public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug breakpoints/27009] New: [s390] GDB branches randomly for BC instruction while displaced stepping
@ 2020-12-03 23:07 gfrix98 at gmail dot com
  2020-12-03 23:09 ` [Bug breakpoints/27009] " gfrix98 at gmail dot com
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: gfrix98 at gmail dot com @ 2020-12-03 23:07 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 27009
           Summary: [s390] GDB branches randomly for BC instruction while
                    displaced stepping
           Product: gdb
           Version: 10.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: breakpoints
          Assignee: unassigned at sourceware dot org
          Reporter: gfrix98 at gmail dot com
  Target Milestone: ---

I noticed this problem while working an s390x port.

Minimal testcase:
        .align  8
        .globl main
        .globl insn
        .type  main, @function
        .type  insn, @function
        # This should return 0 on success.
main:
        basr    %r1, %r0
insn:   bc      15, win-insn(0,%r1)
        lghi    %r2,1
win:    lghi    %r2,0
        br      %r14

Assemble and link the above.

Turn on displaced stepping, set a breakpoint on `insn`, run, then try to step
over the breakpoint with stepi.
(gdb) set displaced-stepping on
(gdb) b insn
(gdb) r
(gdb) stepi

instead of branching to `win`, gdb will branch to an apparently random nearby
address, and the inferior will generally crash. This problem is present in all
versions of GDB I've tested.

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

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

end of thread, other threads:[~2021-11-22  7:39 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03 23:07 [Bug breakpoints/27009] New: [s390] GDB branches randomly for BC instruction while displaced stepping gfrix98 at gmail dot com
2020-12-03 23:09 ` [Bug breakpoints/27009] " gfrix98 at gmail dot com
2020-12-06 10:28 ` cvs-commit at gcc dot gnu.org
2020-12-06 10:29 ` brobecker at gnat dot com
2020-12-06 10:31 ` cvs-commit at gcc dot gnu.org
2021-01-31  6:26 ` brobecker at gnat dot com
2021-06-27 17:59 ` ahmedsayeed1982 at yahoo dot com
2021-08-10 12:45 ` ucelsanicin at yahoo dot com
2021-09-02 11:06 ` donipah907 at mtlcz dot com
2021-09-02 11:15 ` mark at klomp dot org
2021-09-06  9:09 ` focixujo at livinginsurance dot co.uk
2021-09-10 19:38 ` mehmetgelisin at aol dot com
2021-09-22 10:11 ` diheto5497 at secbuf dot com
2021-09-26 13:31 ` tes.vik1986 at gmail dot com
2021-10-09 11:00 ` gulsenenginar at aol dot com
2021-10-17 19:51 ` vmireskazki at gmail dot com
2021-10-19  7:15 ` progonsaytu at gmail dot com
2021-10-24 10:02 ` glassmtech at ukr dot net
2021-11-06 21:13 ` paneki8601 at dukeoo dot com
2021-11-16 19:08 ` xecana8007 at funboxcn dot com
2021-11-16 19:12 ` xecana8007 at funboxcn dot com
2021-11-16 19:15 ` xecana8007 at funboxcn dot com
2021-11-22  7:39 ` gexed96894 at keagenan dot 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).