Commit Graph

112551 Commits

Author SHA1 Message Date
GDB Administrator
6dde7de287 Automatic date update in version.in 2023-03-16 00:01:15 +00:00
GDB Administrator
4947ba8ce9 Automatic date update in version.in 2023-03-15 00:01:07 +00:00
GDB Administrator
c866f18f05 Automatic date update in version.in 2023-03-14 00:01:31 +00:00
Tom Tromey
562403d4f5 Fix crash in inside_main_func
gdb 13.1 crashes while running the rust compiler's debugger tests.
The crash has a number of causes.

First, the rust compiler still uses the C++-like _Z mangling, but with
its own twist -- some hex digits added to the end of a symbol.  So,
while gdb finds the correct name of "main":

(top-gdb) p name
$13 = 0x292e0c0 "rustc_gdb_1031745::main"

It isn't found in the minsyms, because C++ demangling yields:

[99] t 0x90c0 _ZN17rustc_gdb_10317454main17h5b5be7fe16a97225E section .text  rustc_gdb_1031745::main::h5b5be7fe16a97225  zko06yobckx336v

This could perhaps be fixed.  I also filed a new PR to suggest
preferring the linkage name of the main program.

Next, the rust compiler emits both a DW_TAG_subprogram and a
DW_TAG_namespace for "main".  This happens because the file is named
"main.rs" -- i.e., the bug is specific to the source file name.  The
crash also seems to require the nested function inside of 'main', at
least for me.  The namespace always is generated, but perhaps this
changes the ordering in the DWARF.

When inside_main_func looks up the main symbol, it finds the namespace
symbol rather than the function.  (I filed a bug about fixing gdb's
symbol tables -- long overdue.)

Meanwhile, as I think it's important to fix this crash sooner rather
than later, this patch changes inside_main_func to check that the
symbol that is found is LOC_BLOCK.  This perhaps should have been done
in the first place, anyway.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30158

(cherry picked from commit 5f056fcb3d)
2023-03-13 14:19:21 -06:00
GDB Administrator
792b1fd5a8 Automatic date update in version.in 2023-03-13 00:00:50 +00:00
GDB Administrator
f06873510d Automatic date update in version.in 2023-03-12 00:01:03 +00:00
GDB Administrator
b40137baaf Automatic date update in version.in 2023-03-11 00:00:59 +00:00
John Baldwin
a980a7d24b PR gdb/30214: Prefer local include paths to system include paths
Some systems may install binutils headers into a system location
(e.g. /usr/local/include on FreeBSD) which may also include headers
for other external packages used by GDB such as zlib or zstd.  If a
system include path such as /usr/local/include is added before local
include paths to directories within a clone or release tarball, then
headers from the external binutils package are used which can result
in build failures if the external binutils package is out of sync with
the version of GDB being built.

To fix, sort the include paths in INTERNAL_CFLAGS_BASE to add CFLAGS
for "local" componenets before external components.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30214
Reviewed-By: Tom Tromey <tom@tromey.com>
(cherry picked from commit a2fbb69038)
2023-03-10 12:06:42 -08:00
GDB Administrator
cb7fd28390 Automatic date update in version.in 2023-03-10 00:01:11 +00:00
GDB Administrator
885ab3db98 Automatic date update in version.in 2023-03-09 00:00:51 +00:00
GDB Administrator
b7d1a75ca7 Automatic date update in version.in 2023-03-08 00:01:01 +00:00
GDB Administrator
8487291757 Automatic date update in version.in 2023-03-07 00:01:33 +00:00
GDB Administrator
e54175bd12 Automatic date update in version.in 2023-03-06 00:00:58 +00:00
GDB Administrator
de76b54b28 Automatic date update in version.in 2023-03-05 00:00:57 +00:00
GDB Administrator
cb3c6519cd Automatic date update in version.in 2023-03-04 00:00:59 +00:00
GDB Administrator
31b17e2106 Automatic date update in version.in 2023-03-03 00:00:53 +00:00
GDB Administrator
76e8b48e86 Automatic date update in version.in 2023-03-02 00:01:02 +00:00
GDB Administrator
a003e63803 Automatic date update in version.in 2023-03-01 00:01:20 +00:00
GDB Administrator
a9dc6b99c1 Automatic date update in version.in 2023-02-28 00:00:59 +00:00
GDB Administrator
864009de89 Automatic date update in version.in 2023-02-27 00:00:33 +00:00
GDB Administrator
bc8af55ae5 Automatic date update in version.in 2023-02-26 00:00:33 +00:00
GDB Administrator
a55702108f Automatic date update in version.in 2023-02-25 00:00:33 +00:00
GDB Administrator
812ca62301 Automatic date update in version.in 2023-02-24 00:00:38 +00:00
GDB Administrator
da8e6a5da0 Automatic date update in version.in 2023-02-23 00:00:51 +00:00
GDB Administrator
d17e9c8c97 Automatic date update in version.in 2023-02-22 00:01:10 +00:00
GDB Administrator
0426ba8f52 Automatic date update in version.in 2023-02-21 00:00:44 +00:00
GDB Administrator
c0af3c5630 Automatic date update in version.in 2023-02-20 00:00:33 +00:00
Joel Brobecker
1d2740610c Bump GDB's version number to 13.1.90.DATE-git.
This commit changes gdb/version.in to 13.1.90.DATE-git.

This commit also makes the following changes in gdb/testsuite:

	* gdb.base/default.exp: Change $_gdb_minor to 2.
2023-02-19 18:00:08 +04:00
Joel Brobecker
4f3e26ac6e Set GDB version number to 13.1.
This commit changes gdb/version.in to 13.1.
gdb-13.1-release
2023-02-19 17:45:06 +04:00
GDB Administrator
9761733ec7 Automatic date update in version.in 2023-02-19 00:00:50 +00:00
Tom Tromey
7f4307436f Fix "start" for D, Rust, etc
The new DWARF indexer broke "start" for some languages.

