Alan Modra [Wed, 7 Dec 2016 03:42:26 +0000 (14:12 +1030)]
[GOLD] powerpc64le-linux fails to link large Linux kernel
Gold attaches stubs to an existing section in contrast to ld.bfd which
inserts a new section for stubs. If we want stubs before branches,
then the stubs must be added to the previous section. Adding to the
previous section is a disaster if there is a large gap between the
previous section and the group.
PR gold/20878
* powerpc.cc (Stub_control): Replace stubs_always_before_branch_
with stubs_always_after_branch_, group_end_addr_ with
group_start_addr_.
(Stub_control::can_add_to_stub_group): Rewrite to suit scanning
sections by increasing address.
(Target_powerpc::group_sections): Scan that way. Delete corner
case.
* options.h (--stub-group-size): Update help string.
Alan Modra [Wed, 7 Dec 2016 03:41:57 +0000 (14:11 +1030)]
[GOLD] PowerPC stub debug
Some more debug output, and a little hardening.
* powerpc.cc (Stub_table_owner): Provide constructor.
(Powerpc_relobj::set_stub_table): Resize fill with -1.
(Target_powerpc::Branch_info::make_stub): Provide target debug
output on returning false.
GDB Administrator [Wed, 7 Dec 2016 00:00:19 +0000 (00:00 +0000)]
Automatic date update in version.in
Simon Marchi [Tue, 6 Dec 2016 21:19:33 +0000 (16:19 -0500)]
Remove unnecessary inferior lookup in inferior_command
In the case where we switch to a non-running inferior, we do a
"find_inferior_id (num)", although we did the same call right before.
gdb/ChangeLog:
* inferior.c (inferior_command): Remove duplicate
find_inferior_id call.
Nick Clifton [Tue, 6 Dec 2016 16:53:57 +0000 (16:53 +0000)]
Fix seg-fault in strip when copying a corrupt binary.
PR binutils/20931
* elf.c (copy_special_section_fields): Check for an invalid
sh_link field before attempting to follow it.
Nick Clifton [Tue, 6 Dec 2016 16:26:42 +0000 (16:26 +0000)]
Fix seg-fault running strip on a corrupt binary.
PR binutils/20930
* objcopy.c (mark_symbols_used_in_relocations): Check for a null
symbol pointer pointer before attempting to mark the symbol as
kept.
Nick Clifton [Tue, 6 Dec 2016 15:58:15 +0000 (15:58 +0000)]
Fix seg-fault running strip on a corrupt binary.
PR binutils/20929
* aoutx.h (squirt_out_relocs): Check for relocs without an
associated symbol.
Nick Clifton [Tue, 6 Dec 2016 15:34:33 +0000 (15:34 +0000)]
fix typo
Nick Clifton [Tue, 6 Dec 2016 15:31:14 +0000 (15:31 +0000)]
Stop the assembler from running out of memory when asked to generate a huge number of spaces.
PR gas/20901
* read.c (s_space): Place an upper limit on the number of spaces
generated.
Yao Qi [Tue, 6 Dec 2016 14:25:51 +0000 (14:25 +0000)]
Assert on lval_register
This patch adds asserts where the value's lval must be lval_register.
This triggers an error in frame_register_unwind because VALUE_REGNUM
is used but value's lval is not lval_register.
This also reveals a design issue in frame_register_unwind, that is
arguments addrp and realnump are mutually exclusive, we either use
addrp (for lval_memory), or use realnump (for lval_register). This
can be done in a separate patch.
gdb:
2016-12-06 Yao Qi <yao.qi@linaro.org>
* frame.c (frame_register_unwind): Set *realnump if *lvalp is
lval_register.
* value.c (deprecated_value_next_frame_id_hack): Assert
value->lval is lval_register.
(deprecated_value_regnum_hack): Likewise.
Nick Clifton [Tue, 6 Dec 2016 14:13:57 +0000 (14:13 +0000)]
Fix mmix assembler test to account for changes in the error messages produced by the assembler.
PR gas/20896
* testsuite/gas/mmix/err-byte1.s: Adjust expected warning messages
to account for patch to next_char_of_string.
Alan Modra [Tue, 6 Dec 2016 05:36:14 +0000 (16:06 +1030)]
PowerPC64 toc optimisation for power9
Recognize power9 and a few other insns from older machines. Fixes
linker complaints like "toc optimization is not supported for
0xf4090002 instruction". 0xf4090002 is stxsd v0,0(r9)
bfd/
* elf64-ppc.c (ok_lo_toc_insn): Add r_type param. Recognize
lq,lfq,lxv,lxsd,lxssp,lfdp,stq,stfq,stxv,stxsd,stxssp,stfdp.
Don't match lmd and stmd.
ld/
* testsuite/ld-powerpc/tocopt7.s,
* testsuite/ld-powerpc/tocopt7.out,
* testsuite/ld-powerpc/tocopt7.d: New test.
* testsuite/ld-powerpc/tocopt8.s,
* testsuite/ld-powerpc/tocopt8.d: New test.
* testsuite/ld-powerpc/powerpc.exp: Run them.
DJ Delorie [Tue, 6 Dec 2016 06:40:44 +0000 (01:40 -0500)]
argv.c (expandargv): Check for directories passed as @-files.
gcc pr 78584
GDB Administrator [Tue, 6 Dec 2016 00:00:23 +0000 (00:00 +0000)]
Automatic date update in version.in
Alan Modra [Mon, 5 Dec 2016 21:23:51 +0000 (07:53 +1030)]
Fix gold/testsuite/file_in_many_sections_test.sh file mode
chmod a+x
Cary Coutant [Mon, 5 Dec 2016 18:41:09 +0000 (10:41 -0800)]
Fix problem where absolute local symbols are omitted when output has many sections.
2016-12-05 Cary Coutant <ccoutant@gmail.com>
Tristan Gingold <gingold@adacore.com>
gold/
* object.cc (Sized_relobj_file::do_count_local_symbols): Check
is_ordinary before using shndx.
* testsuite/Makefile.am (file_in_many_sections_test.sh): New test case.
* testsuite/Makefile.in: Regenerate.
* testsuite/file_in_many_sections.c: New source file.
* testsuite/file_in_many_sections_test.sh: New script.
Nick Clifton [Mon, 5 Dec 2016 17:36:45 +0000 (17:36 +0000)]
Fix fault in assembler when passed a bogus input file.
PR gas/20902
* read.c (next_char_of_string): Do end advance past the end of the
buffer.
Nick Clifton [Mon, 5 Dec 2016 16:54:59 +0000 (16:54 +0000)]
Fix ICE in assembler when passed a bogus input file.
PR gas/20904
* as.h (SKIP_ALL_WHITESPACE): New macro.
* expr.c (operand): Use it.
Nick Clifton [Mon, 5 Dec 2016 16:34:45 +0000 (16:34 +0000)]
Fix seg-fault in the binutils utilities when reading a corrupt input file.
PR binutils/20905
* peicode.h (pe_ILF_object_p): Use strnlen to avoid running over
the end of the string buffer.
Nick Clifton [Mon, 5 Dec 2016 16:00:43 +0000 (16:00 +0000)]
Fix seg-fault in linker when passed a bogus input script.
PR ld/20906
* ldlex.l: Check for bogus strings in linker scripts.
Jose E. Marchesi [Mon, 5 Dec 2016 15:57:53 +0000 (16:57 +0100)]
binutils: add myself to MAINTAINERS
2016-12-05 Jose E. Marchesi <jose.marchesi@oracle.com>
* MAINTAINERS: Add myself as maintainer for the SPARC targets.
Nick Clifton [Mon, 5 Dec 2016 14:59:02 +0000 (14:59 +0000)]
Fix abort when running tools on a bogus binary.
PR binutils/20907
* peicode.h (pe_ILF_build_a_bfd): Replace abort with error return.
Nick Clifton [Mon, 5 Dec 2016 14:32:30 +0000 (14:32 +0000)]
Fix seg-fault running strip on a corrupt binary.
PR binutils/20921
* aoutx.h (squirt_out_relocs): Check for and report any relocs
that could not be recognised.
Szabolcs Nagy [Mon, 5 Dec 2016 14:24:17 +0000 (14:24 +0000)]
[ARM] Add ARMv8.3 VCMLA and VCADD instructions
Add support for VCMLA and VCADD advanced SIMD complex number instructions.
The command line option is -march=armv8.3-a+fp16+simd for enabling all
instructions.
In arm-dis.c the formatting syntax was abused a bit to select between
0 vs 90 or 180 vs 270 or 90 vs 270 based on a bit value instead of
duplicating entries in the opcode table.
gas/
* config/tc-arm.c (do_vcmla, do_vcadd): Define.
(neon_scalar_for_vcmla): Define.
(enum operand_parse_code): Add OP_IROT1 and OP_IROT2.
(NEON_ENC_TAB): Add DDSI and QQSI variants.
(insns): Add vcmla and vcadd.
* testsuite/gas/arm/armv8_3-a-simd.d: New.
* testsuite/gas/arm/armv8_3-a-simd.s: New.
* testsuite/gas/arm/armv8_3-a-simd-bad.d: New.
* testsuite/gas/arm/armv8_3-a-simd-bad.l: New.
* testsuite/gas/arm/armv8_3-a-simd-bad.s: New.
opcodes/
* arm-dis.c (coprocessor_opcodes): Add vcmla and vcadd.
(print_insn_coprocessor): Add 'V' format for neon D or Q regs.
Claudiu Zissulescu [Mon, 5 Dec 2016 14:09:48 +0000 (15:09 +0100)]
[ARC] Don't check extAuxRegister second argument for sign.
gas/
2016-12-05 Claudiu Zissulescu <claziss@synopsys.com>
* testsuite/gas/arc/textauxregister-1.d: New file.
* testsuite/gas/arc/textauxregister-1.s: Likewise.
* testsuite/gas/arc/textcondcode-err.s: Likewise.
* testsuite/gas/arc/textcoreregister-err.s: Likewise.
* config/tc-arc.c (tokenize_extregister): Return bfd_boolean,
don't check second argument of extension auxiliary register for
signess.
(arc_extcorereg): Consider the return of tokenize_extregister
function call.
Szabolcs Nagy [Mon, 5 Dec 2016 14:13:27 +0000 (14:13 +0000)]
[ARM] Add ARMv8.3 VJCVT instruction
Add support for VJCVT javascript conversion instruction.
gas/
* config/tc-arm.c (arm_ext_v8_3, do_vjcvt): Define.
(insns): Add vjcvt.
* testsuite/gas/aarch64/armv8_3-a-fp.s: New.
* testsuite/gas/aarch64/armv8_3-a-fp.d: New.
* testsuite/gas/aarch64/armv8_3-a-fp-bad.s: New.
* testsuite/gas/aarch64/armv8_3-a-fp-bad.d: New.
* testsuite/gas/aarch64/armv8_3-a-fp-bad.l: New.
opcodes/
* arm-dis.c (coprocessor_opcodes): Add vjcvt.
Szabolcs Nagy [Mon, 5 Dec 2016 14:07:25 +0000 (14:07 +0000)]
[ARM] Add ARMv8.3 command line option and feature flag
ARMv8.3 is an architectural extension of ARMv8. Add the
feature macro and -march=armv8.3-a gas command line option
for the ARM target.
https://community.arm.com/groups/processors/blog/2016/10/27/armv8-a-architecture-2016-additions
gas/
* config/tc-arm.c (arm_archs): Add "armv8.3-a".
* doc/c-arm.texi (-march): Add "armv8.3-a".
include/
* opcode/arm.h (ARM_EXT2_V8_3A, ARM_AEXT2_V8_3A): New.
(ARM_ARCH_V8_3A): New.
Alyssa Milburn [Mon, 5 Dec 2016 06:59:18 +0000 (22:59 -0800)]
bfd,ld: Continue after partially-successful relaxed call relocations in sparc.
bfd/ChangeLog:
2016-12-05 Alyssa Milburn <amilburn@zall.org>
* elfxx-sparc.c: Do not stop processing relocations after
partially relaxing a call with WDISP30.
ld/ChangeLog:
2016-12-05 Alyssa Milburn <amilburn@zall.org>
* testsuite/ld-sparc/wdispcall.s: New file.
* testsuite/ld-sparc/wdispcall.dd: Likewise.
* testsuite/ld-sparc/sparc.exp: Run new test.
Nick Clifton [Mon, 5 Dec 2016 13:35:50 +0000 (13:35 +0000)]
Fix seg-fault attempting to strip a corrupt binary.
PR binutils/20922
* elf.c (find_link): Check for null headers before attempting to
match them.
Nick Clifton [Mon, 5 Dec 2016 13:11:01 +0000 (13:11 +0000)]
Fix seg-fault running strip on a corrupt binary.
PR ld/20923
* objcopy.c (mark_symbols_used_in_relocations): Check for a null
symbol pointer before attempting to mark the symbol as kept.
Nick Clifton [Mon, 5 Dec 2016 12:25:34 +0000 (12:25 +0000)]
Fix seg-fault in linker parsing a corrupt input file.
PR ld/20924
(aout_link_add_symbols): Fix off by one error checking for
overflow of string offset.
Nick Clifton [Mon, 5 Dec 2016 12:14:22 +0000 (12:14 +0000)]
Fix assertion failure in linker triggered by corrupt input file.
PR ld/20925
* aoutx.h (aout_link_add_symbols): Replace BFD_ASSERT with return
FALSE.
Nick Clifton [Mon, 5 Dec 2016 11:25:26 +0000 (11:25 +0000)]
fix typo
GDB Administrator [Mon, 5 Dec 2016 00:00:22 +0000 (00:00 +0000)]
Automatic date update in version.in
Jim Wilson [Sun, 4 Dec 2016 01:29:44 +0000 (17:29 -0800)]
Fix bugs with tbnz/tbz instructions.
sim/aarch64
* simulator.c (tbnz, tbz): Cast 1 to uint64_t before shifting.
(dexTestBranchImmediate): Shift high bit of pos by 5 not 4.
GDB Administrator [Sun, 4 Dec 2016 00:00:23 +0000 (00:00 +0000)]
Automatic date update in version.in
Alan Modra [Sat, 3 Dec 2016 10:30:01 +0000 (21:00 +1030)]
PowerPC64 dot-symbol compatibility bugfixes
Lots of fixes for the compatibility code that handles linking of
-mcall-aixdesc code (or that generated by 12 year old gcc) with
current ELFv1 ABI code.
1) A reference to a dot-symbol in an object file wasn't satisfied by a
function descriptor in later object files.
2) The as-needed code had bit-rotted; Shared libs now need a strong
reference to be counted as needed.
3) --gc-sections involving dot-symbols was broken, needing
func_desc_adjust to be run early and lots of other fixes.
bfd/
* elf64-ppc.c (struct ppc_link_hash_entry): Delete "was_undefined".
(struct ppc_link_hash_table): Delete "twiddled_syms". Add
"need_func_desc_adj".
(lookup_fdh): Link direct fdh sym via oh field and set flags.
(make_fdh): Make strong and weak undefined function descriptor
symbols.
(ppc64_elf_merge_symbol): New function.
(elf_backend_merge_symbol): Define.
(ppc64_elf_archive_symbol_lookup): Don't test undefweak for fake
function descriptors.
(add_symbol_adjust): Don't twiddle symbols to undefweak.
Propagate more ref flags to function descriptor symbol. Make
some function descriptor symbols dynamic.
(ppc64_elf_before_check_relocs): Only run add_symbol_adjust for
ELFv1. Set need_func_desc_adj. Don't fix undefs list.
(ppc64_elf_check_relocs): Set non_ir_ref for descriptors.
Don't call lookup_fdh here.
(ppc64_elf_gc_sections): New function.
(bfd_elf64_bfd_gc_sections): Define.
(ppc64_elf_gc_mark_hook): Mark descriptor.
(func_desc_adjust): Don't make fake function descriptor syms strong
here. Exit earlier on non-dotsyms. Take note of elf.dynamic
flag when deciding whether a dynamic function descriptor might
be needed. Transfer elf.dynamic and set elf.needs_plt. Move
plt regardless of visibility. Make descriptor dynamic if
entry sym is dynamic, not for other cases.
(ppc64_elf_func_desc_adjust): Don't run func_desc_adjust if
already done.
(ppc64_elf_edit_opd): Use oh field rather than lookup_fdh.
(ppc64_elf_size_stubs): Likewise.
(ppc_build_one_stub): Don't clear was_undefined. Only set sym
undefweak if stub symbol is defined.
(undo_symbol_twiddle, ppc64_elf_restore_symbols): Delete.
* elf64-ppc.h (ppc64_elf_restore_symbols): Don't declare.
ld/
* emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Don't call
ppc64_elf_restore_symbols.
* testsuite/ld-powerpc/dotsym1.d: New.
* testsuite/ld-powerpc/dotsym2.d: New.
* testsuite/ld-powerpc/dotsym3.d: New.
* testsuite/ld-powerpc/dotsym4.d: New.
* testsuite/ld-powerpc/dotsymref.s: New.
* testsuite/ld-powerpc/nodotsym.s: New.
* testsuite/ld-powerpc/powerpc.exp: Run new tests.
Alan Modra [Sat, 3 Dec 2016 10:29:43 +0000 (20:59 +1030)]
PowerPC64 dot-sym testsuite fixes
This illustrates quite well why dot-symbols had to go. PowerPC64 gcc
for Linux stopped producing them 12 years ago, but the Linux kernel
still persists in using them so it's necessary to keep and
regression test ld support.
* testsuite/ld-elf/indirect1b.c: Give dot-symbol a version too.
* testsuite/ld-elf/indirect2.c: Likewise.
* testsuite/ld-elf/indirect3b.c: Likewise.
* testsuite/ld-elf/indirect4b.c: Likewise.
* testsuite/ld-elf/pr18718.c: Likewise.
* testsuite/ld-elf/pr18720b.c: Likewise.
* testsuite/ld-elf/pr19553c.c: Likewise.
* testsuite/ld-elfvers/vers.h (FUNC_SYMVER): Define.
* testsuite/ld-elfvers/vers1.c: Use FUNC_SYMVER for functions.
* testsuite/ld-elfvers/vers4.c: Likewise.
* testsuite/ld-elfvers/vers5.c: Likewise.
* testsuite/ld-elfvers/vers6.c: Likewise.
* testsuite/ld-elfvers/vers7a.c: Likewise.
* testsuite/ld-elfvers/vers9.c: Likewise.
* testsuite/ld-elfvers/vers15.c: Likewise.
* testsuite/ld-elfvers/vers18.c: Likewise.
* testsuite/ld-elfvers/vers22a.c: Likewise.
* testsuite/ld-elfvers/vers23a.c: Likewise.
* testsuite/ld-elfvers/vers27d1.c: Likewise.
* testsuite/ld-elfvers/vers21.c: Likewise.
(_old_bar): Use attribute weak rather than asm weak.
* testsuite/ld-ifunc/pr16467b.c: Give dot-symbol a version.
* testsuite/ld-plugin/pr12760b.c: Define warning on .bar rather than
bar for ppc64 -mcall-aixdesc.
* testsuite/ld-plugin/pr16746a.c: Similarly for foobar.
* testsuite/ld-plugin/pr16746b.c: Likewise.
* testsuite/ld-elf/shared.exp: Allow dot-symbol in warnings and errors.
* testsuite/ld-plugin/lto.exp: Likewise.
* testsuite/ld-plugin/plugin-6.d: Likewise.
* testsuite/ld-plugin/plugin-7.d: Likewise.
* testsuite/ld-plugin/plugin-8.d: Likewise.
* testsuite/ld-plugin/plugin-13.d: Likewise.
* testsuite/ld-plugin/plugin-14.d: Likewise.
* testsuite/ld-plugin/plugin-15.d: Likewise.
* testsuite/ld-plugin/plugin-16.d: Likewise.
* testsuite/ld-plugin/plugin-20.d: Likewise.
* testsuite/ld-plugin/plugin-21.d: Likewise.
* testsuite/ld-plugin/plugin-22.d: Likewise.
* testsuite/ld-plugin/plugin-23.d: Likewise.
* testsuite/ld-plugin/plugin.exp: Define .main and .puts for ppc64
-mcall-aixdesc.
* testsuite/ld-elfvers/vers.exp (test_ar): Trim dot-symbols.
(objdump_dynsymstuff): Likewise.
(objdump_symstuff): Likewise. Pack flags to keep column count
consistent.
* testsuite/ld-elfweak/elfweak.exp (objdump_dynsymstuff,
objdump_symstuff): As for vers.exp.
* testsuite/ld-elfvers/vers6.sym: Allow dot-symbols.
* testsuite/ld-elfvers/vers1.sym: Allow missing F flag for
-mcall-aixdesc .opd syms and adjust for flag packing.
* testsuite/ld-elfvers/vers4.sym: Likewise.
* testsuite/ld-elfvers/vers4a.sym: Likewise.
* testsuite/ld-elfvers/vers7a.sym: Likewise.
* testsuite/ld-elfvers/vers9.sym: Likewise.
* testsuite/ld-elfvers/vers15.sym: Likewise.
* testsuite/ld-elfvers/vers18.sym: Likewise.
* testsuite/ld-elfvers/vers21.sym: Likewise.
* testsuite/ld-elfvers/vers22a.sym: Likewise.
* testsuite/ld-elfvers/vers23a.sym: Likewise.
* testsuite/ld-elfvers/vers27d.sym: Likewise.
* testsuite/ld-elfweak/strong.sym: Likewise.
* testsuite/ld-elfweak/strongcomm.sym: Likewise.
* testsuite/ld-elfweak/strongdata.sym: Likewise.
Alan Modra [Sat, 3 Dec 2016 10:29:19 +0000 (20:59 +1030)]
ld-elfvers don't fail on non-empty results
* testsuite/ld-elfvers/vers.exp (objdump_dynsymstuff): Don't abort
on non-empty results with empty expected.
Alan Modra [Sat, 3 Dec 2016 10:28:55 +0000 (20:58 +1030)]
Correct cdtest g++ version test
Fixes declaration conflict with built-in strncpy.
* testsuite/ld-cdtest/cdtest-foo.cc: Test for __GNUG__ >= 2.
Alan Modra [Sat, 3 Dec 2016 10:28:15 +0000 (20:58 +1030)]
Tidy ppc64_elf_hide_symbol
* elf64-ppc.c (ppc64_elf_hide_symbol): Access hash table as
elf_link_hash_table rather than ppc_link_hash_table.
Alan Modra [Sat, 3 Dec 2016 10:27:50 +0000 (20:57 +1030)]
PowerPC64 add_symbol_adjust
* elf64-ppc.c (add_symbol_adjust): Delete dead code.
Alan Modra [Sat, 3 Dec 2016 10:27:27 +0000 (20:57 +1030)]
Indirect and warning symbols
It's possible but unlikely that an indirect symbol points at a warning
symbol.
* elf64-ppc.c (add_symbol_adjust): Correct order of tests for
warning and indirect symbols.
Alan Modra [Sat, 3 Dec 2016 10:25:25 +0000 (20:55 +1030)]
ppc64_elf_copy_indirect_symbol versioned_hidden fix
As per _bfd_elf_link_hash_copy_indirect.
* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy dynamic
flags when direct symbol is versioned_hidden.
Alan Modra [Sat, 3 Dec 2016 10:24:57 +0000 (20:54 +1030)]
try_copy_symbol_type node_class check
* ldexp.c (try_copy_symbol_type): Remove unnecessary check.
GDB Administrator [Sat, 3 Dec 2016 00:00:22 +0000 (00:00 +0000)]
Automatic date update in version.in
Simon Marchi [Fri, 2 Dec 2016 22:12:37 +0000 (17:12 -0500)]
Introduce enum_flag type for ui_out flags
This patch changes the ui_out flags to be an enum flag.
gdb/ChangeLog:
* ui-out.h: Include "common/enum-flags.h".
(enum ui_flags): Rename to ...
(enum ui_out_flag): ... this.
(ui_out_flags): Define enum flag type.
(ui_out_test_flags): Change type of parameter to ui_out_flags.
(ui_out_new): Likewise.
* ui-out.c (ui_out_test_flags): Likewise.
(ui_out_new): Likewise.
* cli-out.c (cli_out_new): Update variable type.
* mi/mi-out.c (mi_out_new): Likewise.
* tui/tui-out.c (tui_out_new): Likewise.
Luis Machado [Fri, 2 Dec 2016 19:36:15 +0000 (13:36 -0600)]
Remove unneeded pattern matching in gdb.base/maint.exp
This gets rid of more useless pattern matching cases in gdb.base/maint.exp.
gdb/testsuite/ChangeLog:
2016-12-02 Luis Machado <lgustavo@codesourcery.com>
* gdb.base/maint.exp: Use gdb_test instead of gdb_test_multiple when
possible.
Remove useless pattern-matching code.
Pedro Alves [Fri, 2 Dec 2016 19:17:14 +0000 (19:17 +0000)]
Support an "unlimited" number of user-defined arguments
New in v2:
- A few adjustments / simplifications were possible now that we
require C++11:
. Use std::unique_ptr to make the user_args_stack std::vector own
its elements:
static std::vector<std::unique_ptr<user_args>> user_args_stack;
. use vector::emplace_back to construct elements directly in the
corresponding vectors.
. use std::to_string instead of adding a gdb::to_string
replacement.
- Now includes a test.
Docs/NEWS are unchanged from v1 and have already been approved.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I recently wrote a user-defined command that could benefit from
supporting an unlimited number of arguments:
http://palves.net/list-active-signal-handlers-with-gdb/
E.g., 'info signal-dispositions 1 2 3 4 5 6 7 8 9 10 11'
However, we currently only support up to 10 arguments passed to
user-defined commands ($arg0..$arg9).
I can't find a good reason for that, other than "old code with hard
coded limits". This patch removes that limit and modernizes the code
along the way:
- Makes the user_args struct a real C++ class that uses std::vector
for storage.
- Removes the "next" pointer from within user_args and uses a
std::vector to maintain a stack instead.
- Adds a new RAII-based scoped_user_args_level class to help
push/pop user args in the stack instead of using a cleanup.
gdb/ChangeLog:
2016-12-02 Pedro Alves <palves@redhat.com>
* NEWS: Mention that user commands now accept an unlimited number
of arguments.
* cli/cli-script.c: Include <vector>.
(struct string_view): New type.
(MAXUSERARGS): Delete.
(struct user_args): Now a C++ class.
(user_args_stack): New.
(struct scoped_user_args_level): New type.
(execute_user_command): Use scoped_user_args_level.
(arg_cleanup): Delete.
(setup_user_args): Deleted, and refactored as ...
(user_args::user_args): ... this new constructor. Limit of number
of arguments removed.
(insert_user_defined_cmd_args): Defer to user_args_stack.
(user_args::insert_args): New, bits based on old
insert_user_defined_cmd_args with limit of number of arguments
eliminated.
gdb/doc/ChangeLog:
2016-12-02 Pedro Alves <palves@redhat.com>
* gdb.texinfo (User-defined Commands): Limit on number of
arguments passed to user-defined commands removed; update.
gdb/testsuite/ChangeLog:
2016-12-02 Pedro Alves <palves@redhat.com>
* gdb.base/commands.exp (user_defined_command_manyargs_test): New
procedure.
(top level): Call it.
Pedro Alves [Fri, 2 Dec 2016 19:17:13 +0000 (19:17 +0000)]
Test user-defined gdb commands and arguments stack
We're missing a test that makes sure that arguments to user-defined
commands are handled correctly when a user-defined command calls
another user-defined command / recurses.
The following patch changes that code, so add such a test first so we
can be confident won't be breaking this use case.
gdb/testsuite/ChangeLog:
2016-12-02 Pedro Alves <palves@redhat.com>
* gdb.base/commands.exp (user_defined_command_args_stack_test):
New procedure.
(top level): Call it.
Pedro Alves [Fri, 2 Dec 2016 19:17:13 +0000 (19:17 +0000)]
Fix PR 20559 - "eval" command and $arg0...$arg9/$argc substitution
It'd be handy to be able to iterate over command arguments in
user-defined commands, in order to support optional arguments
($arg0..$argN).
I thought I could make it work with "eval", but alas, it doesn't work
currently. E.g., with:
define test
set $i = 0
while $i < $argc
eval "print $arg%d", $i
set $i = $i + 1
end
end
we get:
(gdb) test 1
$1 = void
(gdb) test 1 2 3
$2 = void
$3 = void
$4 = void
(gdb)
The problem is that "eval" doesn't do user-defined command arguments
substitution after expanding its own argument. This patch fixes that,
which makes the example above work:
(gdb) test 1
$1 = 1
(gdb) test 1 2 3
$2 = 1
$3 = 2
$4 = 3
(gdb)
New test included, similar the above, but also exercises expanding
$argc.
I think this is likely to simplify many scripts out there, so I'm
adding an example to the manual and mentioning it in NEWS as well.
gdb/ChangeLog:
2016-12-02 Pedro Alves <palves@redhat.com>
PR cli/20559
* NEWS: Mention "eval" expands user-defined command arguments.
* cli/cli-script.c (execute_control_command): Adjust to rename.
(insert_args): Rename to ...
(insert_user_defined_cmd_args): ... this, and make extern.
* cli/cli-script.h (insert_user_defined_cmd_args): New
declaration.
* printcmd.c: Include "cli/cli-script.h".
(eval_command): Call insert_user_defined_cmd_args.
gdb/doc/ChangeLog:
2016-12-02 Pedro Alves <palves@redhat.com>
PR cli/20559
* gdb.texinfo (Define): Add example of using "eval" to process a
variable number of arguments.
(Output) <eval>: Add anchor.
gdb/testsuite/ChangeLog:
2016-12-02 Pedro Alves <palves@redhat.com>
PR cli/20559
* gdb.base/commands.exp (user_defined_command_args_eval): New
procedure.
(top level): Call it.
Nick Clifton [Fri, 2 Dec 2016 17:53:42 +0000 (17:53 +0000)]
Fix typo in changelog entry
Nick Clifton [Fri, 2 Dec 2016 17:46:26 +0000 (17:46 +0000)]
Fix seg-fault in linker when passed a corrupt binary input file.
PR lf/20908
* elflink.c (bfd_elf_final_link): Check for ELF flavour binaries
when following indirect links.
Luis Machado [Fri, 2 Dec 2016 17:37:57 +0000 (11:37 -0600)]
Revert change to gdb.cp/ovldbreak.exp
This reverts the timeout handling (removed by
018572b88885ae67d22612937fa1e4fd98d5f5ad) for gdb.cp/ovldbreak.exp until we
decide what to do about this particular function.
gdb/testsuite/ChangeLog:
2016-12-02 Luis Machado <lgustavo@codesourcery.com>
* gdb.base/ovldbreak.exp (take_gdb_out_of_choice_menu): Restore
timeout handling.
Nick Clifton [Fri, 2 Dec 2016 16:41:14 +0000 (16:41 +0000)]
Fix seg-fault in the linker when examining a corrupt binary.
PR ld/20909
* aoutx.h (aout_link_add_symbols): Fix off-by-one error in check
for an illegal string offset.
Tom Tromey [Mon, 14 Nov 2016 03:56:34 +0000 (20:56 -0700)]
PR symtab/16264 - support DW_AT_main_subprogram
This patch adds support for DW_AT_main_subprogram.
This is PR symtab/16264.
DW_AT_main_subprogram is used to mark a program's entry point. GCC
can emit this, and I hope to change the Rust compiler to emit it as
well.
GDB already supports an older, pre-DWARF 4 convention adopted by
FORTRAN compilers, namely to emit DW_AT_calling_convention for the
"main" function. However, I think this support in GDB had a small
bug, in that it seems to rely on the DW_AT_name being read before
DW_AT_calling_convention. This patch fixes this as well.
Built and regtested on x86-64 Fedora 24 and the buildbot. New test
case included.
2016-12-02 Tom Tromey <tom@tromey.com>
PR symtab/16264:
* dwarf2read.c (struct partial_die_info) <main_subprogram>: New
member.
(add_partial_symbol): Call set_objfile_main_name.
(read_partial_die): Handle DW_AT_main_subprogram.
<DW_AT_calling_convention>: don't call set_objfile_main_name, but
set main_subprogram flag.
2016-12-02 Tom Tromey <tom@tromey.com>
* gdb.dwarf2/main-subprogram.c: New file.
* gdb.dwarf2/main-subprogram.exp: New file.
Nick Clifton [Fri, 2 Dec 2016 15:43:53 +0000 (15:43 +0000)]
Fix seg-fault in the linker when attempting to print out a malicious linker script.
PR ld/20910
* ldmain.c (main): Prevent evaluation of %<char> sequences when
printing out a linker script.
Claudiu Zissulescu [Fri, 2 Dec 2016 15:08:10 +0000 (16:08 +0100)]
[ARC] Sync cpu names with the ones accepted by GCC.
gas/
2016-12-02 Claudiu Zissulescu <claziss@synopsys.com>
* testsuite/gas/arc/cpu-em-err.s: New file.
* testsuite/gas/arc/cpu-em4-err.s: Likewise.
* testsuite/gas/arc/cpu-fpuda-err.s: Likewise.
* testsuite/gas/arc/cpu-hs-err.s: Likewise.
* testsuite/gas/arc/cpu-quarkse-err.s: Likewise.
* testsuite/gas/arc/noargs_a7.s: Add .cpu.
* config/tc-arc.c (ARC_CPU_TYPE_A6xx): Define.
(ARC_CPU_TYPE_A7xx): Likewise.
(ARC_CPU_TYPE_AV2EM): Likewise.
(ARC_CPU_TYPE_AV2HS): Likewise.
(cpu_types): Update list of known CPU names.
(arc_show_cpu_list): New function.
(md_show_usage): Print accepted CPU names.
(cl_features): New variable.
(arc_select_cpu): Use cl_features.
(arc_option): Allow various .cpu names.
(md_parse_option): Set cl_features.
* doc/c-arc.texi: Update -mcpu and .cpu documentation.
Simon Marchi [Fri, 2 Dec 2016 15:16:51 +0000 (10:16 -0500)]
Rename some trace functions
This patch renames a few trace-related functions, so that they adhere to
the de facto standard of naming command entry point functions
<command>_command. I like the ease of looking up a command entry point
if they all follow that rule.
An enum label "tstop_command" conflicts with a new function name, so I
renamed this one trace_stop_command.
In v2:
- Rename functions of the trace_find family, as well as
trace_dump_command.
gdb/ChangeLog:
* tracefile-tfile.c (tfile_write_status): Adjust to renames.
* tracefile.c (trace_save_command): Rename to...
(tsave_command): ...this.
(_initialize_tracefile): Adjust to renames.
* tracepoint.c (trace_actions_command): Rename to...
(actions_command): ...this.
(trace_start_command): Rename to...
(tstart_command): ...this, and adjust to renames..
(trace_stop_command): Rename to...
(tstop_command): ...this.
(trace_status_command): Rename to...
(tstatus_command): ...this, and adjust to renames.
(trace_find_command): Rename to...
(tfind_command): ...this.
(trace_find_pc_command): Rename to...
(tfind_pc_command): ...this.
(trace_find_tracepoint_command): Rename to...
(tfind_tracepoint_command): ...this.
(trace_find_line_command): Rename to...
(tfind_line_command): ...this.
(trace_find_range_command): Rename to...
(tfind_range_command): ...this.
(trace_find_outside_command): Rename to...
(tfind_outside_command): ...this.
(trace_dump_command): Rename to...
(tdump_command): ...this.
(tfind_1): Adjust to renames.
(trace_find_end_command): Rename to...
(tfind_end_command): ...this, and adjust to renames..
(trace_status_mi): Adjust to renames.
(parse_trace_status): Adjust to renames.
(_initialize_tracepoint): Adjust to renames.
* tracepoint.h (enum trace_stop_reason) <tstop_command>: Rename
to...
<trace_stop_command>: ...this.
Nick Clifton [Fri, 2 Dec 2016 15:03:05 +0000 (15:03 +0000)]
Fix seg-fault in linker when applying relocs to a corrupt binary.
PR ld/20911
* ldctor.c (ldctor_build_sets): Produce alternative error message
if the reloc was being applied to a special section.
Simon Marchi [Fri, 2 Dec 2016 14:55:09 +0000 (09:55 -0500)]
Remove mi_out_data::suppress_output
The suppress_output field of the mi_ui_out_data structure is never actually
set to 1/true. We can therefore remove it, and remove all the
if (suppress_output)
checks.
gdb/ChangeLog:
* mi/mi-out.c (mi_ui_out_data) <suppress_output>: Remove.
(mi_table_body): Remove suppress_output check.
(mi_table_end): Likewise.
(mi_table_header): Likewise.
(mi_begin): Likewise.
(mi_end): Likewise.
(mi_field_int): Likewise.
(mi_field_string): Likewise.
(mi_field_fmt): Likewise.
(mi_out_data_ctor): Likewise.
Nick Clifton [Fri, 2 Dec 2016 14:40:46 +0000 (14:40 +0000)]
Fix seg-fault linking corrupt binary.
PR ld/20912
* emultempl/elf32.em (_place_orphan): Test for ELF format of the
orphan before looking for the SHF_EXCLUDE flag.
Gary Benson [Tue, 29 Nov 2016 11:14:02 +0000 (11:14 +0000)]
Always pass a valid section header offset to elf_parse_notes
_bfd_elf_make_section_from_shdr calls elf_parse_notes with an offset
of -1. This argument is used to calculate Elf_Internal_Note.descpos,
which ends up set to a positive but meaningless value. This commit
updates _bfd_elf_make_section_from_shdr to pass the correct offset to
elf_parse_notes, making Elf_Internal_Note.descpos correct in all cases.
bfd/ChangeLog:
* elf.c (_bfd_elf_make_section_from_shdr): Pass offset to
elf_parse_notes.
Josh Conner [Fri, 2 Dec 2016 10:44:29 +0000 (10:44 +0000)]
Add support for Fushia OS.
* configure.ac: Add fuchsia to targets that use ELF.
* configure: Regenerated.
bfd * configure.tgt: Add support for fuchsia (OS).
gas * configure.tgt: Add support for fuchsia (OS).
ld * Makefile.am: Add dependency information for earmelf_fuchsia.c.
* Makefile.in: Regenerate.
* configure.tgt: Add support for aarch64-*-fuchsia, arm*-*-fuchsia*, and
x86_64-*-fuchsia* targets.
* emulparams/armelf_fuchsia.sh: New file.
* emulparams/armelfb_fuchsia.sh: New file.
Yao Qi [Fri, 2 Dec 2016 09:37:30 +0000 (09:37 +0000)]
[AArch64] Recognize STR instruction in prologue
This patch teaches GDB AArch64 backend to recognize STR instructions
in prologue, like 'str x19, [sp, #-48]!' or 'str w0, [sp, #44]'.
The unit test is added too.
gdb:
2016-12-02 Yao Qi <yao.qi@linaro.org>
Pedro Alves <palves@redhat.com>
* aarch64-tdep.c (aarch64_analyze_prologue): Recognize STR
instruction.
(aarch64_analyze_prologue_test): More tests.
Yao Qi [Fri, 2 Dec 2016 09:37:30 +0000 (09:37 +0000)]
Add unit test to aarch64 prologue analyzer
We don't have an effective way to test prologue analyzer which is
highly dependent on instruction patterns in prologue generated by
compiler. GDB prologue analyzer may not handle the new sequences
generated by new compiler, or may still handle some sequences that
generated by very old compilers which are no longer used. The
former is a functionality issue, while the latter is a maintenance
issue.
The input and output of prologue analyzer is quite clear, so it
fits for unit test. The input is series of instructions, and the
output are 1) where prologue end, 2) where registers are saved.
In aarch64, they are represented in 'struct aarch64_prologue_cache'.
This patch refactors aarch64_analyze_prologue so it can read
instructions from either real target or test harness. In unit
test aarch64_analyze_prologue_test, aarch64_analyze_prologue gets
instructions we prepared in the test, as the input of prologue
analyzer. Then, we checked various fields in
'struct aarch64_prologue_cache'.
gdb:
2016-12-02 Yao Qi <yao.qi@linaro.org>
Pedro Alves <palves@redhat.com>
* aarch64-tdep.c: Include "selftest.h".
(abstract_instruction_reader): New class.
(instruction_reader): New class.
(aarch64_analyze_prologue): Add new parameter reader. Call
reader.read instead of read_memory_unsigned_integer.
[GDB_SELF_TEST] (instruction_reader_test): New class.
(aarch64_analyze_prologue_test): New function.
(_initialize_aarch64_tdep) [GDB_SELF_TEST]: Register
selftests::aarch64_analyze_prologue_test.
* trad-frame.c (trad_frame_cache_zalloc):
(trad_frame_alloc_saved_regs): Add a new function.
* trad-frame.h (trad_frame_alloc_saved_regs): Declare.
Luis Machado [Fri, 2 Dec 2016 04:07:02 +0000 (22:07 -0600)]
Don't handle timeout inside gdb_test_multiple
This fixes a few cases where the testcase is explicitly handling timeouts
inside gdb_test_multiple when it is not necessary.
It also converts two gdb_test_multiple calls to gdb_test_no_output calls
(also removing the timeout handling).
gdb/testsuite/ChangeLog:
2016-12-01 Luis Machado <lgustavo@codesourcery.com>
* gdb.base/maint.exp: Remove timeout handling for gdb_test_multiple.
* gdb.cp/gdb2495.exp: Likewise and convert gdb_test_multiple into
gdb_test_no_output for a couple of cases.
* gdb.cp/ovldbreak.exp: Remove timeout handling for gdb_test_multiple.
Cary Coutant [Fri, 2 Dec 2016 03:54:05 +0000 (19:54 -0800)]
Fix problem where orphan section is treated as a KEEP section.
gold/
PR gold/20717
* script-sections.cc (Script_sections): Set *keep to false when
no match.
Cary Coutant [Fri, 2 Dec 2016 03:00:30 +0000 (19:00 -0800)]
Fix problem causing internal error when -z max-page-size is used.
If the default starting address is less than the new ABI page size,
we end up misaligning the file header, causing an internal error.
gold/
PR gold/20834
* target.h (Target::default_text_segment_address): Bump default
start address up to ABI page size.
Cary Coutant [Fri, 2 Dec 2016 00:32:38 +0000 (16:32 -0800)]
Implement --push-state/--pop-state.
gold/
PR gold/18989
* options.cc (General_options::object_format_to_string): New function.
(General_options::copy_from_posdep_options): New function.
(General_options::parse_push_state): New function.
(General_options::parse_pop_state): New function.
* options.h (--push-state, --pop-state): New options.
(General_options::object_format_to_string): New method.
(General_options::set_incremental_disposition): New method.
(General_options::copy_from_posdep_options): New method.
(General_options::options_stack_): New data member.
GDB Administrator [Fri, 2 Dec 2016 00:00:35 +0000 (00:00 +0000)]
Automatic date update in version.in
Simon Marchi [Thu, 1 Dec 2016 21:20:02 +0000 (16:20 -0500)]
Class-ify ui_out_table
This patch makes a class out of the ui_out_table structure, the
structure responsible for managing the generation of an UI table.
To simplify the ui_out_table object, I changed it so that it can only be
used for generating a single object. Instead of clearing the header
list when starting a new table, we an ui_out_table when starting a
table and delete it when we're done. Therefore, the checks:
if (uiout->table->flag)
if (!uiout->table->flag)
are respectively replaced with
if (uiout->table != nullptr)
if (uiout->table == nullptr)
Note: I removed the check at the beginning of ui_out_begin, because
there is an equivalent check at the beginning of verify_field.
New in v2:
- use "enum class" for ui_out_table::state and update references.
gdb/ChangeLog:
* ui-out.c (enum ui_out_table_state): Move to class
ui_out_table as ui_out_table::state.
(struct ui_out_table): Change to ...
(class ui_out_table): ... this.
<flag>: Remove.
<entry_level>: Rename to ...
<m_entry_level>: ... this.
<columns>: Rename to ...
<m_nr_cols>: ... this.
<id>: Rename to ...
<m_id>: ... this.
<headers>: Rename to ...
<m_headers>: ... this.
<headers_iterator>: Rename to ...
<m_headers_iterator>: ... this.
<start_body, append_header, start_row, get_next_header,
query_field, current_state, entry_level>: New methods.
(struct ui_out) <table>: Change type to unique_ptr to
ui_out_table.
(append_header_to_list, get_next_header, clear_header_list,
clear_table): Remove.
(ui_out_table_begin): Instantiate ui_out_table object. Update
table check.
(ui_out_table_body): Update table check, replace code with call
to ui_out_table::start_body.
(ui_out_table_end): Update table check, replace manual cleanup
with assignment of uiout->table unique_ptr to nullptr.
(ui_out_table_header): Update table check, replace call to
append_header_to_list with call to append_header method.
(ui_out_begin): Remove one table state check, update another.
Replace code with call to start_row method.
(verify_field): Update table checks.
(ui_out_query_field): Update table check, replace code with call
to query_field method.
(ui_out_new): Remove table initialization code.
Simon Marchi [Thu, 1 Dec 2016 21:10:45 +0000 (16:10 -0500)]
ui_out_table: Replace boolean flag with enum
This patch is just a little cleanup, it replaces the body_flag field of
ui_out_table with an enum. It expresses more explicitly the
intent of the field (check that state == TABLE_STATE_HEADERS conveys
more what we want to do than checking for !body_flag).
New in v2:
- Remove unnecessary ui_out_table_state::.
gdb/ChangeLog:
* ui-out.c (enum ui_out_table_state): New enum.
(struct ui_out_table) <body_flag>: Remove field.
<state>: New field.
(ui_out_table_begin): Replace usages of body_flag with state.
(ui_out_table_body): Likewise.
(ui_out_table_end): Likewise.
(ui_out_table_header): Likewise.
(ui_out_begin): Likewise.
(verify_field): Likewise.
(ui_out_new): Likewise.
Simon Marchi [Thu, 1 Dec 2016 21:05:17 +0000 (16:05 -0500)]
Simplify ui-out level code
Now that we use a vector to store the levels, we don't have to keep a
separate level field in ui_out to keep track of the current level. We
can efficiently derive it from the vector size. That causes a little
change in the meaning of the level, as in they are now 1-based instead
of 0-based (the initial level has the "id" 1 now), but it shouldn't
change anything in the behavior.
Additionally, push_level and pop_level don't really need to return the
new level, making them return void simplifies the code a bit.
Finally, the ui_out_begin/ui_out_end callbacks in the ui_out_impl
interface don't need to be passed the level, it's never actually used.
New in v2:
- Remove or update stale comments.
gdb/ChangeLog:
* ui-out.h (ui_out_begin_ftype): Remove level parameter.
(ui_out_end_ftype): Likewise.
* ui-out.c (struct ui_out) <level>: Replace field with a method
that dynamically computes the result.
(current_level): Get vector's back item instead of using
uiout->level.
(push_level): Make return type void.
(pop_level): Make return type void and update access to
ui_out::level.
(uo_begin): Remove level parameter.
(uo_end): Likewise.
(ui_out_table_begin): Update access to uiout::level.
(ui_out_begin): Don't read return value from push_level, call
uiout->level() instead, update call to uo_begin.
(ui_out_end): Don't read return value from pop_level, update
call to uo_end.
(verify_field): Update access to uiout->level.
(ui_out_new): Don't initialize ui_out::level, call push_level
to push the initial level instead of doing it by hand.
* cli-out.c (cli_begin): Remove level parameter.
(cli_end): Likewise.
* mi/mi-out.c (mi_begin): Likewise.
(mi_end): Likewise.
Simon Marchi [Thu, 1 Dec 2016 21:04:43 +0000 (16:04 -0500)]
Class-ify ui_out_level
This patch changes struct ui_out_level to be a real C++ class. No
behavioral changes.
gdb/ChangeLog:
* ui-out.c (struct ui_out_level): Replace with ...
(class ui_out_level): ... this.
(current_level): Update.
(push_level): Update.
(pop_level): Update.
(verify_field): Update.
(ui_out_new): Update.
Simon Marchi [Thu, 1 Dec 2016 21:02:00 +0000 (16:02 -0500)]
Class-ify ui_out_hdr
This patch makes ui_out_hdr (the object that represents an ui-out table
header) a proper C++ class. No behavior changes, it's all about
encapsulation.
gdb/ChangeLog:
* ui-out.c (struct ui_out_hdr): Replace with ...
(class ui_out_hdr): ... this.
(append_header_to_list): Update.
(get_next_header): Update.
(ui_out_query_field): Update.
Simon Marchi [Thu, 1 Dec 2016 20:59:01 +0000 (15:59 -0500)]
Use std::string for ui_out_hdr's text fields
This patch makes ui_out_hdr use std::string for its text fields. It
makes freeing automatic when the object is deleted.
gdb/ChangeLog:
* mi/mi-out.c (mi_table_header): Change char * args to
std::string.
* cli-out.c (cli_table_header): Likewise.
* ui-out.h (table_header_ftype): Likewise.
(ui_out_table_header): Constify colhdr argument.
(ui_out_query_field): Constify col_name argument.
* ui-out.c (ui_out_hdr) <col_name, colhdr>: Change type to
std::string.
(uo_table_header): Change char * args to std::string.
(ui_out_table_header): Likewise.
(get_next_header): Constify colhdr argument and adapt.
(clear_header_list): Don't free col_name/colhdr fields.
(append_header_to_list): Change char * args to std::string and
adapt.
(verify_field): Constify variable.
(ui_out_query_field): Constify col_name argument and adapt.
* breakpoint.c (wrap_indent_at_field): Constify variable.
Simon Marchi [Thu, 1 Dec 2016 20:58:40 +0000 (15:58 -0500)]
Replace hand-made linked list of ui_out_hdr by vector and iterator
Instead of keeping pointers to first, last and current ui_out_hdr in
ui_out_table, we can use an std::vector and an iterator. Direct random
access of to vector helps make get_next_header a bit nicer by avoiding
iterating on all the headers. append_header_to_list is also a bit
simpler.
Also, using unique_ptr inside the vector allows expressing the ownership
of the ui_out_hdr objects by the ui_out_table object, and it simplifies
the destruction.
gdb/ChangeLog:
* ui-out.c (struct ui_out_hdr) <next>: Remove.
(struct ui_out_table) <header_first, header_last, header_next>: Remove.
<headers, headers_iterator>: New fields.
(ui_out_table_body): Update for the new data structure.
(ui_out_begin): Likewise.
(clear_header_list): Likewise.
(append_header_to_list): Likewise.
(get_next_header): Likewise.
(ui_out_query_field): Likewise.
(ui_out_new): Likewise.
Cary Coutant [Thu, 1 Dec 2016 20:50:21 +0000 (12:50 -0800)]
Fix internal error when relaxing branches to STT_SECTION symbols.
gold/
PR gold/20807
* aarch64.cc (Target_aarch64::scan_reloc_section_for_stubs): Handle
section symbols correctly.
* arm.cc (Target_arm): Likewise.
* powerpc.cc (Target_powerpc): Likewise.
Luis Machado [Thu, 1 Dec 2016 20:47:50 +0000 (14:47 -0600)]
Fixup testcases outputting own name as a test name and standardize failed compilation messages
Changes in v3:
- Adjusted some testcases where the message "failed to compile" was not unique.
Changes in v2:
- Addressed comments from reviewers.
- Fixed spurious whitespaces.
- Changed compilation failure messages that included source/binary paths to
ones that are short and deterministic.
---
Another bit of cleanup to the testsuite. We have a number of tests that are
not honoring the rule of not outputting their own name as a test name.
I fixed up all the offenders i could find with the following regular
expression:
"(xfail|kfail|kpass|fail|pass|unsupported|untested) ([A-Za-z0-9]+|\\\$(.)*testfile(.)*)\.exp$"
gdb/testsuite/ChangeLog:
2016-12-01 Luis Machado <lgustavo@codesourcery.com>
Fix test names and standardize compilation error messages throughout
the following files:
* gdb.ada/start.exp
* gdb.arch/alpha-step.exp
* gdb.arch/e500-prologue.exp
* gdb.arch/ftrace-insn-reloc.exp
* gdb.arch/gdb1291.exp
* gdb.arch/gdb1431.exp
* gdb.arch/gdb1558.exp
* gdb.arch/i386-dr3-watch.exp
* gdb.arch/i386-sse-stack-align.exp
* gdb.arch/ia64-breakpoint-shadow.exp
* gdb.arch/pa-nullify.exp
* gdb.arch/powerpc-aix-prologue.exp
* gdb.arch/thumb-bx-pc.exp
* gdb.base/annota1.exp
* gdb.base/annota3.exp
* gdb.base/arrayidx.exp
* gdb.base/assign.exp
* gdb.base/attach.exp
* gdb.base/auxv.exp
* gdb.base/bang.exp
* gdb.base/bfp-test.exp
* gdb.base/bigcore.exp
* gdb.base/bitfields2.exp
* gdb.base/break-fun-addr.exp
* gdb.base/break-probes.exp
* gdb.base/call-rt-st.exp
* gdb.base/callexit.exp
* gdb.base/catch-fork-kill.exp
* gdb.base/charset.exp
* gdb.base/checkpoint.exp
* gdb.base/comprdebug.exp
* gdb.base/constvars.exp
* gdb.base/coredump-filter.exp
* gdb.base/cursal.exp
* gdb.base/cvexpr.exp
* gdb.base/detach.exp
* gdb.base/display.exp
* gdb.base/dmsym.exp
* gdb.base/dprintf-pending.exp
* gdb.base/dso2dso.exp
* gdb.base/dtrace-probe.exp
* gdb.base/dump.exp
* gdb.base/enum_cond.exp
* gdb.base/exe-lock.exp
* gdb.base/exec-invalid-sysroot.exp
* gdb.base/execl-update-breakpoints.exp
* gdb.base/exprs.exp
* gdb.base/fileio.exp
* gdb.base/find.exp
* gdb.base/finish.exp
* gdb.base/fixsection.exp
* gdb.base/foll-vfork.exp
* gdb.base/frame-args.exp
* gdb.base/gcore.exp
* gdb.base/gdb1250.exp
* gdb.base/global-var-nested-by-dso.exp
* gdb.base/gnu-ifunc.exp
* gdb.base/hashline1.exp
* gdb.base/hashline2.exp
* gdb.base/hashline3.exp
* gdb.base/hbreak-in-shr-unsupported.exp
* gdb.base/huge.exp
* gdb.base/infcall-input.exp
* gdb.base/info-fun.exp
* gdb.base/info-shared.exp
* gdb.base/jit-simple.exp
* gdb.base/jit-so.exp
* gdb.base/jit.exp
* gdb.base/jump.exp
* gdb.base/label.exp
* gdb.base/lineinc.exp
* gdb.base/logical.exp
* gdb.base/longjmp.exp
* gdb.base/macscp.exp
* gdb.base/miscexprs.exp
* gdb.base/new-ui-echo.exp
* gdb.base/new-ui-pending-input.exp
* gdb.base/new-ui.exp
* gdb.base/nodebug.exp
* gdb.base/nofield.exp
* gdb.base/offsets.exp
* gdb.base/overlays.exp
* gdb.base/pending.exp
* gdb.base/pointers.exp
* gdb.base/pr11022.exp
* gdb.base/printcmds.exp
* gdb.base/prologue.exp
* gdb.base/ptr-typedef.exp
* gdb.base/realname-expand.exp
* gdb.base/relativedebug.exp
* gdb.base/relocate.exp
* gdb.base/remote.exp
* gdb.base/reread.exp
* gdb.base/return2.exp
* gdb.base/savedregs.exp
* gdb.base/sep.exp
* gdb.base/sepdebug.exp
* gdb.base/sepsymtab.exp
* gdb.base/set-inferior-tty.exp
* gdb.base/setshow.exp
* gdb.base/shlib-call.exp
* gdb.base/sigaltstack.exp
* gdb.base/siginfo-addr.exp
* gdb.base/signals.exp
* gdb.base/signull.exp
* gdb.base/sigrepeat.exp
* gdb.base/so-impl-ld.exp
* gdb.base/solib-display.exp
* gdb.base/solib-overlap.exp
* gdb.base/solib-search.exp
* gdb.base/solib-symbol.exp
* gdb.base/structs.exp
* gdb.base/structs2.exp
* gdb.base/symtab-search-order.exp
* gdb.base/twice.exp
* gdb.base/unload.exp
* gdb.base/varargs.exp
* gdb.base/watchpoint-solib.exp
* gdb.base/watchpoint.exp
* gdb.base/whatis.exp
* gdb.base/wrong_frame_bt_full.exp
* gdb.btrace/dlopen.exp
* gdb.cell/ea-standalone.exp
* gdb.cell/ea-test.exp
* gdb.cp/dispcxx.exp
* gdb.cp/gdb2384.exp
* gdb.cp/method2.exp
* gdb.cp/nextoverthrow.exp
* gdb.cp/pr10728.exp
* gdb.disasm/am33.exp
* gdb.disasm/h8300s.exp
* gdb.disasm/mn10300.exp
* gdb.disasm/sh3.exp
* gdb.dwarf2/dw2-dir-file-name.exp
* gdb.fortran/complex.exp
* gdb.fortran/library-module.exp
* gdb.guile/scm-pretty-print.exp
* gdb.guile/scm-symbol.exp
* gdb.guile/scm-type.exp
* gdb.guile/scm-value.exp
* gdb.linespec/linespec.exp
* gdb.mi/gdb701.exp
* gdb.mi/gdb792.exp
* gdb.mi/mi-breakpoint-changed.exp
* gdb.mi/mi-dprintf-pending.exp
* gdb.mi/mi-dprintf.exp
* gdb.mi/mi-exit-code.exp
* gdb.mi/mi-pending.exp
* gdb.mi/mi-solib.exp
* gdb.mi/new-ui-mi-sync.exp
* gdb.mi/pr11022.exp
* gdb.mi/user-selected-context-sync.exp
* gdb.opt/solib-intra-step.exp
* gdb.python/py-events.exp
* gdb.python/py-finish-breakpoint.exp
* gdb.python/py-mi.exp
* gdb.python/py-prettyprint.exp
* gdb.python/py-shared.exp
* gdb.python/py-symbol.exp
* gdb.python/py-template.exp
* gdb.python/py-type.exp
* gdb.python/py-value.exp
* gdb.reverse/solib-precsave.exp
* gdb.reverse/solib-reverse.exp
* gdb.server/solib-list.exp
* gdb.stabs/weird.exp
* gdb.threads/reconnect-signal.exp
* gdb.threads/stepi-random-signal.exp
* gdb.trace/actions.exp
* gdb.trace/ax.exp
* gdb.trace/backtrace.exp
* gdb.trace/change-loc.exp
* gdb.trace/deltrace.exp
* gdb.trace/ftrace-lock.exp
* gdb.trace/ftrace.exp
* gdb.trace/infotrace.exp
* gdb.trace/mi-tracepoint-changed.exp
* gdb.trace/packetlen.exp
* gdb.trace/passcount.exp
* gdb.trace/pending.exp
* gdb.trace/range-stepping.exp
* gdb.trace/report.exp
* gdb.trace/stap-trace.exp
* gdb.trace/tfind.exp
* gdb.trace/trace-break.exp
* gdb.trace/trace-condition.exp
* gdb.trace/trace-enable-disable.exp
* gdb.trace/trace-mt.exp
* gdb.trace/tracecmd.exp
* gdb.trace/tspeed.exp
* gdb.trace/tsv.exp
* lib/perftest.exp
Luis Machado [Thu, 1 Dec 2016 20:46:28 +0000 (14:46 -0600)]
Fix test names starting with uppercase using multi-line gdb_test_multiple
This fixes offender testcases that have test names starting with uppercase
when using gdb_test_multiple in a multi-line construct.
gdb/testsuite/ChangeLog
2016-12-01 Luis Machado <lgustavo@codesourcery.com>
* gdb.cp/gdb2495.exp: Replace gdb_test_multiple
with gdb_test_no_output.
Use command as test name.
Luis Machado [Thu, 1 Dec 2016 20:45:32 +0000 (14:45 -0600)]
Fix test names starting with uppercase using multi-line gdb_test_no_output
This fixes offender testcases that have test names starting with uppercase
when using gdb_test_no_output in a multi-line construct.
gdb/testsuite/ChangeLog
2016-12-01 Luis Machado <lgustavo@codesourcery.com>
Fix test names starting with uppercase throughout the files.
* gdb.ada/assign_1.exp
* gdb.ada/boolean_expr.exp
* gdb.base/arrayidx.exp
* gdb.base/del.exp
* gdb.base/gcore-buffer-overflow.exp
* gdb.base/testenv.exp
* gdb.compile/compile.exp
* gdb.python/py-framefilter-invalidarg.exp
* gdb.python/py-framefilter.exp
Luis Machado [Thu, 1 Dec 2016 20:44:38 +0000 (14:44 -0600)]
Fix test names starting with uppercase using multi-line gdb_test/mi_gdb_test
This fixes offender testcases that have test names starting with uppercase
when using gdb_test/mi_gdb_test in a multi-line construct.
gdb/testsuite/ChangeLog
2016-12-01 Luis Machado <lgustavo@codesourcery.com>
Fix test names starting with uppercase throughout the files.
* gdb.ada/array_return.exp
* gdb.ada/expr_delims.exp
* gdb.ada/mi_dyn_arr.exp
* gdb.ada/mi_interface.exp
* gdb.ada/mi_var_array.exp
* gdb.ada/watch_arg.exp
* gdb.arch/alpha-step.exp
* gdb.arch/altivec-regs.exp
* gdb.arch/e500-regs.exp
* gdb.arch/powerpc-d128-regs.exp
* gdb.base/arrayidx.exp
* gdb.base/break.exp
* gdb.base/checkpoint.exp
* gdb.base/debug-expr.exp
* gdb.base/dmsym.exp
* gdb.base/radix.exp
* gdb.base/sepdebug.exp
* gdb.base/testenv.exp
* gdb.base/watch_thread_num.exp
* gdb.base/watchpoint-cond-gone.exp
* gdb.cell/break.exp
* gdb.cell/ea-cache.exp
* gdb.compile/compile.exp
* gdb.cp/gdb2495.exp
* gdb.gdb/selftest.exp
* gdb.gdb/xfullpath.exp
* gdb.go/hello.exp
* gdb.go/integers.exp
* gdb.objc/basicclass.exp
* gdb.pascal/hello.exp
* gdb.pascal/integers.exp
* gdb.python/py-breakpoint.exp
* gdb.python/py-cmd.exp
* gdb.python/py-linetable.exp
* gdb.python/py-xmethods.exp
* gdb.python/python.exp
* gdb.reverse/consecutive-precsave.exp
* gdb.reverse/finish-precsave.exp
* gdb.reverse/i386-precsave.exp
* gdb.reverse/machinestate-precsave.exp
* gdb.reverse/sigall-precsave.exp
* gdb.reverse/solib-precsave.exp
* gdb.reverse/step-precsave.exp
* gdb.reverse/until-precsave.exp
* gdb.reverse/watch-precsave.exp
* gdb.threads/leader-exit.exp
* gdb.threads/pthreads.exp
* gdb.threads/wp-replication.exp
* gdb.trace/actions.exp
* gdb.trace/mi-tsv-changed.exp
* gdb.trace/tsv.exp
Luis Machado [Thu, 1 Dec 2016 20:43:42 +0000 (14:43 -0600)]
Fix test names starting with uppercase using gdb_test_multiple
This fixes offender testcases that have test names starting with uppercase
when using gdb_test_multiple in a single-line construct.
gdb/testsuite/ChangeLog
2016-12-01 Luis Machado <lgustavo@codesourcery.com>
Fix test names starting with uppercase throughout the files.
* gdb.arch/i386-bp_permanent.exp
* gdb.arch/i386-gnu-cfi.exp
* gdb.base/disasm-end-cu.exp
* gdb.base/macscp.exp
* gdb.base/pending.exp
* gdb.base/watch_thread_num.exp
* gdb.cp/exception.exp
* gdb.cp/gdb2495.exp
* gdb.cp/local.exp
* gdb.python/py-evsignal.exp
* gdb.python/python.exp
* gdb.trace/tracecmd.exp
Luis Machado [Thu, 1 Dec 2016 20:42:48 +0000 (14:42 -0600)]
Fix test names starting with uppercase using gdb_test_no_output
This fixes offender testcases that have test names starting with uppercase
when using gdb_test_no_output in a single-line construct.
gdb/testsuite/ChangeLog
2016-12-01 Luis Machado <lgustavo@codesourcery.com>
Fix test names starting with uppercase throughout the files.
* gdb.base/charset.exp
* gdb.base/eval.exp
* gdb.base/multi-forks.exp
* gdb.guile/scm-progspace.exp
* gdb.opencl/datatypes.exp
* gdb.python/py-block.exp
* gdb.python/py-function.exp
* gdb.python/py-symbol.exp
* gdb.python/py-symtab.exp
* gdb.python/py-xmethods.exp
* gdb.reverse/break-precsave.exp
* gdb.reverse/break-reverse.exp
* gdb.reverse/consecutive-precsave.exp
* gdb.reverse/consecutive-reverse.exp
* gdb.reverse/finish-precsave.exp
* gdb.reverse/finish-reverse-bkpt.exp
* gdb.reverse/finish-reverse.exp
* gdb.reverse/fstatat-reverse.exp
* gdb.reverse/getresuid-reverse.exp
* gdb.reverse/i386-precsave.exp
* gdb.reverse/i386-reverse.exp
* gdb.reverse/i386-sse-reverse.exp
* gdb.reverse/i387-stack-reverse.exp
* gdb.reverse/insn-reverse.exp
* gdb.reverse/machinestate-precsave.exp
* gdb.reverse/machinestate.exp
* gdb.reverse/next-reverse-bkpt-over-sr.exp
* gdb.reverse/pipe-reverse.exp
* gdb.reverse/readv-reverse.exp
* gdb.reverse/recvmsg-reverse.exp
* gdb.reverse/rerun-prec.exp
* gdb.reverse/s390-mvcle.exp
* gdb.reverse/sigall-precsave.exp
* gdb.reverse/sigall-reverse.exp
* gdb.reverse/solib-precsave.exp
* gdb.reverse/solib-reverse.exp
* gdb.reverse/step-precsave.exp
* gdb.reverse/step-reverse.exp
* gdb.reverse/time-reverse.exp
* gdb.reverse/until-precsave.exp
* gdb.reverse/until-reverse.exp
* gdb.reverse/waitpid-reverse.exp
* gdb.reverse/watch-precsave.exp
* gdb.reverse/watch-reverse.exp
Luis Machado [Thu, 1 Dec 2016 20:41:23 +0000 (14:41 -0600)]
Fix test names starting with uppercase using gdb_test on a single line.
Changes in v3:
Fixed incorrect substitutions.
This fixes offender testcases that have test names starting with uppercase
when using gdb_test in a single line construct.
gdb/testsuite/ChangeLog
2016-12-01 Luis Machado <lgustavo@codesourcery.com>
Fix test names starting with uppercase throughout the files.
* gdb.arch/i386-mpx-simple_segv.exp
* gdb.arch/i386-mpx.exp
* gdb.arch/i386-permbkpt.exp
* gdb.arch/pa-nullify.exp
* gdb.arch/powerpc-d128-regs.exp
* gdb.arch/vsx-regs.exp
* gdb.base/bfp-test.exp
* gdb.base/break.exp
* gdb.base/breakpoint-shadow.exp
* gdb.base/callfuncs.exp
* gdb.base/charset.exp
* gdb.base/commands.exp
* gdb.base/completion.exp
* gdb.base/dfp-test.exp
* gdb.base/echo.exp
* gdb.base/ending-run.exp
* gdb.base/eval.exp
* gdb.base/expand-psymtabs.exp
* gdb.base/float128.exp
* gdb.base/floatn.exp
* gdb.base/foll-exec-mode.exp
* gdb.base/gdb1056.exp
* gdb.base/gdb11531.exp
* gdb.base/kill-after-signal.exp
* gdb.base/multi-forks.exp
* gdb.base/overlays.exp
* gdb.base/pending.exp
* gdb.base/sepdebug.exp
* gdb.base/testenv.exp
* gdb.base/valgrind-db-attach.exp
* gdb.base/watch_thread_num.exp
* gdb.base/watchpoint-cond-gone.exp
* gdb.base/watchpoint.exp
* gdb.base/watchpoints.exp
* gdb.cp/arg-reference.exp
* gdb.cp/baseenum.exp
* gdb.cp/operator.exp
* gdb.cp/shadow.exp
* gdb.dwarf2/dw2-op-out-param.exp
* gdb.dwarf2/dw2-reg-undefined.exp
* gdb.go/chan.exp
* gdb.go/hello.exp
* gdb.go/integers.exp
* gdb.go/methods.exp
* gdb.go/package.exp
* gdb.guile/scm-parameter.exp
* gdb.guile/scm-progspace.exp
* gdb.guile/scm-value.exp
* gdb.mi/mi-pending.exp
* gdb.mi/user-selected-context-sync.exp
* gdb.multi/multi-attach.exp
* gdb.multi/tids.exp
* gdb.opt/clobbered-registers-O2.exp
* gdb.pascal/floats.exp
* gdb.pascal/integers.exp
* gdb.python/py-block.exp
* gdb.python/py-events.exp
* gdb.python/py-parameter.exp
* gdb.python/py-symbol.exp
* gdb.python/py-symtab.exp
* gdb.python/py-type.exp
* gdb.python/py-value.exp
* gdb.python/py-xmethods.exp
* gdb.python/python.exp
* gdb.reverse/break-precsave.exp
* gdb.reverse/consecutive-precsave.exp
* gdb.reverse/finish-precsave.exp
* gdb.reverse/i386-precsave.exp
* gdb.reverse/machinestate-precsave.exp
* gdb.reverse/sigall-precsave.exp
* gdb.reverse/solib-precsave.exp
* gdb.reverse/step-precsave.exp
* gdb.reverse/until-precsave.exp
* gdb.reverse/watch-precsave.exp
* gdb.server/ext-attach.exp
* gdb.server/ext-restart.exp
* gdb.server/ext-run.exp
* gdb.server/ext-wrapper.exp
* gdb.stabs/gdb11479.exp
* gdb.stabs/weird.exp
* gdb.threads/attach-many-short-lived-threads.exp
* gdb.threads/kill.exp
* gdb.threads/watchpoint-fork.exp
Luis Machado [Thu, 1 Dec 2016 20:40:05 +0000 (14:40 -0600)]
Fix test names starting with uppercase output by basic functions
The following patch is based on the previous patch i sent and handles cases of
test names that start with an uppercase letter. Test names should start with
lowercase unless it starts with the name of a technology, architecture, ISA
etc.
This first patch addresses cases of test names output explicitly via xfail,
kfail, kpass, fail, pass, unsupported, untested and also names set with the
pattern "set test" and "set testname".
gdb/testsuite/ChangeLog:
2016-12-01 Luis Machado <lgustavo@codesourcery.com>
Fix test names starting with uppercase throughout all the files below.
* gdb.ada/array_return.exp
* gdb.ada/catch_ex.exp
* gdb.ada/info_exc.exp
* gdb.ada/mi_catch_ex.exp
* gdb.ada/mi_dyn_arr.exp
* gdb.ada/mi_ex_cond.exp
* gdb.ada/mi_exc_info.exp
* gdb.ada/mi_interface.exp
* gdb.ada/mi_task_arg.exp
* gdb.ada/mi_task_info.exp
* gdb.ada/mi_var_array.exp
* gdb.arch/alpha-step.exp
* gdb.arch/amd64-disp-step.exp
* gdb.arch/arm-disp-step.exp
* gdb.arch/disp-step-insn-reloc.exp
* gdb.arch/e500-prologue.exp
* gdb.arch/ftrace-insn-reloc.exp
* gdb.arch/gdb1558.exp
* gdb.arch/i386-bp_permanent.exp
* gdb.arch/i386-disp-step.exp
* gdb.arch/i386-float.exp
* gdb.arch/i386-gnu-cfi.exp
* gdb.arch/ia64-breakpoint-shadow.exp
* gdb.arch/mips16-thunks.exp
* gdb.arch/pa-nullify.exp
* gdb.arch/powerpc-aix-prologue.exp
* gdb.arch/powerpc-power.exp
* gdb.arch/ppc-dfp.exp
* gdb.arch/s390-tdbregs.exp
* gdb.arch/spu-info.exp
* gdb.arch/spu-ls.exp
* gdb.arch/thumb-bx-pc.exp
* gdb.base/advance.exp
* gdb.base/annota-input-while-running.exp
* gdb.base/arrayidx.exp
* gdb.base/asmlabel.exp
* gdb.base/async.exp
* gdb.base/attach-wait-input.exp
* gdb.base/auto-connect-native-target.exp
* gdb.base/batch-preserve-term-settings.exp
* gdb.base/bfp-test.exp
* gdb.base/bigcore.exp
* gdb.base/bp-permanent.exp
* gdb.base/break-always.exp
* gdb.base/break-fun-addr.exp
* gdb.base/break-idempotent.exp
* gdb.base/break-main-file-remove-fail.exp
* gdb.base/break-probes.exp
* gdb.base/break-unload-file.exp
* gdb.base/break.exp
* gdb.base/call-ar-st.exp
* gdb.base/call-rt-st.exp
* gdb.base/call-sc.exp
* gdb.base/call-signal-resume.exp
* gdb.base/call-strs.exp
* gdb.base/callexit.exp
* gdb.base/callfuncs.exp
* gdb.base/catch-gdb-caused-signals.exp
* gdb.base/catch-signal-siginfo-cond.exp
* gdb.base/catch-syscall.exp
* gdb.base/compare-sections.exp
* gdb.base/cond-eval-mode.exp
* gdb.base/condbreak-call-false.exp
* gdb.base/consecutive-step-over.exp
* gdb.base/cursal.exp
* gdb.base/disabled-location.exp
* gdb.base/disasm-end-cu.exp
* gdb.base/display.exp
* gdb.base/double-prompt-target-event-error.exp
* gdb.base/dprintf-bp-same-addr.exp
* gdb.base/dprintf-detach.exp
* gdb.base/dprintf-next.exp
* gdb.base/dprintf-non-stop.exp
* gdb.base/dprintf-pending.exp
* gdb.base/dso2dso.exp
* gdb.base/ending-run.exp
* gdb.base/enum_cond.exp
* gdb.base/examine-backward.exp
* gdb.base/exe-lock.exp
* gdb.base/exec-invalid-sysroot.exp
* gdb.base/execl-update-breakpoints.exp
* gdb.base/execution-termios.exp
* gdb.base/fileio.exp
* gdb.base/fixsection.exp
* gdb.base/foll-exec-mode.exp
* gdb.base/foll-exec.exp
* gdb.base/fork-running-state.exp
* gdb.base/frame-args.exp
* gdb.base/fullpath-expand.exp
* gdb.base/func-ptr.exp
* gdb.base/gcore-relro-pie.exp
* gdb.base/gdb1090.exp
* gdb.base/gdb1555.exp
* gdb.base/global-var-nested-by-dso.exp
* gdb.base/gnu-ifunc.exp
* gdb.base/hbreak-in-shr-unsupported.exp
* gdb.base/hbreak-unmapped.exp
* gdb.base/hook-stop.exp
* gdb.base/infcall-input.exp
* gdb.base/info-fun.exp
* gdb.base/info-shared.exp
* gdb.base/interrupt-noterm.exp
* gdb.base/jit-so.exp
* gdb.base/jit.exp
* gdb.base/line-symtabs.exp
* gdb.base/list.exp
* gdb.base/longjmp.exp
* gdb.base/macscp.exp
* gdb.base/max-value-size.exp
* gdb.base/nodebug.exp
* gdb.base/nofield.exp
* gdb.base/overlays.exp
* gdb.base/paginate-after-ctrl-c-running.exp
* gdb.base/paginate-bg-execution.exp
* gdb.base/paginate-inferior-exit.exp
* gdb.base/pending.exp
* gdb.base/pr11022.exp
* gdb.base/printcmds.exp
* gdb.base/ptr-typedef.exp
* gdb.base/ptype.exp
* gdb.base/randomize.exp
* gdb.base/range-stepping.exp
* gdb.base/realname-expand.exp
* gdb.base/relativedebug.exp
* gdb.base/remote.exp
* gdb.base/savedregs.exp
* gdb.base/sepdebug.exp
* gdb.base/set-noassign.exp
* gdb.base/shlib-call.exp
* gdb.base/shreloc.exp
* gdb.base/sigaltstack.exp
* gdb.base/sigbpt.exp
* gdb.base/siginfo-addr.exp
* gdb.base/siginfo-obj.exp
* gdb.base/siginfo-thread.exp
* gdb.base/signest.exp
* gdb.base/signull.exp
* gdb.base/sigrepeat.exp
* gdb.base/skip.exp
* gdb.base/so-impl-ld.exp
* gdb.base/solib-corrupted.exp
* gdb.base/solib-disc.exp
* gdb.base/solib-display.exp
* gdb.base/solib-overlap.exp
* gdb.base/solib-search.exp
* gdb.base/solib-symbol.exp
* gdb.base/source-execution.exp
* gdb.base/sss-bp-on-user-bp-2.exp
* gdb.base/sss-bp-on-user-bp.exp
* gdb.base/stack-checking.exp
* gdb.base/stale-infcall.exp
* gdb.base/step-break.exp
* gdb.base/step-line.exp
* gdb.base/step-over-exit.exp
* gdb.base/step-test.exp
* gdb.base/structs.exp
* gdb.base/sym-file.exp
* gdb.base/symtab-search-order.exp
* gdb.base/term.exp
* gdb.base/type-opaque.exp
* gdb.base/unload.exp
* gdb.base/until-nodebug.exp
* gdb.base/until.exp
* gdb.base/unwindonsignal.exp
* gdb.base/watch-cond.exp
* gdb.base/watch-non-mem.exp
* gdb.base/watch_thread_num.exp
* gdb.base/watchpoint-reuse-slot.exp
* gdb.base/watchpoint-solib.exp
* gdb.base/watchpoint.exp
* gdb.btrace/dlopen.exp
* gdb.cell/arch.exp
* gdb.cell/break.exp
* gdb.cell/bt.exp
* gdb.cell/core.exp
* gdb.cell/data.exp
* gdb.cell/dwarfaddr.exp
* gdb.cell/ea-cache.exp
* gdb.cell/ea-standalone.exp
* gdb.cell/ea-test.exp
* gdb.cell/f-regs.exp
* gdb.cell/fork.exp
* gdb.cell/gcore.exp
* gdb.cell/mem-access.exp
* gdb.cell/ptype.exp
* gdb.cell/registers.exp
* gdb.cell/sizeof.exp
* gdb.cell/solib-symbol.exp
* gdb.cell/solib.exp
* gdb.compile/compile-tls.exp
* gdb.cp/exception.exp
* gdb.cp/gdb2495.exp
* gdb.cp/local.exp
* gdb.cp/mb-inline.exp
* gdb.cp/mb-templates.exp
* gdb.cp/pr10687.exp
* gdb.cp/pr9167.exp
* gdb.cp/scope-err.exp
* gdb.cp/templates.exp
* gdb.cp/virtfunc.exp
* gdb.dwarf2/dw2-dir-file-name.exp
* gdb.dwarf2/dw2-single-line-discriminators.exp
* gdb.fortran/complex.exp
* gdb.fortran/library-module.exp
* gdb.guile/guile.exp
* gdb.guile/scm-cmd.exp
* gdb.guile/scm-frame-inline.exp
* gdb.guile/scm-objfile.exp
* gdb.guile/scm-pretty-print.exp
* gdb.guile/scm-symbol.exp
* gdb.guile/scm-type.exp
* gdb.guile/scm-value.exp
* gdb.linespec/keywords.exp
* gdb.linespec/ls-errs.exp
* gdb.linespec/macro-relative.exp
* gdb.linespec/thread.exp
* gdb.mi/mi-breakpoint-changed.exp
* gdb.mi/mi-dprintf-pending.exp
* gdb.mi/mi-fullname-deleted.exp
* gdb.mi/mi-logging.exp
* gdb.mi/mi-pending.exp
* gdb.mi/mi-solib.exp
* gdb.mi/new-ui-mi-sync.exp
* gdb.mi/user-selected-context-sync.exp
* gdb.multi/dummy-frame-restore.exp
* gdb.multi/multi-arch-exec.exp
* gdb.multi/remove-inferiors.exp
* gdb.multi/watchpoint-multi-exit.exp
* gdb.opt/solib-intra-step.exp
* gdb.perf/backtrace.exp
* gdb.perf/single-step.exp
* gdb.perf/skip-command.exp
* gdb.perf/skip-prologue.exp
* gdb.perf/solib.exp
* gdb.python/lib-types.exp
* gdb.python/py-as-string.exp
* gdb.python/py-bad-printers.exp
* gdb.python/py-block.exp
* gdb.python/py-breakpoint.exp
* gdb.python/py-cmd.exp
* gdb.python/py-events.exp
* gdb.python/py-evthreads.exp
* gdb.python/py-finish-breakpoint.exp
* gdb.python/py-finish-breakpoint2.exp
* gdb.python/py-frame-inline.exp
* gdb.python/py-frame.exp
* gdb.python/py-inferior.exp
* gdb.python/py-infthread.exp
* gdb.python/py-mi.exp
* gdb.python/py-objfile.exp
* gdb.python/py-pp-maint.exp
* gdb.python/py-pp-registration.exp
* gdb.python/py-prettyprint.exp
* gdb.python/py-recurse-unwind.exp
* gdb.python/py-shared.exp
* gdb.python/py-symbol.exp
* gdb.python/py-symtab.exp
* gdb.python/py-template.exp
* gdb.python/py-type.exp
* gdb.python/py-unwind-maint.exp
* gdb.python/py-unwind.exp
* gdb.python/py-value.exp
* gdb.python/python.exp
* gdb.reverse/finish-reverse-bkpt.exp
* gdb.reverse/insn-reverse.exp
* gdb.reverse/next-reverse-bkpt-over-sr.exp
* gdb.reverse/solib-precsave.exp
* gdb.reverse/solib-reverse.exp
* gdb.stabs/gdb11479.exp
* gdb.stabs/weird.exp
* gdb.threads/fork-child-threads.exp
* gdb.threads/fork-plus-threads.exp
* gdb.threads/fork-thread-pending.exp
* gdb.threads/forking-threads-plus-breakpoint.exp
* gdb.threads/hand-call-in-threads.exp
* gdb.threads/interrupted-hand-call.exp
* gdb.threads/linux-dp.exp
* gdb.threads/local-watch-wrong-thread.exp
* gdb.threads/next-while-other-thread-longjmps.exp
* gdb.threads/non-ldr-exit.exp
* gdb.threads/pending-step.exp
* gdb.threads/print-threads.exp
* gdb.threads/process-dies-while-detaching.exp
* gdb.threads/process-dies-while-handling-bp.exp
* gdb.threads/pthreads.exp
* gdb.threads/queue-signal.exp
* gdb.threads/reconnect-signal.exp
* gdb.threads/signal-command-handle-nopass.exp
* gdb.threads/signal-command-multiple-signals-pending.exp
* gdb.threads/signal-delivered-right-thread.exp
* gdb.threads/signal-sigtrap.exp
* gdb.threads/sigthread.exp
* gdb.threads/staticthreads.exp
* gdb.threads/stepi-random-signal.exp
* gdb.threads/thread-unwindonsignal.exp
* gdb.threads/thread_check.exp
* gdb.threads/thread_events.exp
* gdb.threads/tid-reuse.exp
* gdb.threads/tls-nodebug.exp
* gdb.threads/tls-shared.exp
* gdb.threads/tls-so_extern.exp
* gdb.threads/tls.exp
* gdb.threads/wp-replication.exp
* gdb.trace/actions-changed.exp
* gdb.trace/actions.exp
* gdb.trace/backtrace.exp
* gdb.trace/change-loc.exp
* gdb.trace/collection.exp
* gdb.trace/deltrace.exp
* gdb.trace/disconnected-tracing.exp
* gdb.trace/entry-values.exp
* gdb.trace/ftrace-lock.exp
* gdb.trace/ftrace.exp
* gdb.trace/infotrace.exp
* gdb.trace/mi-trace-frame-collected.exp
* gdb.trace/mi-trace-unavailable.exp
* gdb.trace/mi-traceframe-changed.exp
* gdb.trace/mi-tracepoint-changed.exp
* gdb.trace/mi-tsv-changed.exp
* gdb.trace/no-attach-trace.exp
* gdb.trace/packetlen.exp
* gdb.trace/passc-dyn.exp
* gdb.trace/passcount.exp
* gdb.trace/pending.exp
* gdb.trace/pr16508.exp
* gdb.trace/qtro.exp
* gdb.trace/range-stepping.exp
* gdb.trace/read-memory.exp
* gdb.trace/report.exp
* gdb.trace/save-trace.exp
* gdb.trace/signal.exp
* gdb.trace/stap-trace.exp
* gdb.trace/status-stop.exp
* gdb.trace/strace.exp
* gdb.trace/tfile.exp
* gdb.trace/tfind.exp
* gdb.trace/trace-break.exp
* gdb.trace/trace-condition.exp
* gdb.trace/trace-enable-disable.exp
* gdb.trace/trace-mt.exp
* gdb.trace/tracecmd.exp
* gdb.trace/tracefile-pseudo-reg.exp
* gdb.trace/tspeed.exp
* gdb.trace/tstatus.exp
* gdb.trace/tsv.exp
* gdb.trace/unavailable.exp
* gdb.trace/while-dyn.exp
* gdb.trace/while-stepping.exp
* lib/gdb-guile.exp
* lib/gdb.exp
* lib/mi-support.exp
* lib/pascal.exp
* lib/perftest.exp
* lib/prelink-support.exp
* lib/selftest-support.exp
Jim Wilson [Thu, 1 Dec 2016 17:07:55 +0000 (09:07 -0800)]
Fix typo in ChangeLog entry.
Jim Wilson [Thu, 1 Dec 2016 17:06:07 +0000 (09:06 -0800)]
Fix bug with FP stur instructions.
sim/aarch64
* simulator.c (fsturs): Switch use of rn and st variables.
(fsturd, fsturq): Likewise
Nick Clifton [Thu, 1 Dec 2016 15:20:19 +0000 (15:20 +0000)]
Fix seg fault attempting to unget an EOF character.
PR gas/20898
* app.c (do_scrub_chars): Do not attempt to unget EOF.
Nick Clifton [Thu, 1 Dec 2016 15:02:45 +0000 (15:02 +0000)]
Fix seg-fault printing assembler statistics when the output file was not created.
PR gas/20897
* subsegs.c (subsegs_print_statistics): Do nothing if no output
file was created.
Rudy Y [Thu, 1 Dec 2016 14:43:36 +0000 (14:43 +0000)]
Fix generation of IDATA[6] for PE files.
PR ld/20880
* pe-dll.c (make_one): Use the hint if the ordinal is -1.
Luis Machado [Thu, 1 Dec 2016 14:42:11 +0000 (08:42 -0600)]
Fix calculation of synthetic symbol sizes (ppc64)
The attached patch fixes a problem where nm displays bogus information for
synthetic symbol sizes when --size-sort is used.
This happens because the synthetic symbols (dot symbols for ppc64) are
generated based on their non-dot symbols. The generation process doesn't copy
over the ELF-specific bits of the regular non-dot symbols.
When --size-sort is used, the code attempts to access the symbol size from
the ELF-specific bits and ends up reading gargabe, causing the size to be
displayed incorrectly.
With the patch, i can see dot and non-dot symbols having the same size with
--size-sort.
This doesn't fix the fact that we don't display size information for synthetic
symbols without --size-sort, which i may address in the future.
binutils/ChangeLog:
2016-12-01 Luis Machado <lgustavo@codesourcery.com>
* nm.c (sort_symbols_by_size): Don't read symbol size if symbol
is synthetic.
Yury Norov [Thu, 1 Dec 2016 12:31:51 +0000 (12:31 +0000)]
Fix accesses to the GOT for AARCH64 operating in 32-bit mode.
PR ld/20868
bfd * elfnn-aarch64.c (elfNN_aarch64_tls_relax): Use 32-bit accesses
to the GOT when operating in 32-bit mode.
ld * testsuite/ld-aarch64/tls-relax-gd-ie-ilp32.d: New test.
* testsuite/ld-aarch64/relocs-ilp32.ld: Linker script for the new
test.
* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
Ma Jiang [Thu, 1 Dec 2016 12:21:30 +0000 (12:21 +0000)]
Fix handling of MIPS16 HI16 relocs.
PR ld/16720
* elfxx-mips.c (mips_elf_calculate_relocation): Remove overflow
test for HI16 relocs.
Nick Clifton [Thu, 1 Dec 2016 10:49:39 +0000 (10:49 +0000)]
Fix a seg-fault disassembling a corrupt binary.
PR binutils/20892
* aoutx.h (find_nearest_line): Handle the case where the function
name is empty.
Nick Clifton [Thu, 1 Dec 2016 10:38:40 +0000 (10:38 +0000)]
Fix ICE in assembler when passed a corrupt input file.
PR gas/20895
* symbols.c (resolve_symbol_value): Gracefully handle erroneous
symbolic expressions.
Nick Clifton [Thu, 1 Dec 2016 10:26:32 +0000 (10:26 +0000)]
Fix abort in x86 disassembler.
PR binutils/20893
* i386-dis.c (OP_VEX): Replace call to abort with a append of bad
opcode designator.
Nick Clifton [Thu, 1 Dec 2016 10:15:07 +0000 (10:15 +0000)]
Fix seg-fault running addr2line on a corrupt binary.
PR binutils/20891
* aoutx.h (find_nearest_line): Handle the case where the main file
name and the directory name are both empty.
Simon Marchi [Thu, 1 Dec 2016 02:46:49 +0000 (21:46 -0500)]
Use std::string in ui_out_table
Use std::string for the id field of the ui_out_table object.
I found that all users of ui_out_table_begin passed a non-NULL value to
the tblid parameter, so we don't have to worry about the NULL case. I
changed the tblid parameter to be a std::string while at it.
gdb/ChangeLog:
* ui-out.c (struct ui_out_table) <id>: Change type to
std::string.
(ui_out_table_begin): Change tblid parameter type to
std::string, adapt code.
update following type change.
(clear_table): Update.
(ui_out_new): Update.