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
* [Bug tdep/27525] powerpc: displaced stepping broken for breakpoint at lnia instruction
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 ` pedromfc at linux dot ibm.com
2021-03-05 22:55 ` will_schmidt at vnet dot ibm.com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pedromfc at linux dot ibm.com @ 2021-03-05 20:51 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27525
Pedro Franco de Carvalho <pedromfc at linux dot ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ulrich.weigand at de dot ibm.com
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tdep/27525] powerpc: displaced stepping broken for breakpoint at lnia instruction
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
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: will_schmidt at vnet dot ibm.com @ 2021-03-05 22:55 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27525
Will Schmidt <will_schmidt at vnet dot ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |will_schmidt at vnet dot ibm.com
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tdep/27525] powerpc: displaced stepping broken for breakpoint at lnia instruction
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
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-12 18:36 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27525
--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Will Schmidt <willschm@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e3d528d7e6a6b863d30aaecf74adf8c78286f84c
commit e3d528d7e6a6b863d30aaecf74adf8c78286f84c
Author: Will Schmidt <will_schmidt@vnet.ibm.com>
Date: Mon Apr 12 13:35:54 2021 -0500
[PATCH, rs6000, v3][PR gdb/27525] displaced stepping across addpcis/lnia.
This addresses PR gdb/27525. The lnia and other variations
of the addpcis instruction write the value of the NIA into a target
register.
If we are single-stepping across a breakpoint, the instruction is executed
from a displaced location, and thusly the written value of the PC/NIA
will be incorrect. The changes here will measure the displacement
offset, and adjust the target register value to compensate.
YYYY-MM-DD Will Schmidt <will_schmidt@vnet.ibm.com>
gdb/ChangeLog:
* rs6000-tdep.c (ppc_displaced_step_fixup): Update to handle
the addpcis/lnia instruction.
gdb/testsuite/ChangeLog:
* gdb.arch/powerpc-addpcis.exp: Testcase harness to
exercise single-stepping over subpcis,lnia,addpcis instructions
with displacement.
* gdb.arch/powerpc-addpcis.s: Testcase with stream
of addpcis/lnia/subpcis instructions.
* gdb.arch/powerpc-lnia.exp: Testcase harness to exercise
single-stepping over lnia instructions with displacement.
* gdb.arch/powerpc-lnia.s: Testcase with stream of
lnia instructions.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tdep/27525] powerpc: displaced stepping broken for breakpoint at lnia instruction
2021-03-05 15:41 [Bug tdep/27525] New: powerpc: displaced stepping broken for breakpoint at lnia instruction gabriel at inconstante dot net.br
` (2 preceding siblings ...)
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
5 siblings, 0 replies; 7+ messages in thread
From: will_schmidt at vnet dot ibm.com @ 2021-04-12 19:57 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27525
--- Comment #2 from Will Schmidt <will_schmidt at vnet dot ibm.com> ---
This should be corrected by the patch I committed earlier today.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tdep/27525] powerpc: displaced stepping broken for breakpoint at lnia instruction
2021-03-05 15:41 [Bug tdep/27525] New: powerpc: displaced stepping broken for breakpoint at lnia instruction gabriel at inconstante dot net.br
` (3 preceding siblings ...)
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
5 siblings, 0 replies; 7+ messages in thread
From: will_schmidt at vnet dot ibm.com @ 2021-05-21 16:23 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27525
Will Schmidt <will_schmidt at vnet dot ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at sourceware dot org |will_schmidt at vnet dot ibm.com
Status|NEW |ASSIGNED
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tdep/27525] powerpc: displaced stepping broken for breakpoint at lnia instruction
2021-03-05 15:41 [Bug tdep/27525] New: powerpc: displaced stepping broken for breakpoint at lnia instruction gabriel at inconstante dot net.br
` (4 preceding siblings ...)
2021-05-21 16:23 ` will_schmidt at vnet dot ibm.com
@ 2021-05-21 16:24 ` will_schmidt at vnet dot ibm.com
5 siblings, 0 replies; 7+ messages in thread
From: will_schmidt at vnet dot ibm.com @ 2021-05-21 16:24 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27525
Will Schmidt <will_schmidt at vnet dot ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Will Schmidt <will_schmidt at vnet dot ibm.com> ---
Resolved with the commit:
"
commit e3d528d7e6a6b863d30aaecf74adf8c78286f84c
Author: Will Schmidt <will_schmidt@vnet.ibm.com>
Date: Mon Apr 12 13:35:54 2021 -0500
[PATCH, rs6000, v3][PR gdb/27525] displaced stepping across addpcis/lnia.
"
--
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).