public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] tromey/python: pahole.py: Fix Python3 incompatibilities like: print ' /* XXX %d bit hole, try to pack */' % hole ^ SyntaxError: invalid syntax
@ 2015-02-04 16:38 jkratoch
0 siblings, 0 replies; only message in thread
From: jkratoch @ 2015-02-04 16:38 UTC (permalink / raw)
To: archer-commits
The branch, tromey/python has been updated
via 8baa783f3ae8013c1ae623640d90ddb5b5ff90e5 (commit)
from 55b3f8bf6f2ecf9b4f7115d9cf7a34cc1fd9593f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 8baa783f3ae8013c1ae623640d90ddb5b5ff90e5
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Feb 4 17:37:28 2015 +0100
pahole.py: Fix Python3 incompatibilities like:
print ' /* XXX %d bit hole, try to pack */' % hole
^
SyntaxError: invalid syntax
-----------------------------------------------------------------------
Summary of changes:
gdb/python/lib/gdb/command/pahole.py | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
First 500 lines of diff:
diff --git a/gdb/python/lib/gdb/command/pahole.py b/gdb/python/lib/gdb/command/pahole.py
index 636f99d..dee04f5 100644
--- a/gdb/python/lib/gdb/command/pahole.py
+++ b/gdb/python/lib/gdb/command/pahole.py
@@ -29,7 +29,7 @@ It prints the type and displays comments showing where holes are."""
def maybe_print_hole(self, bitpos, field_bitpos):
if bitpos != field_bitpos:
hole = field_bitpos - bitpos
- print ' /* XXX %d bit hole, try to pack */' % hole
+ print (' /* XXX %d bit hole, try to pack */' % hole)
def pahole (self, type, level, name):
if name is None:
@@ -37,7 +37,7 @@ It prints the type and displays comments showing where holes are."""
tag = type.tag
if tag is None:
tag = ''
- print '%sstruct %s {' % (' ' * (2 * level), tag)
+ print ('%sstruct %s {' % (' ' * (2 * level), tag))
bitpos = 0
for field in type.fields ():
# Skip static fields.
@@ -55,27 +55,27 @@ It prints the type and displays comments showing where holes are."""
fieldsize = 8 * ftype.sizeof
# TARGET_CHAR_BIT
- print ' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8)),
+ print (' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8)))
bitpos = bitpos + fieldsize
if ftype.code == gdb.TYPE_CODE_STRUCT:
self.pahole (ftype, level + 1, field.name)
else:
- print ' ' * (2 + 2 * level),
- print '%s %s' % (str (ftype), field.name)
+ print (' ' * (2 + 2 * level))
+ print ('%s %s' % (str (ftype), field.name))
if level == 0:
self.maybe_print_hole(bitpos, 8 * type.sizeof)
- print ' ' * (14 + 2 * level),
- print '} %s' % name
+ print (' ' * (14 + 2 * level))
+ print ('} %s' % name)
def invoke (self, arg, from_tty):
type = gdb.lookup_type (arg)
type = type.strip_typedefs ()
if type.code != gdb.TYPE_CODE_STRUCT:
- raise TypeError, '%s is not a struct type' % arg
- print ' ' * 14,
+ raise (TypeError, '%s is not a struct type' % arg)
+ print (' ' * 14)
self.pahole (type, 0, '')
Pahole()
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-02-04 16:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-04 16:38 [SCM] tromey/python: pahole.py: Fix Python3 incompatibilities like: print ' /* XXX %d bit hole, try to pack */' % hole ^ SyntaxError: invalid syntax jkratoch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).