@@ -21,20 +21,20 @@ def to_string(self):
21
21
22
22
# Split the address on the first space, return that value
23
23
# Addresses are usually {address} {optional type_name}
24
- typed_pointer = ' ({}*){}' .format (self .val .type , raw_address .split (None , 1 )[0 ])
24
+ typed_pointer = " ({}*){}" .format (self .val .type , raw_address .split (None , 1 )[0 ])
25
25
26
26
# Check that the pointer is not null.
27
- if gdb .parse_and_eval (typed_pointer + ' == 0' ):
27
+ if gdb .parse_and_eval (typed_pointer + " == 0" ):
28
28
return ""
29
29
30
30
# If it isn't attempt to find the string.
31
- value = ' (*{})' .format (typed_pointer )
32
- return gdb .parse_and_eval (value + ' .c_str()' )
31
+ value = " (*{})" .format (typed_pointer )
32
+ return gdb .parse_and_eval (value + " .c_str()" )
33
33
except :
34
34
return ""
35
35
36
36
def display_hint (self ):
37
- return ' string'
37
+ return " string"
38
38
39
39
40
40
class InstructionPrettyPrinter :
@@ -44,14 +44,14 @@ def __init__(self, val):
44
44
def to_string (self ):
45
45
try :
46
46
raw_address = str (self .val .address )
47
- variable_accessor = ' (*({}*){})' .format (self .val .type , raw_address .split (None , 1 )[0 ])
48
- expr = ' {0}.to_string()' .format (variable_accessor )
47
+ variable_accessor = " (*({}*){})" .format (self .val .type , raw_address .split (None , 1 )[0 ])
48
+ expr = " {0}.to_string()" .format (variable_accessor )
49
49
return gdb .parse_and_eval (expr )
50
50
except :
51
51
return ""
52
52
53
53
def display_hint (self ):
54
- return ' string'
54
+ return " string"
55
55
56
56
57
57
# If you change the name of this make sure to change install.py too.
@@ -60,7 +60,7 @@ def load_cbmc_printers():
60
60
61
61
# First argument is the name of the pretty-printer, second is a regex match for which type
62
62
# it should be applied too, third is the class that should be called to pretty-print that type.
63
- printers .add_printer (' dstringt' , ' ^(?:dstringt|irep_idt)' , DStringPrettyPrinter )
64
- printers .add_printer (' instructiont' , ' ^goto_programt::instructiont' , InstructionPrettyPrinter )
63
+ printers .add_printer (" dstringt" , " ^(?:dstringt|irep_idt)" , DStringPrettyPrinter )
64
+ printers .add_printer (" instructiont" , " ^goto_programt::instructiont" , InstructionPrettyPrinter )
65
65
# We aren't associating with a particular object file, so pass in None instead of gdb.current_objfile()
66
66
gdb .printing .register_pretty_printer (None , printers , replace = True )
0 commit comments