• R/O
  • HTTP
  • SSH
  • HTTPS

List of commits

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


users/cbiesinger/stl_minsyms_hash
RSS
Rev. Hora Autor
f55c45b users/cbiesinger/stl_minsyms_hash 2019-09-27 04:46:16 Christian Biesinger

Try converting ad-hoc msymbol hash tables to STL containers

I went with multimap (also tried unordered_multimap) to keep
the behavior where we have a special hash key and want
to iterate over everything with that hash using specialized
compare functions.

Unfortunately this is a 10% regression.
real 0m56.538s
user 0m34.304s
sys 0m22.380s

real 0m51.655s
user 0m32.194s
sys 0m19.528s

ececd21 2019-09-27 01:36:40 Christian Biesinger

Convert symtab.h function signatures to use bool instead of int

gdb/ChangeLog:

2019-09-26 Christian Biesinger <cbiesinger@google.com>

* blockframe.c (find_pc_partial_function): Change return type to bool.
* elfread.c (elf_gnu_ifunc_resolve_name): Likewise.
* minsyms.c (in_gnu_ifunc_stub): Likewise.
(stub_gnu_ifunc_resolve_name): Likewise.
* symtab.c (compare_filenames_for_search): Likewise.
(compare_glob_filenames_for_search): Likewise.
(matching_obj_sections): Likewise.
(symbol_matches_domain): Likewise.
(find_line_symtab): Change out param EXACT_MATCH to bool *.
(find_line_pc): Change return type to bool.
(find_line_pc_range): Likewise.
(producer_is_realview): Likewise.
* symtab.h (symbol_matches_domain): Likewise.
(find_pc_partial_function): Likewise.
(find_pc_line_pc_range): Likewise.
(in_gnu_ifunc_stub): Likewise.
(struct gnu_ifunc_fns) <gnu_ifunc_resolve_name>: Likewise.
(find_line_pc): Likewise.
(find_line_pc_range): Likewise.
(matching_obj_sections): Likewise.
(find_line_symtab): Change out parameter to bool.
(producer_is_realview): Change return type to bool.
(compare_filenames_for_search): Likewise.
(compare_glob_filenames_for_search): Likewise.

27a900b 2019-09-26 23:43:15 Tom Tromey

Remove gdb_usleep.c

I noticed that gdb_usleep is unused, so this patch removes it.

gdb/ChangeLog
2019-09-26 Tom Tromey <tom@tromey.com>

* Makefile.in (COMMON_SFILES): Remove gdb_usleep.c.
(HFILES_NO_SRCDIR): Remove gdb_usleep.h.
* gdb_usleep.h: Remove.
* gdb_usleep.c: Remove.
* utils.c: Don't include gdb_usleep.h.

5d63b30 2019-09-26 23:26:12 Tom Tromey

Do not expose stub types to Python

dwarf2read.c will create stub types for Ada "Taft Amendment" types.
These stub types can currently be exposed to Python code, where they
show up as TYPE_CODE_VOID types (but that, mysteriously, can sometimes
be used in other ways).

While it's possible to work with such types by using strip_typedefs,
this seemed unpleasant to me. This patch takes another approach
instead, which is to try not to expose stub types to Python users.

gdb/ChangeLog
2019-09-26 Tom Tromey <tromey@adacore.com>

* python/py-type.c (type_to_type_object): Call check_typedef
for stub types.

gdb/testsuite/ChangeLog
2019-09-26 Tom Tromey <tromey@adacore.com>

* gdb.ada/py_taft.exp: New file.
* gdb.ada/py_taft/main.adb: New file.
* gdb.ada/py_taft/pkg.adb: New file.
* gdb.ada/py_taft/pkg.ads: New file.

12904d3 2019-09-26 22:35:00 Tom Tromey

Remove initialize_utils

initialize_utils only registers some commands, so it isn't necessary
to run it at any particular time during startup. This patch removes
it and merges its contents into _initialize_utils.

Tested by the buildbot.

