Reputation: 2576
I want to port some Python 2.x code to work as GDB Extension in current versions of GDB (7.10) Should this code be ported to Python 3.x, without concern for remaining backwards compatible to 2.x? Or is this based on whatever Python version system has? Ideally I want the scripts to work on any Linux system with GDB 7.10 installed.
Reading the documentation from GDB there is no reference to Python version http://sourceware.org/gdb/onlinedocs/gdb/Python.html#Python
Upvotes: 1
Views: 291
Reputation: 213754
Reading the documentation from GDB there is no reference to Python version
That's because GDB 7.10 can be built against either version of Python.
Ideally I want the scripts to work on any Linux system with GDB 7.10 installed.
That means you have to write your code such that it will work with either Python 2.x or 3.x.
Upvotes: 1