• 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/minidump
RSS
Rev. Hora Autor
2196e89 users/cbiesinger/minidump 2020-02-15 06:11:07 Christian Biesinger

Start working on reading .dmp files

Change-Id: I0cf39c48938b78ae3776d52f425133cadaa33de6

5f661e0 2020-02-15 04:41:07 Simon Marchi

gnulib: import count-one-bits module and use it

For a fix I intend to submit, I would need a function that counts the
number of set bits in a word. There is __builtin_popcount that is
supported by gcc and clang, but there is also a gnulib module that wraps
that and provides a fallback for other compilers, so I think it would be
good to use it.

I also noticed that there is a bitcount function in arch/arm.c, so I
thought that as a first step I would replace that one with the gnulib
count-one-bits module. This is what this patch does.

The gnulib module provides multiple functions, with various parameter
length (unsigned int, unsigned long int, unsigned long long int), I
chose the one that made sense for each call site based on the argument
type.

gnulib/ChangeLog:

* update-gnulib.sh (IMPORTED_GNULIB_MODULES): Import
count-one-bits module.
* configure: Re-generate.
* aclocal.m4: Re-generate.
* Makefile.in: Re-generate.
* import/count-one-bits.c: New file.
* import/count-one-bits.h: New file.
* import/Makefile.am: Re-generate.
* import/Makefile.in: Re-generate.
* import/m4/gnulib-cache.m4: Re-generate.
* import/m4/gnulib-comp.m4: Re-generate.
* import/m4/count-one-bits.m4: New file.

gdb/ChangeLog:

* arm-tdep.c: Include count-one-bits.h.
(cleanup_block_store_pc): Use count_one_bits.
(cleanup_block_load_pc): Use count_one_bits.
(arm_copy_block_xfer): Use count_one_bits.
(thumb2_copy_block_xfer): Use count_one_bits.
(thumb_copy_pop_pc_16bit): Use count_one_bits.
* arch/arm-get-next-pcs.c: Include count-one-bits.h.
(thumb_get_next_pcs_raw): Use count_one_bits.
(arm_get_next_pcs_raw): Use count_one_bits_l.
* arch/arm.c (bitcount): Remove.
* arch/arm.h (bitcount): Remove.

8084e57 2020-02-15 04:38:04 Tom Tromey

Return unique_xmalloc_ptr from call_site_find_chain

call_site_find_chain returns a pointer that the caller must
deallocate. It seemed better here to return a unique_xmalloc_ptr
instead.

gdb/ChangeLog
2020-02-14 Tom Tromey <tromey@adacore.com>

* dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first):
Update.
* dwarf2/loc.h (call_site_find_chain): Return unique_xmalloc_ptr.
* dwarf2/loc.c (call_site_find_chain_1): Return
unique_xmalloc_ptr.
(call_site_find_chain): Likewise.

07d9838 2020-02-14 23:09:28 H.J. Lu

Remove the old movsx and movzx documentation for AT&T syntax

* doc/c-i386.texi: Remove the old movsx and movzx documentation
for AT&T syntax.

6867aac 2020-02-14 22:45:14 H.J. Lu

Remove Intel syntax comments on movsx and movzx

Since movsx and movzx are valid mnemonic in AT&T syntax, remove Intel
syntax comments on movsx and movzx to avoid confusing other readers.

* i386-opc.tbl (movsx): Remove Intel syntax comments.
(movzx): Likewise.

65fca05 2020-02-14 22:27:28 Jan Beulich

x86: replace adhoc (partly wrong) ambiguous operand checking for MOVSX/MOVZX

For these to get treatment consistent with other operand size checking
the special logic shouldn't live in md_assemble(), but process_suffix().
And there's more logic involved than simply zapping the suffix.

