我正在尝试使用–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”以在挂起的未来共享库加载时设置断点?
我记得我能够做点什么,但不记得是什么.
解决方法
回答我自己,我想给出一个人在IRC上给我的答案:
(gdb) apropos pending actions -- 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 on break <source file name>:<line number>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。