[Dwarf-discuss] dwarf information for mutiple statements at thesame line.

Jim Blandy jimb
Thu Jul 13 07:10:39 GMT 2006


On 7/12/06, Michael Eager <eager at eagercon.com> wrote:
> If foo:5 never
> appears in the line table, how would a debugger place a
> breakpoint on it?   Certainly you could place a breakpoint at
> stdio.h:459, but is that really what you wanted to do?

If you can't set a breakpoint on line 5, then I certainly agree that's
a serious loss of functionality.  I can see why one would want
"hierarchical line numbers" of the sort Brian mentions.  So this is a
good "why not" example.

But this distinction:

> I think that the problem is that macros have two distinct and
> disparate uses:  one is as a simple form of inlined function,
> like Keith's example.  In that case, giving the location of the
> macro definition is reasonable (although I'm not fully convinced).
>
> The other use is as a source unit, for example, a call to any of
> the functions defined as macros in stdio.h.

doesn't make sense to me, or at least it isn't supported by your
example.  It seems to me that the 'getc' use in your example is
exactly like Keith's example --- a simple form of inlined function.
If there's a lot going on there, you certainly want to be able to step
through it, just as you would an inlined function.

I guess the catch is that you'd like the *option* of stepping through
the macro call.  Simply attributing instructions to macro definition
locations would effectively require you to step through it.





More information about the Dwarf-discuss mailing list