This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: MI and pending breakpoints
On Wednesday 15 March 2006 19:19, Jim Ingham wrote:
> You need to set the gdb variable "pending" to "on" before setting the
> breakpoint.
Do you mean:
set breakpoint pending on
? That's what I do (not shown in the example), and without it the ordinary
"break" won't set the breakpoint -- it will ask if pending breakpoint should
be set. But even with it, "-break-insert" refused to set pending breakpoint.
Maybe, there's was bug that's fixed on Apple branch?
In fact, with CVS HEAD version, -break-insert calls gdb_breakpoint, which
calls do_captured_parse_breakpoint which reports that file does not exists,
and process stops (see breakpoint.c:gdb_breakpoint and
mi/mi-cmd-break.c:mi_cmd_break_insert).
For "break", the do_captures_parse_breakpoint" is called as well, but after
then, an explicit check for not found file is made, and pending breakpoint is
added (see breakpoint.c:break_command_1)
> 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".
Yes, this might be good.
- Volodya