For D, it is broken because, while the code in cooked_index_shard::add
specifically excludes Ada, it fails to exclude D.  This means that the
C "main" will be detected as "main" here -- whereas what is intended
is for the code in find_main_name to use d_main_name to find the name.

The Rust compiler, on the other hand, uses DW_AT_main_subprogram.
However, the code in dwarf2_build_psymtabs_hard fails to create a
fully-qualified name, so the name always ends up as plain "main".

For D and Ada, a very simple approach suffices: remove the check
against "main" from cooked_index_shard::add.  This also has the
benefit of slightly speeding up DWARF indexing.  I assume this
approach will work for Pascal and Modula-2 as well, but I don't have a
way to test those at present.

For Rust, though, this is not sufficient.  And, computing the
fully-qualified name in dwarf2_build_psymtabs_hard will crash, because
cooked_index_entry::full_name uses the canonical name -- and that is
not computed until after canonicalization.

However, we don't want to wait for canonicalization to be done before
computing the main name.  That would remove any benefit from doing
canonicalization is the background.

This patch solves this dilemma by noticing that languages using
DW_AT_main_subprogram are, currently, disjoint from languages
requiring canonicalization.  Because of this, we can add a parameter
to full_name to let us avoid crashes, slowdowns, and races here.

This is kind of tricky and ugly, so I've tried to comment it
sufficiently.

While doing this, I had to change gdb.dwarf2/main-subprogram.exp.  A
different possibility here would be to ignore the canonicalization
needs of C in this situation, because those only affect certain types.
However, I chose this approach because the test case is artificial
anyhow.

A long time ago, in an earlier threading attempt, I changed the global
current_language to be a function (hidden behind a macro) to let us
attempt lazily computing the current language.  Perhaps this approach
could still be made to work.  However, that also seemed rather tricky,
more so than this patch.

Reviewed-By: Andrew Burgess <aburgess@redhat.com>
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30116
(cherry picked from commit 47fe57c928)
2023-02-18 16:30:31 -07:00
GDB Administrator
c7c263ea9c Automatic date update in version.in 2023-02-18 00:00:27 +00:00
GDB Administrator
ba1572b512 Automatic date update in version.in 2023-02-17 00:00:39 +00:00
GDB Administrator
34c8bf99b6 Automatic date update in version.in 2023-02-16 00:00:38 +00:00
GDB Administrator
53622d843b Automatic date update in version.in 2023-02-15 00:00:44 +00:00
GDB Administrator
3053fcf3d1 Automatic date update in version.in 2023-02-14 00:00:44 +00:00
Keith Seitz
c594b6f7d5 Fix doc build dependencies for --with-system-readline
PR build/30108 concerns building gdb documentation with
--with-sytem-readline.  If the in-tree readline directory is
missing, though, the docs will fail to build:

make[4]: Entering directory '/home/keiths/work/readline-doc-issue/linux/gdb/doc'
make[4]: *** No rule to make target '../../../src/gdb/doc/../../readline/readline/doc/rluser.texi', needed by 'gdb.info'.  Stop.

The listed file (and hsuser.texi) are conditionally included by gdb.texinfo.
When system readline is used, gdb/configure.ac will leave
READLINE_TEXI_INCFLAGS empty, causing doc/Makefile.in to output a line to
$BUILD/doc/GDBvn.texi with "@set SYSTEM_READLINE".  This surpresses the
inclusion of the missing files. They are not needed or used in this
scenario.

However, GDB_DOC_SOURCE_INCLUDES always lists these two files as dependencies,
thus provoking the build error whenever readline/ is missing.

This patch fixes this by creating (essentially) a conditional setting of the
dependencies to be included from readline.
2023-02-13 06:20:58 -08:00
GDB Administrator
6e92595dc2 Automatic date update in version.in 2023-02-13 00:00:26 +00:00
GDB Administrator
62f2dfcc74 Automatic date update in version.in 2023-02-12 00:00:26 +00:00
GDB Administrator
4b69f04bd8 Automatic date update in version.in 2023-02-11 00:00:32 +00:00
GDB Administrator
a0f9e84579 Automatic date update in version.in 2023-02-10 00:00:34 +00:00
GDB Administrator
8364dca17d Automatic date update in version.in 2023-02-09 00:00:43 +00:00
GDB Administrator
257660c3de Automatic date update in version.in 2023-02-08 00:00:45 +00:00
GDB Administrator
e045e0fa77 Automatic date update in version.in 2023-02-07 00:00:45 +00:00
GDB Administrator
5f157ecd60 Automatic date update in version.in 2023-02-06 00:00:44 +00:00
GDB Administrator
9a7d273178 Automatic date update in version.in 2023-02-05 00:00:37 +00:00
GDB Administrator
3199e96dae Automatic date update in version.in 2023-02-04 00:00:28 +00:00
GDB Administrator
39d4bba77d Automatic date update in version.in 2023-02-03 00:00:42 +00:00
Joel Brobecker
83f1f651c7 Bump GDB's version number to 13.0.91.DATE-git.
This commit changes gdb/version.in to 13.0.91.DATE-git.
2023-02-02 09:23:37 +04:00
Nick Clifton
16c45b9ab6 Ensure that libbacktrace/allocfail.sh is not deleted when creating release tarballs.
* Makefile.am (CLEANFILES): Import patch from upstream to prevent
        allocafail.sh from being removed when running 'make clean'.

(cherry picked from commit edf64cd235)
2023-02-02 08:54:49 +04:00