1

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

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. After this response I checked how gdb gets built and can see this is the case

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.