gdb/ChangeLog
2019-09-26 Tom Tromey <tom@tromey.com>

* utils.h (initialize_utils): Don't declare.
* top.c (gdb_init): Don't call initialize_utils.
* utils.c (initialize_utils): Remove. Move contents...
(_initialize_utils): ... here.

41f37a6 2019-09-26 19:21:18 Alan Modra

PR24262, plugin search dir doesn't respect --libdir

bfd/
PR 24262
* Makefile.am (AM_CPPFLAGS): Add -DLIBDIR.
* plugin.c (load_plugin): Search both ${libdir}/bfd-plugins and
${bindir}/../lib/bfd-plugins if different.
* Makefile.in: Regenerate.
ld/
PR 24262
* ld.texi (-plugin): Revert 2019-03-15 change.

d2f6178 2019-09-26 09:00:45 GDB Administrator

Automatic date update in version.in

858f25f 2019-09-26 00:37:56 Tom Tromey

Remove make_hex_string

I noticed that make_hex_string does essentially the same thing as
bin2hex, and furthermore is only called in a single spot. This patch
removes make_hex_string.

Tested by the builtbot.

gdb/ChangeLog
2019-09-25 Tom Tromey <tom@tromey.com>

* python/py-objfile.c (objfpy_get_build_id): Use bin2hex.
* utils.h (make_hex_string): Don't declare.
* utils.c (make_hex_string): Remove.

9a24a27 2019-09-25 23:44:44 Alan Modra

SORT_BY_INIT_PRIORITY

I was looking at the implementation of this script keyword today and
couldn't remember why we do what we do in get_init_priority, because
the comments explain how the init_priority is encoded but don't say
why it is necessary to extract the priority and sort on that. So
after figuring out why (again), I wrote some more comments.

Then I simplified get_init_priority a little, adding some sanity
checking on the strtoul result. This actually makes get_init_priority
support sorting by numerical suffix more generally, but I figure this
feature would be better as a new keyword (without the .ctors/.dtors
special case), so haven't documented the extension.

* ld.texi (SORT_BY_ALIGNMENT): Reword slightly.
(SORT_BY_INIT_PRIORITY): Elucidate.
* ldlang.c: Include limits.h.
(get_init_priority): Comment. Change param to a section,
return an int. Sanity check priority digits. Support sorting
more sections with trailing digits. Return -1 on error.
(compare_section): Adjust.

6ba2ed4 2019-09-25 22:34:23 Nick Clifton

Silence a build-time warning about constant comparisons when building with clang,

* emultempl/avrelf.em (_before_allocation): Silence build warning
using clang.

33637ec 2019-09-25 09:00:43 GDB Administrator

Automatic date update in version.in

3d43522 2019-09-25 06:38:49 Tom de Vries

[gdb/tdep] Handle mxcsr kernel bug on Intel Skylake CPUs

On my openSUSE Leap 15.1 x86_64 Skylake system with the default (4.12) kernel,
I run into:
...
FAIL: gdb.base/gcore.exp: corefile restored all registers
...

The problem is that there's a difference in the mxcsr register value before
and after the gcore command:
...
- mxcsr 0x0 [ ]
+ mxcsr 0x400440 [ DAZ OM ]
...

This can be traced back to amd64_linux_nat_target::fetch_registers, where
xstateregs is partially initialized by the ptrace call:
...
char xstateregs[X86_XSTATE_MAX_SIZE];
struct iovec iov;

amd64_collect_xsave (regcache, -1, xstateregs, 0);
iov.iov_base = xstateregs;
iov.iov_len = sizeof (xstateregs);
if (ptrace (PTRACE_GETREGSET, tid,
(unsigned int) NT_X86_XSTATE, (long) &iov) < 0)
perror_with_name (_("Couldn't get extended state status"));

amd64_supply_xsave (regcache, -1, xstateregs);
...
after which amd64_supply_xsave is called.

