Skip to content

Commit

Permalink
HOw-TO-USE-DEBUGBREAK-GDB-PY.md: show result of
Browse files Browse the repository at this point in the history
debugbreak-{step,continue}
  • Loading branch information
Scott Tsai committed Jul 4, 2018
1 parent 8b4a755 commit 2ba11b7
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions HOW-TO-USE-DEBUGBREAK-GDB-PY.md
Expand Up @@ -17,16 +17,17 @@ Starting program: /home/fedora/debugbreak/test/break
Program received signal SIGTRAP, Trace/breakpoint trap.
main () at test/break.c:6
6 debug_break();
(gdb) stepi
0x000000001000048c in trap_instruction () at ./debugbreak.h:131
131 trap_instruction();
0x0000000010000480 <main+0>: 7c 08 02 a6 mflr r0
0x0000000010000484 <main+4>: f8 01 00 10 std r0,16(r1)
0x0000000010000488 <main+8>: f8 21 ff 91 stdu r1,-112(r1)
=> 0x000000001000048c <main+12>: 7d 82 10 08 twge r2,r2
Program received signal SIGTRAP, Trace/breakpoint trap.
main () at test/break.c:6
6 debug_break();
(gdb) debugbreak-step
(gdb) debugbreak-continue
7 printf("hello world\n");
(gdb) debugbreak-continue
hello world
[Inferior 1 (process 12533) exited normally]
(gdb)
```

On ARM and POWER, trying to use `step` or `stepi` in place of `debugbreak-step` in the sesion above wouldn't have worked as execution would be stock on the breakpoint instruction.

0 comments on commit 2ba11b7

Please sign in to comment.