Skip to content
Advertisement

how to save “set solib-search-path”

I wonder linux gdb debugging.

I have 1 execute file, 1 core dump file. so, I opened it in linux like this,

JavaScript

but, I only show error message.

JavaScript

so, I input command,

JavaScript

and symbol read succeed. and, I input command

JavaScript

and, I reopen dump file. like this,

JavaScript

but still show same error message.

JavaScript

I don’t want to show this error message never. so, I want to save library search path. how Can I do?

Advertisement

Answer

You can create a file called .gdbinit

You can put this either in your home folder (and it will be loaded for all projects) or in your current directory (and it will be used for gdb sessions loaded from this folder).

There are a bunch of interesting examples of various complexity around. I’d keep it simple to start with – just create a .gdbinit in your local folder with that one line

JavaScript

And maybe add more later, if you need to.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement