我試圖使用--command
標誌自動化gdb會話。我試圖在一個共享庫的函數中設置一個斷點(一個DLL的Unix等價物)。我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」來設置將來未來共享庫加載的斷點?
我記得我能夠做些事情,但不記得是什麼。
相關:可以gdb的消息「從終端輸入不是」被抑制?](HTTP:// stackoverflow.com/questions/23005668/can-gdbs-input-not-from-terminal-messages-be-suppressed) – TooTone 2015-07-16 11:08:02