The amd64_supply_xsave call is supposed to only use initialized parts of
xstateregs, but due to a kernel bug on intel skylake (fixed from 4.14 onwards
by commit 0852b374173b "x86/fpu: Add FPU state copying quirk to handle XRSTOR
failure on Intel Skylake CPUs") it can happen that the mxcsr part of
xstateregs is not initialized, while amd64_supply_xsave expects it to be
initialized, which explains the FAIL mentioned above.

Fix the undetermined behaviour by initializing xstateregs before calling
ptrace, which makes sure we get a 0x0 for mxcsr when this kernel bug occurs,
and which also happens to fix the FAIL.

Furthermore, add an xfail for this FAIL which triggers the same kernel bug:
...
FAIL: gdb.arch/amd64-init-x87-values.exp: check_setting_mxcsr_before_enable: \
check new value of MXCSR is still in place
...

Both FAILs pass when using a 5.3 kernel instead on the system mentioned above.

Tested on x86_64-linux.

gdb/ChangeLog:

2019-09-24 Tom de Vries <tdevries@suse.de>

PR gdb/23815
* amd64-linux-nat.c (amd64_linux_nat_target::fetch_registers):
Initialize xstateregs before ptrace PTRACE_GETREGSET call.

gdb/testsuite/ChangeLog:

2019-09-24 Tom de Vries <tdevries@suse.de>

PR gdb/24598
* gdb.arch/amd64-init-x87-values.exp: Add xfail.

e8f8842 2019-09-24 23:00:41 Tamar Christina

Arm: Fix out of range conditional branch (PR/24991)

The fix for PR12848 introduced an off by one error in the mask, this corrected
the negative overflows but not the positive overflows. As a result the
conditional branch instructions accepted a too wide positive immediate which
resulted in it corrupting the instruction during encoding.

The relocation I believe has been incorrectly named, to be consistent with the
other relocations it should have been named BRANCH21 which is why the masks for
it are confusing.

I've replaced the masks with a function out_of_range_p which should make it
harder to make such mistakes.

The mask for BL/BLX on Armv6t+ is also wrong, the extended range is 25-bits
and so the mask should be checking for 24-bits for positive overflow.

gas/ChangeLog:

PR gas/24991
* config/tc-arm.c (out_of_range_p): New.
(md_apply_fix): Use it in BFD_RELOC_THUMB_PCREL_BRANCH9,
BFD_RELOC_THUMB_PCREL_BRANCH12, BFD_RELOC_THUMB_PCREL_BRANCH20,
BFD_RELOC_THUMB_PCREL_BRANCH23, BFD_RELOC_THUMB_PCREL_BRANCH25
* testsuite/gas/arm/pr24991.d: New test.
* testsuite/gas/arm/pr24991.l: New test.
* testsuite/gas/arm/pr24991.s: New test.

352f6bc 2019-09-24 22:23:51 Alan Modra

PR25031, nm reports wrong address on 32bit

Using saved_format breaks when nm is presented with multiple object
files, some 32-bit and some 64-bit.

PR 25031
* nm.c (print_format_string): New.
(get_print_format): Delete saved_format. Move earlier.
(set_print_width): Call get_print_format.
(print_value): Use print_format_string.

e449ea9 2019-09-24 18:29:18 Srinath Parvathaneni

[ARM]: Modify assembler to accept floating and signless datatypes for MVE instruction VLDR.

This patch modifies assembler to accept the equivalent sized floating
and signless datatypes for VLDR instruction but as alias for the unsigned version.

gas/ChangeLog:

2019-09-23 Srinath Parvathaneni <srinath.parvathaneni@arm.com>

* config/tc-arm.c (do_mve_vstr_vldr_RQ): Modify function to allow float
* and signless datatypes for few cases of VLDR instruction.
* testsuite/gas/arm/mve-vldr-bad-3.l: Modify.
* testsuite/gas/arm/mve-vldr-bad-3.s: Likewise.
* testsuite/gas/arm/mve-vstrldr-1.d: Likewise.
* testsuite/gas/arm/mve-vstrldr-1.s: Likewise.

5d33705 2019-09-24 18:07:56 Nick Clifton

Fix building gold with gcc-10.

* descriptors.cc: Include <string>

3868d2e 2019-09-24 09:00:31 GDB Administrator

Automatic date update in version.in

627d4cc 2019-09-24 06:36:42 Andrew Burgess

gdb/readline: Fix date in last ChangeLog entry

Fixes the date in the last ChangeLog entry.

32a1adc 2019-09-24 06:35:05 Andrew Burgess

gdb/readline: fix use of an undefined variable

This commit in binutils-gdb:

commit 830b67068cebe7db0eb0db3fa19244e03859fae0
Date: Fri Jul 12 09:53:02 2019 +0200

[readline] Fix heap-buffer-overflow in update_line

Which corresponds to this commit in upstream readline:

commit 31547b4ea4a1a904e1b08e2bc4b4ebd5042aedaa
Date: Mon Aug 5 10:24:27 2019 -0400

commit readline-20190805 snapshot

Introduced a use of an undefined variable, which can be seen using
valgrind:

$ valgrind --tool=memcheck gdb
GNU gdb (GDB) 8.3.50.20190918-git
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
==24924== Conditional jump or move depends on uninitialised value(s)
==24924== at 0x9986C3: rl_redisplay (display.c:710)
==24924== by 0x9839CE: readline_internal_setup (readline.c:447)
==24924== by 0x9A1C2B: _rl_callback_newline (callback.c:100)
==24924== by 0x9A1C85: rl_callback_handler_install (callback.c:111)
==24924== by 0x6195EB: gdb_rl_callback_handler_install(char const*) (event-top.c:319)
==24924== by 0x61975E: display_gdb_prompt(char const*) (event-top.c:409)
==24924== by 0x4FBFE3: cli_interp_base::pre_command_loop() (cli-interp.c:286)
==24924== by 0x6E53DA: interp_pre_command_loop(interp*) (interps.c:321)
==24924== by 0x731F30: captured_command_loop() (main.c:334)
==24924== by 0x733568: captured_main(void*) (main.c:1182)
==24924== by 0x7335CE: gdb_main(captured_main_args*) (main.c:1197)
==24924== by 0x41325D: main (gdb.c:32)
==24924==
(gdb)

The problem can be traced back to init_line_structures. The very
first time this function is ever called its MINSIZE parameter is
always 0 and the global LINE_SIZE is 1024. Prior to the above
mentioned commits we spot that the line_state variables have not yet
been initialised, and allocate them some new buffer, then we enter
this loop:

for (n = minsize; n < line_size; n++)
{
visible_line[n] = 0;
invisible_line[n] = 1;
}

which would initialise everything from the incoming minimum up to the
potentially extended upper line size.

The problem is that the above patches added a new condition that would
bump up the minsize like this:

if (minsize <= _rl_screenwidth) /* XXX - for gdb */
minsize = _rl_screenwidth + 1;

So, the first time this function is called the incoming MINSIZE is 0,
the LINE_SIZE global is 1024, and if the _rl_screenwidth is 80, we see
that MINSIZE will be pushed up to 80. We still notice that the line
state is uninitialised and allocate some buffers, then we enter the
initialisation loop:

for (n = minsize; n < line_size; n++)
{
visible_line[n] = 0;
invisible_line[n] = 1;
}

And initialise from 80 to 1023 i the newly allocated buffers, leaving
0 to 79 uninitialised.

To confirm this is an issue, if we then look at rl_redisplay we see
that a call to init_line_structures is followed first by a call to
rl_on_new_line, which does initialise visible_line[0], but not
invisible_line[0]. Later in rl_redisplay we have this logic:

if (visible_line[0] != invisible_line[0])
rl_display_fixed = 0;

The use of invisible_line[0] here will be undefined.

Considering how this variable was originally initialised before the
above patches, this patch modifies the initialisation loop in
init_line_structures, to use the original value of MINSIZE. With this
change the valgrind warning goes away.

readline/ChangeLog:

PR cli/24980
* display.c (init_line_structures): Initialise line_state using
original minsize value.

e2e9097 2019-09-24 06:11:16 Dimitar Dimitrov

Add testsuite for the PRU simulator port

sim/testsuite/ChangeLog:

* configure: Regenerate.

sim/testsuite/sim/pru/ChangeLog:

* add.s: New test.
* allinsn.exp: New file.
* dmem-zero-pass.s: New test.
* dmem-zero-trap.s: New test.
* dram.s: New test.
* jmp.s: New test.
* loop-imm.s: New test.
* loop-reg.s: New test.
* mul.s: New test.
* subreg.s: New test.
* testutils.inc: New file.

ddd44b7 2019-09-24 06:11:02 Dimitar Dimitrov

sim: Add PRU simulator port

A simulator port for the TI PRU I/O processor.

v1: https://sourceware.org/ml/gdb-patches/2016-12/msg00143.html
v2: https://sourceware.org/ml/gdb-patches/2017-02/msg00397.html
v3: https://sourceware.org/ml/gdb-patches/2017-02/msg00516.html
v4: https://sourceware.org/ml/gdb-patches/2018-06/msg00484.html
v5: https://sourceware.org/ml/gdb-patches/2019-08/msg00584.html
v6: https://sourceware.org/ml/gdb-patches/2019-09/msg00036.html

gdb/ChangeLog:

* NEWS: Mention new simulator port for PRU.

sim/ChangeLog:

* MAINTAINERS: Add myself as PRU maintainer.
* configure: Regenerated.
* configure.tgt: Add PRU.

sim/common/ChangeLog:

* gennltvals.sh: Add PRU libgloss target.
* nltvals.def: Regenerate from the latest libgloss sources.

sim/pru/ChangeLog:

* Makefile.in: New file.
* aclocal.m4: Regenerated.
* config.in: Regenerated.
* configure: Regenerated.
* configure.ac: New file.
* interp.c: New file.
* pru.h: New file.
* pru.isa: New file.
* sim-main.h: New file.

f945ded 2019-09-24 03:36:34 Christian Biesinger

Make ada_decode not use a static buffer

This makes it safer to use in general, and also allows using it on a
background thread in the future.

Inspired by tromey's patch at:
https://github.com/tromey/gdb/commit/1226cbdfa436297a5dec054d94592c45891afa93
(however, implemented in a different way)

gdb/ChangeLog:

2019-09-23 Christian Biesinger <cbiesinger@google.com>

* ada-exp.y (write_object_remaining): Update.
* ada-lang.c (ada_decode): Return a std::string instead of a char*
and eliminate the static buffer.
(ada_decode_symbol): Update.
(ada_la_decode): Update.
(ada_sniff_from_mangled_name): Update.
(is_valid_name_for_wild_match): Update.
(ada_lookup_name_info::matches): Update and simplify.
(name_matches_regex): Update.
(ada_add_global_exceptions): Update.
* ada-lang.h (ada_decode): Update signature.
* ada-varobj.c (ada_varobj_describe_simple_array_child): Update.
* dwarf-index-write.c (debug_names::insert): Update.

4a41f3f 2019-09-24 00:51:36 H.J. Lu

ld-plugin/pr24406-1.c: Correct buffer size to read

* testsuite/ld-plugin/pr24406-1.c (main): Correct buffer size
to read.

ec73ddc 2019-09-23 23:19:25 Alan Modra

PowerPC64 dynamic symbol tweaks

In check_relocs, bfd_link_pic true means ld is producing a shared
library or a position independent executable. !bfd_link_pic means a
fixed position (ie. static) executable since the relocatable linking
case is excluded. So it is appropriate to continue using bfd_link_pic
when testing whether non-pcrelative relocations should be dynamic, and
!bfd_link_pic for the special case of ifunc in static executables.
However, -Bsymbolic shouldn't affect PIEs (they are executables so
none of their symbols should be overridden) and PIEs can support copy
relocations, thus bfd_link_executable should be used in those cases
rather than bfd_link_pic.

