[patch] Fix internal error on breaking at a multi-locations caller

Joel Brobecker brobecker@adacore.com
Fri May 1 15:48:00 GMT 2009


Hello Jan,

I think Tom must be pretty busy right now :), so here is my take on this.

> info '(gdb)Set Breaks'
> `break'
>      When called without any arguments, `break' sets a breakpoint at
>      the next instruction to be executed in the selected stack frame
> [...]
> 
> Do you refer here to the "selected stack frame" part of the doc?

More importantly: "next instruction"; but yes, the selected stack
frame is also important.

Based on that, "break" in my opinion should be equivalent to "break *PC"
where PC is the current frame's PC.  So, I think that the correct way
to fix this is to set the "explicit_pc" flag in the sal. That should
make sure that expand_line_sal_maybe does not, in fact, do any expansion.

I also understand the reason why you think a warning might help,
especially since I had a different intuitive perception of what
the argument-less command was doing.  But I think that such a warning
would quickly become more annoying than anything if the user knows
precisely the meaning of his command. What do others think?

Nonetheless, I think we can treat the two issues separately. We can
fix the problem first with a one-liner, and then we can discuss the
idea of a warning if you think it might be useful. Does this sound
reasonable to you?

-- 
Joel



More information about the Gdb-patches mailing list