Corrected mono-gdb.py use of "\u%X".format (val)
authorJames <james.l.davis@outlook.com>
Tue, 14 Apr 2015 18:40:23 +0000 (14:40 -0400)
committerJames <james.l.davis@outlook.com>
Tue, 14 Apr 2015 18:40:23 +0000 (14:40 -0400)
This line of code would cause an error to pop up in gdb when starting.

data/gdb/mono-gdb.py

index ce34d357f643f46953e45518289e7dc796853b9d..f4dcfe72c09edbea4c3fcf23c19c3e0bbf1c0502 100644 (file)
@@ -31,7 +31,7 @@ class StringPrinter:
         while i < len:
             val = (chars.cast(gdb.lookup_type ("gint64")) + (i * 2)).cast(gdb.lookup_type ("gunichar2").pointer ()).dereference ()
             if val >= 256:
-                c = "\u%X".format (val)
+                c = unichr (val)
             else:
                 c = chr (val)
             res.append (c)