public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug tdep/12352] New: Displaced stepping doesn't work for str pc, [Rd, #imm]
@ 2010-12-28  6:43 qiyao at gcc dot gnu.org
  2010-12-29 11:56 ` [Bug tdep/12352] " qiyao at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: qiyao at gcc dot gnu.org @ 2010-12-28  6:43 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12352

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


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

* [Bug tdep/12352] Displaced stepping doesn't work for str pc, [Rd, #imm]
  2010-12-28  6:43 [Bug tdep/12352] New: Displaced stepping doesn't work for str pc, [Rd, #imm] qiyao at gcc dot gnu.org
@ 2010-12-29 11:56 ` qiyao at gcc dot gnu.org
  2011-01-06  8:29 ` qiyao at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: qiyao at gcc dot gnu.org @ 2010-12-29 11:56 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12352

Yao Qi <qiyao at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |armv7l-unknown-linux-gnueab
                   |                            |i
                 CC|                            |qiyao at gcc dot gnu.org
               Host|                            |armv7l-unknown-linux-gnueab
                   |                            |i
              Build|                            |armv7l-unknown-linux-gnueab
                   |                            |i

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


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

* [Bug tdep/12352] Displaced stepping doesn't work for str pc, [Rd, #imm]
  2010-12-28  6:43 [Bug tdep/12352] New: Displaced stepping doesn't work for str pc, [Rd, #imm] qiyao at gcc dot gnu.org
  2010-12-29 11:56 ` [Bug tdep/12352] " qiyao at gcc dot gnu.org
@ 2011-01-06  8:29 ` qiyao at gcc dot gnu.org
  2011-01-06  8:31 ` qiyao at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: qiyao at gcc dot gnu.org @ 2011-01-06  8:29 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12352

--- Comment #1 from Yao Qi <qiyao at gcc dot gnu.org> 2011-01-06 08:29:21 UTC ---
Patch is submitted http://sourceware.org/ml/gdb-patches/2010-12/msg00514.html

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


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

* [Bug tdep/12352] Displaced stepping doesn't work for str pc, [Rd, #imm]
  2010-12-28  6:43 [Bug tdep/12352] New: Displaced stepping doesn't work for str pc, [Rd, #imm] qiyao at gcc dot gnu.org
  2010-12-29 11:56 ` [Bug tdep/12352] " qiyao at gcc dot gnu.org
  2011-01-06  8:29 ` qiyao at gcc dot gnu.org
@ 2011-01-06  8:31 ` qiyao at gcc dot gnu.org
  2011-02-15 14:27 ` cvs-commit at gcc dot gnu.org
  2011-02-15 15:01 ` qiyao at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: qiyao at gcc dot gnu.org @ 2011-01-06  8:31 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12352

Yao Qi <qiyao at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at sourceware    |qiyao at gcc dot gnu.org
                   |dot org                     |

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


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

* [Bug tdep/12352] Displaced stepping doesn't work for str pc, [Rd, #imm]
  2010-12-28  6:43 [Bug tdep/12352] New: Displaced stepping doesn't work for str pc, [Rd, #imm] qiyao at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-01-06  8:31 ` qiyao at gcc dot gnu.org
@ 2011-02-15 14:27 ` cvs-commit at gcc dot gnu.org
  2011-02-15 15:01 ` qiyao at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2011-02-15 14:27 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12352

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2011-02-15 14:26:37 UTC ---
CVSROOT:    /cvs/src
Module name:    src
Changes by:    qiyao@sourceware.org    2011-02-15 14:26:34

Modified files:
    gdb            : ChangeLog arm-tdep.c 
    gdb/testsuite  : ChangeLog 
    gdb/testsuite/gdb.arch: arm-disp-step.exp arm-disp-step.S 

Log message:
    2011-02-15  Yao Qi  <yao@codesourcery.com>

    PR tdep/12352
    * arm-tdep.c (copy_ldr_str_ldrb_strb): Replace PC with SP in
    order to store PC value on stack instead of text section.

    2011-02-15  Yao Qi  <yao@codesourcery.com>

    PR tdep/12352
    * gdb.arch/arm-disp-step.S : New test for str instruction.
    * gdb.arch/arm-disp-step.exp : Likewise

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.12582&r2=1.12583
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/arm-tdep.c.diff?cvsroot=src&r1=1.325&r2=1.326
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2584&r2=1.2585
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.arch/arm-disp-step.exp.diff?cvsroot=src&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.arch/arm-disp-step.S.diff?cvsroot=src&r1=1.2&r2=1.3

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


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

* [Bug tdep/12352] Displaced stepping doesn't work for str pc, [Rd, #imm]
  2010-12-28  6:43 [Bug tdep/12352] New: Displaced stepping doesn't work for str pc, [Rd, #imm] qiyao at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-02-15 14:27 ` cvs-commit at gcc dot gnu.org
@ 2011-02-15 15:01 ` qiyao at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: qiyao at gcc dot gnu.org @ 2011-02-15 15:01 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12352

Yao Qi <qiyao at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Yao Qi <qiyao at gcc dot gnu.org> 2011-02-15 15:01:11 UTC ---
Patch is checked in to mainline.  Close.

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


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

end of thread, other threads:[~2011-02-15 15:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-28  6:43 [Bug tdep/12352] New: Displaced stepping doesn't work for str pc, [Rd, #imm] qiyao at gcc dot gnu.org
2010-12-29 11:56 ` [Bug tdep/12352] " qiyao at gcc dot gnu.org
2011-01-06  8:29 ` qiyao at gcc dot gnu.org
2011-01-06  8:31 ` qiyao at gcc dot gnu.org
2011-02-15 14:27 ` cvs-commit at gcc dot gnu.org
2011-02-15 15:01 ` qiyao 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).