如何使用命令标志在将来的共享库上设置断点
我正在尝试使用该--command
标志自动执行gdb会话。我正在尝试在共享库(相当于DLL的Unix)中的函数上设置断点。我的cmds.gdb看起来像这样:
set args /home/shlomi/conf/bugs/kde/font-break.txtb IA__FcFontMatch
r
但是,我得到以下信息:
shlomi:~/progs/bugs-external/kde/font-breaking$ gdb --command=cmds.gdb...GNU gdb 6.8-2mdv2009.0 (Mandriva Linux release 2009.0)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i586-mandriva-linux-gnu"...
(no debugging symbols found)
Function "IA__FcFontMatch" not defined.
Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal]
因此,它毕竟不会设置断点。如何将默认值设置为“ y”,以在未决的将来共享库加载时设置断点?
我记得自己能够做些事情,但无法回忆起什么。
回答:
回覆我自己,我想提供某人在IRC上给我的答案:
(gdb) apropos pendingactions -- Specify the actions to be taken at a tracepoint
set breakpoint -- Breakpoint specific settings
set breakpoint pending -- Set debugger's behavior regarding pending breakpoints
show breakpoint -- Breakpoint specific settings
show breakpoint pending -- Show debugger's behavior regarding pending breakpoints
因此, 可以了;它用于cmds.gdb
例如
set breakpoint pending onbreak <source file name>:<line number>
以上是 如何使用命令标志在将来的共享库上设置断点 的全部内容, 来源链接: utcz.com/qa/398517.html