[RFC/RFA?] Should break FILE:LINENO skip prologue?
Mark Kettenis
mark.kettenis@xs4all.nl
Wed Jan 9 19:16:00 GMT 2008
> Date: Wed, 9 Jan 2008 07:17:45 -0800
> From: Joel Brobecker <brobecker@adacore.com>
>
> Hello,
>
> I would like to revive a discussion that started sometime in 2002.
> The idea is the following: When breaking on a given source line, if
> that line is inside a function prologue, skip the prologue (using
> the linetable to do so).
You've got me confused here. How can it be that if skipping using the
line table helps, the breakpoint location (which I assume has been
determined based on the line table) isn't right to begin with?
> In our experience, we have found that most users are not aware of
> the existence of function prologues. When they break on the line
> where a function is defined, they think the debugger is doing the
> same thing than it would do if it inserted the breakpoint using
> that function name. Unfortunately, it doesn't and they end up
> having problems trying to print parameter values [1].
Ultimately, the problem is that GCC is (still) generating the wrong
debug information, since either:
* The line table is wrong and the prologue instructions are wrongly
attributed to a line of source code.
* Instructions corresponding to source code have been scheduled into
the prologue, but the compiler didn't generate location expressions
for the arguments that are valid at that point.
More information about the Gdb-patches
mailing list