c++ - How to set breakpoints on future shared libraries with a command flag -


i'm trying automate gdb session using --command flag. i'm trying set breakpoint on function in shared library (the unix equivalent of dll) . cmds.gdb looks this:

set args /home/shlomi/conf/bugs/kde/font-break.txt b ia__fcfontmatch r 

however, i'm getting following:

 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  free software: free change , redistribute it. there no warranty, extent permitted law.  type "show copying" , "show warranty" details. gdb configured "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 terminal]  

so doesn't set breakpoint after all. how can make default answer "y" set breakpoints on pending future shared library load?

i recall able something, cannot recall what.

replying myself, i'd give answer gave me on irc:

 (gdb) apropos pending actions -- specify actions taken @ 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 

and set breakpoint pending on trick; used in cmds.gdb e.g.

set breakpoint pending on break <source file name>:<line number> 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -