0

I have a python gdb script that finds a pointer to some important value.

I want to call gdb print command to have this value assigned to value history for future references in other debug commands.

How to do it?

I know that I can define python function that will return this value - but I really want gdb command for backward compatibility with old gdb scripts.

1 Answer 1

0

Generate python string and call gdb.execute

tmpVal = long(pointer)
tmpStr = "print (Xxxx *)0x{:x}".format(tmpVal)
gdb.execute(tmpStr)
Sign up to request clarification or add additional context in comments.

Comments

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.