Skip to content

Commit c68aa53

Browse files
authored
Merge pull request #1282 from cppalliance/gdb
Allow gdb to automatically import detail modules
2 parents f18e27b + b1a41b9 commit c68aa53

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,6 @@ gcm.cache/
4747

4848
# Mac option
4949
*.DS_Store
50+
51+
# Pretty Printers
52+
*.pyc

doc/modules/ROOT/pages/debugger.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ To load the pretty printer, add the following line to your `.gdbinit`:
2525

2626
[source]
2727
----
28-
python exec(open("/path/to/decimal/extra/decimal_printer_gdb.py").read())
28+
source /path/to/decimal/extra/decimal_printer_gdb.py
2929
----
3030

3131
or you can source it manually in GDB:

extra/decimal_printer_gdb.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
# Distributed under the Boost Software License, Version 1.0.
33
# https://www.boost.org/LICENSE_1_0.txt
44

5+
import sys
6+
import os
7+
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
8+
59
from detail.decode_ieee_type import decode_decimal32
610
from detail.decode_ieee_type import decode_decimal64
711
from detail.decode_ieee_type import decode_decimal128

0 commit comments

Comments
 (0)