Skip to content

Commit e91cbdc

Browse files
Add comments to pretty printer
1 parent 6010d1f commit e91cbdc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/pretty-printers/gdb/pretty_printers.py

+6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
import gdb
22

33

4+
# Class for pretty-printing dstringt
45
class DStringPrettyPrinter:
6+
"Print a dstringt"
7+
58
def __init__(self, val):
69
self.val = val
710

811
def to_string(self):
12+
# ideally, we want to access the memory where the string
13+
# is stored directly instead of calling a function. However,
14+
# this is simpler.
915
try:
1016
raw_address = str(self.val.address)
1117

0 commit comments

Comments
 (0)