[#5900] hardware single stepping in userspace does not handle syscalls correctly

Document created by Aaronwu Employee on Sep 10, 2013
Version 1Show Document
  • View in full screen mode

[#5900] hardware single stepping in userspace does not handle syscalls correctly

Submitted By: Mike Frysinger

Open Date

2010-02-15 03:35:27     Close Date

2010-02-17 05:44:26

Priority:

Medium     Assignee:

Mike Frysinger

Status:

Closed     Fixed In Release:

N/A

Found In Release:

2010R1     Release:

Category:

N/A     Board:

N/A

Processor:

ALL     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Fixed

Uboot version or rev.:

    Toolchain version or rev.:

trunk

App binary format:

N/A     

Summary: hardware single stepping in userspace does not handle syscalls correctly

Details:

 

as pointed out on lkml, the way we notify common layers about tracing doesnt work correctly when we combine single stepping and system calls.  it's broken in at least current trunk and 2009R1.1, and considering this code has rarely changed, it's probably always been broken.

 

...

0x001c0080 in ?? ()

(gdb) dis

0x001c0080:     R4 = 0x5 (X);           /*              R4=0x0(  0) */

0x001c0082:     R5 = 0x6 (X);           /*              R5=0x0(  0) */

0x001c0084:     NOP;

0x001c0086:     EXCPT 0x0;

0x001c0088:     P0 = 0x1 (X);           /*              P0=0x0(  0) */

0x001c008a:     EXCPT 0x0;

(gdb) stepi

0x001c0082 in ?? ()

(gdb) stepi

0x001c0084 in ?? ()

(gdb) stepi

0x001c0086 in ?? ()

(gdb) stepi

0x001c008a in ?? ()

 

the single step over 0x1c0086 should have stopped at 0x1c0088 and not 0x1c008a

 

Follow-ups

 

--- Mike Frysinger                                           2010-02-17 05:43:43

fixed in svn trunk by setting/checking TIF_SINGLESTEP as needed

(gdb) dis

0x02652164 <main+8>:    P0 = 0x6 (X);

0x02652166 <main+10>:   EXCPT 0x0;

0x02652168 <main+12>:   P0 = 0x1 (X);

0x0265216a <main+14>:   R0 = 0x1 (X);

0x0265216c <main+16>:   EXCPT 0x0;

(gdb) stepi

0x02652166

(gdb) stepi

0x02652168

(gdb) stepi

0x0265216a

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes