This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MI and pending breakpoints


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





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]