GDB Administrator [Tue, 18 Oct 2016 00:00:21 +0000 (00:00 +0000)]
Automatic date update in version.in
Simon Marchi [Mon, 17 Oct 2016 21:05:46 +0000 (17:05 -0400)]
Fix duplicate test message in mi-trace-save.exp
gdb/testsuite/ChangeLog:
* gdb.trace/mi-trace-save.exp (test_trace_save_wrong_num_args):
Change test message.
Simon Marchi [Mon, 17 Oct 2016 20:54:24 +0000 (16:54 -0400)]
Fix comment in mi-trace-save.exp
This fixes a comment I forgot to update in the previous patch.
gdb/testsuite/ChangeLog:
* gdb.trace/mi-trace-save.exp (test_trace_save_wrong_num_args):
Update comment.
Simon Marchi [Mon, 17 Oct 2016 20:47:36 +0000 (16:47 -0400)]
Fix -trace-save crash when argument is missing
-trace-save doesn't check whether an argument is passed, leading to a
segfault if you pass nothing.
I added a small test, which only tests the error conditions of
-trace-save.
gdb/ChangeLog:
* mi/mi-main.c (mi_cmd_trace_save): Check if argument is present
before using it.
gdb/testsuite/ChangeLog:
* gdb.trace/mi-trace-save.exp: New file.
Pedro Alves [Mon, 17 Oct 2016 16:13:26 +0000 (17:13 +0100)]
gdb: Fix phony iconv build
Cross building gdb for mingw32 on Fedora 23 fails with:
x86_64-w64-mingw32-g++ -g -O2 [...] ../../src/gdb/charset.c
In file included from ../../src/gdb/charset.c:21:0:
../../src/gdb/charset.h:134:3: error: 'iconv_t' does not name a type
iconv_t m_desc;
^
../../src/gdb/charset.c: In constructor 'wchar_iterator::wchar_iterator(const gdb_byte*, size_t, const char*, size_t)':
../../src/gdb/charset.c:600:3: error: 'm_desc' was not declared in this scope
m_desc = iconv_open (INTERMEDIATE_ENCODING, charset);
^
../../src/gdb/charset.c: In destructor 'wchar_iterator::~wchar_iterator()':
../../src/gdb/charset.c:607:7: error: 'm_desc' was not declared in this scope
if (m_desc != (iconv_t) -1)
^
../../src/gdb/charset.c: In member function 'int wchar_iterator::iterate(wchar_iterate_result*, gdb_wchar_t**, const gdb_byte**, size_t*)':
../../src/gdb/charset.c:633:25: error: 'm_desc' was not declared in this scope
size_t r = iconv (m_desc, &inptr, &m_bytes, &outptr, &out_avail);
^
This is a regression caused by commit
cda6c55bd399 (Turn wchar
iterator into a class). The problem is that iconv_t is now exposed in
gdb/charset.h, while before it was only used in gdb/charset.c.
gdb/charset.c, under #ifdef PHONY_ICONV, does:
#undef iconv_t
#define iconv_t int
So it seems the simplest is to use 'int' in the header file too.
gdb/ChangeLog:
2016-10-17 Pedro Alves <palves@redhat.com>
* charset.h (class wchar_iterator) [PHONY_ICONV] <m_desc>: Use
'int' as type.
Cupertino Miranda [Mon, 17 Oct 2016 14:45:57 +0000 (16:45 +0200)]
Fixed matching in newly added test.
gas/ChangeLog:
2016-10-17 Cupertino Miranda <cmiranda@synopsys.com>
* testsuite/arc/dis-inv.d: Fixed target match.
Nick Clifton [Mon, 17 Oct 2016 14:29:43 +0000 (15:29 +0100)]
Display unknown notes. Decode NT_GNU_HWCAP notes.
* readelf.c (apply_relocations): Fail if the symbol table section
linked to by the reloc section does not have either the SHT_SYMTAB
or SHT_DYNSYM type.
(print_gnu_note): Decode the contents of NT_GNU_HWCAP notes.
Print the contents of unknown note types.
(process_note): Add the file and section to the parameter list.
Use print_symbol to display the note name.
Display the contents of unknown note types.
(process_corefile_note_segment): Rename to process_notes_at.
Add section parameter. Apply relocations to the notes when
loading from a section. Display section name when processing
notes in a section.
* testsuite/binutils-all/readelf.n: Update expected output.
Cupertino Miranda [Wed, 21 Sep 2016 11:07:46 +0000 (12:07 +0100)]
Removed pseudo invalid instructions opcodes.
The disassember was generating invXXX instructions for cases when in reality we
had llockd or scondd instrutions.
opcodes/ChangeLog:
Cupertino Miranda <cmiranda@synopsys.com>
arc-tbl.h: Removed any "inv.+" instructions from the table.
gas/ChangeLog:
Cupertino Miranda <cmiranda@synopsys.com>
testsuite/arc/dis-inv.s: Test to validate patch.
testsuite/arc/dis-inv.d: Likewise.
Nick Clifton [Mon, 17 Oct 2016 10:46:32 +0000 (11:46 +0100)]
Update list of ELF machine numbers.
include * elf/common.h (DT_SYMTAB_SHNDX): Define.
(EM_CLOUDSHIELD, EM_COREA_1ST, EM_COREA_2ND, EM_OPEN8): Define.
(EM_VIDEOCORE5, EM_56800EX, EM_BA1, EM_BA2, EM_XCORE): Define.
(EM_MCHP_PIC, EM_KM32, EM_KMX32, EM_KMX16, EM_KMX8): Define.
(EM_KVARC, EM_CDP, EM_COGE, EM_COOL, EM_NORC): Define.
(EM_CSR_KALIMBA, EM_Z80, EM_AMDGPU, EM_RISCV): Define.
(ELFOSABI_OPENVOS): Define.
(GRP_MASKOS, GRP_MASKPROC): Define.
binutils * readelf.c (get_dynamic_type): Add DT_SYMTAB_SHNDX.
(get_machine_type): Add EM_CLOUDSHIELD, EM_COREA_1ST,
EM_COREA_2ND, EM_OPEN8, EM_VIDEOCORE5, EM_56800EX, EM_BA1, EM_BA2,
EM_XCORE, EM_MCHP_PIC, EM_KM32, EM_KMX32, EM_KMX16, EM_KMX8,
EM_KVARC, EM_CDP, EM_COGE, EM_COOL, EM_NORC, EM_CSR_KALIMBA,
EM_Z80, EM_AMDGPU, EM_RISCV.
(get_osabi_name): Add ELFOSABI_CLOUDABI and ELFOSABI_OPENVS.
(get_group_flags): Update to handle flags in the
GRP_MASKOS and GRP_MASKPROC ranges.
Nick Clifton [Mon, 17 Oct 2016 09:26:56 +0000 (10:26 +0100)]
Sync libiberty sources with gcc mainline.
2016-09-19 Andrew Stubbs <ams@codesourcery.com>
* pex-win32.c (argv_to_cmdline): Quote zero-length parameters.
* testsuite/test-pexecute.c (main): Insert check for zero-length parameters.
2016-09-10 Mark Wielaard <mjw@redhat.com>
* cp-demangle.c (d_substitution): Change struct demangle_component
variable name from c to dc.
2016-08-12 Marek Polacek <polacek@redhat.com>
PR c/7652
* cp-demangle.c (d_print_mod): Add FALLTHRU.
2016-08-04 Marcel B?hme <boehme.marcel@gmail.com>
PR c++/71696
* cplus-dem.c: Prevent infinite recursion when there is a cycle
in the referencing of remembered mangled types.
(work_stuff): New stack to keep track of the remembered mangled
types that are currently being processed.
(push_processed_type): New method to push currently processed
remembered type onto the stack.
(pop_processed_type): New method to pop currently processed
remembered type from the stack.
(work_stuff_copy_to_from): Copy values of new variables.
(delete_non_B_K_work_stuff): Free stack memory.
(demangle_args): Push/Pop currently processed remembered type.
(do_type): Do not demangle a cyclic reference and push/pop
referenced remembered type.
GDB Administrator [Mon, 17 Oct 2016 00:00:21 +0000 (00:00 +0000)]
Automatic date update in version.in
GDB Administrator [Sun, 16 Oct 2016 00:00:20 +0000 (00:00 +0000)]
Automatic date update in version.in
Alan Modra [Sat, 15 Oct 2016 01:54:54 +0000 (12:24 +1030)]
Regenerate spu_ovl.o_c
No real changes here. This is just so that we match current spu_ovl.o
with .shstrtab moved.
* emultempl/spu_ovl.o_c: Regenerate.
GDB Administrator [Sat, 15 Oct 2016 00:00:19 +0000 (00:00 +0000)]
Automatic date update in version.in
Pedro Alves [Fri, 14 Oct 2016 16:03:16 +0000 (17:03 +0100)]
FINAL/OVERRIDE: Define to empty on g++ < 4.7
final/override were only implemented in g++ 4.7.
include/ChangeLog
2016-10-14 Pedro Alves <palves@redhat.com>
* ansidecl.h [__cplusplus >= 201103 && GCC_VERSION < 4007] (FINAL,
OVERRIDE): Define as empty.
[__cplusplus < 201103 && GCC_VERSION < 4007] (FINAL): Define as
__final.
[__cplusplus < 201103 && GCC_VERSION >= 4007] (OVERRIDE): Define as
empty.
Pedro Alves [Fri, 14 Oct 2016 16:03:16 +0000 (17:03 +0100)]
Move OVERRIDE/FINAL from gcc/coretypes.h to include/ansidecl.h
So that GDB and other projects that share the top level can use them.
Bootstrapped with all default languages + jit on x86-64 Fedora 23.
gcc/ChangeLog:
2016-10-14 Pedro Alves <palves@redhat.com>
* coretypes.h (OVERRIDE, FINAL): Delete, moved to
include/ansidecl.h.
include/ChangeLog:
2016-10-14 Pedro Alves <palves@redhat.com>
* ansidecl.h (GCC_FINAL): Delete.
(OVERRIDE, FINAL): New, moved from gcc/coretypes.h.
Simon Marchi [Fri, 14 Oct 2016 15:39:17 +0000 (11:39 -0400)]
Fix typos in trace commands doc
gdb/doc/ChangeLog:
* gdb.texinfo (Using Trace Files): Fix typo.
(GDB/MI Tracepoint Commands): Likewise.
Simon Marchi [Fri, 14 Oct 2016 15:39:16 +0000 (11:39 -0400)]
Document -ctf switch of -trace-save
The -trace-save MI command supports saving the trace in the CTF format,
as its CLI counterpart, but it's not documented.
gdb/doc/ChangeLog:
* gdb.texinfo (GDB/MI Tracepoint Commands): Document -ctf switch
of -trace-save.
Luis Machado [Fri, 14 Oct 2016 14:04:46 +0000 (09:04 -0500)]
Fix leftover remote test failures from PR binutils/19020
As pointed out in PR binutils/19020, those tests were still failing when doing
remote testing. This is because the binary files weren't being copied over to
the remote host for testing.
FAIL: binutils-all/pr19020a
FAIL: binutils-all/pr19020b
This small patch fixes this up to make things pass.
binutils/ChangeLog:
2016-10-14 Luis Machado <lgustavo@codesourcery.com>
* testsuite/lib/utils-lib.exp (run_dump_test): Call remote_download
to copy file to remote host.
Ulrich Weigand [Fri, 14 Oct 2016 13:04:04 +0000 (15:04 +0200)]
Fix set sysroot command on AIX
set sysroot command on AIX has no effect if a program depends on shared
library archives (.a). Fixed by using solib_find and solib_bfd_fopen
instead of gdb_bfd_open in solib_aix_bfd_open.
gdb/
2016-10-14 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
Ulrich Weigand <uweigand@de.ibm.com>
* solib-aix.c (solib_aix_bfd_open): Call solib_find so that sysroot
path is set properly if program has a dependency on .a archive and
sysroot is set via set sysroot command.
Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Alan Modra [Fri, 14 Oct 2016 10:47:54 +0000 (21:17 +1030)]
Add separate debug info file section
* scripttempl/DWARF.sc: Add .debug_addr.
Claudiu Zissulescu [Thu, 13 Oct 2016 13:01:19 +0000 (15:01 +0200)]
[ARC] Disassembler: fix LIMM detection for short instructions.
The ARC (short) instructions are using a special register number to
indicate is the instruction uses a long immediate (LIMM). In the case
of short instruction, this LIMM indicator depends on the ISA version
used. Thus, for ARCv1 processors, the LIMM indicator is 0x3E, the same
value used in "long" instructions. However, for the ARCv2 processors,
this LIMM indicator is 0x1E.
This patch fixes the LIMM detection for ARCv1 ISA and adds two tests.
gas/
2016-10-13 Claudiu Zissulescu <claziss@synopsys.com>
* testsuite/gas/arc/shortlimm_a7.d: New file.
* testsuite/gas/arc/shortlimm_a7.s: Likewise.
* testsuite/gas/arc/shortlimm_hs.d: Likewise.
* testsuite/gas/arc/shortlimm_hs.s: Likewise.
include/
2016-10-13 Claudiu Zissulescu <claziss@synopsys.com>
* opcode/arc.h (ARC_OPCODE_ARCV2): New define.
opcodes/
2016-10-13 Claudiu Zissulescu <claziss@synopsys.com>
* arc-dis.c (find_format_from_table): Discriminate LIMM indicator
usage on ISA basis.
Markus Metzger [Thu, 13 Oct 2016 14:09:41 +0000 (16:09 +0200)]
btrace: remove leftover comment
Remove a leftover comment on a function that was removed with commit
0568462bbf0f666d5bf9f720e16147da71eec46a.
Eli Zaretskii [Fri, 14 Oct 2016 07:08:25 +0000 (10:08 +0300)]
Include strings.h where available
gdb/ChangeLog
2016-10-14 Eli Zaretskii <eliz@gnu.org>
* common/common-defs.h [HAVE_STRINGS_H]: Include strings.h if
available, to get prototypes of 'strcasecmp' and 'strncasecmp'.
GDB Administrator [Fri, 14 Oct 2016 00:00:22 +0000 (00:00 +0000)]
Automatic date update in version.in
Pedro Alves [Thu, 13 Oct 2016 16:59:26 +0000 (17:59 +0100)]
ARI: Remove true/false checks
These don't make sense with C++.
gdb/ChangeLog:
2016-10-13 Pedro Alves <palves@redhat.com>
* contrib/ari/gdb_ari.sh (boolean): Suggest bool instead.
(false, true): Remove checks.
Yao Qi [Thu, 13 Oct 2016 15:08:17 +0000 (16:08 +0100)]
Share proc get_var_address
This patch moves proc get_var_address into lib/gdb.exp, and remove the
duplicate copy in gdb.base/*.exp files.
gdb/testsuite:
2016-10-13 Yao Qi <yao.qi@linaro.org>
* gdb.base/code_elim.exp (get_var_address): Remove.
* gdb.base/relocate.exp: Likewise.
* gdb.base/shreloc.exp: Likewise.
* lib/gdb.exp (get_var_address): New.
Yao Qi [Thu, 13 Oct 2016 10:10:25 +0000 (11:10 +0100)]
Skip testing structures with floating points
This patch skips some tests related to floating point in structs.exp
if gdb_skip_float_test return false.
gdb/testsuite:
2016-10-13 Yao Qi <yao.qi@linaro.org>
* gdb.base/structs.exp: Invoke gdb_skip_float_test, and do
floating point tests if $skip_float_test is false.
Tom Tromey [Sun, 25 Sep 2016 03:28:52 +0000 (21:28 -0600)]
Use std::string in macho_symfile_read_all_oso
This changes macho_symfile_read_all_oso to use std::string. This
avoids a cleanup.
2016-10-12 Tom Tromey <tom@tromey.com>
* machoread.c (macho_symfile_read_all_oso): Use std::string.
Tom Tromey [Sun, 25 Sep 2016 03:14:14 +0000 (21:14 -0600)]
Remove unnecessary null_cleanup
This patch removes an unnecessary null_cleanup.
2016-10-12 Tom Tromey <tom@tromey.com>
* tracepoint.c (trace_dump_command): Remove unnecessary
null_cleanup.
Tom Tromey [Fri, 23 Sep 2016 03:16:53 +0000 (21:16 -0600)]
Turn wchar iterator into a class
This changes wchar_iterator from charset.c into a real C++ class, then
updates the users to use the class. This lets us remove some cleanups
in favor of the class' destructor.
2016-10-12 Tom Tromey <tom@tromey.com>
* valprint.c (generic_emit_char, count_next_character)
(generic_printstr): Update.
* charset.c (struct wchar_iterator): Move to charset.h.
(wchar_iterator::wchar_iterator): Rename from
make_wchar_iterator, turn into a constructor.
(wchar_iterator::~wchar_iterator): Rename from
do_cleanup_iterator, turn into a destructor.
(make_cleanup_wchar_iterator): Remove.
(wchar_iterator::iterate): Rename from wchar_iterate. Remove
"iter" argument. Update.
* charset.h: Include <vector>.
(class wchar_iterator): New class, from old struct
wchar_iterator.
(make_wchar_iterator, make_cleanup_wchar_iterator): Don't
declare.
Tom Tromey [Fri, 23 Sep 2016 03:32:03 +0000 (21:32 -0600)]
Change selttest.c to use use std::vector
This patch changes selftest.c to use std::vector rather than VEC.
I think this is a small net plus.
2016-10-12 Tom Tromey <tom@tromey.com>
* selftest.c: Include <vector>, not "vec.h".
(self_test_function_ptr): Remove.
(tests): Now a std::vector.
(register_self_test, run_self_tests): Update.
Pedro Alves [Thu, 13 Oct 2016 00:54:07 +0000 (01:54 +0100)]
Convert tid_range_parser and get_number_or_range to classes
This converts tid_range_parser and get_number_or_range to be classes.
The various tid_range_parser_* and get_number_or_range_* functions
become methods on the respective classes. Then it updates the users
to follow.
The rationale for the change is that this provides better
encapsulation. For example, this forced me to think of a better
interface between tid_range_parser and get_number_or_range, since the
former peeked into the latter's internals a bit too much. That ended
up resulting mostly in these two not-just-straight-1-1 changes:
void
-tid_range_parser_skip (struct tid_range_parser *parser)
+tid_range_parser::skip_range ()
{
...
- tid_range_parser_init (parser, parser->range_parser.end_ptr,
- parser->default_inferior);
+ m_range_parser.skip_range ();
+ init (m_range_parser.string (), m_default_inferior);
}
and:
/* If we successfully parsed a thread number or finished parsing a
thread range, switch back to assuming the next TID is
inferior-qualified. */
- if (parser->range_parser.end_ptr == NULL
- || parser->range_parser.string == parser->range_parser.end_ptr)
+ if (!m_range_parser.in_range ())
{
For the same reason (encapsulation), this moves the enum
tid_range_state definition to within the tid_parser class's scope,
since that is private implementation detail.
While at it, switch to use "bool" for booleans.
gdb/ChangeLog:
2016-10-13 Pedro Alves <palves@redhat.com>
Tom Tromey <tom@tromey.com>
* tid-parse.h (tid_range_parser): New class.
(enum tid_range_state): Move into tid_range_parser's scope.
Remove TID_RANGE_ prefix from all values.
(tid_range_parser_get_tid, tid_range_parser_get_tid_range)
(tid_range_parser_star_range, tid_range_parser_finished)
(tid_range_parser_skip, tid_range_parser_qualified): Don't
declare.
(tid_is_in_list): Update comment.
* tid-parse.c (tid_range_parser::tid_range_parser): New.
(init, finished, get_string, skip, tid_is_qualified)
(get_tid_or_range, get_tid_range, get_tid, star_range): Rename;
turn into methods.
(tid_is_in_list): Adjust.
* cli/cli-utils.h (number_or_range_parser): New class.
(init_number_or_range, get_number_or_range)
(number_range_setup_range): Don't declare.
* cli/cli-utils.c
(number_or_range_parser::number_or_range_parser): New.
(init_number_or_range, get_number_or_range)
(number_range_setup_range): Rename; turn into methods.
(number_is_in_list): Adjust.
* breakpoint.c (map_breakpoint_numbers): Adjust. Use bool.
(trace_pass_command, get_tracepoint_by_number): Adjust.
* breakpoint.h (get_tracepoint_by_number): Adjust.
* inferior.c (detach_inferior_command, kill_inferior_command)
(remove_inferior_command): Adjust.
* linespec.c (decode_line_2): Adjust.
* memattr.c (mem_enable_command, mem_disable_command)
(mem_delete_command): Adjust.
* printcmd.c (map_display_numbers): Adjust.
* reverse.c (delete_bookmark_command, bookmarks_info): Adjust.
* thread.c (thread_apply_command): Adjust.
GDB Administrator [Thu, 13 Oct 2016 00:00:20 +0000 (00:00 +0000)]
Automatic date update in version.in
Luis Machado [Wed, 12 Oct 2016 15:10:03 +0000 (10:10 -0500)]
Fixup gdb.python/py-value.exp for bare-metal aarch64-elf
I noticed that testing aarch64-elf gdb with a physical board
ran into issues with gdb.python/py-value.exp. Further investigation showed
that we were actually trying to dereference a NULL pointer (argv) when trying
to access argv[0].
Being bare-metal, argv is not guaranteed to be valid. So we need to make sure
argv is sane before accessing argv[0].
The following patch fixes up the test program to check for a NULL argv and also
improves the testcase a bit so it doesn't have to work with a hardcoded argc
value.
Regression-tested on x86-64 Ubuntu 16.04.
gdb/testsuite/ChangeLog:
2016-10-12 Luis Machado <lgustavo@codesourcery.com>
* gdb.python/py-value.c (main): Check if argv is NULL before using it.
* gdb.python/py-value.exp (test_value_in_inferior): Don't use hardcoded
argc values.
Add 1 to argc so we guarantee distinct initial/modified argc values.
Anton Kolesov [Wed, 12 Oct 2016 11:36:44 +0000 (14:36 +0300)]
arc: Add support for Newlib
Add support for Newlib as an OS/ABI. The only thing that is specific to it
relatively to "generic" baremetal target is location of PC register in jump
buffer for longjump support.
Sniffer uses .ivt section to decide if ELF file is for ARC Newlib or not.
gdb/ChangeLog:
* arc-newlib-tdep.c: New file.
* configure.tgt: Add newlib support for ARC.
Anton Kolesov [Wed, 12 Oct 2016 11:36:44 +0000 (14:36 +0300)]
arc: Add evaluation of long jump targets
Standard get_longjmp_target implementation, similar to what is in arm-tdep.c.
Actual value of jb_pc should be set in init_osabi methods of particular OS/ABI
implementations.
gdb/ChangeLog:
* arc-tdep.h (struct gdbarch_tdep) <jb_pc>: New field.
* arc-tdep.c (arc_get_longjmp_target): New function.
(arc_gdbarch_init): Set get_longjmp_target if jb_pc is non-negative.
(arc_dump_tdep): Print jb_pc.
Anton Kolesov [Wed, 12 Oct 2016 11:36:44 +0000 (14:36 +0300)]
arc: Add a gdbarch_tdep structure
Add target-specific structure gdbarch_tdep for ARC.
gdb/ChangeLog:
* arc-tdep.h (struct gdbarch_tdep): New.
* arc-tdep.c (arc_gdbarch_init): Allocate gdbarch_tdep.
Yao Qi [Tue, 11 Oct 2016 11:12:46 +0000 (12:12 +0100)]
[AArch64] Track FP registers in prologue analyzer
We don't track FP registers in aarch64 prologue analyzer, so this causes
an internal error when FP registers are saved by "stp" instruction in
prologue (stp d8, d9, [sp,#128]),
tbreak _Unwind_RaiseException^M
aarch64-tdep.c:335: internal-error: CORE_ADDR aarch64_analyze_prologue(gdbarch*, CORE_ADDR, CORE_ADDR, aarch64_prologue_cache*): Assertion `inst.operands[0].type == AARCH64_OPND_Rt' failed.^M
A problem internal to GDB has been detected,
This patch teaches GDB to track FP registers (D registers) in prologue
analyzer.
gdb:
2016-10-12 Yao Qi <yao.qi@linaro.org>
PR tdep/20682
* aarch64-tdep.c: Replace 32 with AARCH64_D_REGISTER_COUNT.
(aarch64_analyze_prologue): Extend array 'regs' for D registers.
Assert that operand 0 and 1 can be X or D registers. Update
register number for D registers. Update registers in frame
cache.
* aarch64-tdep.h (AARCH64_D_REGISTER_COUNT): New macro.
GDB Administrator [Wed, 12 Oct 2016 00:00:19 +0000 (00:00 +0000)]
Automatic date update in version.in
Alan Modra [Tue, 11 Oct 2016 23:22:53 +0000 (09:52 +1030)]
missing changelog entry
Alan Modra [Tue, 11 Oct 2016 23:11:33 +0000 (09:41 +1030)]
BFD_FAKE_SECTION macro params
Order NAME, IDX, FLAGS as per STD_SECTION macro.
* section.c (BFD_FAKE_SECTION): Reorder parameters. Formatting.
(STD_SECTION): Adjust to suit.
* elf.c (_bfd_elf_large_com_section): Likewise.
* bfd-in2.h: Regenerate.
Alan Modra [Tue, 11 Oct 2016 23:01:24 +0000 (09:31 +1030)]
Update more tests for objdump change
* testsuite/ld-i386/pr19636-1d-nacl.d: Adjust for objdump change.
* testsuite/ld-i386/pr19636-2c-nacl.d: Likewise.
* testsuite/ld-tic6x/shlib-1r.dd: Likewise.
* testsuite/ld-x86-64/plt-nacl.pd: Likewise.
* testsuite/ld-x86-64/pr19636-2d-nacl.d: Likewise.
Jan Kratochvil [Tue, 11 Oct 2016 17:09:05 +0000 (19:09 +0200)]
testsuite: Fix gdb.arch/powerpc-prologue.c compilation
gcc-6.2.1
gdb compile failed, gdb/testsuite/gdb.arch/powerpc-prologue.c: In function 'main':
gdb/testsuite/gdb.arch/powerpc-prologue.c:32:3: warning: implicit declaration of function 'optimized_1' [-Wimplicit-function-declaration]
optimized_1 ();
^~~~~~~~~~~
gdb/testsuite/ChangeLog
2016-10-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.arch/powerpc-prologue.c (optimized_1): New declaration.
Jan Kratochvil [Tue, 11 Oct 2016 14:43:58 +0000 (16:43 +0200)]
testsuite: Use standard_output_file
gdb/testsuite/ChangeLog
2016-10-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.arch/powerpc-prologue.exp: Use standard_output_file.
* gdb.arch/ppc64-symtab-cordic.exp: Likewise.
* gdb.arch/vsx-regs.exp: Likewise.
Nick Clifton [Tue, 11 Oct 2016 12:50:10 +0000 (13:50 +0100)]
Enhance objdump so that it will use .got, .plt and .plt.got section symbols when disassembling, and it will use dynamic relocs to interpret entries in the PLT and GOT.
binutils * objdump.c (is_significant_symbol_name): New function.
(remove_useless_symbols): Do not remove significanr symbols.
(find_symbol_for_address): If an exact match for the specified
address has not been found, try scanning the dynamic relocs to see
if one of these matches the address. If so, use the symbol
associated with the reloc.
(objdump_print_addr_with_symbol): Do not print offsets to symbols
with no value.
(disassemble_section): Only use dynamic relocs if the user
requested this.
(disassemble_data): Always load dynamic relocs if they are
available.
ld * ld-aarch64/emit-relocs-515-be.d: Adjust output to match change
in objdump.
* ld-aarch64/emit-relocs-515.d: Likewise.
* ld-aarch64/emit-relocs-516-be.d: Likewise.
* ld-aarch64/emit-relocs-516.d: Likewise.
* ld-aarch64/farcall-b-plt.d: Likewise.
* ld-aarch64/farcall-bl-plt.d: Likewise.
* ld-aarch64/gc-plt-relocs.d: Likewise.
* ld-aarch64/tls-desc-ie.d: Likewise.
* ld-aarch64/tls-tiny-desc.d: Likewise.
* ld-aarch64/tls-tiny-gd.d: Likewise.
* ld-aarch64/tls-tiny-ie.d: Likewise.
* ld-arm/arm-app-abs32.d: Likewise.
* ld-arm/arm-app.d: Likewise.
* ld-arm/arm-lib-plt32.d: Likewise.
* ld-arm/arm-lib.d: Likewise.
* ld-arm/armthumb-lib.d: Likewise.
* ld-arm/cortex-a8-fix-b-plt.d: Likewise.
* ld-arm/cortex-a8-fix-bcc-plt.d: Likewise.
* ld-arm/cortex-a8-fix-bl-plt.d: Likewise.
* ld-arm/cortex-a8-fix-bl-rel-plt.d: Likewise.
* ld-arm/cortex-a8-fix-blx-plt.d: Likewise.
* ld-arm/farcall-mixed-app-v5.d: Likewise.
* ld-arm/farcall-mixed-app.d: Likewise.
* ld-arm/farcall-mixed-app2.d: Likewise.
* ld-arm/farcall-mixed-lib-v4t.d: Likewise.
* ld-arm/farcall-mixed-lib.d: Likewise.
* ld-arm/ifunc-10.dd: Likewise.
* ld-arm/ifunc-14.dd: Likewise.
* ld-arm/ifunc-15.dd: Likewise.
* ld-arm/ifunc-3.dd: Likewise.
* ld-arm/ifunc-4.dd: Likewise.
* ld-arm/ifunc-9.dd: Likewise.
* ld-arm/long-plt-format.d: Likewise.
* ld-arm/mixed-app-v5.d: Likewise.
* ld-arm/mixed-app.d: Likewise.
* ld-arm/mixed-lib.d: Likewise.
* ld-arm/tls-lib-loc.d: Likewise.
* ld-cris/dso-pltdis1.d: Likewise.
* ld-cris/dso-pltdis2.d: Likewise.
* ld-cris/dso12-pltdis.d: Likewise.
* ld-elf/symbolic-func.r: Likewise.
* ld-frv/fdpic-pie-1.d: Likewise.
* ld-frv/fdpic-pie-2.d: Likewise.
* ld-frv/fdpic-pie-6.d: Likewise.
* ld-frv/fdpic-pie-7.d: Likewise.
* ld-frv/fdpic-pie-8.d: Likewise.
* ld-frv/fdpic-shared-1.d: Likewise.
* ld-frv/fdpic-shared-2.d: Likewise.
* ld-frv/fdpic-shared-3.d: Likewise.
* ld-frv/fdpic-shared-4.d: Likewise.
* ld-frv/fdpic-shared-5.d: Likewise.
* ld-frv/fdpic-shared-6.d: Likewise.
* ld-frv/fdpic-shared-7.d: Likewise.
* ld-frv/fdpic-shared-8.d: Likewise.
* ld-frv/fdpic-shared-local-2.d: Likewise.
* ld-frv/fdpic-shared-local-8.d: Likewise.
* ld-frv/fdpic-static-1.d: Likewise.
* ld-frv/fdpic-static-2.d: Likewise.
* ld-frv/fdpic-static-6.d: Likewise.
* ld-frv/fdpic-static-7.d: Likewise.
* ld-frv/fdpic-static-8.d: Likewise.
* ld-frv/tls-dynamic-2.d: Likewise.
* ld-frv/tls-initial-shared-2.d: Likewise.
* ld-frv/tls-relax-shared-2.d: Likewise.
* ld-frv/tls-shared-2.d: Likewise.
* ld-i386/plt-nacl.pd: Likewise.
* ld-i386/plt-pic-nacl.pd: Likewise.
* ld-i386/plt-pic.pd: Likewise.
* ld-i386/plt.pd: Likewise.
* ld-i386/pr19636-1d-nacl.d: Likewise.
* ld-i386/pr19636-1d.d: Likewise.
* ld-i386/pr19636-2c-nacl.d: Likewise.
* ld-i386/pr19636-2c.d: Likewise.
* ld-ifunc/ifunc-21-x86-64.d: Likewise.
* ld-ifunc/ifunc-22-x86-64.d: Likewise.
* ld-ifunc/pr17154-i386.d: Likewise.
* ld-ifunc/pr17154-x86-64.d: Likewise.
* ld-m68k/plt1-68020.d: Likewise.
* ld-m68k/plt1-cpu32.d: Likewise.
* ld-m68k/plt1-isab.d: Likewise.
* ld-m68k/plt1-isac.d: Likewise.
* ld-metag/shared.d: Likewise.
* ld-metag/stub_pic_app.d: Likewise.
* ld-metag/stub_pic_shared.d: Likewise.
* ld-metag/stub_shared.d: Likewise.
* ld-s390/tlsbin_64.dd: Likewise.
* ld-s390/tlspic_64.dd: Likewise.
* ld-tic6x/shlib-1.dd: Likewise.
* ld-tic6x/shlib-1b.dd: Likewise.
* ld-tic6x/shlib-1rb.dd: Likewise.
* ld-tic6x/shlib-app-1.dd: Likewise.
* ld-tic6x/shlib-app-1b.dd: Likewise.
* ld-tic6x/shlib-app-1r.dd: Likewise.
* ld-tic6x/shlib-app-1rb.dd: Likewise.
* ld-tic6x/shlib-noindex.dd: Likewise.
* ld-vax-elf/export-class-data.dd: Likewise.
* ld-vax-elf/plt-local-lib.dd: Likewise.
* ld-vax-elf/plt-local.dd: Likewise.
* ld-x86-64/bnd-ifunc-2.d: Likewise.
* ld-x86-64/bnd-plt-1.d: Likewise.
* ld-x86-64/gotpcrel1.dd: Likewise.
* ld-x86-64/libno-plt-1b.dd: Likewise.
* ld-x86-64/load1c-nacl.d: Likewise.
* ld-x86-64/load1c.d: Likewise.
* ld-x86-64/load1d-nacl.d: Likewise.
* ld-x86-64/load1d.d: Likewise.
* ld-x86-64/mov1a.d: Likewise.
* ld-x86-64/mov1b.d: Likewise.
* ld-x86-64/mov1c.d: Likewise.
* ld-x86-64/mov1d.d: Likewise.
* ld-x86-64/mov2a.d: Likewise.
* ld-x86-64/mov2b.d: Likewise.
* ld-x86-64/mov2c.d: Likewise.
* ld-x86-64/mov2d.d: Likewise.
* ld-x86-64/mpx3.dd: Likewise.
* ld-x86-64/mpx4.dd: Likewise.
* ld-x86-64/no-plt-1a.dd: Likewise.
* ld-x86-64/no-plt-1b.dd: Likewise.
* ld-x86-64/no-plt-1c.dd: Likewise.
* ld-x86-64/no-plt-1e.dd: Likewise.
* ld-x86-64/no-plt-1f.dd: Likewise.
* ld-x86-64/no-plt-1g.dd: Likewise.
* ld-x86-64/plt-main-bnd.dd: Likewise.
* ld-x86-64/plt-nacl.pd: Likewise.
* ld-x86-64/plt.pd: Likewise.
* ld-x86-64/pr18591.d: Likewise.
* ld-x86-64/pr19609-1c.d: Likewise.
* ld-x86-64/pr19609-1e.d: Likewise.
* ld-x86-64/pr19609-1j.d: Likewise.
* ld-x86-64/pr19609-1l.d: Likewise.
* ld-x86-64/pr19609-1m.d: Likewise.
* ld-x86-64/pr19609-5b.d: Likewise.
* ld-x86-64/pr19609-5c.d: Likewise.
* ld-x86-64/pr19609-5e.d: Likewise.
* ld-x86-64/pr19609-6b.d: Likewise.
* ld-x86-64/pr19609-7b.d: Likewise.
* ld-x86-64/pr19609-7d.d: Likewise.
* ld-x86-64/pr19636-2d.d: Likewise.
* ld-x86-64/pr20093-1.d: Likewise.
* ld-x86-64/pr20093-2.d: Likewise.
* ld-x86-64/pr20253-1b.d: Likewise.
* ld-x86-64/pr20253-1d.d: Likewise.
* ld-x86-64/pr20253-1f.d: Likewise.
* ld-x86-64/pr20253-1h.d: Likewise.
* ld-x86-64/pr20253-1j.d: Likewise.
* ld-x86-64/pr20253-1l.d: Likewise.
* ld-x86-64/protected3.d: Likewise.
* ld-x86-64/tlsbin.dd: Likewise.
* ld-x86-64/tlsbin2.dd: Likewise.
* ld-x86-64/tlsbindesc.dd: Likewise.
* ld-x86-64/tlsdesc-nacl.pd: Likewise.
* ld-x86-64/tlsdesc.dd: Likewise.
* ld-x86-64/tlsdesc.pd: Likewise.
* ld-x86-64/tlsgd10.dd: Likewise.
* ld-x86-64/tlsgd5.dd: Likewise.
* ld-x86-64/tlsgd6.dd: Likewise.
* ld-x86-64/tlsgd8.dd: Likewise.
* ld-x86-64/tlsgdesc.dd: Likewise.
* ld-x86-64/tlspic.dd: Likewise.
* ld-x86-64/tlspic2.dd: Likewise.
2016-10-11 Nick Clifton <nickc@redhat.com>
PR ld/20535
* emultempl/elf32.em (_search_needed): Add support for pseudo
environment variables supported by ld.so. Namely $ORIGIN, $LIB
and $PLATFORM.
* configure.ac: Add getauxval to list AC_CHECK_FUNCS list.
* config.in: Regenerate.
* configure: Regenerate.
2016-10-11 Alan Modra <amodra@gmail.com>
* ldlang.c (lang_do_assignments_1): Descend into output section
statements that do not yet have bfd sections. Set symbol section
temporarily for symbols defined in such statements to the undefined
section. Don't error on data or reloc statements until final phase.
* ldexp.c (exp_fold_tree_1 <etree_assign>): Handle bfd_und_section
in expld.section.
* testsuite/ld-mmix/bpo-10.d: Adjust.
* testsuite/ld-mmix/bpo-11.d: Adjust.
2016-10-10 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* emulparams/elf64_s390.sh: Move binary start to 16M.
* testsuite/ld-s390/tlsbin_64.dd: Adjust testcases accordingly.
* testsuite/ld-s390/tlsbin_64.rd: Likewise.
2016-10-07 Alan Modra <amodra@gmail.com>
* ldexp.c (MAX): Define.
(exp_unop, exp_binop, exp_trinop): Alloc at least enough for
etree_type.value.
2016-10-07 Alan Modra <amodra@gmail.com>
* testsuite/lib/ld-lib.exp (is_generic_elf): New, extracted from..
* testsuite/ld-elf/elf.exp: ..here.
2016-10-06 Ludovic Court?s <ludo@gnu.org>
* emulparams/elf32bmipn32-defs.sh: Shift quote of
"x$EMULATION_NAME" to the left to work around
<http://ftp.gnu.org/gnu/bash/bash-4.2-patches/bash42-007>.
2016-10-06 Alan Modra <amodra@gmail.com>
* lexsup.c: Spell fall through comments consistently and add
missing fall through comments.
2016-10-06 Alan Modra <amodra@gmail.com>
* plugin.c (asymbol_from_plugin_symbol): Avoid compiler warning
by adding return.
2016-10-04 Alan Modra <amodra@gmail.com>
* ld.texinfo (Expression Section): Update result of arithmetic
expressions.
* ldexp.c (arith_result_section): New function.
(fold_binary): Use it.
2016-10-04 Alan Modra <amodra@gmail.com>
* ldexp.c (exp_value_fold): New function.
(exp_unop, exp_binop, exp_trinop): Use it.
2016-09-30 Alan Modra <amodra@gmail.com>
* scripttempl/v850.sc: Don't reference __ctbp, __ep, __gp when
not relocating.
* scripttempl/v850_rh850.sc: Likewise.
2016-09-30 Alan Modra <amodra@gmail.com>
PR ld/20528
* testsuite/ld-elf/pr20528a.d: xfail generic elf targets. Allow
multiple .text sections for hppa-linux.
* testsuite/ld-elf/pr20528b.d: Likewise.
2016-09-30 Alan Modra <amodra@gmail.com>
* ldmain.c (default_bfd_error_handler): New function pointer.
(ld_bfd_error_handler): New function.
(main): Arrange to call it on bfd errors/warnings.
(ld_bfd_assert_handler): Enable tail call.
2016-09-30 Alan Modra <amodra@gmail.com>
* ldlang.c (ignore_bfd_errors): Update params.
2016-09-29 H.J. Lu <hongjiu.lu@intel.com>
PR ld/20528
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
merge 2 sections with different SHF_EXCLUDE.
* testsuite/ld-elf/pr20528a.d: New file.
* testsuite/ld-elf/pr20528a.s: Likewise.
* testsuite/ld-elf/pr20528b.d: Likewise.
* testsuite/ld-elf/pr20528b.s: Likewise.
2016-09-28 Christophe Lyon <christophe.lyon@linaro.org>
PR ld/20608
* testsuite/ld-arm/arm-elf.exp: Handle new testcase.
* testsuite/ld-arm/farcall-mixed-app2.d: New file.
* testsuite/ld-arm/farcall-mixed-app2.r: Likewise.
* testsuite/ld-arm/farcall-mixed-app2.s: Likewise.
* testsuite/ld-arm/farcall-mixed-app2.sym: Likewise.
2016-09-26 Vlad Zakharov <vzakhar@synopsys.com>
* Makefile.in: Regenerate.
* configure: Likewise.
2016-09-26 Alan Modra <amodra@gmail.com>
* testsuite/ld-powerpc/attr-gnu-4-4.s: Delete.
* testsuite/ld-powerpc/attr-gnu-4-14.d: Delete.
* testsuite/ld-powerpc/attr-gnu-4-24.d: Delete.
* testsuite/ld-powerpc/attr-gnu-4-34.d: Delete.
* testsuite/ld-powerpc/attr-gnu-4-41.d: Delete.
* testsuite/ld-powerpc/attr-gnu-4-32.d: Adjust expected warning.
* testsuite/ld-powerpc/attr-gnu-8-23.d: Likewise.
* testsuite/ld-powerpc/attr-gnu-4-01.d: Adjust expected output.
* testsuite/ld-powerpc/attr-gnu-4-02.d: Likewise.
* testsuite/ld-powerpc/attr-gnu-4-03.d: Likewise.
* testsuite/ld-powerpc/attr-gnu-4-10.d: Likewise.
* testsuite/ld-powerpc/attr-gnu-4-11.d: Likewise.
* testsuite/ld-powerpc/attr-gnu-4-20.d: Likewise.
* testsuite/ld-powerpc/attr-gnu-4-22.d: Likewise.
* testsuite/ld-powerpc/attr-gnu-4-33.d: Likewise.
* testsuite/ld-powerpc/attr-gnu-8-11.d: Likewise.
* testsuite/ld-powerpc/powerpc.exp: Don't run deleted tests.
2016-09-23 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
PR ld/20595
* testsuite/ld-arm/unwind-4.d: Add -q option to linker command
line and -r option to objdump command line. Match emitted relocs
to make sure that superflous relocs are not generated.
2016-09-23 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* emulparams/elf64_s390.sh: Change TEXT_START_ADDR to 256MB.
* testsuite/ld-s390/tlsbin_64.dd: Adjust testcase accordingly.
* testsuite/ld-s390/tlsbin_64.rd: Likewise.
2016-09-22 Nick Clifton <nickc@redhat.com>
* emultempl/elf32.em (_try_needed): In verbose mode, report failed
attempts to find a needed library.
2016-09-21 Richard Sandiford <richard.sandiford@arm.com>
* testsuite/ld-aarch64/emit-relocs-28.d: Expect spaces after ","
in addresses.
* testsuite/ld-aarch64/emit-relocs-301-be.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-301.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-302-be.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-302.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-310-be.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-310.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-313.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-515-be.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-515.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-516-be.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-516.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-531.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-532.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-533.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-534.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-535.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-536.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-537.d: Likewise.
* testsuite/ld-aarch64/emit-relocs-538.d: Likewise.
* testsuite/ld-aarch64/erratum835769.d: Likewise.
* testsuite/ld-aarch64/erratum843419.d: Likewise.
* testsuite/ld-aarch64/farcall-b-plt.d: Likewise.
* testsuite/ld-aarch64/farcall-bl-plt.d: Likewise.
* testsuite/ld-aarch64/gc-plt-relocs.d: Likewise.
* testsuite/ld-aarch64/ifunc-21.d: Likewise.
* testsuite/ld-aarch64/ifunc-7c.d: Likewise.
* testsuite/ld-aarch64/tls-desc-ie.d: Likewise.
* testsuite/ld-aarch64/tls-large-desc-be.d: Likewise.
* testsuite/ld-aarch64/tls-large-desc.d: Likewise.
* testsuite/ld-aarch64/tls-large-ie-be.d: Likewise.
* testsuite/ld-aarch64/tls-large-ie.d: Likewise.
* testsuite/ld-aarch64/tls-relax-all.d: Likewise.
* testsuite/ld-aarch64/tls-relax-gd-ie.d: Likewise.
* testsuite/ld-aarch64/tls-relax-gdesc-ie-2.d: Likewise.
* testsuite/ld-aarch64/tls-relax-gdesc-ie.d: Likewise.
* testsuite/ld-aarch64/tls-relax-large-desc-ie-be.d: Likewise.
* testsuite/ld-aarch64/tls-relax-large-desc-ie.d: Likewise.
* testsuite/ld-aarch64/tls-tiny-desc.d: Likewise.
* testsuite/ld-aarch64/tls-tiny-gd.d: Likewise.
gas * gas/arm/tls.d: Adjust output to match change in objdump.
Nick Clifton [Tue, 11 Oct 2016 11:04:42 +0000 (12:04 +0100)]
Add support to the static linker for the tokens accepted by the dynamic linker when resolving search paths.
PR ld/20535
* emultempl/elf32.em (_search_needed): Add support for pseudo
environment variables supported by ld.so. Namely $ORIGIN, $LIB
and $PLATFORM.
* configure.ac: Add getauxval to list AC_CHECK_FUNCS list.
* config.in: Regenerate.
* configure: Regenerate.
Jiong Wang [Tue, 11 Oct 2016 10:24:44 +0000 (11:24 +0100)]
[AArch64] PR target/20666, fix wrong encoding of new introduced BFC pseudo
opcode/
PR target/20666
* aarch64-asm.c (convert_bfc_to_bfm): Fix dest index.
gas/
* testsuite/gas/aarch64/alias-2.d: Update expected results.
Alan Modra [Tue, 11 Oct 2016 07:43:04 +0000 (18:13 +1030)]
Always descend into output section statements in lang_do_assignments
See https://sourceware.org/ml/binutils/2016-07/msg00091.html
This patch stop --gc-sections elf_gc_sweep_symbol localizing symbols
that ought to remain global.
The difficulty with always descending into output section statements
is that symbols defined by the script in such statements don't have
a bfd section when lang_do_assignments runs early in the link process.
There are two approaches to curing this problem. Either we can
create the bfd section early, or we can use a special section. This
patch takes the latter approach and uses bfd_und_section. (Creating
bfd sections early results in changed output section order, and thus
lots of testsuite failures. You can't create all output sections
early to ensure proper ordering as KEEP then stops empty sections
from being stripped.)
The wrinkle with this approach is that some code that runs at
gc-sections time needs to be made aware of the odd defined symbols
using bfd_und_section.
bfd/
* elf64-x86-64.c (elf_x86_64_convert_load_reloc): Handle symbols
defined temporarily with bfd_und_section.
* elflink.c (_bfd_elf_gc_keep): Don't set SEC_KEEP for bfd_und_section.
* elfxx-mips.c (mips_elf_local_pic_function_p): Exclude defined
symbols with bfd_und_section.
ld/
* ldlang.c (lang_do_assignments_1): Descend into output section
statements that do not yet have bfd sections. Set symbol section
temporarily for symbols defined in such statements to the undefined
section. Don't error on data or reloc statements until final phase.
* ldexp.c (exp_fold_tree_1 <etree_assign>): Handle bfd_und_section
in expld.section.
* testsuite/ld-mmix/bpo-10.d: Adjust.
* testsuite/ld-mmix/bpo-11.d: Adjust.
GDB Administrator [Tue, 11 Oct 2016 00:00:21 +0000 (00:00 +0000)]
Automatic date update in version.in
Andreas Krebbel [Mon, 10 Oct 2016 15:09:03 +0000 (17:09 +0200)]
S/390: Move binary start to 16M.
Turned out that by moving the binary start to 256M I've hit a case with
potentially a lot of aliasing in the branch target buffer between
binaries and shared libs. So moving on.
Tested on s390x. No regressions.
ld/ChangeLog:
2016-10-10 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* emulparams/elf64_s390.sh: Move binary start to 16M.
* testsuite/ld-s390/tlsbin_64.dd: Adjust testcases accordingly.
* testsuite/ld-s390/tlsbin_64.rd: Likewise.
Maciej W. Rozycki [Mon, 10 Oct 2016 13:49:00 +0000 (14:49 +0100)]
bfd/ChangeLog: Add missing PR ld/19908 reference
Andreas Krebbel [Mon, 10 Oct 2016 12:06:35 +0000 (14:06 +0200)]
MIPS64: Adjust cfi* testcases.
The CFI* testcases fail on MIPS64 because the augmentation string does
not match the regexp. This is because MIPS64 doesn't use the default of
4 for DWARF2_FDE_RELOC_SIZE which ends up as "b" in the augmentation
string. MIPS64 uses the address size which is 8 resulting in "c".
Adding c to the regexp fixes a couple of them. Others also need
adjustments in the FDE header lines due to different
sizes/offsets.
gas/ChangeLog:
2016-10-10 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* testsuite/gas/cfi/cfi-common-1.d: Adjust regexps for mips64.
* testsuite/gas/cfi/cfi-common-2.d: Likewise.
* testsuite/gas/cfi/cfi-common-3.d: Likewise.
* testsuite/gas/cfi/cfi-common-4.d: Likewise.
* testsuite/gas/cfi/cfi-common-5.d: Likewise.
* testsuite/gas/cfi/cfi-common-7.d: Likewise.
* testsuite/gas/cfi/cfi-common-8.d: Likewise.
* testsuite/gas/cfi/cfi-common-9.d: Likewise.
* testsuite/gas/cfi/cfi-mips-1.d: Likewise.
Yao Qi [Mon, 10 Oct 2016 10:11:25 +0000 (11:11 +0100)]
Share enum arm_breakpoint_kinds
This patch shares "enum arm_breakpoint_kinds", and use ARM_BP_KIND_THUMB2
in GDB.
gdb:
2016-10-10 Yao Qi <yao.qi@linaro.org>
* arch/arm.h (enum arm_breakpoint_kinds): New.
* arm-tdep.c (arm_remote_breakpoint_from_pc): Use
ARM_BP_KIND_THUMB2.
gdb/gdbserver:
2016-10-10 Yao Qi <yao.qi@linaro.org>
* linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
Yao Qi [Mon, 10 Oct 2016 09:32:46 +0000 (10:32 +0100)]
Rename 'arch' by 'gdbarch' in m32c_gdbarch_init
This patch renames local 'arch' by 'gdbarch' in m32c_gdbarch_init, so
that I can use macros in the following patch.
gdb:
2016-10-10 Yao Qi <yao.qi@linaro.org>
* m32c-tdep.c (m32c_gdbarch_init): Rename local 'arch' by
'gdbarch'.
Yao Qi [Mon, 10 Oct 2016 09:28:30 +0000 (10:28 +0100)]
Remove v850_dbtrap_breakpoint_from_pc
v850 has two functions to install to gdbarch_breakpoint_from_pc,
and it selects one according to info.bfd_arch_info->mach. However,
we can select the kind/length of breakpoint instruction inside
v850_breakpoint_from_pc by gdbarch_bfd_arch_info (gdbarch)->mach.
This patch is to do that, and remove v850_dbtrap_breakpoint_from_pc.
gdb:
2016-08-30 Yao Qi <yao.qi@linaro.org>
* v850-tdep.c (v850_breakpoint_from_pc): Use the right
breakpoint instruction.
(v850_dbtrap_breakpoint_from_pc): Remove.
(v850_gdbarch_init): Update.
GDB Administrator [Mon, 10 Oct 2016 00:00:21 +0000 (00:00 +0000)]
Automatic date update in version.in
GDB Administrator [Sun, 9 Oct 2016 00:00:25 +0000 (00:00 +0000)]
Automatic date update in version.in
Simon Marchi [Sat, 8 Oct 2016 23:47:09 +0000 (19:47 -0400)]
ui-out.c: Remove unused parameter to push_level
The parameter "id" is unused.
gdb/ChangeLog:
* ui-out.c (push_level): Remove "id" parameter.
(ui_out_begin): Update call.
Alan Modra [Sat, 8 Oct 2016 03:19:00 +0000 (13:49 +1030)]
Auto-generated dependencies for rx-parse.o and rl78-parse.o
I noticed a while ago that the rx-elf gas gprel test regressed for no
apparent reason. It turns out that the problem was rx-parse.y using
BFD_RELOC_RX_* values, which may change when other targets add new
relocs. If rx-parse.o doesn't depend on bfd.h, it won't be recompiled.
* Makefile.am (EXTRA_as_new_SOURCES): Add config/rl78-parse.y and
config/rx-parse.y. Move config/bfin-parse.y.
(bfin-parse.@OBJEXT@, rl78-parse.@OBJEXT@, rx-parse.@OBJEXT@): Delete.
($(srcdir)/config/rl78-defs.h): New rule.
* Makefile.in: Regenerate.
GDB Administrator [Sat, 8 Oct 2016 00:00:23 +0000 (00:00 +0000)]
Automatic date update in version.in
Joel Brobecker [Fri, 7 Oct 2016 17:18:36 +0000 (10:18 -0700)]
Document the GDB 7.12 release in gdb/ChangeLog
gdb/ChangeLog:
GDB 7.12 released.
Alan Modra [Fri, 7 Oct 2016 12:24:45 +0000 (22:54 +1030)]
Fold arithmetic integer expressions fallout
* ldexp.c (MAX): Define.
(exp_unop, exp_binop, exp_trinop): Alloc at least enough for
etree_type.value.
Jiong Wang [Fri, 7 Oct 2016 09:55:56 +0000 (10:55 +0100)]
[AArch64] PR target/20667, fix disassembler for the "special" optional SYS_Rt operand for "ic"/"tlbi"
gas/
PR target/20667
* testsuite/gas/aarch64/sys-rt-reg.s: Test source for instructions
using SYS_Rt reg.
* testsuite/gas/aarch64/sys-rt-reg.d: New testcase.
opcodes/
PR target/20667
* aarch64-opc.c (aarch64_print_operand): Always print operand if
it's available.
Yao Qi [Fri, 7 Oct 2016 09:24:12 +0000 (10:24 +0100)]
Set regdir in tdesc-regs.exp or arm
0a69eedb (Clean up the XML files for ARM) moves arm-*.xml files to
arm/ directory, so need update gdb.xml/tdesc-regs.exp accordingly.
gdb/testsuite:
2016-10-07 Yao Qi <yao.qi@linaro.org>
* gdb.xml/tdesc-regs.exp: Set regdir to "arm/".
Markus Metzger [Mon, 20 Jun 2016 09:12:14 +0000 (11:12 +0200)]
python: accept address and explicit locations in gdb.decode_line
The gdb.decode_line python function is documented to support the same location
expressions as the "break" command. It currently expects a linespec location.
Instead of creating a linespec location directly, create the location via
string_to_event_location_basic.
Alan Modra [Thu, 29 Sep 2016 23:14:50 +0000 (08:44 +0930)]
Pass link_info to _bfd_merge_private_bfd_data
Most BFD linker functions take a bfd_link_info param, which reinforces
the fact that they are linker functions and allow access to linker
callbacks, eg. einfo for printing errors. I was going to use einfo
for --fatal-warnings support before I decided a better way was the
patch commit
4519d071.
bfd/
* targets.c (bfd_target <_bfd_merge_private_bfd_data>): Replace
obfd param with struct bfd_link_info param. Update all callers.
* linker.c (bfd_merge_private_bfd_data): Likewise.
(_bfd_generic_verify_endian_match): Likewise.
* aoutf1.h (sunos_merge_private_bfd_data): Likewise.
* coff-arm.c (coff_arm_merge_private_bfd_data): Likewise.
* elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
* elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Likewise.
(_bfd_elf_merge_object_attributes): Likewise.
* elf-m10300.c (_bfd_mn10300_elf_merge_private_bfd_data): Likewise.
* elf-s390-common.c (elf_s390_merge_obj_attributes): Likewise.
* elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
* elf32-arm.c (elf32_arm_merge_eabi_attributes): Likewise.
(elf32_arm_merge_private_bfd_data): Likewise.
* elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Likewise.
* elf32-cr16.c (_bfd_cr16_elf_merge_private_bfd_data): Likewise.
* elf32-cris.c (cris_elf_merge_private_bfd_data): Likewise.
* elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
* elf32-h8300.c (elf32_h8_merge_private_bfd_data): Likewise.
* elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
* elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
* elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
* elf32-m32r.c (m32r_elf_merge_private_bfd_data): Likewise.
* elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
* elf32-m68hc1x.h (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
* elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Likewise.
* elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
* elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
* elf32-msp430.c (elf32_msp430_merge_mspabi_attributes): Likewise.
(elf32_msp430_merge_private_bfd_data): Likewise.
* elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
* elf32-nds32.c (nds32_elf_merge_private_bfd_data): Likewise.
* elf32-nios2.c (nios2_elf32_merge_private_bfd_data): Likewise.
* elf32-or1k.c (elf32_or1k_merge_private_bfd_data): Likewise.
* elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Likewise.
(ppc_elf_merge_obj_attributes): Likewise.
(ppc_elf_merge_private_bfd_data): Likewise.
* elf32-rl78.c (rl78_elf_merge_private_bfd_data): Likewise.
* elf32-rx.c (rx_elf_merge_private_bfd_data): Likewise.
* elf32-s390.c (elf32_s390_merge_private_bfd_data): Likewise.
* elf32-score.c (s3_elf32_score_merge_private_bfd_data): Likewise.
(elf32_score_merge_private_bfd_data): Likewise.
* elf32-score.h (s7_elf32_score_merge_private_bfd_data): Likewise.
* elf32-score7.c (s7_elf32_score_merge_private_bfd_data): Likewise.
* elf32-sh.c (sh_merge_bfd_arch, sh_elf_merge_private_data): Likewise.
* elf32-sh64.c (sh64_elf_merge_private_data): Likewise.
* elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise.
* elf32-tic6x.c (elf32_tic6x_merge_attributes): Likewise.
(elf32_tic6x_merge_private_bfd_data): Likewise.
* elf32-v850.c (v850_elf_merge_private_bfd_data): Likewise.
* elf32-vax.c (elf32_vax_merge_private_bfd_data): Likewise.
* elf32-visium.c (visium_elf_merge_private_bfd_data): Likewise.
* elf32-xtensa.c (elf_xtensa_merge_private_bfd_data): Likewise.
* elf64-ia64-vms.c (elf64_ia64_merge_private_bfd_data): Likewise.
* elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Likewise.
* elf64-s390.c (elf64_s390_merge_private_bfd_data): Likewise.
* elf64-sh64.c (sh_elf64_merge_private_data): Likewise.
* elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
* elfnn-aarch64.c (elfNN_aarch64_merge_private_bfd_data): Likewise.
* elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): Likewise.
* elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
(mips_elf_merge_obj_attributes): Likewise.
(_bfd_mips_elf_merge_private_bfd_data): Likewise.
* elfxx-mips.h (_bfd_mips_elf_merge_private_bfd_data): Likewise.
* elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): Likewise.
* elfxx-sparc.h (_bfd_sparc_elf_merge_private_bfd_data): Likewise.
* elfxx-target.h (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
* elfxx-tilegx.c (_bfd_tilegx_elf_merge_private_bfd_data): Likewise.
* elfxx-tilegx.h (_bfd_tilegx_elf_merge_private_bfd_data): Likewise.
* libbfd-in.h (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
ld/
* ldlang.c (lang_check): Update bfd_merge_private_bfd_data call.
Alan Modra [Fri, 7 Oct 2016 00:28:35 +0000 (10:58 +1030)]
bfd_merge_private_bfd_data tidy
bfd_merge_private_bfd_data and _bfd_generic_verify_endian_match are
linker functions, so move them to linker.c.
bfd/
* Makefile.am (LIBBFD_H_FILES): Update.
* doc/Makefile.am (LIBBFD_H_DEP): Likewise.
* cpu-sh.c (sh_merge_bfd_arch): Move to..
* elf32-sh.c: ..here, and make static.
* elf32-arc.c (arc_elf_merge_private_bfd_data): Delete extraneous
error.
* elf32-cris.c (cris_elf_merge_private_bfd_data): Don't call
_bfd_generic_verify_endian_match.
* elf32-microblaze.c (microblaze_elf_merge_private_bfd_data): Delete.
(bfd_elf32_bfd_merge_private_bfd_data): Define as
_bfd_generic_verify_endian_match.
* elf32-mt.c (mt_elf_merge_private_bfd_data): Don't test
boolean == FALSE.
* elf32-xgate.c (_bfd_xgate_elf_merge_private_bfd_data): Delete.
(bfd_elf32_bfd_merge_private_bfd_data): Don't define.
* elf32-xgate.h (_bfd_xgate_elf_merge_private_bfd_data): Delete.
* libbfd-in.h (_bfd_generic_verify_endian_match): Delete.
* libbfd.c (_bfd_generic_verify_endian_match): Move to..
* linker.c: ..here, and make internal.
* bfd.c (bfd_merge_private_bfd_data): Move to..
* linker.c: ..here.
* Makefile.in: Regenerate.
* doc/Makefile.in: Regenerate.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
opcodes/
* sh-opc.h (sh_merge_bfd_arch): Delete prototype.
Alan Modra [Mon, 25 Jul 2016 02:36:52 +0000 (12:06 +0930)]
Add is_generic_elf to ld/ld-lib.exp
* testsuite/lib/ld-lib.exp (is_generic_elf): New, extracted from..
* testsuite/ld-elf/elf.exp: ..here.
GDB Administrator [Fri, 7 Oct 2016 00:00:28 +0000 (00:00 +0000)]
Automatic date update in version.in
Sergio Durigan Junior [Tue, 27 Sep 2016 20:21:48 +0000 (16:21 -0400)]
Consolidate API of target_supports_multi_process
This simple commit consolidates the API of
target_supports_multi_process. Since both GDB and gdbserver use the
same function prototype, all that was needed was to move create this
prototype on gdb/target/target.h and turn the macros declared on
gdb/{,gdbserver/}target.h into actual functions.
Regtested (clean pass) on the BuildBot.
gdb/ChangeLog:
2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
* target.c (target_supports_multi_process): New function, moved
from...
* target.h (target_supports_multi_process): ... here. Remove
macro.
* target/target.h (target_supports_multi_process): New prototype.
gdb/gdbserver/ChangeLog:
2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
* target.c (target_supports_multi_process): New function, moved
from...
* target.h (target_supports_multi_process): ... here. Remove
macro.
Pedro Alves [Thu, 6 Oct 2016 18:23:37 +0000 (19:23 +0100)]
gdb: Remove some C compiler support leftovers
Remove some __cplusplus checks, inline EXPORTED_CONST, and update some comments.
gdb/ChangeLog:
2016-10-06 Pedro Alves <palves@redhat.com>
* cp-valprint.c (vtbl_ptr_name): Write "extern const" instead of
EXPORTED_CONST.
* stub-termcap.c: Remove __cplusplus checks.
* common/common-defs.h [!__cplusplus] (EXTERN_C, EXTERN_C_PUSH,
EXTERN_C_POP): Delete.
* common/common-exceptions.h (GDB_XCPT_SJMP): Update comments.
(GDB_XCPT) [!__cplusplus]: Delete.
(throw_exception, throw_exception_sjlj): Update comments.
* guile/guile-internal.h (as_a_scm_t_subr) [!__cplusplus]: Delete.
* guile/guile.c (extension_language_guile): Write "extern const"
instead of EXPORTED_CONST.
* features/feature_to_c.sh: Don't emit !__cplusplus code. Write
"extern const" instead of EXPORTED_CONST.
Doug Evans [Thu, 6 Oct 2016 17:41:27 +0000 (10:41 -0700)]
Fix gdb.Value->python conversion for large unsigned ints.
gdb/ChangeLog:
* python/py-value.c (valpy_long): Handle unsigned values.
gdb/testsuite/ChangeLog:
* gdb.python/py-value.exp (test_value_creation): Add test for large
unsigned 64-bit value.
Simon Marchi [Thu, 6 Oct 2016 17:01:37 +0000 (13:01 -0400)]
frame.h: Forward-declare struct ui_out
Fixes this failure when building in C mode. I think it's relevant for master
as well, since it's a good practice to include (or forward-declare) what you
use.
In file included from ../../binutils-gdb/gdb/gdbarch.h:38:0,
from ../../binutils-gdb/gdb/defs.h:653,
from ../../binutils-gdb/gdb/dictionary.c:23:
../../binutils-gdb/gdb/frame.h:710:48: warning: ‘struct ui_out’ declared inside parameter list will not be visible outside of this definition or declaration
extern void print_stack_frame_to_uiout (struct ui_out *uiout,
gdb/ChangeLog:
* frame.h: Forward-declare struct ui_out.
Tom Tromey [Wed, 5 Oct 2016 14:44:34 +0000 (08:44 -0600)]
Remove Java support
This patch removes the Java support from gdb. gcj has not seen much
development or use for years now, and was recently removed from GCC.
This patch changes gdb to follow; in the unlikely event that there are
still users using gcj, they can continue to use an older gdb to debug.
Or, they can debug in C++ mode.
Built and regtested on x86-64 Fedora 24.
2016-10-06 Tom Tromey <tom@tromey.com>
* MAINTAINERS: Remove Java test maintainer.
* varobj.h (java_varobj_ops): Don't declare.
* valprint.h (struct value_print_options)
<pascal_static_field_print>: Update comment.
* utils.c (producer_is_gcc): Remove java reference.
* symtab.h (struct general_symbol_info): Remove java references.
(SYMBOL_SEARCH_NAME): Likewise.
* objfiles.c (allocate_objfile): Update comment.
* linespec.c (find_linespec_symbols): Remove java references.
* gnu-v3-abi.c (gnuv3_rtti_type, gnuv3_baseclass_offset): Remove
java references.
* gdbtypes.h (struct cplus_struct_type) <is_java>: Remove.
(TYPE_CPLUS_REALLY_JAVA): Remove.
* c-varobj.c (enum vsections): Update comment.
* symtab.c (symbol_set_language, symbol_set_names)
(symbol_natural_name, symbol_demangled_name)
(demangle_for_lookup, symbol_matches_domain)
(default_make_symbol_completion_list_break_on_1): Remove java
references.
(JAVA_PREFIX, JAVA_PREFIX_LEN): Remove.
* psymtab.c (match_partial_symbol, psymtab_search_name)
(lookup_partial_symbol): Remove java references.
* dwarf2read.c (find_slot_in_mapped_hash): Remove java references.
(add_partial_symbol, dwarf2_compute_name, dwarf2_physname)
(dwarf2_add_member_fn, is_vtable_name, read_structure_type)
(process_structure_scope, read_subroutine_type)
(read_subrange_type, load_partial_dies)
(new_symbol_full, determine_prefix, typename_concat)
(dwarf2_name): Remove java references.
(set_cu_language): Treat Java as C++.
* c-typeprint.c (c_type_print_args): Remove java reference.
* defs.h (enum language) <language_java>: Remove.
* Makefile.in (SFILES, HFILES_NO_SRCDIR, COMMON_OBS, YYFILES)
(YYOBJ, local-maintainer-clean): Don't mention java files.
* jv-exp.y, jv-lang.c, jv-lang.h, jv-typeprint.c, jv-valprint.c,
jv-varobj.c: Remove.
2016-10-06 Tom Tromey <tom@tromey.com>
* guile.texi (Types In Guile): Remove Java mentions.
* python.texi (Types In Python): Remove Java mentions.
* gdb.texinfo (Address Locations, Supported Languages)
(Index Section Format): Remove Java mentions.
2016-10-06 Tom Tromey <tom@tromey.com>
* gdb.compile/compile.exp: Change java tests to rust.
* gdb.base/setshow.exp: Change java tests to rust.
* gdb.base/default.exp: Remove java from language list.
* README (Examples): Update language example.
* gdb.python/py-lookup-type.exp (test_lookup_type): Remove java
test.
* lib/gdb.exp (skip_java_tests): Remove.
* lib/java.exp: Remove.
* gdb.java: Remove.
Maciej W. Rozycki [Thu, 6 Oct 2016 15:51:18 +0000 (16:51 +0100)]
mips-tdep: Make FCRs always 32-bit
Fix a regression from commit
f8b73d13b7ca ("Target-described register
support for MIPS"),
<https://sourceware.org/ml/gdb-patches/2007-05/msg00340.html>,
<https://sourceware.org/ml/gdb-patches/2007-06/msg00256.html>, which
caused Floating Point Control Registers (FCRs) to be shown as 64-bit
with 64-bit targets.
This came from the legacy register format where all raw registers
matched the width of the architecture regardless of their actual size.
The correct size was then set in `mips_register_type' for cooked
registers presented to the user, which in the case of FCRs meant the
cooked size was always forced to 32 bits, reflecting their actual
hardware size, even though the raw format carried them in 64-bit
quantities on 64-bit targets. The upper 32 bits carried in the raw FCR
format have always been don't-cares, not actually retrieved from
hardware and never written back.
With the introduction of XML register descriptions the layout of
previously defined raw registers has been preserved, so as to keep
existing register handling code unchanged and make it easier for GDB and
`gdbserver' to interact with each other whether neither, either or both
parties talking over RSP support XML register descriptions. For the
XML-described case however `mips_register_type' is not used in raw to
cooked register conversion, so any special cases coded there are not
taken into account.
Instead a new function, `mips_pseudo_register_type', has been introduced
to handle size conversion, however lacking the special case for FCRs for
the Linux and the now defunct IRIX target. The correct size has been
maintained for embedded targets however, due to the bundling of FCRs
with the embedded registers under the `rawnum >= MIPS_EMBED_FP0_REGNUM +
32' condition.
Add the missing case to `mips_pseudo_register_type' then, referring to
the FCR indices explicitly, and observing that between
`MIPS_EMBED_FP0_REGNUM + 32' and `MIPS_FIRST_EMBED_REGNUM' there is an
unused register slot whose contents are ignored so with the removal of
embedded FCRs from under that condition we don't have to care about it
and we can refer to the embedded registers starting from
MIPS_FIRST_EMBED_REGNUM instead.
Add a test case too so that we have means to check automatically that
the correct user-visible size of FCRs is maintained.
gdb/
* mips-tdep.c (mips_pseudo_register_type): Make FCRs always
32-bit.
gdb/testsuite/
* gdb.arch/mips-fcr.exp: New test.
* gdb.arch/mips-fcr.c: Source for the new test.
Maciej W. Rozycki [Thu, 6 Oct 2016 15:19:38 +0000 (16:19 +0100)]
mips-tdep: Rearrange comments in `mips_pseudo_register_type'
Rearrange comments throughout `mips_pseudo_register_type', placing them
ahead the condtionals they apply to consistently.
gdb/
* mips-tdep.c (mips_pseudo_register_type): Rearrange comments
throughout.
Claudiu Zissulescu [Wed, 28 Sep 2016 10:27:41 +0000 (12:27 +0200)]
[ARC] Fix parsing leave_s and enter_s mnemonics.
gas/
2016-10-06 Claudiu Zissulescu <claziss@synopsys.com>
* testsuite/gas/arc/leave_enter.d: New file.
* testsuite/gas/arc/leave_enter.s: Likewise.
* testsuite/gas/arc/regnames.d: Likewise.
* testsuite/gas/arc/regnames.s: Likewise.
* config/tc-arc.c (arc_parse_name): Don't match reg names against
confirmed symbol names.
Maciej W. Rozycki [Thu, 6 Oct 2016 14:12:54 +0000 (15:12 +0100)]
testsuite: solib-disc: Use `standard_output_file'
Correct a commit
2151ccc56c74 ("Always organize test artifacts in a
directory hierarchy") regression causing:
Running .../gdb/testsuite/gdb.base/solib-disc.exp ...
gdb compile failed, Assembler messages:
Fatal error: can't create .../gdb/testsuite/gdb.base/so-disc-shr.c.o: No such file or directory
by using `standard_output_file' to construct output file names
throughout.
gdb/testsuite/
* gdb.base/solib-disc.exp: Use `standard_output_file'
throughout.
Ludovic Court?s [Thu, 6 Oct 2016 12:49:09 +0000 (13:49 +0100)]
Add workaround for bash 4.2 scripting problem.
* emulparams/elf32bmipn32-defs.sh: Shift quote of
"x$EMULATION_NAME" to the left to work around
<http://ftp.gnu.org/gnu/bash/bash-4.2-patches/bash42-007>.
Markus Metzger [Fri, 22 Jul 2016 08:01:19 +0000 (10:01 +0200)]
stack: fix gdb.dwarf2/dw2-undefined-ret-addr.exp regression
Commit
a038fa3e14a4 stack: check frame_unwind_caller_id adds a frame_id check to
frame_info and treats a missing frame_id as NOT_AVAILABLE_ERROR. This causes a
regression in gdb.dwarf2/dw2-undefined-ret-addr.exp.
Treat a missing frame_id as OPTIMIZED_OUT_ERROR instead.
See also https://sourceware.org/ml/gdb-patches/2016-07/msg00273.html.
Alan Modra [Thu, 6 Oct 2016 12:19:08 +0000 (22:49 +1030)]
-Wimplicit-fallthrough dodgy fixes
The comment logically belongs inside the preprocessor conditional,
but gcc's -Wimplicit-fallthrough loses track of it. Revert when/if
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77817 is fixed.
* app.c (do_scrub_chars): Move fall through comment.
* expr.c (operand): Likewise.
Alan Modra [Thu, 6 Oct 2016 10:11:13 +0000 (20:41 +1030)]
Add fall through comment to source in cpu/
I edited opcodes/mep-asm.c in
1a0670f3 without noticing it was a
generated file.
* mep.opc (expand_string): Add fall through comment.
Alan Modra [Thu, 6 Oct 2016 05:24:38 +0000 (15:54 +1030)]
[GOLD] two more fall-through comments
* powerpc.cc (Target_powerpc::Relocate::relocate): Add fall
through comment.
* tilegx.cc (Target_tilegx::Relocate::relocate): Likewise.
Pedro Alves [Thu, 6 Oct 2016 11:53:52 +0000 (12:53 +0100)]
Fix PR11094: JIT breakpoint is not properly recreated on reruns
Even though this was supposedly in the gdb 7.2 timeframe, the testcase
in PR11094 crashes current GDB with a segfault:
Program received signal SIGSEGV, Segmentation fault.
0x00000000005ee894 in event_location_to_string (location=0x0) at
src/gdb/location.c:412
412 if (EL_STRING (location) == NULL)
(top-gdb) bt
#0 0x00000000005ee894 in event_location_to_string (location=0x0) at
src/gdb/location.c:412
#1 0x000000000057411a in print_breakpoint_location (b=0x18288e0, loc=0x0) at
src/gdb/breakpoint.c:6201
#2 0x000000000057483f in print_one_breakpoint_location (b=0x18288e0,
loc=0x182cf10, loc_number=0, last_loc=0x7fffffffd258, allflag=1)
at src/gdb/breakpoint.c:6473
#3 0x00000000005751e1 in print_one_breakpoint (b=0x18288e0,
last_loc=0x7fffffffd258, allflag=1) at
src/gdb/breakpoint.c:6707
#4 0x000000000057589c in breakpoint_1 (args=0x0, allflag=1, filter=0x0) at
src/gdb/breakpoint.c:6947
#5 0x0000000000575aa8 in maintenance_info_breakpoints (args=0x0, from_tty=0)
at src/gdb/breakpoint.c:7026
[...]
This is GDB trying to print the location spec of the JIT event
breakpoint, but that's an internal breakpoint without one.
If I add a NULL check, then we see that the JIT breakpoint is now
pending (because its location has shlib_disabled set):
(gdb) maint info breakpoints
Num Type Disp Enb Address What
[...]
-8 jit events keep y <PENDING> inf 1
[...]
But that's incorrect. GDB should have managed to recreate the JIT
breakpoint's location for the second run. So the problem is
elsewhere.
The problem is that if the JIT loads at the same address on the second
run, we never recreate the JIT breakpoint, because we hit this early
return:
static int
jit_breakpoint_re_set_internal (struct gdbarch *gdbarch,
struct jit_program_space_data *ps_data)
{
[...]
if (ps_data->cached_code_address == addr)
return 0;
[...]
delete_breakpoint (ps_data->jit_breakpoint);
[...]
ps_data->jit_breakpoint = create_jit_event_breakpoint (gdbarch, addr);
Fix this by deleting the breakpoint and discarding the cached code
address when the objfile where the previous JIT breakpoint was found
is deleted/unloaded in the first place.
The test that was originally added for PR11094 doesn't trip on this
because:
#1 - It doesn't test the case of the JIT descriptor's address _not_
changing between reruns.
#2 - And then it doesn't do "maint info breakpoints", or really
anything with the JIT at all.
#3 - and even then, to trigger the problem the JIT descriptor needs
to be in a separate library, while the current test puts it in
the main program.
The patch extends the test to cover all combinations of these
scenarios.
gdb/ChangeLog:
2016-10-06 Pedro Alves <palves@redhat.com>
* jit.c (free_objfile_data): Delete the JIT breakpoint and clear
the cached code address.
gdb/testsuite/ChangeLog:
2016-10-06 Pedro Alves <palves@redhat.com>
* gdb.base/jit-simple-dl.c: New file.
* gdb.base/jit-simple-jit.c: New file, factored out from ...
* gdb.base/jit-simple.c: ... this.
* gdb.base/jit-simple.exp (jit_run): Delete.
(build_jit): New proc.
(jit_test_reread): Recompile either the main program or the shared
library, depending on what is being tested. Skip changing address
if caller wants to. Compare before/after addresses. If testing
standalone, explicitly load the binary. Test "maint info
breakpoints".
(top level): Add "standalone vs shared lib" and "change address"
vs "same address" axes.
Pedro Alves [Thu, 6 Oct 2016 11:53:51 +0000 (12:53 +0100)]
Fix a few gdb.base/jit-simple.exp problems
I noticed that we sometimes get this:
(gdb) print &__jit_debug_descriptor
$1 = (struct jit_descriptor *) 0x601040 <__jit_debug_descriptor>
(gdb) PASS: gdb.base/jit-simple.exp: blah 1
[...]
(gdb) run
[...]
Starting program: build/gdb/testsuite/outputs/gdb.base/jit-simple/jit-simple
Unsupported JIT protocol version 4 in descriptor (expected 1)
Breakpoint 2, main () at src/gdb/testsuite/gdb.base/jit-simple.c:36
36 return 0;
(gdb) print &__jit_debug_descriptor
$2 = (struct jit_descriptor *) 0x601040 <__jit_debug_descriptor>
(gdb) PASS: gdb.base/jit-simple.exp: blah 1
All tests PASSed, but note the "Unsupported JIT protocol version 4"
message.
Also notice that "__jit_debug_descriptor" has the same address before
and after the rerun, while the test is built in a way that should make
that address change between runs.
The test doesn't catch any of this because it doesn't compare
before/after addresses.
And then notice the "blah 1" test messages. "blah" is clearly a WIP
message, but it should be at least "blah 2" the second time. :-)
The reason this sometimes happens is that the test recompiles the
program and expects gdb to reload it automaticallyt on "run". However,
if the original program and the new recompilation happen to be in the
same second, then gdb does not realize that the binary needs to be
reloaded. (This is an old problem out of scope of this series.) If
that happens, then GDB ends up using the wrong symbols for the program
that it spawns, reads the JIT descriptor out of the wrong address,
finds garbage, and prints that "unsupported version" notice.
Fix that in the same way gdb.base/reread.exp handles it -- by sleeping
one second before recompiling.
gdb/testsuite/ChangeLog:
2016-10-06 Pedro Alves <palves@redhat.com>
* gdb.base/jit-simple.exp (top level) Delete get_compiler_info
call.
(jit_run): Delete.
(jit_test_reread): Use with_test_prefix. Reload the main binary
explicitly. Compare the before/after addresses of the JIT
descriptor.
Tom Tromey [Thu, 6 Oct 2016 11:51:47 +0000 (12:51 +0100)]
Remove redundant assignment in gprof.
PR gprof/20656
* source.c (annotate_source): Delete redundant assignment to
new_line.
Matthew Fortune [Thu, 29 Sep 2016 10:13:46 +0000 (11:13 +0100)]
Refine .cfi_sections check to only consider compact eh_frame
The .cfi_sections directive can be safely used multiple times
with different sections named at any time unless the compact form
of exception handling is requested after CFI information has
been emitted. Only the compact form of CFI information changes
the way in which CFI is generated and therefore cannot be
retrospectively requested after generating CFI information.
gas/
PR gas/20648
* dw2gencfi.c (dot_cfi_sections): Refine the check for
inconsistent .cfi_sections to only consider compact vs non
compact forms.
* testsuite/gas/cfi/cfi-common-9.d: New file.
* testsuite/gas/cfi/cfi-common-9.s: New file.
* testsuite/gas/cfi/cfi.exp: Run new test.
Doug Evans [Thu, 6 Oct 2016 11:12:33 +0000 (12:12 +0100)]
Make "end" field in feature specs required again.
Newer gdbservers may be talking to older gdbs,
and older gdbs will flag a missing "end" as an error.
So just make "end" required again, and for compatibility
change the default field type to "bool".
gdb/ChangeLog:
2016-10-06 Doug Evans <dje@google.com>
* features/aarch64-core.xml (cpsr_flags): Elide "type" and specify
"end" in all fields.
* features/aarch64.c: Regenerate.
* features/i386/32bit-mpx.xml (_bndcfgu): Specify type of "preserved"
and "enabled" fields. Correct size of "enabled" field.
* features/i386/64bit-mpx.xml (_bndcfgu): Specify type of "preserved"
and "enabled" fields.
* features/i386/i386-avx-mpx-linux.c: Regenerate.
* features/i386/i386-avx-mpx.c: Regenerate.
* features/i386/i386-avx512-linux.c: Regenerate.
* features/i386/i386-avx512.c: Regenerate.
* features/i386/i386-mpx-linux.c: Regenerate.
* features/i386/i386-mpx.c: Regenerate.
* features/arc-arcompact.c: Regenerate.
* features/arc-v2.c: Regenerate.
* xml-tdesc.c (tdesc_start_field): Require "end" spec. Single bit
fields default to "bool" type.
Revert 2016-03-15 Doug Evans <dje@google.com>
* features/i386/32bit-core.xml (i386_eflags): Remove "end" spec.
* features/i386/32bit-sse.xml (i386_eflags): Ditto.
* features/i386/64bit-core.xml (i386_eflags): Ditto.
* features/i386/64bit-sse.xml (i386_eflags): Ditto.
* features/i386/x32-core.xml (i386_eflags): Ditto.
gdb/doc/ChangeLog:
2016-10-06 Doug Evans <dje@google.com>
* gdb.texinfo (Target Description Format): Update docs on "end"
field spec and field default type.
gdb/testsuite/ChangeLog:
2016-10-06 Doug Evans <dje@google.com>
* gdb.xml/extra-regs.xml: Update, end field now required, default type
for single bitfields is bool.
* gdb.xml/tdesc-regs.exp: Ditto.
GDB Administrator [Thu, 6 Oct 2016 00:00:20 +0000 (00:00 +0000)]
Automatic date update in version.in
Alan Modra [Wed, 5 Oct 2016 07:47:02 +0000 (18:17 +1030)]
-Wimplicit-fallthrough warning fixes
Comment changes.
bfd/
* coff-h8300.c: Spell fall through comments consistently.
* coffgen.c: Likewise.
* elf32-hppa.c: Likewise.
* elf32-ppc.c: Likewise.
* elf32-score.c: Likewise.
* elf32-score7.c: Likewise.
* elf64-ppc.c: Likewise.
* elfxx-aarch64.c: Likewise.
* elfxx-mips.c: Likewise.
* cpu-ns32k.c: Add missing fall through comments.
* elf-m10300.c: Likewise.
* elf32-arm.c: Likewise.
* elf32-avr.c: Likewise.
* elf32-bfin.c: Likewise.
* elf32-frv.c: Likewise.
* elf32-i386.c: Likewise.
* elf32-microblaze.c: Likewise.
* elf32-nds32.c: Likewise.
* elf32-ppc.c: Likewise.
* elf32-rl78.c: Likewise.
* elf32-rx.c: Likewise.
* elf32-s390.c: Likewise.
* elf32-sh.c: Likewise.
* elf32-tic6x.c: Likewise.
* elf64-ia64-vms.c: Likewise.
* elf64-ppc.c: Likewise.
* elf64-s390.c: Likewise.
* elf64-x86-64.c: Likewise.
* elflink.c: Likewise.
* elfnn-aarch64.c: Likewise.
* elfnn-ia64.c: Likewise.
* ieee.c: Likewise.
* oasys.c: Likewise.
* pdp11.c: Likewise.
* srec.c: Likewise.
* versados.c: Likewise.
opcodes/
* aarch64-opc.c: Spell fall through comments consistently.
* i386-dis.c: Likewise.
* aarch64-dis.c: Add missing fall through comments.
* aarch64-opc.c: Likewise.
* arc-dis.c: Likewise.
* arm-dis.c: Likewise.
* i386-dis.c: Likewise.
* m68k-dis.c: Likewise.
* mep-asm.c: Likewise.
* ns32k-dis.c: Likewise.
* sh-dis.c: Likewise.
* tic4x-dis.c: Likewise.
* tic6x-dis.c: Likewise.
* vax-dis.c: Likewise.
binutils/
* dlltool.c: Spell fall through comments consistently.
* objcopy.c: Likewise.
* readelf.c: Likewise.
* dwarf.c: Add missing fall through comments.
* elfcomm.c: Likewise.
* sysinfo.y: Likewise.
* readelf.c: Likewise. Also remove extraneous comments.
gas/
* app.c: Add missing fall through comments.
* dw2gencfi.c: Likewise.
* expr.c: Likewise.
* config/tc-alpha.c: Likewise.
* config/tc-arc.c: Likewise.
* config/tc-arm.c: Likewise.
* config/tc-cr16.c: Likewise.
* config/tc-crx.c: Likewise.
* config/tc-dlx.c: Likewise.
* config/tc-h8300.c: Likewise.
* config/tc-hppa.c: Likewise.
* config/tc-i370.c: Likewise.
* config/tc-i386.c: Likewise.
* config/tc-i960.c: Likewise.
* config/tc-ia64.c: Likewise.
* config/tc-m68hc11.c: Likewise.
* config/tc-m68k.c: Likewise.
* config/tc-mep.c: Likewise.
* config/tc-metag.c: Likewise.
* config/tc-microblaze.c: Likewise.
* config/tc-mips.c: Likewise.
* config/tc-ns32k.c: Likewise.
* config/tc-rx.c: Likewise.
* config/tc-score.c: Likewise.
* config/tc-score7.c: Likewise.
* config/tc-sh.c: Likewise.
* config/tc-tic4x.c: Likewise.
* config/tc-vax.c: Likewise.
* config/tc-xstormy16.c: Likewise.
* config/tc-z80.c: Likewise.
* config/tc-z8k.c: Likewise.
* config/obj-elf.c: Likewise.
* config/tc-i386.c: Likewise.
* depend.c: Spell fall through comments consistently.
* config/tc-arm.c: Likewise.
* config/tc-d10v.c: Likewise.
* config/tc-i960.c: Likewise.
* config/tc-ia64.c: Likewise.
* config/tc-m68k.c: Likewise.
* config/tc-mcore.c: Likewise.
* config/tc-mep.c: Likewise.
* config/tc-ns32k.c: Likewise.
* config/tc-visium.c: Likewise.
* config/tc-xstormy16.c: Likewise.
* config/tc-z8k.c: Likewise.
gprof/
* gprof.c: Add missing fall through comments.
ld/
* lexsup.c: Spell fall through comments consistently and add
missing fall through comments.
Alan Modra [Wed, 5 Oct 2016 06:14:07 +0000 (16:44 +1030)]
-Wimplicit-fallthrough noreturn fixes
binutils/
* cxxfilt.c (usage): Add ATTRIBUTE_NORETURN.
* elfedit.c (usage): Likewise.
* nm.c (usage): Likewise.
* objcopy.c (copy_usage, strip_usage): Likewise.
* srconv.c (show_usage): Likewise.
* strings.c (usage): Likewise.
* sysdump.c (show_usage): Likewise.
* srconv.c: Remove unneeded forward function declarations.
* strings.c: Likewise.
* sysdump.c: Likewise.
gas/
* as.h (as_assert): Add ATTRIBUTE_NORETURN.
Alan Modra [Wed, 5 Oct 2016 06:22:24 +0000 (16:52 +1030)]
-Wimplicit-fallthrough error fixes
Well, not all are errors, but a little more substantive than just
fiddling with comments.
bfd/
* coffcode.h (coff_slurp_symbol_table): Revert accidental commit
made 2015-01-08.
* elf32-nds32.c (nds32_elf_grok_psinfo): Add missing break.
* reloc.c (bfd_default_reloc_type_lookup): Add missing breaks.
opcodes/
* arc-ext.c (create_map): Add missing break.
* msp430-decode.opc (encode_as): Likewise.
* msp430-decode.c: Regenerate.
binutils/
* coffdump.c (dump_coff_where): Add missing break.
* stabs.c (stab_xcoff_builtin_type): Likewise.
gas/
* config/tc-arc.c (find_opcode_match): Add missing break.
* config/tc-i960.c (get_cdisp): Likewise.
* config/tc-metag.c (parse_swap, md_apply_fix): Likewise.
* config/tc-mt.c (md_parse_option): Likewise.
* config/tc-nds32.c (nds32_apply_fix): Likewise.
* config/tc-hppa.c (pa_ip): Assert rather than testing last
condition of multiple if statements.
* config/tc-s390.c (s390_exp_compare): Return 0 on error.
* config/tc-tic4x.c (tic4x_operand_parse): Add as_bad and break
out of case rather than falling into next case. Formatting.
ld/
* plugin.c (asymbol_from_plugin_symbol): Avoid compiler warning
by adding return.
Alan Modra [Wed, 5 Oct 2016 05:10:11 +0000 (15:40 +1030)]
[GOLD] -Wimplicit-fallthrough warning fixes
* aarch64.cc: Spell fall through comments as "// Fall through.".
* arm.cc: Likewise.
* mips.cc: Likewise.
* powerpc.cc: Likewise.
* s390.cc: Likewise.
* sparc.cc: Likewise.
* x86_64.cc: Likewise.
* powerpc.cc (Target_powerpc::Relocate::relocate): Add missing
fall through comments.
* sparc.cc: (Target_sparc::Scan::global): Likewise.
(Target_sparc::Relocate::relocate): Likewise.
* tilegx.cc (Target_tilegx::Relocate::relocate): Likewise.
* resolve.cc (symbol_to_bits): Add missing break.
Alan Modra [Wed, 5 Oct 2016 22:25:23 +0000 (08:55 +1030)]
bison warning fixes
* config/rl78-parse.y: Don't use deprecated %name-prefix.
* config/rx-parse.y: Likewise.
Alan Modra [Wed, 5 Oct 2016 21:38:25 +0000 (08:08 +1030)]
Don't use boolean OR in arithmetic expressions
bfd/
* elf32-epiphany.c (epiphany_final_link_relocate): Use bitwise
OR in arithmetic expression, not boolean OR.
opcodes/
* cr16-dis.c (print_insn_cr16): Don't use boolean OR in arithmetic.
* crx-dis.c (print_insn_crx): Likewise.
Jan Kratochvil [Wed, 5 Oct 2016 19:56:46 +0000 (21:56 +0200)]
testsuite: Fix recent GCC FAIL: gdb.arch/i386-signal.exp
gcc-6.2.1-2.fc24.x86_64
(gdb) backtrace 10^M
(gdb) FAIL: gdb.arch/i386-signal.exp: backtrace 10
(gdb) disas/s
Dump of assembler code for function main:
.../gdb/testsuite/gdb.arch/i386-signal.c:
30 {
0x000000000040057f <+0>: push %rbp
0x0000000000400580 <+1>: mov %rsp,%rbp
31 setup ();
0x0000000000400583 <+4>: callq 0x400590 <setup>
=> 0x0000000000400588 <+9>: mov $0x0,%eax
32 }
0x000000000040058d <+14>: pop %rbp
0x000000000040058e <+15>: retq
End of assembler dump.
The .exp patch is an obvious typo fix I think. The regex was written to
accept "ADDR in main" and I find it OK as checking .debug_line validity is not
the purpose of this testfile.
gcc-4.8.5-11.el7.x86_64 did not put the 'mov $0x0,%eax' instruction there at
all so there was no problem with .debug_line.
gdb/testsuite/ChangeLog
2016-10-05 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.arch/i386-signal.exp (backtrace 10): Fix #2 typo.
Tom Tromey [Fri, 30 Sep 2016 21:45:26 +0000 (15:45 -0600)]
PR remote/20655 - small fix in handle_tracepoint_bkpts
handle_tracepoint_bkpts has two parallel "if"s. This changes the
second one to check ipa_error_tracepoint, which seems to be what was
intended.
2016-10-05 Tom Tromey <tom@tromey.com>
PR remote/20655:
* tracepoint.c (handle_tracepoint_bkpts): Check
ipa_error_tracepoint, not ipa_stopping_tracepoint.
Tom Tromey [Fri, 30 Sep 2016 21:43:40 +0000 (15:43 -0600)]
PR gdb/20653 - small cleanup in string_to_explicit_location
This bug points out that string_to_explicit_location compares a char*
against '\0'; whereas comparing against NULL is more normal.
2016-10-05 Tom Tromey <tom@tromey.com>
PR breakpoints/20653:
* location.c (string_to_explicit_location): Use NULL, not '\0'.
Tom Tromey [Fri, 30 Sep 2016 21:42:28 +0000 (15:42 -0600)]
PR symtab/20652 - fix psymbol_compare
This fixes an oversight in psymbol_compare.
2016-10-05 Tom Tromey <tom@tromey.com>
PR symtab/20652:
* psymtab.c (psymbol_compare): Correctly compare "ginfo.value"
fields.
This page took 0.053347 seconds and 4 git commands to generate.