]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
12 hours agoAutomatic date update in version.in gdb-16-branch
GDB Administrator [Sat, 28 Jun 2025 00:04:16 +0000 (00:04 +0000)] 
Automatic date update in version.in

36 hours agoAutomatic date update in version.in
GDB Administrator [Fri, 27 Jun 2025 00:01:59 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 days agoAutomatic date update in version.in
GDB Administrator [Thu, 26 Jun 2025 00:03:33 +0000 (00:03 +0000)] 
Automatic date update in version.in

3 days agoAutomatic date update in version.in
GDB Administrator [Wed, 25 Jun 2025 00:03:03 +0000 (00:03 +0000)] 
Automatic date update in version.in

4 days agoAutomatic date update in version.in
GDB Administrator [Tue, 24 Jun 2025 00:01:53 +0000 (00:01 +0000)] 
Automatic date update in version.in

5 days agoAutomatic date update in version.in
GDB Administrator [Mon, 23 Jun 2025 00:02:53 +0000 (00:02 +0000)] 
Automatic date update in version.in

6 days agoAutomatic date update in version.in
GDB Administrator [Sun, 22 Jun 2025 00:01:28 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 days agoAutomatic date update in version.in
GDB Administrator [Sat, 21 Jun 2025 00:01:09 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 days agoAutomatic date update in version.in
GDB Administrator [Fri, 20 Jun 2025 00:03:24 +0000 (00:03 +0000)] 
Automatic date update in version.in

9 days agoAutomatic date update in version.in
GDB Administrator [Thu, 19 Jun 2025 00:01:42 +0000 (00:01 +0000)] 
Automatic date update in version.in

10 days agoAutomatic date update in version.in
GDB Administrator [Wed, 18 Jun 2025 00:03:54 +0000 (00:03 +0000)] 
Automatic date update in version.in

11 days agoAutomatic date update in version.in
GDB Administrator [Tue, 17 Jun 2025 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

12 days agoAutomatic date update in version.in
GDB Administrator [Mon, 16 Jun 2025 00:01:45 +0000 (00:01 +0000)] 
Automatic date update in version.in

13 days agoAutomatic date update in version.in
GDB Administrator [Sun, 15 Jun 2025 00:01:50 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 weeks agoAutomatic date update in version.in
GDB Administrator [Sat, 14 Jun 2025 00:01:26 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 weeks agoAutomatic date update in version.in
GDB Administrator [Fri, 13 Jun 2025 00:02:07 +0000 (00:02 +0000)] 
Automatic date update in version.in

2 weeks agoAutomatic date update in version.in
GDB Administrator [Thu, 12 Jun 2025 00:01:11 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 weeks agoAutomatic date update in version.in
GDB Administrator [Wed, 11 Jun 2025 00:02:23 +0000 (00:02 +0000)] 
Automatic date update in version.in

2 weeks agoreadline/tcap.h: Update definitions for C23
Chris Packham [Wed, 30 Apr 2025 04:49:44 +0000 (16:49 +1200)] 
readline/tcap.h: Update definitions for C23

C23 changes how function definitions like int `int tputs ()` are
interpreted. In older standards this meant that the function arguments
are unknown. In C23 this is interpreted as `int tputs (void)` so now
when we compile with GCC15 (which defaults to -std=gnu23) we get an
error such as

  readline/display.c:2839:17: error: too many arguments to function 'tputs'; expected 0, have 3

Add the function arguments for tgetent(), tgetflag(), tgetnum(),
tgetstr(), tputs() and tgoto().

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Approved-By: Tom Tromey <tom@tromey.com>
(cherry picked from commit 5c87b330e910f8be1443c881fd16a70e685f1f2f)
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33071

2 weeks agoAutomatic date update in version.in
GDB Administrator [Tue, 10 Jun 2025 00:02:06 +0000 (00:02 +0000)] 
Automatic date update in version.in

2 weeks agoAutomatic date update in version.in
GDB Administrator [Mon, 9 Jun 2025 00:01:38 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 weeks agoAutomatic date update in version.in
GDB Administrator [Sun, 8 Jun 2025 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 weeks agoAutomatic date update in version.in
GDB Administrator [Sat, 7 Jun 2025 00:02:29 +0000 (00:02 +0000)] 
Automatic date update in version.in

3 weeks agoAutomatic date update in version.in
GDB Administrator [Fri, 6 Jun 2025 00:01:03 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 weeks agoAutomatic date update in version.in
GDB Administrator [Thu, 5 Jun 2025 00:01:30 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 weeks agoAutomatic date update in version.in
GDB Administrator [Wed, 4 Jun 2025 00:01:22 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 weeks agoAutomatic date update in version.in
GDB Administrator [Tue, 3 Jun 2025 00:01:36 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 weeks agoAutomatic date update in version.in
GDB Administrator [Mon, 2 Jun 2025 00:01:27 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 weeks agoAutomatic date update in version.in
GDB Administrator [Sun, 1 Jun 2025 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 weeks agoAutomatic date update in version.in
GDB Administrator [Sat, 31 May 2025 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 weeks agoAutomatic date update in version.in
GDB Administrator [Fri, 30 May 2025 00:00:28 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 weeks agoAutomatic date update in version.in
GDB Administrator [Thu, 29 May 2025 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 weeks agoAutomatic date update in version.in
GDB Administrator [Wed, 28 May 2025 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 weeks agoAutomatic date update in version.in
GDB Administrator [Tue, 27 May 2025 00:00:55 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 weeks agoAutomatic date update in version.in
GDB Administrator [Mon, 26 May 2025 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 weeks agoAutomatic date update in version.in
GDB Administrator [Sun, 25 May 2025 00:01:27 +0000 (00:01 +0000)] 
Automatic date update in version.in

5 weeks agoAutomatic date update in version.in
GDB Administrator [Sat, 24 May 2025 00:00:34 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 weeks agoAutomatic date update in version.in
GDB Administrator [Fri, 23 May 2025 00:01:28 +0000 (00:01 +0000)] 
Automatic date update in version.in

5 weeks agoAutomatic date update in version.in
GDB Administrator [Thu, 22 May 2025 00:00:23 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 weeks agoAutomatic date update in version.in
GDB Administrator [Wed, 21 May 2025 00:01:10 +0000 (00:01 +0000)] 
Automatic date update in version.in

5 weeks agoAutomatic date update in version.in
GDB Administrator [Tue, 20 May 2025 00:00:35 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 weeks agoAutomatic date update in version.in
GDB Administrator [Mon, 19 May 2025 00:00:39 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 weeks agoAutomatic date update in version.in
GDB Administrator [Sun, 18 May 2025 00:01:09 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 weeks agoAutomatic date update in version.in
GDB Administrator [Sat, 17 May 2025 00:00:32 +0000 (00:00 +0000)] 
Automatic date update in version.in

6 weeks agoAutomatic date update in version.in
GDB Administrator [Fri, 16 May 2025 00:01:06 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 weeks agoAutomatic date update in version.in
GDB Administrator [Thu, 15 May 2025 00:01:14 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 weeks agoAutomatic date update in version.in
GDB Administrator [Wed, 14 May 2025 00:01:11 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 weeks agoAutomatic date update in version.in
GDB Administrator [Tue, 13 May 2025 00:00:36 +0000 (00:00 +0000)] 
Automatic date update in version.in

6 weeks agoAutomatic date update in version.in
GDB Administrator [Mon, 12 May 2025 00:00:40 +0000 (00:00 +0000)] 
Automatic date update in version.in

6 weeks agoAutomatic date update in version.in
GDB Administrator [Sun, 11 May 2025 00:00:31 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 weeks agoAutomatic date update in version.in
GDB Administrator [Sat, 10 May 2025 00:01:13 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 weeks agoAutomatic date update in version.in
GDB Administrator [Fri, 9 May 2025 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 weeks agoAutomatic date update in version.in
GDB Administrator [Thu, 8 May 2025 00:00:36 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 weeks agoAutomatic date update in version.in
GDB Administrator [Wed, 7 May 2025 00:01:21 +0000 (00:01 +0000)] 
Automatic date update in version.in

7 weeks agoAutomatic date update in version.in
GDB Administrator [Tue, 6 May 2025 00:00:40 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 weeks agoAutomatic date update in version.in
GDB Administrator [Mon, 5 May 2025 00:00:38 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 weeks agoAutomatic date update in version.in
GDB Administrator [Sun, 4 May 2025 00:01:15 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 weeks agoAutomatic date update in version.in
GDB Administrator [Sat, 3 May 2025 00:00:31 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 weeks agoAutomatic date update in version.in
GDB Administrator [Fri, 2 May 2025 00:01:21 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 weeks agoAutomatic date update in version.in
GDB Administrator [Thu, 1 May 2025 00:00:27 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 weeks agoAutomatic date update in version.in
GDB Administrator [Wed, 30 Apr 2025 00:02:13 +0000 (00:02 +0000)] 
Automatic date update in version.in

8 weeks agoAutomatic date update in version.in
GDB Administrator [Tue, 29 Apr 2025 00:01:24 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Mon, 28 Apr 2025 00:01:33 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Sun, 27 Apr 2025 00:01:03 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Sat, 26 Apr 2025 00:00:31 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Fri, 25 Apr 2025 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Thu, 24 Apr 2025 00:00:28 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Wed, 23 Apr 2025 00:02:08 +0000 (00:02 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Tue, 22 Apr 2025 00:02:09 +0000 (00:02 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Mon, 21 Apr 2025 00:00:42 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 months agoBump GDB's version number to 16.3.90.DATE-git.
Joel Brobecker [Sun, 20 Apr 2025 17:39:23 +0000 (10:39 -0700)] 
Bump GDB's version number to 16.3.90.DATE-git.

This commit changes gdb/version.in to 16.3.90.DATE-git.

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

* gdb.base/default.exp: Change $_gdb_minor to 4.

2 months agoSet GDB version number to 16.3. gdb-16.3-release
Joel Brobecker [Sun, 20 Apr 2025 17:22:06 +0000 (10:22 -0700)] 
Set GDB version number to 16.3.

This commit changes gdb/version.in to 16.3.

2 months agoAutomatic date update in version.in
GDB Administrator [Sun, 20 Apr 2025 00:01:45 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Sat, 19 Apr 2025 00:01:13 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Fri, 18 Apr 2025 00:01:40 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Thu, 17 Apr 2025 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Wed, 16 Apr 2025 00:01:15 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Tue, 15 Apr 2025 00:01:28 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Mon, 14 Apr 2025 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Sun, 13 Apr 2025 00:00:38 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Sat, 12 Apr 2025 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Fri, 11 Apr 2025 00:01:08 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Thu, 10 Apr 2025 00:01:13 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Wed, 9 Apr 2025 00:00:42 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Tue, 8 Apr 2025 00:01:17 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 months agogstack: [downstream regression] Output file names and line numbers
Keith Seitz [Mon, 7 Apr 2025 15:40:56 +0000 (08:40 -0700)] 
gstack: [downstream regression] Output file names and line numbers

With commit fb2ded33c1e519659743047ed7817166545b6d91, I added
Fedora's gstack script to gdb.  Some issues have arisen since
then, and this patch addresses those issues:

. As Sam James recently noted[1], PKGVERSION and VERSION
  need to be quoted.
. A Fedora user reported the misuse of --readnever, which
  causes gstack to omit filename and line number information in the
  backtrace[Red Hat BZ 2354997].

[1] https://inbox.sourceware.org/gdb-patches/d19d6bc17e0a160ce27fc572079f11a587c0e168.1742424869.git.sam@gentoo.org/
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=2354997
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32828

2 months agoFix build failure for gdbserver's raw_compare self test
Luis Machado [Mon, 7 Apr 2025 08:24:57 +0000 (09:24 +0100)] 
Fix build failure for gdbserver's raw_compare self test

Commit 5c89e5539aef2992a2417be55307c9071ffbe89c addressed a SVE/SME gdbserver
crash on gdbserver and added a gdbserver-side self test for a register cache
raw_compare function.

For the GDB 16 branch though, gdbserver's regcache doesn't yet have a
constructor taking a target description, so we need to explicitly initialize
the register cache before the self test can take place.

Also, the self tests are only built if we explicitly pass --enable-unit-tests
to configure. This build error should not manifest on a default build that
doesn't enable self tests.

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

Reviewed-By: Keith Seitz <keiths@redhat.com>
Approved-By: Andrew Burgess <aburgess@redhat.com>
2 months agoAutomatic date update in version.in
GDB Administrator [Mon, 7 Apr 2025 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Sun, 6 Apr 2025 00:00:42 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Sat, 5 Apr 2025 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Fri, 4 Apr 2025 00:00:48 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Thu, 3 Apr 2025 00:00:34 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 months agoFix gdbserver crashes on SVE/SME-enabled systems
Luis Machado [Fri, 28 Feb 2025 09:36:42 +0000 (09:36 +0000)] 
Fix gdbserver crashes on SVE/SME-enabled systems

Commit 51e6b8cfd649013ae16a3d00f1451b2531ba6bc9 fixed a
regression for SVE/SME registers on gdb's side by using a <= comparison for
regcache's raw_compare assertion check. We seem to have failed to do the same
for gdbserver's raw_compare counterpart.

With the code as it is, I'm seeing a lot of crashes for gdbserver on a machine
with SVE enabled. For instance, with the following invocation:

make check-gdb RUNTESTFLAGS="--target_board=native-gdbserver" TESTS=gdb.base/break.exp

Running /work/builds/binutils-gdb/gdb/testsuite/../../../../repos/binutils-gdb/gdb/testsuite/gdb.base/break.exp ...
FAIL: gdb.base/break.exp: test_break: run until function breakpoint
FAIL: gdb.base/break.exp: test_break: run until breakpoint set at a line number (the program is no longer running)
FAIL: gdb.base/break.exp: test_break: run until file:function(6) breakpoint (the program is no longer running)
FAIL: gdb.base/break.exp: test_break: run until file:function(5) breakpoint (the program is no longer running)
FAIL: gdb.base/break.exp: test_break: run until file:function(4) breakpoint (the program is no longer running)
FAIL: gdb.base/break.exp: test_break: run until file:function(3) breakpoint (the program is no longer running)
FAIL: gdb.base/break.exp: test_break: run until file:function(2) breakpoint (the program is no longer running)
FAIL: gdb.base/break.exp: test_break: run until file:function(1) breakpoint (the program is no longer running)
FAIL: gdb.base/break.exp: test_break: run until quoted breakpoint (the program is no longer running)
FAIL: gdb.base/break.exp: test_break: run until file:linenum breakpoint (the program is no longer running)
FAIL: gdb.base/break.exp: test_break: breakpoint offset +1
FAIL: gdb.base/break.exp: test_break: step onto breakpoint (the program is no longer running)
FAIL: gdb.base/break.exp: test_break: setting breakpoint at }
FAIL: gdb.base/break.exp: test_break: continue to breakpoint at } (the program is no longer running)
FAIL: gdb.base/break.exp: test_no_break_on_catchpoint: runto: run to main
FAIL: gdb.base/break.exp: test_break_nonexistent_line: runto: run to main
FAIL: gdb.base/break.exp: test_break_default: runto: run to main
FAIL: gdb.base/break.exp: test_break_silent_and_more: runto: run to main
FAIL: gdb.base/break.exp: test_break_line_convenience_var: runto: run to main
FAIL: gdb.base/break.exp: test_break_user_call: runto: run to main
FAIL: gdb.base/break.exp: test_finish_arguments: runto: run to main
FAIL: gdb.base/break.exp: test_next_with_recursion: kill program
FAIL: gdb.base/break.exp: test_next_with_recursion: run to factorial(6)
FAIL: gdb.base/break.exp: test_next_with_recursion: continue to factorial(5) (the program is no longer running)
FAIL: gdb.base/break.exp: test_next_with_recursion: backtrace from factorial(5)
FAIL: gdb.base/break.exp: test_next_with_recursion: next to recursive call (the program is no longer running)
FAIL: gdb.base/break.exp: test_next_with_recursion: next over recursive call (the program is no longer running)
FAIL: gdb.base/break.exp: test_next_with_recursion: backtrace from factorial(5.1)
FAIL: gdb.base/break.exp: test_next_with_recursion: continue until exit at recursive next test (the program is no longer running)
FAIL: gdb.base/break.exp: test_break_optimized_prologue: run until function breakpoint, optimized file
FAIL: gdb.base/break.exp: test_break_optimized_prologue: run until breakpoint set at small function, optimized file (the program is no longer running)
FAIL: gdb.base/break.exp: test_rbreak_shlib: rbreak junk

Adjusting the regcache raw_compare assertion check to use <= fixes
the problem on aarch64-linux on a SVE-capable system.

This patch also adds a simple selftest to gdbserver that validates this
particular case by simulating a raw_compare operation.

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

Approved-By: Simon Marchi <simon.marchi@efficios.com>
2 months agogdb: allow selecting default fg/bg colors in tui mode
Andrew Burgess [Sun, 30 Mar 2025 09:25:18 +0000 (10:25 +0100)] 
gdb: allow selecting default fg/bg colors in tui mode

This commit fixes PR gdb/32797, and pulls in just part of commit:

  commit 6447969d0ac774b6dec0f95a0d3d27c27d158690
  Date:   Sat Oct 5 22:27:44 2024 +0300

    Add an option with a color type.

to the gdb-16-branch.

This commit allows the escape sequences \x1b[39m and \x1b[49m, which
select the default foreground and background colours respectively, to
work correctly.

This fix is just a small part of the above commit.  Only these two
changes are required to fix this bug.  As we are currently preparing
for a 16.3 release, I don't think we should be pulling in the whole of
the above commit.

You can test this commit using:

  export TERM=xterm-256color
  gdb -q -tui -ex 'py print("normal\n\x1b[39mforeground default\n\x1b[0mnormal\n\x1b[49mbackground default\n\x1b[0mnormal\n")'

All of the output text should use the default foreground and
background colors.

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

Approved-By: Tom Tromey <tom@tromey.com>
2 months agoAutomatic date update in version.in
GDB Administrator [Wed, 2 Apr 2025 00:00:39 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Tue, 1 Apr 2025 00:01:06 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Mon, 31 Mar 2025 00:00:46 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 months agoAutomatic date update in version.in
GDB Administrator [Sun, 30 Mar 2025 00:00:26 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 months agoAutomatic date update in version.in
GDB Administrator [Sat, 29 Mar 2025 00:01:30 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 months agogdb: Fix assertion failure when inline frame #0 is duplicated
Craig Blackmore [Thu, 13 Feb 2025 15:53:34 +0000 (15:53 +0000)] 
gdb: Fix assertion failure when inline frame #0 is duplicated

Modifying inline-frame-cycle-unwind.exp to use `bt -no-filters` produces
the following incorrect backtrace:

  #0  inline_func () at .../gdb/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.c:49
  #1  normal_func () at .../gdb/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.c:32
  #2  0x000055555555517f in inline_func () at .../gdb/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.c:50
  #3  normal_func () at .../gdb/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.c:32
  Backtrace stopped: previous frame identical to this frame (corrupt stack?)
  (gdb) FAIL: gdb.base/inline-frame-cycle-unwind.exp: cycle at level 1: backtrace when the unwind is broken at frame 1

The expected output, which we get with `bt`, is:

  #0  inline_func () at .../gdb/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.c:49
  #1  normal_func () at .../gdb/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.c:32
  Backtrace stopped: previous frame identical to this frame (corrupt stack?)
  (gdb) PASS: gdb.base/inline-frame-cycle-unwind.exp: cycle at level 1: backtrace when the unwind is broken at frame 1

The cycle checking in `get_prev_frame_maybe_check_cycle` relies on newer
frame ids having already been computed and stashed.  Unlike other
frames, frame #0's id does not get computed immediately.

The test passes with `bt` because when applying python frame filters,
the call to `bootstrap_python_frame_filters` happens to compute the id
of frame #0.  When `get_prev_frame_maybe_check_cycle` later tries to
stash frame #2's id, the cycle is detected.

The test fails with `bt -no-filters` because frame #0's id has not been
stashed by the time `get_prev_frame_maybe_check_cycle` tries to stash
frame #2's id which succeeds and the cycle is only detected later when
trying to stash frame #4's id.  Doing `stepi` after the incorrect
backtrace would then trigger an assertion failure when trying to stash
frame #0's id because it is a duplicate of #2's already stashed id.

In `get_prev_frame_always_1`, if this_frame is inline frame 0, then
compute and stash its frame id before returning the previous frame.
This ensures that the id of inline frame 0 has been stashed before
`get_prev_frame_maybe_check_cycle` is called on older frames.

The test case has been updated to run both `bt` and `bt -no-filters`.

Co-authored-by: Andrew Burgess <aburgess@redhat.com>
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32757