public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug tdep/30049] New: [gdb/tdep, powerpc64le] FAIL: gdb.base/unwind-on-each-insn.exp: bar: instruction 5: bt 2
@ 2023-01-25 12:15 vries at gcc dot gnu.org
  2023-01-25 12:27 ` [Bug tdep/30049] " cvs-commit at gcc dot gnu.org
  2024-02-14  8:24 ` vries at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: vries at gcc dot gnu.org @ 2023-01-25 12:15 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 30049
           Summary: [gdb/tdep, powerpc64le] FAIL:
                    gdb.base/unwind-on-each-insn.exp: bar: instruction 5:
                    bt 2
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tdep
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

[ Filing this to be able to reference it from commit message. ]

With the tentative patch for PR30021 comment 5, and an update to
gdb.base/unwind-on-each-insn.exp that adds testing of non-leaf function (that
I'm hoping to commit soon), I run into:
...
Running /home/vries/gdb/src/gdb/testsuite/gdb.base/unwind-on-each-insn.exp ...
FAIL: gdb.base/unwind-on-each-insn.exp: bar: instruction 5: bt 2
FAIL: gdb.base/unwind-on-each-insn.exp: bar: instruction 5: up
FAIL: gdb.base/unwind-on-each-insn.exp: bar: instruction 5: [string equal $fid
$::main_fid]
FAIL: gdb.base/unwind-on-each-insn.exp: bar: instruction 6: bt 2
FAIL: gdb.base/unwind-on-each-insn.exp: bar: instruction 6: up
FAIL: gdb.base/unwind-on-each-insn.exp: bar: instruction 6: [string equal $fid
$::main_fid]
...

[ Note that without the tentative patch, I see the same failures, and more. ]

First sign of trouble:
...
(gdb) bt 2^M
#0  0x0000000010000748 in bar ()^M
#1  0x0000000010000744 in bar ()^M
(More stack frames follow...)^M
(gdb) FAIL: gdb.base/unwind-on-each-insn.exp: bar: instruction 5: bt 2
...

We're expecting bar/main, the same as we get at insn 4:
...
bt 2^M
#0  0x0000000010000744 in bar ()^M
#1  0x00000000100006c8 in main () at
/home/vries/gdb/src/gdb/testsuite/gdb.base/unwind-on-each-insn.c:25^M
(gdb)
...

Disassembly of bar:
...
000000001000071c <bar>:
    1000071c:   02 10 40 3c     lis     r2,4098
    10000720:   00 7f 42 38     addi    r2,r2,32512
    10000724:   a6 02 08 7c     mflr    r0
    10000728:   10 00 01 f8     std     r0,16(r1)
    1000072c:   f8 ff e1 fb     std     r31,-8(r1)
    10000730:   c1 ff 21 f8     stdu    r1,-64(r1)
    10000734:   78 0b 3f 7c     mr      r31,r1
    10000738:   20 00 7f f8     std     r3,32(r31)
    1000073c:   20 00 7f e8     ld      r3,32(r31)
    10000740:   b5 ff ff 4b     bl      100006f4 <foo>
    10000744:   40 00 3f 38     addi    r1,r31,64
    10000748:   10 00 01 e8     ld      r0,16(r1)
    1000074c:   a6 03 08 7c     mtlr    r0
    10000750:   f8 ff e1 eb     ld      r31,-8(r1)
    10000754:   20 00 80 4e     blr
...

The problem occurs when backtracing from pc == 10000748 and 1000074c, inbetween
the restore of stack pointer r1 and frame pointer r31.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-14  8:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-25 12:15 [Bug tdep/30049] New: [gdb/tdep, powerpc64le] FAIL: gdb.base/unwind-on-each-insn.exp: bar: instruction 5: bt 2 vries at gcc dot gnu.org
2023-01-25 12:27 ` [Bug tdep/30049] " cvs-commit at gcc dot gnu.org
2024-02-14  8:24 ` vries at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).