rogerhu/gdb-heap

SyntaxError:

Closed this issue · 2 comments

Ubuntu: 13:10
Run command
./run-gdb-heap python

GNU gdb (GDB) 7.6.1-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/bin/python2.7...Reading symbols from /usr/lib/debug/usr/bin/python2.7...done.
done.
File "/usr/lib/debug/usr/bin/python2.7-gdb.py", line 54
Py_TPFLAGS_HEAPTYPE = (1L << 9)

SyntaxError: invalid syntax
File "/usr/lib/debug/usr/bin/python2.7-gdb.py", line 54
Py_TPFLAGS_HEAPTYPE = (1L << 9)

SyntaxError: invalid syntax
Traceback (most recent call last):
File "", line 1, in
File "/tmp/gdb-heap/gdbheap.py", line 17, in
from heap.commands import register_commands
File "/tmp/gdb-heap/heap/init.py", line 63
print 'type cache miss: %r' % typename

SyntaxError: invalid syntax
Error while executing Python code.
(gdb)

1- Change print 'type cache miss: %r' % typename to print ('type cache miss: %r' % typename)

Looks like it was fixed by 7e205d7.