Re: [PATCH] gdb/unwinders: better support for $pc not saved

Keith Seitz
2024-01-29T16:50:16Z

On 1/27/24 07:26, Andrew Burgess wrote:
> This started with a Red Hat bug report which can be seen here:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1850710
>
> The problem reported here was using GDB on GNU/Linux for S390, the
> user stepped into JIT generated code. As they enter the JIT code GDB
> would report 'PC not saved', and this same message would be reported
> after each step/stepi.

I really appreciate that you've looked into this. For several years
now, any interested user has seen my hack workaround (posted in 28313)!

I haven't dug into this yet, but I wanted to point out that on s390x,
the new test file comes with a FAIL (on unix, native-gdbserver, and
native-extended-gdbserver boards):

=== gdb Summary ===

# of expected passes 6
# of unexpected failures 1

The failure from gdb.log (I'm testing through our internal beaker
test infra on RHEL9, so all tests are run (unfortunately) as root):

bt
#0 other_func () at
/root/test-fsf-master/gdb/build-s390x-redhat-linux-gnu/gdb/
testsuite/../../../gdb/testsuite/gdb.base/pc-not-saved.c:24
#1 0x00000000010006ae in break_bt_here () at
/root/test-fsf-master/gdb/build-s3
90x-redhat-linux-gnu/gdb/testsuite/../../../gdb/testsuite/gdb.base/pc-not-saved.
c:38
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) FAIL: gdb.base/pc-not-saved.exp: backtrace from other_func function

Keith