1

I need to pass to a GDB python custom command an argument or environmental variable to change a path, but so that it would also have a default one; I.e. when I do source pythonfile.py I could set a path according to the argument.

This is basically what I want to do

PATH = "/some/path/" if not os.environ.get("CUSTOM_PATH") else os.environ.get("CUSTOM_PATH")

1 Answer 1

2

I ended up passing it directly to GDB, i.e. CUSTOM_PATH=/path/to/thing gdb ...

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.