[Bug tdep/12352] New: Displaced stepping doesn't work for str pc, [Rd, #imm]

qiyao at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Tue Dec 28 06:43:00 GMT 2010


           Summary: Displaced stepping doesn't work for str pc, [Rd, #imm]
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tdep
        AssignedTo: unassigned@sourceware.org
        ReportedBy: qiyao@gcc.gnu.org

Created attachment 5171
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5171
test case

Steps to reproduce:

$ gcc -march=armv7-a -marm asm1.S -g -o asm.exe
$ ./gdb ~/asm.exe
(gdb) b test_str_pc 
Breakpoint 1 at 0x837c: file asm1.S, line 10.
(gdb) run
Starting program: /home/yao/asm.exe 

Breakpoint 1, main () at asm1.S:10
10        str    pc, [sp, #0]
(gdb) set displaced-stepping on
(gdb) set debug displaced 1
(gdb) c
displaced: stepping process 18618 now
displaced: saved 0x8304: 5d f8 04 1b 6a 46 4d f8 04 2d 4d f8 04 0d df f8 14 c0
4d f8 04 cd 04 48 04 4b ff f7 e2 ef ff f7 
displaced: stepping insn e58df000 at 0000837c
displaced: copying str insn e58df000
displaced: read r0 value 00000001
displaced: read r2 value bebe5d2c
displaced: read r4 value 00000000
displaced: read pc value 00008384
displaced: read r13 value bebe5bd4
displaced: writing r0 value 00008384
displaced: writing r2 value bebe5bd4
displaced: writing insn e58ff014 at 00008304
displaced: writing insn e59f4010 at 00008308
displaced: writing insn e044400f at 0000830c
displaced: writing insn e2844008 at 00008310
displaced: writing insn e0800004 at 00008314
displaced: writing insn e5820000 at 00008318
displaced: copy 0x837c->0x8304: displaced: displaced pc to 0x8304
displaced: run 0x8304: 14 f0 8f e5 
displaced: restored 0x8304

Program received signal SIGILL, Illegal instruction.
main () at asm1.S:10
10        str    pc, [sp, #0]

Run the same case on the other ARM board, SIGSEGV is got.

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the Gdb-prs mailing list