最佳答案
我试图使用 --command
标志自动化 gdb 会话。我试图在一个共享库(Unix 等效于 DLL)中的一个函数上设置一个断点。我的 cmds.gdb 是这样的:
set args /home/shlomi/conf/bugs/kde/font-break.txt
b 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”为未来挂起的共享库加载设置断点?
我记得我能够做一些事情,但是想不起来是什么。