diff options
author | Ondřej Surý <ondrej@sury.org> | 2011-04-20 15:44:41 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2011-04-20 15:44:41 +0200 |
commit | 50104cc32a498f7517a51c8dc93106c51c7a54b4 (patch) | |
tree | 47af80be259cc7c45d0eaec7d42e61fa38c8e4fb /src/pkg/runtime/runtime-gdb.py | |
parent | c072558b90f1bbedc2022b0f30c8b1ac4712538e (diff) | |
download | golang-50104cc32a498f7517a51c8dc93106c51c7a54b4.tar.gz |
Imported Upstream version 2011.03.07.1upstream/2011.03.07.1
Diffstat (limited to 'src/pkg/runtime/runtime-gdb.py')
-rw-r--r-- | src/pkg/runtime/runtime-gdb.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pkg/runtime/runtime-gdb.py b/src/pkg/runtime/runtime-gdb.py index 677e9bde4..68dd8abdc 100644 --- a/src/pkg/runtime/runtime-gdb.py +++ b/src/pkg/runtime/runtime-gdb.py @@ -13,7 +13,7 @@ path to this file based on the path to the runtime package. # - pretty printing only works for the 'native' strings. E.g. 'type # foo string' will make foo a plain struct in the eyes of gdb, # circumventing the pretty print triggering. -# - + import sys, re @@ -39,7 +39,8 @@ class StringTypePrinter: return 'string' def to_string(self): - return self.val['str'] + l = int(self.val['len']) + return self.val['str'].string("utf-8", "ignore", l) class SliceTypePrinter: |