• 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/hashtable
RSS
Rev. Tiempo Autor
3286a5f users/cbiesinger/hashtable 2019-09-25 09:53:35 Christian Biesinger

Fork GCC's hash-table.h for use in GDB

And use it at one callsite in dwarf2read.

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

8410a65 2019-09-23 09:57:21 Alan Modra

bfin bfd.h tidy

bfd/
* bfd-in.h: Move bfin function declaration..
* elf32-bfin.h: ..to here, new file.
* elf32-bfin.c: Include elf32-bfin.h.
* bfd-in2.h: Regenerate.
ld/
* emultempl/bfin.em: Include elf32-bfin.h.

ca05ca5 2019-09-23 09:57:21 Alan Modra

cr16 bfd.h tidy

bfd/
* bfd-in.h: Move cr16 function declaration..
* elf32-cr16.h: ..to here, new file.
* elf32-cr16.c: Include elf32-cr16.h.
* bfd-in2.h: Regenerate.
ld/
* emultempl/cr16elf.em: Include elf32-cr16.h.

530f612 2019-09-23 09:57:21 Alan Modra

obsoleted bfd.h tidy

* bfd-in.h (bfd_sunos_get_needed_list),
(bfd_sunos_record_link_assignment),
(bfd_sunos_size_dynamic_sections),
(bfd_i386linux_size_dynamic_sections),
(bfd_sparclinux_size_dynamic_sections): Delete obsolete decls.
* bfd-in2.h: Regenerate.

6ea7de3 2019-09-23 09:57:21 Alan Modra

xcoff bfd.h tidy

bfd/
* bfd-in.h: Move xcoff function declarations..
* xcofflink.h: ..to here, new file.
* xcofflink.c: Include xcofflink.h.
* coff-rs6000.c (bfd_xcoff_ar_archive_set_magic): Delete unused func.
* bfd-in2.h: Regenerate.
ld/
* emultempl/aix.em: Include xcofflink.h.

aa739c5 2019-09-23 09:57:21 Alan Modra

coff bfd.h tidy

bfd/
* bfd-in.h: Delete coff forward refs and move coff declaration..
* coff-bfd.h: ..to here.
* bfd-in2.h: Regenerate.
binutils/
* dlltool.c: Include coff-bfd.h.

f37164d 2019-09-23 09:57:21 Alan Modra

arm bfd.h tidy

bfd/
* bfd-in.h: Move arm declaraions..
* cpu-arm.h: ..to here, new file..
* coff-arm.h: ..and here, new file..
* elf32-arm.h: ..and here, new file.
* cpu-arm.c: Include cpu-arm.h.
* coff-arm.c: Include cpu-arm.h and coff-arm.h.
* elf32-arm.c: Include cpu-arm.h and elf32-arm.h.
* pe-arm.c: Move function rename defines later.
* pe-arm-wince.c: Likewise and include sysdep.h and bfd.h early.
* bfd-in2.h: Regenerate.
gas/
* config/tc-arm.c: Include cpu-arm.h.
ld/
* emultempl/armelf.em: Include elf32-arm.h.
* emultempl/pe.em: Move func defines later and include coff-arm.h.

79c2ce5 2019-09-23 09:57:21 Alan Modra

tic6x bfd.h tidy

* bfd-in.h: Move tic6x function declaration..
* elf32-tic6x.h: ..to here.
* bfd-in2.h: Regenerate.

a8bfaad 2019-09-23 09:57:21 Alan Modra

aarch64 bfd.h tidy

bfd/
* bfd-in.h: Move aarch64 declarations and defines..
* cpu-aarch64.h: ..to here, new file..
* elfxx-aarch64.h: ..and here.
* cpu-aarch64.c: Include cpu-aarch64.h.
* elfnn-aarch64.c: Likewise.
* bfd-in2.h: Regenerate.
ld/
* emultempl/aarch64elf.em: Include elfxx-aarch64.h.

c348479 2019-09-23 09:57:21 Alan Modra

tic54x bfd.h tidy

* bfd-in.h: Delete ticoff function declarations.
* coff-tic54x.c (bfd_ticoff_set_section_load_page),
(bfd_ticoff_get_section_load_page): Make static.
* bfd-in2.h: Regenerate.

ca437b1 2019-09-23 09:57:21 Alan Modra

h8300 bfd.h tidy

* bfd-in.h: Move h8300 function declaration to..
* cpu-h8300.h: ..here, new file.
* cpu-h8300.c: Include cpu-h8300.h.
* elf32-h8300.c: Likewise.
* bfd-in2.h: Regenerate.