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(
16311631 ".ascii \" return ary_type.fields()[0].type.range()[1]+1\\n\"\n"
16321632 ".ascii \"\\n\"\n"
16331633 ".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"
16341637 ".ascii \" len = int(zstr['len'])\\n\"\n"
16351638 ".ascii \" truncated = False\\n\"\n"
16361639 ".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):
961961 return ary_type .fields ()[0 ].type .range ()[1 ]+ 1
962962
963963def format_zstr (zstr ):
964+ if zstr .type .code == gdb .TYPE_CODE_PTR and int (zstr ) == 0 :
965+ return zstr
966+
964967 len = int (zstr ['len' ])
965968 truncated = False
966969 if len > 200 :
You can’t perform that action at this time.
0 commit comments