Skip to content

Commit aba5d4b

Browse files
committed
Update doc page
1 parent ef0add3 commit aba5d4b

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

doc/modules/ROOT/pages/debugger.adoc

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,37 @@ https://www.boost.org/LICENSE_1_0.txt
88
= Debugger Support
99
:idprefix: debug_
1010

11-
Currently, Boost.Decimal supports pretty printing with LLDB.
11+
Currently, Boost.Decimal supports pretty printing with LLDB and GDB.
12+
13+
== LLDB
14+
1215
To load the pretty printer, add the following line to your `.lldbinit`:
1316

1417
[source]
1518
----
16-
command script import /path/to/decimal/extra/decimal_printer.py
19+
command script import /path/to/decimal/extra/decimal_printer_lldb.py
20+
----
21+
22+
== GDB
23+
24+
To load the pretty printer, add the following line to your `.gdbinit`:
25+
26+
[source]
27+
----
28+
python exec(open("/path/to/decimal/extra/decimal_printer_gdb.py").read())
1729
----
1830

19-
Once you have loaded `decimal_printer.py` you can run the following example to see how different values are represented with the pretty printer.
31+
or you can source it manually in GDB:
32+
33+
[source]
34+
----
35+
(gdb) source /path/to/decimal/extra/decimal_printer_gdb.py
36+
----
37+
38+
== Example
39+
40+
Once you have loaded a pretty printer, you can run the below example to see how different values are represented with the pretty printer.
41+
This expected output of the example below was taken from LLDB, but the results should be quite similar when using GDB.
2042

2143
.The following example can be run with the debugger to show a variety of values
2244
====

0 commit comments

Comments
 (0)