2015-09-18 18:57:42 +00:00
|
|
|
diff --git a/gdb/python/lib/gdb/command/pahole.py b/gdb/python/lib/gdb/command/pahole.py
|
2015-09-24 07:18:32 +00:00
|
|
|
index e08eaf5..56c1737 100644
|
2015-09-18 18:57:42 +00:00
|
|
|
--- a/gdb/python/lib/gdb/command/pahole.py
|
|
|
|
+++ b/gdb/python/lib/gdb/command/pahole.py
|
|
|
|
@@ -55,19 +55,19 @@ It prints the type and displays comments showing where holes are."""
|
|
|
|
fieldsize = 8 * ftype.sizeof
|
|
|
|
|
|
|
|
# TARGET_CHAR_BIT
|
2015-09-24 07:18:32 +00:00
|
|
|
- print (' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8)), end = "")
|
|
|
|
+ print (' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8))),
|
2015-09-18 18:57:42 +00:00
|
|
|
bitpos = bitpos + fieldsize
|
|
|
|
|
|
|
|
if ftype.code == gdb.TYPE_CODE_STRUCT:
|
|
|
|
self.pahole (ftype, level + 1, field.name)
|
|
|
|
else:
|
2015-09-24 07:18:32 +00:00
|
|
|
- print (' ' * (2 + 2 * level), end = "")
|
|
|
|
+ print (' ' * (2 + 2 * level)),
|
2015-09-18 18:57:42 +00:00
|
|
|
print ('%s %s' % (str (ftype), field.name))
|
|
|
|
|
|
|
|
if level == 0:
|
|
|
|
self.maybe_print_hole(bitpos, 8 * type.sizeof)
|
|
|
|
|
2015-09-24 07:18:32 +00:00
|
|
|
- print (' ' * (14 + 2 * level), end = "")
|
|
|
|
+ print (' ' * (14 + 2 * level)),
|
2015-09-18 18:57:42 +00:00
|
|
|
print ('} %s' % name)
|
|
|
|
|
|
|
|
def invoke (self, arg, from_tty):
|
|
|
|
@@ -75,7 +75,7 @@ It prints the type and displays comments showing where holes are."""
|
|
|
|
type = type.strip_typedefs ()
|
|
|
|
if type.code != gdb.TYPE_CODE_STRUCT:
|
|
|
|
raise (TypeError, '%s is not a struct type' % arg)
|
2015-09-24 07:18:32 +00:00
|
|
|
- print (' ' * 14, end = "")
|
|
|
|
+ print (' ' * 14),
|
2015-09-18 18:57:42 +00:00
|
|
|
self.pahole (type, 0, '')
|
|
|
|
|
|
|
|
Pahole()
|