File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1631,6 +1631,9 @@ asm(
1631
1631
".ascii \" return ary_type.fields()[0].type.range()[1]+1\\n\"\n"
1632
1632
".ascii \"\\n\"\n"
1633
1633
".ascii \"def format_zstr(zstr):\\n\"\n"
1634
+ ".ascii \" if zstr.type.code == gdb.TYPE_CODE_PTR and int(zstr) == 0:\\n\"\n"
1635
+ ".ascii \" return zstr\\n\"\n"
1636
+ ".ascii \"\\n\"\n"
1634
1637
".ascii \" len = int(zstr['len'])\\n\"\n"
1635
1638
".ascii \" truncated = False\\n\"\n"
1636
1639
".ascii \" if len > 200:\\n\"\n"
Original file line number Diff line number Diff line change @@ -961,6 +961,9 @@ def array_size(ary_type):
961
961
return ary_type .fields ()[0 ].type .range ()[1 ]+ 1
962
962
963
963
def format_zstr (zstr ):
964
+ if zstr .type .code == gdb .TYPE_CODE_PTR and int (zstr ) == 0 :
965
+ return zstr
966
+
964
967
len = int (zstr ['len' ])
965
968
truncated = False
966
969
if len > 200 :
You can’t perform that action at this time.
0 commit comments