I've also removed the test of ELIMINATE_COPY_RELOCS in check_relocs.
We can sort out what to do regarding copy relocs later, which allows
the code in check_relocs to be simplified.

* elf64-ppc.c (ppc64_elf_check_relocs): Use bfd_link_executable
in choosing between different actions for shared library and
non-shared library cases. Delete ELIMINATE_COPY_RELOCS test.
(dec_dynrel_count): Likewise. Account for ifunc special case.
(ppc64_elf_adjust_dynamic_symbol): Copy relocs are for executables,
not non-pic.
(allocate_dynrelocs): Comment fixes. Delete ELIMINATE_COPY_RELOCS
test.

6831670 2019-09-23 23:14:21 Alan Modra

implicit conversion from enum ld_plugin_level to enum ld_plugin_status

This is a gcc10 warning fix.

gold/
* testsuite/plugin_new_section_layout.c (new_input_hook): Correct
return status enum values.

b06252c 2019-09-23 09:57:22 Alan Modra

bfd Makefile update

* Makefile.am (SOURCE_HFILES): Add many missing .h files.
* Makefile.in: Regenerate.
* po/SRC-POTFILES.in: Regenerate.

640197a 2019-09-23 09:57:22 Alan Modra

linker bfd.h tidy

bfd/
* bfd-in.h (bfd_symbol, bfd_section_already_linked),
(bfd_elf_version_tree): Delete forward declarations.
Move other forward decls and remaining elf function decl later.
(bfd_section_already_linked_table_init),
(bfd_section_already_linked_table_free),
(_bfd_handle_already_linked, _bfd_nearby_section),
(_bfd_fix_excluded_sec_syms): Move to bfdlink.h.
include/
* bfdlink.h (struct bfd_section_already_linked): Forward declare.
(bfd_section_already_linked_table_init),
(bfd_section_already_linked_table_free),
(_bfd_handle_already_linked, _bfd_nearby_section),
(_bfd_fix_excluded_sec_syms): Declare.

