public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug tdep/27525] New: powerpc: displaced stepping broken for breakpoint at lnia instruction
@ 2021-03-05 15:41 gabriel at inconstante dot net.br
  2021-03-05 20:51 ` [Bug tdep/27525] " pedromfc at linux dot ibm.com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: gabriel at inconstante dot net.br @ 2021-03-05 15:41 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 27525
           Summary: powerpc: displaced stepping broken for breakpoint at
                    lnia instruction
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tdep
          Assignee: unassigned at sourceware dot org
          Reporter: gabriel at inconstante dot net.br
                CC: pedromfc at linux dot ibm.com, rcardoso at linux dot vnet.ibm.com
  Target Milestone: ---

Consider the following function:

.global fn
.type fn,@function
fn:
    lnia   3
    blr

If I place a breakpoing at 'fn', then try to 'stepi', the result in 'r3' is not
set to the address of the next instruction, as can be seen in the following
output snippet:

Breakpoint 1, 0x0000000010000680 in fn ()
>>> set displaced-stepping on
>>> x /i $pc
=> 0x10000680 <fn>:     lnia    r3
>>> stepi
0x0000000010000684 in fn ()
>>> info registers r3
r3             0x100004ac          268436652

However, pedromfc told me that disabling displaced stepping would probably fix
the problem, and it did, indeed:

Breakpoint 1, 0x0000000010000680 in fn ()
>>> set displaced-stepping off
>>> x /i $pc
=> 0x10000680 <fn>:     lnia    r3
>>> stepi
0x0000000010000684 in fn ()
>>> info registers r3
r3             0x10000684          268437124

Cheers,
Gabriel

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

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

end of thread, other threads:[~2021-05-21 16:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05 15:41 [Bug tdep/27525] New: powerpc: displaced stepping broken for breakpoint at lnia instruction gabriel at inconstante dot net.br
2021-03-05 20:51 ` [Bug tdep/27525] " pedromfc at linux dot ibm.com
2021-03-05 22:55 ` will_schmidt at vnet dot ibm.com
2021-04-12 18:36 ` cvs-commit at gcc dot gnu.org
2021-04-12 19:57 ` will_schmidt at vnet dot ibm.com
2021-05-21 16:23 ` will_schmidt at vnet dot ibm.com
2021-05-21 16:24 ` will_schmidt at vnet dot ibm.com

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).