Note however that MOVS[BW]* and MOVZ[BW]* still won't be fully
consistent, due to the objection to fold MOVS* templates just like was
done for MOVZ* in c07315e0c6 ("x86: allow suffix-less movzw and 64-bit
movzb").

Note further that it is against my own intentions to have MOVSX/MOVZX
silently default to a byte source in AT&T mode. This should happen only
when the destination register is a 16-bit one. In all other cases there
is an ambiguity, and the user should be warned. But it was explicitly
requested for this to be done in a way inconsistent with everything
else.

Note finally that the assembler change points out (and this patch fixes)
a wrong Intel syntax test introduced by bc31405ebb2c ("x86-64: Properly
encode and decode movsxd"): When source code specifies a 16-bit
destination register, disassembly expectations shouldn't have been to
find a 32-bit one.

b677388 2020-02-14 22:04:23 Jan Beulich

x86: adjust segment override prefix emission

Since we already suppress the prefix altogether when it's the default
one for the chosen addressing mode, let's do so also when instruction
prefix and override specified with the memory operand match. (Note that
insn prefix specified segment overrides never get discarded.)

92334ad 2020-02-14 22:03:19 Jan Beulich

x86: optimize away pointless segment overrides

When optimizing there's no point keeping the segment overrides when we
warn about their presence in the first place.

514a8bb 2020-02-14 22:02:05 Jan Beulich

x86: extend LEA's segment override warning

For one both possible forms should be warned about. And then, to guard
against future surprises, qualify the original opcode check by excluding
VEX/EVEX-like templates.

0e6724d 2020-02-14 21:57:16 H.J. Lu

x86: Document movsx/movsxd/movzx for AT&T syntax

Document different mnemonics of movsx, movsxd and movzx in AT&T syntax.

PR gas/25438
* doc/c-i386.texi: Document movsx, movsxd and movzx for AT&T
syntax.

a9b3453 2020-02-14 18:53:55 Eli Zaretskii

Fix argv[] in programs invoked by gdbserver on MS-Windows

gdbserver/ChangeLog
2020-02-14 Eli Zaretskii <eliz@gnu.org>

* win32-low.c (create_process): Prepend PROGRAM to ARGS when
preparing the command line for CreateProcess.
(win32_create_inferior): Reflect the program name in debugging
output that shows the process and its command line.

258bf0e 2020-02-14 16:32:53 Richard Biener

[gdb] Speedup lnp_state_machine::handle_special_opcode

I see for some program at gdb startup:
...
Samples: 102K of event 'cycles:pu', Event count (approx.): 91710925103
Overhead Command Shared Object Symbol
15.21% gdb gdb [.]
lnp_state_machine::handle_special
...
where the divisions are the places we stall. The following
micro-optimizes things but it smells like m_line_header->line_range
is constant, likewise probably m_line_header->maximum_ops_per_instruction
so eventually the divisions could be avoided completely with some
lookup table.

Well. Micro-optimizing with this patch improves things
(don't expect [load] CSE over the gdbarch_adjust_dwarf2_line call).

Build and reg-tested on x86_64-linux.

gdb/ChangeLog:

2020-02-14 Richard Biener <rguenther@suse.de>

* dwarf2/read.c (lnp_state_machine::handle_special_opcode): Apply CSE
on expression with division operators.

d4059b1 2020-02-14 09:00:26 GDB Administrator

Automatic date update in version.in

292676c 2020-02-14 06:44:29 H.J. Lu

x86: Resolve PLT32 reloc aganst local symbol to section

Since PLT entry isn't needed for branch to local symbol, we can resolve
R_386_PLT32/R_X86_64_PLT32 relocation aganst local symbol to section,
similar to R_386_PC32/R_X86_64_PC32.

2020-02-13 Fangrui Song <maskray@google.com>
H.J. Lu <hongjiu.lu@intel.com>

PR gas/25551
* config/tc-i386.c (tc_i386_fix_adjustable): Don't check
BFD_RELOC_386_PLT32 nor BFD_RELOC_X86_64_PLT32.
* testsuite/gas/i386/i386.exp: Run relax-5 and x86-64-relax-4.
* testsuite/gas/i386/relax-5.d: New file.
* testsuite/gas/i386/relax-5.s: Likewise.
* testsuite/gas/i386/x86-64-relax-4.d: Likewise.
* testsuite/gas/i386/x86-64-relax-4.s: Likewise.

feacfca 2020-02-14 06:27:51 Simon Marchi

gdbserver: rename source files to .cc

For the same reasons outlined in the previous patch, this patch renames
gdbserver source files to .cc.

I have moved the "-x c++" switch to only those rules that require it.

gdbserver/ChangeLog:

* Makefile.in: Rename source files from .c to .cc.
* %.c: Rename to %.cc.
* configure.ac: Rename server.c to server.cc.
* configure: Re-generate.

06b3c5b 2020-02-14 06:27:03 Simon Marchi

gdbsupport: rename source files to .cc

This patch renames the .c source files in gdbsupport to .cc.

In the gdb directory, there is an argument against renaming the source
files, which is that it makes using some git commands more difficult to
do archeology. Some commands have some kind of "follow" option that
makes git try to follow renames, but it doesn't work in all situations.

Given that we have just moved the gdbsupport directory, that argument
doesn't hold for source files in that directory. I therefore suggest
renaming them to .cc, so that they are automatically recognized as C++
by various tools and editors.

The original motivation behind this is that when building gdbsupport
with clang, I get:

CC agent.o
clang: error: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Werror,-Wdeprecated]

In the gdb/ directory, we make clang happy by passing "-x c++". We
could do this in gdbsupport too, but I think that renaming the files is
a better long-term solution.

gdbserver still does its own build of gdbsupport, so a few changes in
its Makefile are necessary.

gdbsupport/ChangeLog:

* Makefile.am: Rename source files from .c to .cc.
(CC, CFLAGS): Don't override.
(AM_CFLAGS): Rename to ...
(AM_CXXFLAGS): ... this.
* Makefile.in: Re-generate.
* %.c: Rename to %.cc.

gdbserver/ChangeLog:

* Makefile.in: Rename gdbsupport source files from .c to .cc.

8f43263 2020-02-13 23:42:07 Tom de Vries

[gdb/testsuite] Remove stale exec in gdb_compile_ada

When running test-case gdb.ada/ptype_tagged_param.exp, I get:
...
PASS: gdb.ada/ptype_tagged_param.exp: compilation foo.adb
...

However, when I then de-install gnatmake and run again, I get the same result.
This is due to a stale exec. After removing the stale exec, I get:
...
UNSUPPORTED: gdb.ada/ptype_tagged_param.exp: compilation foo.adb
...

Fix this removing the stale exec in gdb_compile_ada before compilation.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-02-13 Tom de Vries <tdevries@suse.de>

* lib/ada.exp (gdb_compile_ada): Delete stale exec before compilation.

92b6eaf 2020-02-13 23:34:06 Tom de Vries

[gdb/testsuite] Add unsupported tests in catch_ex_std.exp

If I de-install gnatbind, I run into:
...
FAIL: gdb.ada/catch_ex_std.exp: gnatbind foo
...

Fix this by marking the test unsupported instead:
...
UNSUPPORTED: gdb.ada/catch_ex_std.exp: gnatbind foo
...

Likewise for gnatlink.

Tested on x86_64-linux, with and without gnatbind/gnatlink installed.

gdb/testsuite/ChangeLog:

2020-02-13 Tom de Vries <tdevries@suse.de>

* gdb.ada/catch_ex_std.exp: Indicate unsupported if gnatbind/gnatlink
are missing.

99845b3 2020-02-13 20:18:13 H.J. Lu

plugin: Search bfd-plugins directories only once

try_load_plugin is updated to take either plugin name or plugin entry.
load_plugin is updated to search bfd-plugins directories first to build
a list of plugins and call try_load_plugin with each plugin on the list.
When --plugin is used, the plugin list only has one entry.

* plugin.c (try_load_plugin): Make plugin_list_iter an argument
and use it if it isn't NULL. Remove has_plugin_p argument. Add
a build_list_p argument. Don't search plugin_list. Short circuit
when building the plugin list.
(has_plugin): Renamed to has_plugin_list.
(bfd_plugin_set_plugin): Don't set has_plugin.
(bfd_plugin_specified_p): Check plugin_list instead.
(build_plugin_list): New function.
(load_plugin): Call build_plugin_list and use plugin_list.

f98a845 2020-02-13 19:56:11 Alok Kumar Sharma

Adding myself to gdb/MAINTAINERS

2020-02-13 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>

* MAINTAINERS (Write After Approval): Adding myself.

Change-Id: I2e6095a63247902f5fe23d58c2df8f995e41cf58

7deea9a 2020-02-13 18:19:28 Jan Beulich

x86: fix SSE4a dependencies of ".arch .nosse*"

Since ".arch .sse4a" enables SSE3 and earlier, disabling SSE3 should
also disable SSE4a. And as per its name, ".arch .nosse4" should also do
so.

f3b0f7f 2020-02-13 16:37:34 Tom de Vries

[gdb/testsuite] Fix gnatmake_version_at_least

After de-installing gnatmake, I get:
...
Running src/gdb/testsuite/gdb.ada/rename_subscript_param.exp ...
ERROR: tcl error sourcing src/gdb/testsuite/gdb.ada/rename_subscript_param.exp.
ERROR: couldn't execute "gnatmake": no such file or directory
while executing
"exec $gnatmake --version"
(procedure "gnatmake_version_at_least" line 4)
...

Fix this by wrapping the exec call in a catch call.

Tested with and withouth gnatmake installed on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-02-13 Tom de Vries <tdevries@suse.de>

* lib/ada.exp (gnatmake_version_at_least): Wrap exec call in a catch
call.

d1437c0 2020-02-13 09:16:50 Tom Tromey

Remove some dead code from event-loop.c

This removes some dead code from event-loop.c.

This patch is from my old series to merge the gdb and gdbserver event
loops; but since it is just removing dead code, it seemed simple to
commit it separately.

gdb/ChangeLog
2020-02-12 Tom Tromey <tom@tromey.com>

* event-loop.c (event_data, gdb_event, event_handler_func):
Remove.

c273235 2020-02-13 09:00:41 GDB Administrator

Automatic date update in version.in

3d4560f 2020-02-13 07:51:58 Tom Tromey

Move the frame data to the BFD when possible

Now that comp_unit and the remaining frame data are all independent of
the objfile, it can all be stored on the BFD and shared across
inferiors.

As with other code doing this same thing, care must be taken to not
share the data when the objfile requires relocations. So, two keys
are used: one for the BFD and one for the objfile, and
gdb_bfd_requires_relocations is used to differentiate between the two
cases.

gdb/ChangeLog
2020-02-12 Tom Tromey <tom@tromey.com>

* dwarf2/frame.c (dwarf2_frame_bfd_data): New global.
(dwarf2_frame_objfile_data): Add comment.
(find_comp_unit, set_comp_unit): New functions.
(dwarf2_frame_find_fde): Use find_comp_unit.
(dwarf2_build_frame_info): Use set_comp_unit.

2198230 2020-02-13 07:51:58 Tom Tromey

Remove the objfile backlink from comp_unit

This removes the objfile backlink from comp_unit. The only remaining
uses involved fetching the text offset from the objfile. However,
this is already conveniently computed at all the sites that call
execute_cfa_program, and so it can simply be passed in.

gdb/ChangeLog
2020-02-12 Tom Tromey <tom@tromey.com>

* dwarf2/frame.c (struct comp_unit) <objfile>: Remove.
(comp_unit): Don't initialize objfile.
(execute_cfa_program): Add text_offset parameter.
(execute_cfa_program_test, dwarf2_fetch_cfa_info)
(dwarf2_frame_cache): Update.
(dwarf2_build_frame_info): Don't set "objfile" member.

4debb23 2020-02-13 07:51:58 Tom Tromey

Remove a use of the comp_unit backlink

The DWARF frame comp_unit object still has a backlink to the objfile.
In order to be truly objfile-independent, this must be removed.

This patch removes one such use, by passing the gdbarch to
decode_frame_entry directly.

gdb/ChangeLog
2020-02-12 Tom Tromey <tom@tromey.com>

* dwarf2/frame.c (decode_frame_entry_1): Add gdbarch parameter.
(decode_frame_entry): Likewise.
(dwarf2_build_frame_info): Update.

0d404d4 2020-02-13 07:51:58 Tom Tromey

Add per-unit obstack

This adds an auto_obstack to the DWARF frame comp_unit object, and
then changes the remaining code here to use the comp_unit obstack
rather than the objfile obstack.

At this point, all the storage for frame data is self-contained --
that is, it is independent of the objfile.

gdb/ChangeLog
2020-02-12 Tom Tromey <tom@tromey.com>

* dwarf2/frame.c (struct comp_unit) <obstack>: New member.
(decode_frame_entry_1): Use the comp_unit obstack.

a7a3ae5 2020-02-13 07:51:58 Tom Tromey

Store the comp_unit instead of the FDE table

This changes the DWARF frame code to store the comp_unit on the
objfile, rather than storing the FDE table. It also changes the
comp_unit to be heap-allocated using "new".

This change makes it simpler for a later patch to add a field to the
comp_unit, and to have deallaction work properly. This in turn is
important for making the frame data be independent of the objfile.

gdb/ChangeLog
2020-02-12 Tom Tromey <tom@tromey.com>

* dwarf2/frame.c (struct comp_unit): Add initializers and
constructor.
(dwarf2_frame_objfile_data): Store a comp_unit.
(dwarf2_frame_find_fde): Update.
(dwarf2_build_frame_info): Use "new".

a9d6541 2020-02-13 07:51:58 Tom Tromey

Change fde table to a vector

This removes struct dwarf2_fde_table, replacing it with a typedef of
std::vector. This simplifies the code somewhat.

gdb/ChangeLog
2020-02-12 Tom Tromey <tom@tromey.com>

* dwarf2/frame.c (struct dwarf2_fde_table): Remove.
(dwarf2_fde_table): Typedef for std::vector.
(dwarf2_frame_objfile_data): Remove the deleter. Now static.
(dwarf2_frame_find_fde, add_fde, decode_frame_entry_1)
(decode_frame_entry): Update.
(dwarf2_build_frame_info): Use "new".