I wonder linux gdb debugging.
我想知道linux gdb的调试。
I have 1 execute file, 1 core dump file. so, I opened it in linux like this,
我有一个执行文件,一个核心转储文件。我在linux中打开它,
gdb exefilename -c exefuilename.core
but, I only show error message.
但是,我只显示错误消息。
warning: Could not load shared library symbols for 44 libraries, e.g. /usr/local/lib/libboost_system.so.1.55.0.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
so, I input command,
所以,我输入命令,
set solib-search-path /librarypath/
and symbol read succeed. and, I input command
和阅读成功的象征。我输入命令
quit
and, I reopen dump file. like this,
然后,我重新打开转储文件。像这样,
gdb exefilename -c exefuilename.core
but still show same error message.
但是仍然显示相同的错误信息。
warning: Could not load shared library symbols for 44 libraries, e.g. /usr/local/lib/libboost_system.so.1.55.0.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
I don't want to show this error message never. so, I want to save library search path. how Can I do?
我不想永远显示这个错误消息。我要保存库搜索路径。我怎么能做什么?
1 个解决方案
#1
2
You can create a file called .gdbinit
您可以创建一个名为.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).
您可以将它放在您的主文件夹(它将被加载到所有项目中)或当前目录(它将被用于从这个文件夹加载的gdb会话)中。
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
有很多有趣的例子说明各种各样的复杂性。首先,我要简单地在本地文件夹中使用这一行创建一个。gdbinit
set solib-search-path /librarypath/
And maybe add more later, if you need to.
如果你需要的话,可以以后再加一些。
#1
2
You can create a file called .gdbinit
您可以创建一个名为.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).
您可以将它放在您的主文件夹(它将被加载到所有项目中)或当前目录(它将被用于从这个文件夹加载的gdb会话)中。
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
有很多有趣的例子说明各种各样的复杂性。首先,我要简单地在本地文件夹中使用这一行创建一个。gdbinit
set solib-search-path /librarypath/
And maybe add more later, if you need to.
如果你需要的话,可以以后再加一些。