gas/ChangeLog:
2020-01-15 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* config/tc-msp430.c (CHECK_RELOC_MSP430): Always generate 430X
relocations when the target is 430X, except when extracting part of an
expression.
(msp430_srcoperand): Adjust comment.
Initialize the expp member of the msp430_operand_s struct as
appropriate.
(msp430_dstoperand): Likewise.
* testsuite/gas/msp430/msp430.exp: Run new test.
* testsuite/gas/msp430/reloc-lo-430x.d: New test.
* testsuite/gas/msp430/reloc-lo-430x.s: New test.
include/ChangeLog:
2020-01-15 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* opcode/msp430.h (enum msp430_expp_e): New.
(struct msp430_operand_s): Add expp member to struct.
ld/ChangeLog:
2020-01-15 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* testsuite/ld-msp430-elf/msp430-elf.exp: Run new test.
* testsuite/ld-msp430-elf/reloc-lo-430x.s: New test.
In commit c9098af41e I over-simplified the sparc target decoding,
missing the fact that prior to that patch sparc-*-freebsd fell through
to the generic *-*-freebsd match.
* configure.tgt: Add sparc-*-freebsd case.
Function symbols of course don't normally want .dynbss copies but
with some old versions of gcc they are needed to copy the function
descriptor. This patch restricts the cases where they are useful to
compilers using dot-symbols, and enables the warning regardless of
whether a PLT entry is emitted in the executable. PLTs in shared
libraries are affected by a .dynbss copy in the executable.
bfd/
PR 25384
* elf64-ppc.c (ELIMINATE_COPY_RELOCS): Update comment.
(ppc64_elf_adjust_dynamic_symbol): Don't allow .dynbss copies
of function symbols unless dot symbols are present. Do warn
whenever one is created, regardles of whether a PLT entry is
also emitted for the function symbol.
ld/
* testsuite/ld-powerpc/ambiguousv1b.d: Adjust expected output.
* testsuite/ld-powerpc/funref.s: Align func_tab.
* testsuite/ld-powerpc/funref2.s: Likewise.
* testsuite/ld-powerpc/funv1.s: Add dot symbols.
PR symtab/12535 points out that gdb.decode_line("") will cause a
valgrind report.
I think the empty linespec does not really make sense. So, this patch
changes gdb.decode_line to treat a whitespace-only linespec the same
as a non-existing argument.
gdb/ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
PR symtab/12535:
* python/python.c (gdbpy_decode_line): Treat empty string the same
as no argument.
gdb/testsuite/ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
PR symtab/12535:
* gdb.python/python.exp: Test decode_line with empty string
argument.
Change-Id: I1d95812b4b7a21d69a3e9afd05b9e3141a931897
I noticed that gdb includes libiberty twice in its link line. I don't
think there's a need for this, so this patch removes one of the
references.
gdb/ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
* Makefile.in (CLIBS): Remove second use of $(LIBIBERTY).
Change-Id: I43bb7100660867081f937c67ea70ff751c62bbfb
This adds a new script that tries to check that none of the support
code uses defines that are not defined by common.m4. This check is
necessarily inexact, but this script caught all the issues fixed in
the previous patches.
gdbsupport/ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
* Makefile.in: Rebuild.
* Makefile.am (check-defines): New target.
* check-defines.el: New file.
Change-Id: I59450e91394d5e6a7fa59e9ab53c95843c4bacd9
This removes the use of <config.h> from the files in gdb/nat/.
gdb/ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
* nat/linux-btrace.c: Don't include <config.h>.
* nat/linux-ptrace.c: Don't include <config.h>.
* nat/x86-linux-dregs.c: Don't include <config.h>.
Change-Id: Ie8c734c54ada848aa020c77ec727704d367eff81
This moves many needed configure checks from gdb and gdbserver into
common.m4. This helps gdbsupport, nat, and target be self-contained.
The result is a bit spaghetti-ish, because gdbsupport uses another m4
file from gdb/. The resulting code is somewhat non-obvious. However,
these problems already exist, so it's not really that much worse than
what is already done.
gdb/ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
* configure.ac: Move many checks to ../gdbsupport/common.m4.
gdb/gdbserver/ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
* configure.ac: Remove any checks that were added to common.m4.
* acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
lib-link.m4.
gdbsupport/ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
* configure, Makefile.in, aclocal.m4, common.m4, config.in:
Rebuild.
* common.m4 (GDB_AC_COMMON): Move many checks from
gdb/configure.ac.
* acinclude.m4: Include bfd.m4, ptrace.m4.
Change-Id: I931eaa94065df268b30a2f1354390710df89c7f8
This patch moves the gdbsupport directory to the top level. This is
the next step in the ongoing project to move gdbserver to the top
level.
The bulk of this patch was created by "git mv gdb/gdbsupport gdbsupport".
This patch then adds a build system to gdbsupport and wires it into
the top level. Then it changes gdb to use the top-level build.
gdbserver, on the other hand, is not yet changed. It still does its
own build of gdbsupport.
ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
* src-release.sh (GDB_SUPPORT_DIRS): Add gdbsupport.
* MAINTAINERS: Add gdbsupport.
* configure: Rebuild.
* configure.ac (configdirs): Add gdbsupport.
* gdbsupport: New directory, move from gdb/gdbsupport.
* Makefile.def (host_modules, dependencies): Add gnulib.
* Makefile.in: Rebuild.
gdb/ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
* nat/x86-linux-dregs.c: Include configh.h.
* nat/linux-ptrace.c: Include configh.h.
* nat/linux-btrace.c: Include configh.h.
* defs.h: Include config.h, bfd.h.
* configure.ac: Don't source common.host.
(CONFIG_OBS, CONFIG_SRCS): Remove gdbsupport files.
* configure: Rebuild.
* acinclude.m4: Update path.
* Makefile.in (SUPPORT, LIBSUPPORT, INCSUPPORT): New variables.
(CONFIG_SRC_SUBDIR): Remove gdbsupport.
(INTERNAL_CFLAGS_BASE): Add INCSUPPORT.
(CLIBS): Add LIBSUPPORT.
(CDEPS): Likewise.
(COMMON_SFILES): Remove gdbsupport files.
(HFILES_NO_SRCDIR): Likewise.
(stamp-version): Update path to create-version.sh.
(ALLDEPFILES): Remove gdbsupport files.
gdb/gdbserver/ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
* server.h: Include config.h.
* gdbreplay.c: Include config.h.
* configure: Rebuild.
* configure.ac: Don't source common.host.
* acinclude.m4: Update path.
* Makefile.in (INCSUPPORT): New variable.
(INCLUDE_CFLAGS): Add INCSUPPORT.
(SFILES): Update paths.
(version-generated.c): Update path to create-version.sh.
(gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
gdbsupport/ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
* common-defs.h: Add GDBSERVER case. Update includes.
* acinclude.m4, aclocal.m4, config.in, configure, configure.ac,
Makefile.am, Makefile.in, README: New files.
* Moved from ../gdb/gdbsupport/
Change-Id: I07632e7798635c1bab389bf885971e584fb4bb78
I noticed that USE_WIN32API is defined separately by gdbserver and
gdb. However, because it is used by code in gdbsupport, it should be
defined by common.m4. This approach ensures that the code will
continue to work when it is moved to the top level.
gdb/ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
* gdbsupport/common.m4 (GDB_AC_COMMON): Define WIN32APILIBS and
USE_WIN32API when needed.
* configure.ac (USE_WIN32API): Don't define.
(WIN32LIBS): Use WIN32APILIBS.
* configure: Rebuild.
gdb/gdbserver/ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
* configure.ac (LIBS): Use WIN32APILIBS.
(USE_WIN32API): Don't define.
* configure: Rebuild.
Change-Id: I40d524d5445ebfb452b36f4d0e102f0b1e1089df
Simon pointed out that the indentation in common.m4 is off. This
patch fixes the problem.
gdb/ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
* gdbsupport/common.m4 (GDB_AC_COMMON): Fix indentation.
gdb/gdbserver/ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
Change-Id: I6a629bd5873cca95ba3e17656f0d0ce583a08361
Previously always the outermost function block was used, but
since skip is now able to skip over inline functions it is more
natural to skip the inline function that the program is currently
executing.
gdb:
2020-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
* skip.c (skip_function_command): Make skip w/o arguments use the
name of the inlined function if pc is inside any inlined function.
gdb/testsuite:
2020-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
* gdb.base/skip-inline.exp: Extend test.
While doing some investigation of mine, i noticed a few typos,
inaccuracies and missing information.
I went ahead and updated/improved those.
gdb/ChangeLog:
2020-01-14 Luis Machado <luis.machado@linaro.org>
* inf-ptrace.c (inf_ptrace_target::resume): Update comments.
* infrun.c (resume_1): Likewise.
(handle_inferior_event): Remove stale comment.
* linux-nat.c (linux_nat_target::resume): Update comments.
(save_stop_reason): Likewise.
(linux_nat_filter_event): Likewise.
* linux-nat.h (struct lwp_info) <stop_pc>, <stop_reason>: Likewise.
PR 25377
gas * config/tc-z80.c: Add support for half precision, single
precision and double precision floating point values.
* config/tc-z80.h b/gas/config/tc-z80.h: Disable string escapes.
* doc/as.texi: Add new z80 command line options.
* doc/c-z80.texi: Document new z80 command line options.
* testsuite/gas/z80/ez80_pref_dis.s: New test.
* testsuite/gas/z80/ez80_pref_dis.d: New test driver.
* testsuite/gas/z80/z80.exp: Run the new test.
* testsuite/gas/z80/fp_math48.d: Use correct command line option.
* testsuite/gas/z80/fp_zeda32.d: Likewise.
* testsuite/gas/z80/strings.d: Update expected output.
opcodes * z80-dis.c (suffix): Use .db instruction to generate double
prefix.
I thought the fuzzers were really going overboard by defining
VMS_DEBUG but that wasn't the case. VMS_DEBUG is defined by
default. Let's not do that, and fix the segv as well.
* vms.h (VMS_DEBUG): Define as 0.
* vms-alpha.c (image_write): Move debug output after bounds check.
Tidy bounds check.
(_bfd_vms_slurp_eihd): Warning fix.
(_bfd_vms_slurp_etir): Init variables to avoid bogus warnings.
I ended up debugging a malformed ELF where a section containing
executable code was not correctly marked as allocatable. Before
realising the ELF was corrupted I tried to place a breakpoint on a
symbol in the non-allocatable, executable section, and GDB crashed.
Though trying to debug such an ELF clearly isn't going to go well I
would prefer, as far as possible, that any input, no matter how
corrupted, not crash GDB.
The crash occurs when trying to set a breakpoint on the name of a
function from the corrupted section. GDB converts the symbol to a
symtab_and_line, and looks up a suitable section for this.
The problem is that the section is actually an obj_section, which is
stored in the table within the objfile, and we only initialise this
table for allocatable sections (see add_to_objfile_sections_full in
objfiles.c). So, if the symbol is in a non-allocatable section then
we end up referencing an uninitialised obj_section.
Later we call get_sal_arch on the symtab_and_line, which calls
get_objfile_arch, which uses the objfile from the uninitialised
obj_section, which will be nullptr, at which point GDB crashes.
The fix I propose here is that when we setup the section references on
msymbols, we should check if the bfd_section being referenced is
allocatable or not. If it is not then we should set the section
reference back to the default 0 section (see how MSYMBOL_OBJ_SECTION
and SYMBOL_OBJ_SECTION treat the 0 section index).
With this fix in place GDB no longer crashes. Instead GDB creates the
breakpoint at the non-allocated address, and then fails, with an
error, when it tries to insert the breakpoint.
gdb/ChangeLog:
* elfread.c (record_minimal_symbol): Set section index to 0 for
non-allocatable sections.
gdb/testsuite/ChangeLog:
* gdb.dwarf2/dw2-bad-elf-other.S: New file.
* gdb.dwarf2/dw2-bad-elf.c: New file.
* gdb.dwarf2/dw2-bad-elf.exp: New file.
Change-Id: Ie05436ab4c6a71440304d20ee639dfb021223f8b
Fixes a bug in the DWARF assembler that prevents multiple line tables
from being created in a test. We currently don't initialise a couple
of flags, as a result we will only ever generate one end of file list,
and one end of header, in the first line table. Any additional line
tables will be missing these parts, and will therefore be corrupt.
This fix will be required for a later commit. There should be no
change in the testsuite after this commit.
gdb/testsuite/ChangeLog:
* lib/dwarf.exp (Dwarf::lines): Reset _line_saw_program and
_line_saw_file.
Change-Id: Id7123f217a036f26ee32d608db3064dd43164596
* Process debug_str_offsets section. Handle DW_AT_str_offsets_base attribute and
keep the value in dwarf2_cu.
* Make addr_base field in dwarf2_cu optional to disambiguate 0 value
(absent or present and 0).
* During parsing, there is no guarantee that DW_AT_str_offsets_base and
DW_AT_rnglists_base fields will be processed before the attributes that need
those values for correct computation. So make two passes, on the first one mark
the attributes that depend on *_base attributes and process only the others.
On the second pass, only process the attributes that are marked on the first
pass.
* For string attributes, differentiate between addresses that directly point to
a string and those that point to an offset in debug_str_offsets section.
* There are now two attributes, DW_AT_addr_base and DW_AT_GNU_addr_base to read
address offset base. Likewise, there are two attributes, DW_AT_rnglists_base
and DW_AT_GNU_ranges_base to read ranges base. Since there is no guarantee which
ones the compiler will generate, create helper functions to handle all cases.
Tested with CC=/usr/bin/gcc (version 8.3.0) against master branch (also with
-gsplit-dwarf and -gdwarf-4 flags) and there was no increase in the set of
tests that fails. (gdb still cannot debug a 'hello world' program with DWARF 5,
so for the time being, this is all we care about).
This is part of an effort to support DWARF-5 in gdb.
Since the data held by the `contents` variable is arbitrary binary data,
it should have gdb_byte elements, not char elements. Also, using
gdb::byte_vector is preferable, since it doesn't unnecessarily
zero-initialize the values.
Instead of adding a cast in the call to m_core_vec->core_read_registers,
I have changed core_read_registers' argument to be a gdb_byte* instead
of a char*.
gdb/ChangeLog:
* gdbcore.h (struct core_fns) <core_read_registers>: Change
core_reg_sect type to gdb_byte *.
* arm-nbsd-nat.c (fetch_elfcore_registers): Likewise.
* cris-tdep.c (fetch_core_registers): Likewise.
* corelow.c (core_target::get_core_register_section): Change
type of `contents` to gdb::byte_vector.
In tui-wingeneral.c:box_win () a comment suggest we should display
titles like this:
+-WINDOW TITLE GOES HERE-+
However, we actually display them like this:
+--WINDOW TITLE GOES HERE+
The former seems nicer to me, so that's what this commit does. Short
titles will appear as:
+-SHORT TITLE------------+
We previously didn't test the horizontal windows borders in the test
suite, however, I've updated things so that we do now check for the
'+-' and '-+' on the upper border, this will give us some protection.
gdb/ChangeLog:
* tui/tui-wingeneral.c (box_win): Position the title in the center
of the border.
gdb/testsuite/ChangeLog:
* lib/tuiterm.exp (Term::_check_box): Check some parts of the top
border.
Change-Id: Iead6910e3b4e68bdf6871f861f23d2efd699faf0
As I was trying to compile gdb for an m68k host, I got this error:
CXX corelow.o
In file included from /binutils-gdb/gdb/gdbsupport/common-defs.h:120,
from /binutils-gdb/gdb/defs.h:28,
from /binutils-gdb/gdb/corelow.c:20:
/binutils-gdb/gdb/corelow.c: In member function 'void core_target::get_core_register_section(regcache*, const regset*, const char*, int, int, const char*, bool)':
/binutils-gdb/gdb/../include/libiberty.h:727:36: error: 'alloca' bound is unknown [-Werror=alloca-larger-than=]
727 | # define alloca(x) __builtin_alloca(x)
| ~~~~~~~~~~~~~~~~^~~
/binutils-gdb/gdb/corelow.c:625:23: note: in expansion of macro 'alloca'
625 | contents = (char *) alloca (size);
| ^~~~~~
We are using alloca to hold the contents of a the core register
sections. These sections are typically fairly small, but there is no
realy guarantee, so I think it would be more reasonable to just use
dynamic allocation here.
gdb/ChangeLog:
* corelow.c (core_target::get_core_register_section): Use
std::vector instead of alloca.
The dat files in regformats/i386 were removed a while ago, this rule is
no longer necessary.
gdb/gdbserver/ChangeLog:
* Makefile.in (%-generated.c): Remove rule for files from
regformats/i386.
Now that most warnings of this kind are fixed, we can enable
-Wmissing-declarations. I say "most", because it is likely that there
are some more in some configurations I am not able to build, but they
should be pretty easy to fix.
gdb/ChangeLog:
* warning.m4: Add -Wmissing-declarations to build_warnings.
* configure: Re-generate.
gdb/gdbserver/ChangeLog:
* configure: Re-generate.
Change-Id: Iae9b59f22eb5dd1965d09f34c5c9e212cddf67ba
Fixing the -Wmissing-declarations errors in gdbserver's tracepoint.c is
a bit tricky, because some functions are compiled for both gdbserver, in
which case they should be static, since they are only used in that file,
and for libinproctrace.so, in which case they should be externally
visible, since they need to be looked up. In the case where they are
externally visible, -Wmissing-declarations requires that a declaration
exists (that's the point of the warning).
I've reused the IP_AGENT_EXPORT_FUNC macro to mark the functions as
static when compiled for gdbserver. Some seemingly unnecessary
declarations are added for when compiling libinproctrace.so (thanks to
Tom for the suggestion).
gdb/gdbserver/ChangeLog:
* tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
Define to static.
* tracepoint.c (stop_tracing, flush_trace_buffer,
about_to_request_buffer_space, get_trace_state_variable_value,
set_trace_state_variable_value, gdb_collect): Add declaration.
Change-Id: If9c66151bd00c3b9c5caa27a7c21c5a3a952de2a
These functions are only used in this file, so should be static.
gdb/gdbserver/ChangeLog:
* linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
static.
Change-Id: I703da41867735aefadd49140e80cd60f6ab9ad39
So that the definitions of get_inferior_cwd/set_inferior_cwd see their
declarations.
CXX inferiors.o
/home/smarchi/src/binutils-gdb/gdb/gdbserver/inferiors.c: In function ‘const char* get_inferior_cwd()’:
/home/smarchi/src/binutils-gdb/gdb/gdbserver/inferiors.c:228:1: error: no previous declaration for ‘const char* get_inferior_cwd()’ [-Werror=missing-declarations]
get_inferior_cwd ()
^~~~~~~~~~~~~~~~
/home/smarchi/src/binutils-gdb/gdb/gdbserver/inferiors.c: In function ‘void set_inferior_cwd(const char*)’:
/home/smarchi/src/binutils-gdb/gdb/gdbserver/inferiors.c:236:1: error: no previous declaration for ‘void set_inferior_cwd(const char*)’ [-Werror=missing-declarations]
set_inferior_cwd (const char *cwd)
^~~~~~~~~~~~~~~~
gdb/gdbserver/ChangeLog:
* inferiors.c: Include gdbsupport/common-inferior.h.
Change-Id: Iae5ccb3e1dc37ce79f03f08465f603a0411e7af0
... so that the definition of hostio_last_error_from_errno in hostio-errno.c
sees the declaration in hostio.h.
Fix this error:
CXX hostio-errno.o
/home/smarchi/src/binutils-gdb/gdb/gdbserver/hostio-errno.c: In function ‘void hostio_last_error_from_errno(char*)’:
/home/smarchi/src/binutils-gdb/gdb/gdbserver/hostio-errno.c:28:1: error: no previous declaration for ‘void hostio_last_error_from_errno(char*)’ [-Werror=missing-declarations]
hostio_last_error_from_errno (char *buf)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
gdb/gdbserver/ChangeLog:
* hostio-errno.c: Include hostio.h.
Change-Id: I056308fd4ce12810d0a1b826c423bd0c7eeb8944
When I try to enable -Wmissing-declarations, I get this error:
CXX python/python.o
/home/smarchi/src/binutils-gdb/gdb/python/python.c: In function ‘PyObject* init__gdb_module()’:
/home/smarchi/src/binutils-gdb/gdb/python/python.c:1582:1: error: no previous declaration for ‘PyObject* init__gdb_module()’ [-Werror=missing-declarations]
init__gdb_module (void)
^~~~~~~~~~~~~~~~
Prevent it by providing a declaration just before the definition.
gdb/ChangeLog:
* python/python.c (init__gdb_module): Add declaration.
Change-Id: I394bc691b7db624708cc4cb2cda28a56ab85a82b
When compiling gdbserver for an architecture that uses the regdat.sh
script (such as m68k) and the -Wmissing-declarations compiler flag, I
get:
REGDAT reg-m68k-generated.c
CXX reg-m68k.o
reg-m68k-generated.c:30:1: error: no previous declaration for 'void init_registers_m68k()' [-Werror=missing-declarations]
30 | init_registers_m68k (void)
| ^~~~~~~~~~~~~~~~~~~
The same happens with other architectures, such as s390, but I'll be
using 68k as an example.
The init_registers_m68k function is defined in reg-m68k-generated.c,
which is produced by the regformats/regdat.sh script. This script reads
the regformats/reg-m68k.dat file, containing a register description, and
produces C code that creates a corresponding target description at
runtime.
The init_registers_m68k function is invoked at initialization time in
linux-m68k-low.c. The function must therefore be non-static, but does
not have a declaration at the moment.
The real clean way of fixing this would be to make regdat.sh generate a
.h file (in addition to the .c file) with declarations for whatever is
in the .c file. The generated .c file would include the .h file, and
therefore the definition would have a corresponding declaration. The
linux-m68k-low.c file would also include this .h file, instead of having
its own declaration of init_registers_m68k, like it does now.
However, this would be a quite big change for not much gain. As far as
I understand, some common architectures (i386, x86-64, ARM, AArch64)
have been moved to dynamically building target descriptions based on
features (the linux-*-tdesc.c files in gdbserver) and don't use
regdat.sh anymore. Logically (and given infinite development
resources), the other architectures would be migrated to this system too
and the regdat.sh script would be dropped. A new architecture would
probably not use regdat.sh either. So I therefore propose this simpler
patch instead, which just adds a local declaration in the generated
file.
gdb/ChangeLog:
* regformats/regdat.sh: Generate declaration for init function.
The intent of the rules modified by this patch is that the *-generated.c
files generated by regdat.sh are re-generated in the event that
regdat.sh is modified. However, if I build, touch regdat.sh, and build
again, the files are not re-generated during the second build.
This is because regdat.sh is specified as an order-only dependency [1],
after the pipe. Make therefore only ensures that regdat.sh exists
before generating the target file, it doesn't check the timestamp of
regdat.sh.
This patch changes it to be a regular prerequisite.
The rules use the $< variable, which is substituted by the first
prerequisite only, so the command lines won't change.
[1] https://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html
gdb/gdbserver/ChangeLog:
* Makefile.in (%-generated.c): Make $(regdat_sh) a regular
prerequisite.
The remote-sim.c file doesn't build since the main multi-target patch
(5b6d1e4f, "Multi-target support"), this patch is an attempt to fix it.
I have only build-tested it, so I'm not sure it runs fine, but it should
get us close at least.
I made these functions methods of the gdbsim_target, because they need
to pass the target down to some GDB core functions, like
find_inferior_ptid:
- get_sim_inferior_data_by_ptid (renamed to get_inferior_data_by_ptid)
- gdbsim_resume_inferior (renamed to resume_one_inferior)
- gdbsim_close_inferior (renamed to close_one_inferior)
In the last two, I changed iterate_over_inferiors to a range-based for,
since that gives simpler code (no need to pass data through the void
pointer).
The next_pid variable, INITIAL_PID macro and sim_inferior_data structure
are simply moved up in the file, above gdbsim_target.
gdb/ChangeLog:
* remote-sim.c (next_pid, INITIAL_PID, sim_inferior_data): Move
up.
(gdbsim_target) <get_inferior_data_by_ptid, resume_one_inferior,
close_one_inferior>: New methods.
(get_sim_inferior_data_by_ptid): Move to gdbsim_target,
pass down target to find_inferior_pid.
(gdbsim_target::fetch_registers, gdbsim_target::store_registers):
Pass down target to find_inferior_ptid.
(gdbsim_target::create_inferior): Pass down target to
add_thread_silent.
(gdbsim_close_inferior): Move to gdbsim_close_inferior, pass
target down to find_inferior_ptid and switch_to_thread.
(gdbsim_target::close): Update to call close_one_inferior.
(struct resume_data): Remove.
(gdbsim_resume_inferior): Move to gdbsim_target. Take arguments
directly, rather than through a void pointer.
(gdbsim_target::resume): Update to call resume_one_inferior.
There are no instructions under these matrix multiply extensions that
can be used without having SVE enabled.
Since these extensions require SVE, we make that explicit in the options
table.
Tested on aarch64-none-elf without regressions.
gas/ChangeLog:
2020-01-13 Matthew Malcomson <matthew.malcomson@arm.com>
* config/tc-aarch64.c (f64mm, f32mm): Add sve as a feature
dependency.
binutils* objdump.c (visualize_jumps, color_output, extended_color_output)
(detected_jumps): New variables.
(usage): Add the new jump visualization options.
(option_values): Add new option value.
(long_options): Add the new option.
(jump_info_new, jump_info_free): New functions.
(jump_info_min_address, jump_info_max_address): Likewise.
(jump_info_end_address, jump_info_is_start_address): Likewise.
(jump_info_is_end_address, jump_info_size): Likewise.
(jump_info_unlink, jump_info_insert): Likewise.
(jump_info_add_front, jump_info_move_linked): Likewise.
(jump_info_intersect, jump_info_merge): Likewise.
(jump_info_sort, jump_info_visualize_address): Likewise.
(disassemble_jumps): New function - used to locate jumps.
(disassemble_bytes): Add ascii art generation.
(disassemble_section): Add scan to locate jumps.
(main): Parse the new visualization option.
* doc/binutils.texi: Document the new feature.
* NEWS: Mention the new feature.
opcodes * arm-dis.c (print_insn_arm): Fill in insn info fields for control
flow instructions.
(print_insn_thumb16, print_insn_thumb32): Likewise.
(print_insn): Initialize the insn info.
* i386-dis.c (print_insn): Initialize the insn info fields, and
detect jumps.
xxxx-xx-xx Claudiu Zissulescu <claziss@synopsys.com>
* elfarcv2.sc : Allow interrupt vector table to be located at an
arbitrary address. Use DWARF.sc file.
* elfarc.sc: Use DWARF.sc file.
ACCL/ACCH register names are only available for ARCv2 architecture,
leading to a confusion when disassembling for any other ARC
variants. This patch is changing the default names for ACCL/ACCH to
generic r58/r59.
2012-01-13 Claudiu Zissulescu <claziss@gmail.com>
* opcode/arc-dis.c (regnames): Correct ACCL/ACCH naming, fix typo
reserved register name.