0ba9378 2019-09-23 09:57:22 Alan Modra

ecoff bfd.h tidy

bfd/
* bfd-in.h: Move ecoff function declarations..
* ecoff-bfd.h: ..to here, new file.
* ecoff.c: Include ecoff-bfd.h.
* ecofflink.c: Likewise.
* elf64-alpha.c: Likewise.
* elfxx-mips.c: Likewise.
* bfd-in2.h: Regenerate.
gas/
* config/obj-ecoff.c: Include ecoff-bfd.h.
* config/obj-elf.c: Likewise.

0b4453c 2019-09-23 09:57:22 Alan Modra

elf bfd.h tidy

bfd/
* bfd-in.h (enum notice_asneeded_action): Move to bfdlink.h.
Move most other elf declarations..
* elf-bfd.h: ..to here.
* bfd-in2.h: Regenerate.
include/
* bfdlink.h (enum notice_asneeded_action): Define.
ld/
* deffilep.y: Include bfdlink.h.
* ldelf.c: Likewise.
* ldelfgen.c: Likewise.
* ldver.c: Likewise.
* mri.c: Likewise.
* emultempl/irix.em: Don't include ld.h, ldmain.h, libiberty.h.
Comment.

f5c5b7c 2019-09-23 09:57:22 Alan Modra

m68k bfd.h tidy

bfd/
* bfd-in.h: Move m68k function declaration..
* cpu-m68k.h: ..to here, new file..
* elf32-m68k.h: ..and here, new file.
* elf32-m68k.c: Include cpu-m68k.h and elf32-m68k.h.
* bfd-in2.h: Regenerate.
ld/
* emultempl/m68kelf.em: Include elf32-m68k.h.
opcodes/
* m68k-dis.c: Include cpu-m68k.h