-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
While trying to use GDB to debug an OSv instance that hangs with an undefined syscall, I got a strange syntax error:
lemmy@mike:~/work/osv⟫ gdb build/release/loader.elf
[...]
Reading symbols from build/release/loader.elf...done.
Traceback (most recent call last):
File "/home/lemmy/work/osv/scripts/loader.py", line 1483, in <module>
setup_libstdcxx()
File "/home/lemmy/work/osv/scripts/loader.py", line 1020, in setup_libstdcxx
exec(compile(open(main).read(), main, 'exec'))
File "/home/lemmy/work/osv/external/x64/gcc.bin/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.18-gdb.py", line 59, in <module>
from libstdcxx.v6.printers import register_libstdcxx_printers
File "/home/lemmy/work/osv/external/x64/gcc.bin/usr/share/gcc-4.8.2/python/libstdcxx/v6/printers.py", line 55
raise ValueError, "Cannot find type %s::%s" % (str(orig), name)
^
SyntaxError: invalid syntaxAlthough my default python is 2.7, GDB seems to be linked with python 3.4 causing a problem: python 3 does not support tuples when raising exceptions anymore.
Patch is rather trivial and requires changing this pattern on several places inside printers.py, like in this gist. Not sure how to submit the patch (either as a pull request or to the mailing list).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels