Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to store user-defined function in GDB?

After i quit GDB every user-defined function disappear. Im sure there should be some way to make it available between sessions.

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

GDB reads the following files before starting: ~/.config/gdb/gdbinit, ~/.gdbinit.

It is a common practice to edit e.g. ~/.gdbinit to define the user-defined function using an external editor and use source ~/.gdbinit in a GDB session to reload that file. Once the function works as you expect, just leave it in your ~/.gdbinit and it will be available in all future GDB sessions.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading