system/5223: gdb - repeated stepi doesn't show all instructions

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

system/5223: gdb - repeated stepi doesn't show all instructions

Paul Stoeber
>Number:         5223
>Category:       system
>Synopsis:       gdb - repeated stepi doesn't show all instructions
>Confidential:   yes
>Severity:       serious
>Priority:       medium
>Responsible:    bugs
>State:          open
>Quarter:        
>Keywords:      
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 04 17:30:01 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Paul Stoeber
>Release:        3.9
>Organization:
net
>Environment:
        System      : OpenBSD 3.9
        Architecture: OpenBSD.i386
        Machine     : i386
>Description:
$ uname -mrsv
OpenBSD 3.9 GENERIC#617 i386
$ cat x.c
main() { asm("\
push   $0x0        \n\
mov    $0x24,%eax  \n\
int    $0x80       \n\
push   $0x0        \n\
mov    $0x1,%eax   \n\
int    $0x80       \n\
"); }
$ gcc -O2 x.c
$ gdb -q ./a.out
(no debugging symbols found)
(gdb) break main
Breakpoint 1 at 0x1c0005a6
(gdb) display/i $pc
(gdb) run
Starting program: /home/a/a.out

Breakpoint 1, 0x1c0005a6 in main ()
1: x/i $pc  0x1c0005a6 <main+6>:        mov    0x3c0030e0,%ecx
(gdb) x/9i $pc
0x1c0005a6 <main+6>:    mov    0x3c0030e0,%ecx
0x1c0005ac <main+12>:   and    $0xfffffff0,%esp
0x1c0005af <main+15>:   mov    %ecx,0xffffffe8(%ebp)
0x1c0005b2 <main+18>:   push   $0x0
0x1c0005b4 <main+20>:   mov    $0x24,%eax
0x1c0005b9 <main+25>:   int    $0x80
0x1c0005bb <main+27>:   push   $0x0
0x1c0005bd <main+29>:   mov    $0x1,%eax
0x1c0005c2 <main+34>:   int    $0x80
(gdb) stepi
0x1c0005ac in main ()
1: x/i $pc  0x1c0005ac <main+12>:       and    $0xfffffff0,%esp
(gdb)
0x1c0005af in main ()
1: x/i $pc  0x1c0005af <main+15>:       mov    %ecx,0xffffffe8(%ebp)
(gdb)
0x1c0005b2 in main ()
1: x/i $pc  0x1c0005b2 <main+18>:       push   $0x0
(gdb)
0x1c0005b4 in main ()
1: x/i $pc  0x1c0005b4 <main+20>:       mov    $0x24,%eax
(gdb)
0x1c0005b9 in main ()
1: x/i $pc  0x1c0005b9 <main+25>:       int    $0x80
(gdb)
0x1c0005bd in main ()                                            <== ???
1: x/i $pc  0x1c0005bd <main+29>:       mov    $0x1,%eax
(gdb)
0x1c0005c2 in main ()
1: x/i $pc  0x1c0005c2 <main+34>:       int    $0x80
(gdb)

Program exited normally.
(gdb)


>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: