2020-06-30 07:53:03 -06:00
|
|
|
2020-06-30 Tom Tromey <tromey@adacore.com>
|
|
|
|
|
|
|
|
PR build/26183:
|
|
|
|
* gdb_string_view.h (basic_string_view::to_string): Remove.
|
|
|
|
(gdb::to_string): New function.
|
|
|
|
|
2020-06-27 14:38:43 -04:00
|
|
|
2020-06-27 Simon Marchi <simon.marchi@efficios.com>
|
|
|
|
|
|
|
|
* tdesc.h (class print_xml_feature) <add_line>: Add
|
|
|
|
ATTRIBUTE_PRINTF.
|
|
|
|
|
gdb: New maintenance command to print XML target description
This commit adds a new maintenance command that dumps the current
target description as an XML document. This is a maintenance command
as I currently only see this being useful for GDB developers, or for
people debugging a new remote target.
By default the command will print whatever the current target
description is, whether this was delivered by the remote, loaded by
the user from a file, or if it is a built in target within GDB.
The command can also take an optional filename argument. In this case
GDB loads a target description from the file, and then reprints it.
This could be useful for testing GDB's parsing of target descriptions,
or to check that GDB can successfully parse a particular XML
description.
It is worth noting that the XML description printed will not be an
exact copy of the document fed into GDB. For example this minimal
input file:
<target>
<feature name="abc">
<reg name="r1" bitsize="32"/>
</feature>
</target>
Will produce this output:
(gdb) maint print xml-tdesc path/to/file.xml
<?xml version="1.0"?>
<!DOCTYPE target SYSTEM "gdb-target.dtd">
<target>
<feature name="abc">
<reg name="r1" bitsize="32" type="int" regnum="0"/>
</feature>
</target>
Notice that GDB filled in both the 'type' and 'regnum' fields of the
<reg>. I think this is actually a positive as it means we get to
really understand how GDB processed the document, if GDB made some
assumptions that differ to those the user expected then hopefully this
will bring those issues to the users attention.
To implement this I have tweaked the output produced by the
print_xml_feature which is defined within the gdbsupport/ directory.
The changes I have made to this class are:
1. The <architecture>...</architecture> tags are now not produced if
the architecture name is NULL.
2. The <osabi>...</osabi> tags get a newline at the end.
3. And, the whole XML document is indented using white space in a
nested fashion (as in the example output above).
I think that these changes should be fine, the print_xml_feature class
is used:
1. In gdbserver to generate an XML document to send as the target
description to GDB.
2. In GDB as part of a self-check function, a target_desc is
converted to XML then parsed back into a target_desc. We then check
the before and after target_desc objects are the same.
3. In the new 'maint print xml-tdesc' command.
In all of these use cases adding the extra white space should be fine.
gdbsupport/ChangeLog:
* tdesc.cc (print_xml_feature::visit_pre): Use add_line to add
output content, and call indent as needed in all overloaded
variants.
(print_xml_feature::visit_post): Likewise.
(print_xml_feature::visit): Likewise.
(print_xml_feature::add_line): Two new overloaded functions.
* tdesc.h (print_xml_feature::indent): New member function.
(print_xml_feature::add_line): Two new overloaded member
functions.
(print_xml_feature::m_depth): New member variable.
gdb/ChangeLog:
* target-descriptions.c (tdesc_architecture_name): Protect against
NULL pointer dereference.
(maint_print_xml_tdesc_cmd): New function.
(_initialize_target_descriptions): Register new 'maint print
xml-tdesc' command and give it the filename completer.
* NEWS: Mention new 'maint print xml-tdesc' command.
gdb/testsuite/ChangeLog:
* gdb.xml/tdesc-reload.c: New file.
* gdb.xml/tdesc-reload.exp: New file.
* gdb.xml/maint-xml-dump-01.xml: New file.
* gdb.xml/maint-xml-dump-02.xml: New file.
* gdb.xml/maint-xml-dump.exp: New file.
gdb/doc/ChangeLog:
* gdb.texinfo (Maintenance Commands): Document new 'maint print
xml-desc' command.
2020-06-09 23:08:54 +01:00
|
|
|
2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
|
|
|
|
|
|
|
|
* tdesc.cc (print_xml_feature::visit_pre): Use add_line to add
|
|
|
|
output content, and call indent as needed in all overloaded
|
|
|
|
variants.
|
|
|
|
(print_xml_feature::visit_post): Likewise.
|
|
|
|
(print_xml_feature::visit): Likewise.
|
|
|
|
(print_xml_feature::add_line): Two new overloaded functions.
|
|
|
|
* tdesc.h (print_xml_feature::indent): New member function.
|
|
|
|
(print_xml_feature::add_line): Two new overloaded member
|
|
|
|
functions.
|
|
|
|
(print_xml_feature::m_depth): New member variable.
|
|
|
|
|
gdb: Print compatible information within print_xml_feature
The gdbsupport directory contains a helper class print_xml_feature
that is shared between gdb and gdbserver. This class is used for
printing an XML representation of a target_desc object.
Currently this class doesn't have the ability to print the
<compatible> entities that can appear within a target description, I
guess no targets have needed that functionality yet.
The print_xml_feature classes API is based around operating on the
target_desc class, however, the sharing between gdb and gdbserver is
purely textural, we rely on their being a class called target_desc in
both gdb and gdbserver, but there is no shared implementation. We
then have a set of functions declared that operate on an object of
type target_desc, and again these functions have completely separate
implementations.
Currently then the gdb version of target_desc contains a vector of
bfd_arch_info pointers which represents the compatible entries from a
target description. The gdbserver version of target_desc has no such
information. Further, the gdbserver code doesn't seem to include the
bfd headers, and so doesn't know about the bfd types.
I was reluctant to include the bfd headers into gdbserver just so I
can reference the compatible information, which isn't (currently) even
needed in gdbserver.
So, the approach I take in this patch is to wrap the compatible
information into a new helper class. This class is declared in the
gdbsupport library, but implemented separately in both gdb and
gdbserver.
In gdbserver the class is empty. The compatible information within
the gdbserver is an empty list, of empty classes.
In gdb the class contains a pointer to the bfd_arch_info object.
With this in place we can now add support to print_xml_feature for
printing the compatible information if it is present. In the
gdbserver code this will never happen, as the gdbserver never has any
compatible information. But in gdb, this code will trigger when
appropriate.
gdb/ChangeLog:
* target-descriptions.c (class tdesc_compatible_info): New class.
(struct target_desc): Change type of compatible vector.
(tdesc_compatible_p): Update for change in type of
target_desc::compatible.
(tdesc_compatible_info_list): New function.
(tdesc_compatible_info_arch_name): New function.
(tdesc_add_compatible): Update for change in type of
target_desc::compatible.
(print_c_tdesc::visit_pre): Likewise.
gdbserver/ChangeLog:
* tdesc.cc (struct tdesc_compatible_info): New struct.
(tdesc_compatible_info_list): New function.
(tdesc_compatible_info_arch_name): New function.
gdbsupport/ChangeLog:
* tdesc.cc (print_xml_feature::visit_pre): Print compatible
information.
* tdesc.h (struct tdesc_compatible_info): Declare new struct.
(tdesc_compatible_info_up): New typedef.
(tdesc_compatible_info_list): Declare new function.
(tdesc_compatible_info_arch_name): Declare new function.
2020-06-11 22:36:29 +01:00
|
|
|
2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
|
|
|
|
|
|
|
|
* tdesc.cc (print_xml_feature::visit_pre): Print compatible
|
|
|
|
information.
|
|
|
|
* tdesc.h (struct tdesc_compatible_info): Declare new struct.
|
|
|
|
(tdesc_compatible_info_up): New typedef.
|
|
|
|
(tdesc_compatible_info_list): Declare new function.
|
|
|
|
(tdesc_compatible_info_arch_name): Declare new function.
|
|
|
|
|
2020-05-25 11:40:07 -04:00
|
|
|
2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
|
|
|
|
|
|
|
|
* common-utils.cc, common-utils.h (stringify_argv): Drop
|
|
|
|
now unused function stringify_argv
|
|
|
|
|
2020-05-25 11:38:32 -04:00
|
|
|
2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
|
|
|
|
|
|
|
|
* common-inferior.cc, common-inferior.h (construct_inferior_arguments):
|
|
|
|
Adapt to take a gdb::array_view<char * const> parameter.
|
|
|
|
Adapt call site.
|
|
|
|
|
2020-05-25 11:38:11 -04:00
|
|
|
2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
|
|
|
|
|
|
|
|
* common-inferior.cc, common-inferior.h (construct_inferior_arguments):
|
|
|
|
Adapt to handle zero args and return a std::string.
|
|
|
|
Adapt call site.
|
|
|
|
|
2020-05-25 11:37:44 -04:00
|
|
|
2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
|
|
|
|
|
|
|
|
* common-inferior.h, common-inferior.cc: (construct_inferior_arguments):
|
|
|
|
Move function here from gdb/infcmd.c, gdb/inferior.h
|
|
|
|
|
Disable record btrace bts support for AMD processors
Some Intel processors implement a Branch Trace Store (BTS) which GDB
uses for reverse execution support via the "record btrace bts"
command.
I have been unable to find a description of a similar feature in a
recent (April 2020) AMD64 architecture reference:
https://www.amd.com/system/files/TechDocs/40332.pdf
While it is the case that AMD processors have an LBR (last branch
record) bit in the DebugCtl MSR, it seems that it affects only four
MSRs when enabled. The names of these MSRs are LastBranchToIP,
LastBranchFromIP, LastIntToIP, and LastIntFromIP. I can find no
mention of anything more extensive. While looking at an Intel
architecture document, I noticed that Intel's P6 family from the
mid-90s had registers of the same name.
Therefore...
This commit disables "record btrace bts" support in GDB for AMD
processors.
Using the test case from gdb.base/break.exp, the sessions
below show the expected behavior (run on a machine with an
Intel processor) versus that on a machine with an AMD processor.
The AMD processor in question is reported as follows by "lscpu":
AMD Ryzen Threadripper 2950X 16-Core Processor . Finally, I'll
note that the AMD machine is actually a VM, but I see similar
behavior on both the virtualization host and the VM.
Intel machine - Desired behavior:
[kevinb@mohave gdb]$ ./gdb -q testsuite/outputs/gdb.base/break/break
Reading symbols from testsuite/outputs/gdb.base/break/break...
(gdb) start
Temporary breakpoint 1 at 0x401179: file /home/kevinb/sourceware-git/native-build/bld/../../binutils-gdb/gdb/testsuite/gdb.base/break.c, line 43.
Starting program: /home/kevinb/sourceware-git/native-build/bld/gdb/testsuite/outputs/gdb.base/break/break
Temporary breakpoint 1, main (argc=1, argv=0x7fffffffd748, envp=0x7fffffffd758)
at /home/kevinb/sourceware-git/native-build/bld/../../binutils-gdb/gdb/testsuite/gdb.base/break.c:43
43 if (argc == 12345) { /* an unlikely value < 2^16, in case uninited */ /* set breakpoint 6 here */
(gdb) record btrace
(gdb) b factorial
Breakpoint 2 at 0x40121b: file /home/kevinb/sourceware-git/native-build/bld/../../binutils-gdb/gdb/testsuite/gdb.base/break.c, line 63.
(gdb) c
Continuing.
Breakpoint 2, factorial (value=6)
at /home/kevinb/sourceware-git/native-build/bld/../../binutils-gdb/gdb/testsuite/gdb.base/break.c:63
63 if (value > 1) { /* set breakpoint 7 here */
(gdb) info record
Active record target: record-btrace
Recording format: Branch Trace Store.
Buffer size: 64kB.
Recorded 768 instructions in 22 functions (0 gaps) for thread 1 (process 19215).
(gdb) record function-call-history
13 do_lookup_x
14 _dl_lookup_symbol_x
15 _dl_fixup
16 _dl_runtime_resolve_xsavec
17 atoi
18 strtoq
19 ____strtoll_l_internal
20 atoi
21 main
22 factorial
(gdb) record instruction-history
759 0x00007ffff7ce0917 <____strtoll_l_internal+647>: pop %r15
760 0x00007ffff7ce0919 <____strtoll_l_internal+649>: retq
761 0x00007ffff7cdd064 <atoi+20>: add $0x8,%rsp
762 0x00007ffff7cdd068 <atoi+24>: retq
763 0x00000000004011b1 <main+75>: mov %eax,%edi
764 0x00000000004011b3 <main+77>: callq 0x401210 <factorial>
765 0x0000000000401210 <factorial+0>: push %rbp
766 0x0000000000401211 <factorial+1>: mov %rsp,%rbp
767 0x0000000000401214 <factorial+4>: sub $0x10,%rsp
768 0x0000000000401218 <factorial+8>: mov %edi,-0x4(%rbp)
AMD machine - Wrong behavior:
[kev@f32-1 gdb]$ ./gdb -q testsuite/outputs/gdb.base/break/break
Reading symbols from testsuite/outputs/gdb.base/break/break...
(gdb) start
Temporary breakpoint 1 at 0x401179: file /ironwood1/sourceware-git/f32-master/bld/../../worktree-master/gdb/testsuite/gdb.base/break.c, line 43.
Starting program: /mesquite2/sourceware-git/f32-master/bld/gdb/testsuite/outputs/gdb.base/break/break
Temporary breakpoint 1, main (argc=1, argv=0x7fffffffd5b8, envp=0x7fffffffd5c8)
at /ironwood1/sourceware-git/f32-master/bld/../../worktree-master/gdb/testsuite/gdb.base/break.c:43
43 if (argc == 12345) { /* an unlikely value < 2^16, in case uninited */ /* set breakpoint 6 here */
(gdb) record btrace
(gdb) b factorial
Breakpoint 2 at 0x40121b: file /ironwood1/sourceware-git/f32-master/bld/../../worktree-master/gdb/testsuite/gdb.base/break.c, line 63.
(gdb) c
Continuing.
Breakpoint 2, factorial (value=6)
at /ironwood1/sourceware-git/f32-master/bld/../../worktree-master/gdb/testsuite/gdb.base/break.c:63
63 if (value > 1) { /* set breakpoint 7 here */
(gdb) info record
Active record target: record-btrace
Recording format: Branch Trace Store.
Buffer size: 64kB.
warning: Recorded trace may be incomplete at instruction 7737 (pc = 0x405000).
warning: Recorded trace may be incomplete at instruction 7739 (pc = 0x0).
Recorded 7740 instructions in 46 functions (2 gaps) for thread 1 (process 1402911).
(gdb) record function-call-history
37 ??
38 values
39 some_enum_global
40 ??
41 some_union_global
42 some_variable
43 ??
44 [decode error (2): unknown instruction]
45 ??
46 [decode error (2): unknown instruction]
(gdb) record instruction-history
7730 0x0000000000404ff3: add %al,(%rax)
7731 0x0000000000404ff5: add %al,(%rax)
7732 0x0000000000404ff7: add %al,(%rax)
7733 0x0000000000404ff9: add %al,(%rax)
7734 0x0000000000404ffb: add %al,(%rax)
7735 0x0000000000404ffd: add %al,(%rax)
7736 0x0000000000404fff: .byte 0x0
7737 0x0000000000405000: Cannot access memory at address 0x405000
Lastly, I'll note that I see a lot of gdb.btrace failures without
this commit. Worse still, the results aren't always the same which
causes a lot of noise when comparing test results.
gdbsupport/ChangeLog:
* btrace-common.h (btrace_cpu_vendor): Add CV_AMD.
gdb/ChangeLog:
* nat/linux-btrace.c (btrace_this_cpu): Add check for AMD
processors.
(cpu_supports_bts): Add CV_AMD case.
2020-05-14 11:10:14 -07:00
|
|
|
2020-05-14 Kevin Buettner <kevinb@redhat.com>
|
|
|
|
|
|
|
|
* btrace-common.h (btrace_cpu_vendor): Add CV_AMD.
|
|
|
|
|
2020-05-14 13:59:53 +02:00
|
|
|
2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
|
|
|
|
|
|
|
|
* common-regcache.h (regcache_read_pc_protected): New function
|
|
|
|
declaration.
|
|
|
|
|
2020-04-28 11:30:52 +02:00
|
|
|
2020-04-28 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
|
|
|
|
|
|
|
|
* gdb-sigmask.h: Fix typo (pthead_sigmask -> pthread_sigmask).
|
|
|
|
|
2020-04-27 09:19:48 -04:00
|
|
|
2020-04-27 Simon Marchi <simon.marchi@polymtl.ca>
|
|
|
|
|
|
|
|
* common-defs.h: Include cstdlib.h.
|
|
|
|
|
2020-04-20 11:45:06 -06:00
|
|
|
2020-04-20 Tom Tromey <tromey@adacore.com>
|
|
|
|
|
|
|
|
* scoped_mmap.h (scoped_mmap): Mark move constructor as noexcept.
|
|
|
|
Use initialization style. Don't call destroy.
|
|
|
|
* scoped_fd.h (class scoped_fd): Mark move constructor as
|
|
|
|
noexcept.
|
|
|
|
* gdb_ref_ptr.h (class ref_ptr): Mark move constructor as
|
|
|
|
noexcept.
|
|
|
|
|
2020-04-13 12:42:59 -06:00
|
|
|
2020-04-13 Tom Tromey <tom@tromey.com>
|
|
|
|
|
|
|
|
* event-loop.c: Move comment. Remove obsolete comment.
|
|
|
|
|
2020-04-13 12:42:59 -06:00
|
|
|
2020-04-13 Tom Tromey <tom@tromey.com>
|
|
|
|
|
|
|
|
* event-loop.h: Move from ../gdb/.
|
|
|
|
* event-loop.cc: Move from ../gdb/.
|
|
|
|
|
2020-04-13 12:42:59 -06:00
|
|
|
2020-04-13 Tom Tromey <tom@tromey.com>
|
|
|
|
|
|
|
|
* errors.h (flush_streams): Declare.
|
|
|
|
|
2020-04-13 12:42:59 -06:00
|
|
|
2020-04-13 Tom Tromey <tom@tromey.com>
|
|
|
|
|
|
|
|
* gdb_select.h: Move from ../gdb/.
|
|
|
|
|
2020-04-13 12:42:59 -06:00
|
|
|
2020-04-13 Tom Tromey <tom@tromey.com>
|
|
|
|
|
|
|
|
* config.in, configure: Rebuild.
|
|
|
|
* common.m4 (GDB_AC_COMMON): Check for poll.h, sys/poll.h,
|
|
|
|
sys/select.h, and poll.
|
|
|
|
|
2020-03-31 07:29:53 -06:00
|
|
|
2020-03-31 Tom Tromey <tromey@adacore.com>
|
|
|
|
|
|
|
|
* btrace-common.cc (btrace_data_append): Conditionally call
|
|
|
|
memcpy.
|
|
|
|
|
2020-03-27 11:56:33 +00:00
|
|
|
2020-03-27 Andrew Burgess <andrew.burgess@embecosm.com>
|
|
|
|
|
|
|
|
* create-version.sh: Resolve issues highlighted by shellcheck.
|
|
|
|
|
gdb: remove HAVE_DECL_PTRACE
I stumbled on this snippet in nat/gdb_ptrace.h:
/* Some systems, in particular DEC OSF/1, Digital Unix, Compaq Tru64
or whatever it's called these days, don't provide a prototype for
ptrace. Provide one to silence compiler warnings. */
#ifndef HAVE_DECL_PTRACE
extern PTRACE_TYPE_RET ptrace();
#endif
I believe this is unnecessary today and should be removed. First, the
comment only mentions OSes we don't support (and to be honest, I had
never even heard of).
But most importantly, in C++, a declaration with empty parenthesis
declares a function that accepts no arguments, unlike in C. So if this
declaration was really used, GDB wouldn't build, since all ptrace call
sites pass some arguments. Since we haven't heard anything about this
causing some build failures since we have transitioned to C++, I
conclude that it's not used.
This patch removes it as well as the corresponding configure check.
gdb/ChangeLog:
* ptrace.m4: Don't check for ptrace declaration.
* config.in: Re-generate.
* configure: Re-generate.
* nat/gdb_ptrace.h: Don't declare ptrace if HAVE_DECL_PTRACE is
not defined.
gdbserver/ChangeLog:
* config.in: Re-generate.
* configure: Re-generate.
gdbsupport/ChangeLog:
* config.in: Re-generate.
* configure: Re-generate.
2020-03-20 11:57:49 -04:00
|
|
|
2020-03-20 Simon Marchi <simon.marchi@efficios.com>
|
|
|
|
|
|
|
|
* config.in: Re-generate.
|
|
|
|
* configure: Re-generate.
|
|
|
|
|
2020-03-17 15:01:55 +01:00
|
|
|
2020-03-17 Kamil Rytarowski <n54@gmx.com>
|
|
|
|
|
|
|
|
* common-defs.h: Include alloca.h if HAVE_ALLOCA_H is defined.
|
|
|
|
|
2020-03-12 13:32:15 -06:00
|
|
|
2020-03-12 Tom Tromey <tom@tromey.com>
|
|
|
|
|
|
|
|
* common-types.h: Remove GDBSERVER code.
|
|
|
|
(gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Redefine.
|
|
|
|
* common-defs.h: Remove GDBSERVER code.
|
|
|
|
|
2020-03-12 14:19:38 -04:00
|
|
|
2020-03-12 Simon Marchi <simon.marchi@efficios.com>
|
|
|
|
|
|
|
|
* selftest.m4: Moved from gdb/.
|
|
|
|
* acinclude.m4: Update path to selftest.m4.
|
|
|
|
|
2020-03-12 14:18:00 -04:00
|
|
|
2020-03-12 Simon Marchi <simon.marchi@efficios.com>
|
|
|
|
|
|
|
|
* configure.ac: Don't source bfd/development.sh.
|
|
|
|
* common.m4: Source bfd/development.sh.
|
|
|
|
* configure: Re-generate.
|
|
|
|
|
2020-03-12 14:12:36 -04:00
|
|
|
2020-03-12 Simon Marchi <simon.marchi@efficios.com>
|
|
|
|
|
|
|
|
* configure: Re-generate.
|
|
|
|
|
2020-03-11 15:15:12 -04:00
|
|
|
2020-03-11 Simon Marchi <simon.marchi@efficios.com>
|
|
|
|
|
|
|
|
* configure: Re-generate.
|
|
|
|
* warning.m4: Enable -Wmissing-prototypes.
|
|
|
|
|
2020-03-08 11:05:43 -06:00
|
|
|
2020-03-08 Tom Tromey <tom@tromey.com>
|
|
|
|
|
|
|
|
* gdb_binary_search.h: Fix two typos.
|
|
|
|
|
gdbserver/gdbsupport: Add .dir-locals.el file
Copy the .dir-locls.el file from gdb/ to gdbserver/ and gdbsupport/ so
that we get the GNU/GDB style when editing these files in Emacs.
I initially wanted to remove the (c-mode . ((mode . c++))) that
switches c-mode files into c++-mode as we store C++ code in *.cc files
in the gdbserver/ directory, unlike gdb/ where we use *.c, however, I
was forgetting about the header files - we still use *.h for our C++
header files, so for now I left the settings in place to open all C
files in c++-mode.
We now have three copies of this file, which are all identical. It
would be nice if we could remove this duplication, however, for now we
haven't found a good way to do this.
Some options considered were:
1. Use symlinks to only have one copy of the file. This was
rejected as not all targets support symlinks in the way.
2. Have two of the .dir-locals.el files contain some mechanism by
which the third copy of the file is sourced. Though this would, in
theory, be possible, it would involve some advanced Emacs scripting,
would be fragile, and a maintenance burdon.
3. Move the .dir-locals up into top level src/ directory, then use
Emacs dir-locals directory pattern matching to only apply the rules
for the three directories we care about. The problem is that each
directory has to be listed separately, so we still end up having to
duplicate all the rules.
In the end, it was decided that having three copies of the file,
though not ideal, is probably easiest for now. This was all discussed
in this mailing list thread:
https://sourceware.org/ml/gdb-patches/2020-03/msg00024.html
The copyright date in the new files is left as for gdb/.dir-locals.el,
as the new files are a copy of the old, this is inline with this rule:
https://sourceware.org/gdb/wiki/ContributionChecklist#Copyright_Header
gdb/ChangeLog:
* .dir-locals.el: Add a comment referencing the other copies of
this file.
gdbserver/ChangeLog:
* .dir-locals.el: New file.
gdbsupport/ChangeLog:
* .dir-locals.el: New file.
2020-02-28 18:08:08 +00:00
|
|
|
2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
|
|
|
|
|
|
|
|
* .dir-locals.el: New file.
|
|
|
|
|
gdbsupport/configure.ac: source development.sh
[Commit message by Simon Marchi]
The GDB build in non-development mode (turn development to false in
bfd/development.sh if you want to try) is currently broken:
CXXLD gdb
/home/smarchi/src/binutils-gdb/gdb/disasm-selftests.c:218: error: undefined reference to 'selftests::register_test_foreach_arch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void (*)(gdbarch*))'
/home/smarchi/src/binutils-gdb/gdb/disasm-selftests.c:220: error: undefined reference to 'selftests::register_test_foreach_arch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void (*)(gdbarch*))'
/home/smarchi/src/binutils-gdb/gdb/dwarf2/frame.c:2310: error: undefined reference to 'selftests::register_test_foreach_arch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void (*)(gdbarch*))'
/home/smarchi/src/binutils-gdb/gdb/gdbarch-selftests.c:168: error: undefined reference to 'selftests::register_test_foreach_arch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void (*)(gdbarch*))'
/home/smarchi/src/binutils-gdb/gdbsupport/selftest.cc:96: error: undefined reference to 'selftests::reset()'
This is because the gdbsupport configure script doesn't source
bfd/development.sh to set the development variable. When $development
is unset, GDB_AC_SELFTEST defaults to enabling selftests. I don't think
the macro was written with this intention in mind, it just happens to be
that way.
So gdbsupport thinks selftests are enabled, while gdb thinks they are
disabled. gdbsupport compiles in code that calls selftests:: functions,
which are normally provided by gdb, but gdb doesn't provide them, hence
the undefined references.
Fix this by sourcing bfd/development.sh in gdbsupport/configure.ac, so
that the development variable is set.
gdbsupport/ChangeLog:
* configure.ac: Added call development.sh.
* configure: Regenerate.
2020-02-26 12:32:03 +06:00
|
|
|
2020-03-05 Vyacheslav Petrishchev <vyachemail@gmail.com>
|
|
|
|
|
|
|
|
* configure.ac: Added call development.sh.
|
|
|
|
* configure: Regenerate.
|
|
|
|
|
gdb, gdbserver, gdbsupport: add .gitattributes files
Create .gitattributes files in gdb/, gdbserver/, and gdbsupport/.
The files specify cpp-style diffs for .h and .c files. This is
particularly helpful if a class in a header file is modified.
For instance, if the `stop_requested` field of `thread_info` in
gdb/gdbthread.h is modified, we get the following diff with
'git diff' (using git version 2.17.1):
@@ -379,7 +379,7 @@ public:
struct target_waitstatus pending_follow;
/* True if this thread has been explicitly requested to stop. */
- int stop_requested = 0;
+ bool stop_requested = 0;
/* The initiating frame of a nexting operation, used for deciding
which exceptions to intercept. If it is null_frame_id no
Note that the context of the change shows up as 'public:'; not so
useful. With the .gitattributes file, we get:
@@ -379,7 +379,7 @@ class thread_info : public refcounted_object
struct target_waitstatus pending_follow;
/* True if this thread has been explicitly requested to stop. */
- int stop_requested = 0;
+ bool stop_requested = 0;
/* The initiating frame of a nexting operation, used for deciding
which exceptions to intercept. If it is null_frame_id no
The context is successfully shown as 'class thread_info'.
This patch creates a .gitattributes file per each of gdb, gdbserver,
and gdbsupport folders. An alternative would be to define the
attributes in the root folder -- this would impact all the top-level
folders, though. I opted for the more conservative approach.
gdb/ChangeLog:
2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* .gitattributes: New file.
gdbserver/ChangeLog:
2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* .gitattributes: New file.
gdbsupport/ChangeLog:
2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* .gitattributes: New file.
2020-03-05 15:59:22 +01:00
|
|
|
2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
|
|
|
|
|
|
|
|
* .gitattributes: New file.
|
|
|
|
|
2020-03-03 17:11:12 -05:00
|
|
|
2020-03-03 Simon Marchi <simon.marchi@efficios.com>
|
|
|
|
|
|
|
|
* Makefile.in: Re-generate.
|
|
|
|
|
2020-02-25 15:50:16 -05:00
|
|
|
2020-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
|
|
|
|
|
|
|
|
* gdb-dlfcn.h (gdb_dlopen): Update comment.
|
|
|
|
|
Merge changes from GCC for the config/ directory
GCC's config/ChangeLog since the last time this merge was done
(in the binutils-gdb commit 0b4d000cc4e8e77c823) is included at the
end of this commit message.
It is worth noting that the binutils-gdb commit 301a9420d947da1458
added the file config/debuginfod.m4 which is not present in GCC's
config/ directory. This file is preserved, unmodified, after this
commit.
In order to regenerate all of the configure files, I configured with
--enable-maintainer-mode, and built the 'all' target. I then did the
same thing on a source tree without this patch, and only committed
those files that changed when this patch was added.
GCC's config/ChangeLog entries:
2020-02-12 Sandra Loosemore <sandra@codesourcery.com>
PR libstdc++/79193
PR libstdc++/88999
* no-executables.m4: Use a non-empty program to test for linker
support.
2020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
* lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Update shell syntax.
2020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
* lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Add new
--with-libXXX-type=... option. Use this to guide the selection of
either a shared library or a static library.
2020-01-24 Maciej W. Rozycki <macro@wdc.com>
* toolexeclibdir.m4: New file.
2019-09-10 Christophe Lyon <christophe.lyon@st.com>
* futex.m4: Handle *-uclinux*.
* tls.m4 (GCC_CHECK_TLS): Likewise.
2019-09-06 Florian Weimer <fweimer@redhat.com>
* futex.m4 (GCC_LINUX_FUTEX): Include <unistd.h> for the syscall
function.
2019-07-08 Richard Sandiford <richard.sandiford@arm.com>
* bootstrap-Og.mk: New file.
2019-06-25 Kwok Cheung Yeung <kcy@codesourcery.com>
Andrew Stubbs <ams@codesourcery.com>
* gthr.m4 (GCC_AC_THREAD_HEADER): Add case for gcn.
2019-05-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* ax_count_cpus.m4: New file.
2019-05-02 Richard Biener <rguenther@suse.de>
PR bootstrap/85574
* bootstrap-lto.mk (extra-compare): Set to gcc/lto1$(exeext).
2019-04-16 Martin Liska <mliska@suse.cz>
* bootstrap-lto-lean.mk: Filter out -flto in STAGEtrain_CFLAGS.
2019-04-09 Martin Liska <mliska@suse.cz>
* bootstrap-lto-lean.mk: New file.
2019-03-02 Johannes Pfau <johannespfau@gmail.com>
* mh-mingw: Also set __USE_MINGW_ACCESS flag for C++ code.
2018-10-31 Joseph Myers <joseph@codesourcery.com>
PR bootstrap/82856
* math.m4, tls.m4: Use AC_LANG_SOURCE.
Merge from binutils-gdb:
2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
* override.m4 (_GCC_AUTOCONF_VERSION): Bump from 2.64 to 2.69.
config/ChangeLog:
* ax_count_cpus.m4: New file, backported from GCC.
* bootstrap-Og.mk: New file, backported from GCC.
* bootstrap-lto-lean.mk: New file, backported from GCC.
* bootstrap-lto.mk: Changes backported from GCC.
* futex.m4: Changes backported from GCC.
* gthr.m4: Changes backported from GCC.
* lib-link.m4: Changes backported from GCC.
* mh-mingw: Changes backported from GCC.
* no-executables.m4: Changes backported from GCC.
* tls.m4: Changes backported from GCC.
* toolexeclibdir.m4: New file, backported from GCC.
binutils/ChangeLog:
* configure: Regenerate.
gdb/ChangeLog:
* configure: Regenerate.
gdbserver/ChangeLog:
* configure: Regenerate.
gdbsupport/ChangeLog:
* configure: Regenerate.
intl/ChangeLog:
* configure: Regenerate.
libiberty/ChangeLog:
* configure: Regenerate.
zlib/ChangeLog.bin-gdb:
* configure: Regenerate.
2020-02-05 11:50:07 +00:00
|
|
|
2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
|
|
|
|
|
|
|
|
* configure: Regenerate.
|
|
|
|
|
2020-02-14 14:34:20 -07:00
|
|
|
2020-02-14 Tom Tromey <tom@tromey.com>
|
|
|
|
|
|
|
|
* common-defs.h: Change path to gnulib/config.h.
|
|
|
|
|
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.
2020-02-13 16:27:02 -05:00
|
|
|
2020-02-13 Simon Marchi <simon.marchi@efficios.com>
|
|
|
|
|
|
|
|
* 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.
|
|
|
|
|
2020-02-11 10:56:05 -05:00
|
|
|
2020-02-11 Simon Marchi <simon.marchi@efficios.com>
|
|
|
|
|
|
|
|
* configure: Re-generate.
|
|
|
|
|
2020-02-11 10:51:49 -05:00
|
|
|
2020-02-11 Simon Marchi <simon.marchi@efficios.com>
|
|
|
|
|
|
|
|
* warning.m4: Add -Wstrict-null-sentinel.
|
|
|
|
* configure: Re-generate.
|
|
|
|
|
2020-02-11 10:51:43 -05:00
|
|
|
2020-02-11 Simon Marchi <simon.marchi@efficios.com>
|
|
|
|
|
|
|
|
* warning.m4: Move here, from gdb/warning.m4.
|
|
|
|
* acinclude.m4: Update warning.m4 path.
|
|
|
|
* Makefile.in: Re-generate.
|
|
|
|
|
2020-02-11 10:46:23 -05:00
|
|
|
2020-02-11 Simon Marchi <simon.marchi@efficios.com>
|
|
|
|
|
|
|
|
* acinclude.m4: Include ../gdb/warning.m4.
|
|
|
|
* configure.ac: Use AM_GDB_WARNINGS.
|
|
|
|
* Makefile.am: Set AM_CFLAGS to WARN_CFLAGS and WERROR_CFLAGS.
|
|
|
|
* Makefile.in: Re-generate.
|
|
|
|
* configure: Re-generate.
|
|
|
|
|
2020-02-10 15:13:42 +01:00
|
|
|
2020-02-10 Tom de Vries <tdevries@suse.de>
|
|
|
|
|
|
|
|
* environ.c (gdb_environ::set): Cast concat NULL sentinel to char *.
|
|
|
|
|
2020-01-24 14:58:29 +01:00
|
|
|
2020-01-24 Christian Biesinger <cbiesinger@google.com>
|
|
|
|
|
|
|
|
* thread-pool.c (set_thread_name): Add an overload for the NetBSD
|
|
|
|
version of pthread_setname_np.
|
|
|
|
|
2020-01-15 21:55:29 +00:00
|
|
|
2020-01-17 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
* Makefile.am: Append CXX_DIALECT to CXX.
|
|
|
|
* Makefile.in: Regenerate.
|
|
|
|
|
2020-01-17 15:14:56 +00:00
|
|
|
2020-01-17 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
* configure.ac: Generate config.h instead of support-config.h.
|
|
|
|
* common-defs.h: Include <gdbsupport/config.h> instead of
|
|
|
|
<gdbsupport/support-config.h>.
|
|
|
|
* Makefile.in: Regenerate.
|
|
|
|
* configure: Regenerate.
|
|
|
|
|
2019-12-19 17:51:40 -07:00
|
|
|
2020-01-14 Tom Tromey <tom@tromey.com>
|
|
|
|
|
|
|
|
* Makefile.in: Rebuild.
|
|
|
|
* Makefile.am (check-defines): New target.
|
|
|
|
* check-defines.el: New file.
|
|
|
|
|
Move many configure checks to common.m4
This moves many needed configure checks from gdb and gdbserver into
common.m4. This helps gdbsupport, nat, and target be self-contained.
The result is a bit spaghetti-ish, because gdbsupport uses another m4
file from gdb/. The resulting code is somewhat non-obvious. However,
these problems already exist, so it's not really that much worse than
what is already done.
gdb/ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
* configure.ac: Move many checks to ../gdbsupport/common.m4.
gdb/gdbserver/ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
* configure.ac: Remove any checks that were added to common.m4.
* acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
lib-link.m4.
gdbsupport/ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
* configure, Makefile.in, aclocal.m4, common.m4, config.in:
Rebuild.
* common.m4 (GDB_AC_COMMON): Move many checks from
gdb/configure.ac.
* acinclude.m4: Include bfd.m4, ptrace.m4.
Change-Id: I931eaa94065df268b30a2f1354390710df89c7f8
2019-12-19 16:40:15 -07:00
|
|
|
2020-01-14 Tom Tromey <tom@tromey.com>
|
|
|
|
|
|
|
|
* configure, Makefile.in, aclocal.m4, common.m4, config.in:
|
|
|
|
Rebuild.
|
|
|
|
* common.m4 (GDB_AC_COMMON): Move many checks from
|
|
|
|
gdb/configure.ac.
|
|
|
|
* acinclude.m4: Include bfd.m4, ptrace.m4.
|
|
|
|
|
Move gdbsupport to the top level
This patch moves the gdbsupport directory to the top level. This is
the next step in the ongoing project to move gdbserver to the top
level.
The bulk of this patch was created by "git mv gdb/gdbsupport gdbsupport".
This patch then adds a build system to gdbsupport and wires it into
the top level. Then it changes gdb to use the top-level build.
gdbserver, on the other hand, is not yet changed. It still does its
own build of gdbsupport.
ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
* src-release.sh (GDB_SUPPORT_DIRS): Add gdbsupport.
* MAINTAINERS: Add gdbsupport.
* configure: Rebuild.
* configure.ac (configdirs): Add gdbsupport.
* gdbsupport: New directory, move from gdb/gdbsupport.
* Makefile.def (host_modules, dependencies): Add gnulib.
* Makefile.in: Rebuild.
gdb/ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
* nat/x86-linux-dregs.c: Include configh.h.
* nat/linux-ptrace.c: Include configh.h.
* nat/linux-btrace.c: Include configh.h.
* defs.h: Include config.h, bfd.h.
* configure.ac: Don't source common.host.
(CONFIG_OBS, CONFIG_SRCS): Remove gdbsupport files.
* configure: Rebuild.
* acinclude.m4: Update path.
* Makefile.in (SUPPORT, LIBSUPPORT, INCSUPPORT): New variables.
(CONFIG_SRC_SUBDIR): Remove gdbsupport.
(INTERNAL_CFLAGS_BASE): Add INCSUPPORT.
(CLIBS): Add LIBSUPPORT.
(CDEPS): Likewise.
(COMMON_SFILES): Remove gdbsupport files.
(HFILES_NO_SRCDIR): Likewise.
(stamp-version): Update path to create-version.sh.
(ALLDEPFILES): Remove gdbsupport files.
gdb/gdbserver/ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
* server.h: Include config.h.
* gdbreplay.c: Include config.h.
* configure: Rebuild.
* configure.ac: Don't source common.host.
* acinclude.m4: Update path.
* Makefile.in (INCSUPPORT): New variable.
(INCLUDE_CFLAGS): Add INCSUPPORT.
(SFILES): Update paths.
(version-generated.c): Update path to create-version.sh.
(gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
gdbsupport/ChangeLog
2020-01-14 Tom Tromey <tom@tromey.com>
* common-defs.h: Add GDBSERVER case. Update includes.
* acinclude.m4, aclocal.m4, config.in, configure, configure.ac,
Makefile.am, Makefile.in, README: New files.
* Moved from ../gdb/gdbsupport/
Change-Id: I07632e7798635c1bab389bf885971e584fb4bb78
2019-07-09 08:06:39 -06:00
|
|
|
2020-01-14 Tom Tromey <tom@tromey.com>
|
|
|
|
|
|
|
|
* common-defs.h: Add GDBSERVER case. Update includes.
|
|
|
|
* acinclude.m4, aclocal.m4, config.in, configure, configure.ac,
|
|
|
|
Makefile.am, Makefile.in, README: New files.
|
|
|
|
* Moved from ../gdb/gdbsupport/
|
|
|
|
|