0

I have written a small python script that adds new commands to gdb and for others to use it, they can just source the python file in their ~/.gdbinit, but I would now like to add some useful aliases to those commands.

Right now I've added a README instruction to add those aliases manually in each user's ~/.gdbinit, but wanted to know if there's any better way to just add aliases to the new commands in python itself.

2
  • 1
    I just do gdb.execute('alias short-name = long-command-name'). Commented Dec 29, 2022 at 14:14
  • oh wow, that's perfect. I'm not sure why I did not think of that, but thanks a lot Commented Dec 30, 2022 at 5:01

0

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.