MI and pending breakpoints

Jim Ingham jingham@apple.com
Wed Mar 15 16:21:00 GMT 2006


You need to set the gdb variable "pending" to "on" before setting the  
breakpoint.  Since this is kind of a pain, we added a "-f" option to - 
break-insert that will do this for you wrapped around the breakpoint  
setting ("-f" because this feature was called "future-break" in the  
NeXT gdb many years ago.)

It's also arguable that for -break-insert you ALWAYS want "pending"  
to be "on".

Jim

On Mar 15, 2006, at 4:25 AM, Vladimir Prus wrote:

>
> Hello!
> I've got some problems with "pending breakpoints" functionality,  
> using MI
> interface. Here's example session:
>
>    (gdb) break helper.cpp:4
>    break helper.cpp:4
>    No source file named helper.cpp.
>    Breakpoint 2 (helper.cpp:4) pending.
>    ^done
>    (gdb) -break-insert helper.cpp:5
>    No source file named helper.cpp.
>    ^done
>
> The CLI command correctly adds pending breakpoint. The helper.cpp  
> file is in
> dlopen-ed shared library, and the breakpoint will be resolved when the
> library is loaded.
>
> The MI command neither errors out (the reply is "^done", not  
> "^error"), nor
> it does anything. It does not report breakpoint number, it does not  
> add any
> breakpoint at all.
>
> What is the reason for this? Is this a bug? How do other frontend  
> authors
> deal with breakpoints in shared libraries, then?
>
> Thanks in advance,
> Volodya
>
>
>



More information about the Gdb mailing list