-
Notifications
You must be signed in to change notification settings - Fork 18
How to Create Breakpoints
Aaron Esau edited this page Nov 9, 2021
·
6 revisions
You can create breakpoints to replace the tracer with the GNU Debugger (gdb) automatically when specified conditions are satisfied.
Please create a GitHub Issue if you have any questions or would like a feature implemented.
Use --break
(-b
) or --break-after
(-B
) with a required argument in the following format:
-
3
- breaks at operation number 3 -
#3
- same as above.#
is ignored -
oid=3
- same as above. Breaks at operation number (oid) 3 -
oid=#3
- same as above.#
is ignored -
addr=bin+0x1234
- breaks the first time the address equals binary base + 0x1234 -
address=bin+0x1234
- same thing as above ^ -
address=bin+0x1234:10
- breaks when address has equaled binary base + 0x1234, 10 times -
address=libc+0x1337:2
- breaks when address has equaled libc base + 0x1337, 2 times -
address=get_input+0x34
- breaks when address equals symbolget_input
+ 0x34 -
address=0x123 AND address=0x456:2
- breaks when address equaled 0x123 at least once, and address has equaled 0x456 at least twice (you can also useand
,&&
) -
address=0x123 OR address=0x456:2 OR oid=3
- breaks if any of the conditions evaluate to true. Note that this is equivalent to using multiple--break
/--break-after
arguments (you can also useor
,||
, or,
) -
segfault
- breaks if the process segfaults. You can also useabort
,sigsegv
,segv
-
main
- breaks at _entry. You can also use_entry
,entry
, andstart
Whitespace ( \t\n
) is ignored when not separating tokens.
When specifying operation IDs, using --break-after
(-B
) will launch gdb after the heap operation function returns only. Using --break
(-b
) will launch gdb at the start of the heap operation function. Both arguments are equivalent for all of the other options.