Skip to content

Commit

Permalink
Update debug.adoc
Browse files Browse the repository at this point in the history
  • Loading branch information
prudhomm authored Mar 21, 2019
1 parent 03be57b commit b008327
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion docs/dev/modules/ROOT/pages/debug.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,14 @@ When AddressSanitizer finds a bug you can set a breakpoint
* right before it generates the error report by setting a breakpoint on `__asan::ReportGenericError`
* right after the error generation by setting a breakpoint on `__asan::Die`

NOTE: you can also set the environment variable `ASAN_OPTIONS=abort_on_error=1` to
[TIP]
====
you can also set the environment variable `ASAN_OPTIONS=abort_on_error=1` to
get the same effect as in the second case
----
> ASAN_OPTIONS=abort_on_error=1 gdb <executable to debug>
----
====

[TIP]
====
Expand All @@ -43,3 +49,11 @@ It is advised to disable the leak detection while looking for a bug as follows
> ASAN_OPTIONS=detect_leaks=0 gdb <executable to debug>
----
====

[TIP]
====
To combine multiple address sanitizer options in the command line, separate them with a `:` like below
----
> ASAN_OPTIONS=detect_leaks=0:abort_on_error=1 gdb <executable to debug>
----
====

0 comments on commit b008327

Please sign in to comment.