This is the mail archive of the gdb@sourceware.cygnus.com 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]

Re: debugging inline functions


>>>>> "Per" == Per Bothner <per@bothner.com> writes:

    >> Is that OK with everyone?

    Per> Isn't that more-or-less the current behaviour (except for
    Per> adding the local variable declarations), which is what I was
    Per> complaining about?

Perhaps.  I wasn't exactly clear.

    Per> I think a stack trace displaying the caller's function but
    Per> with the inlined callee's line number is quite
    Per> counter-intuitive and confusing.  I certainly have found it
    Per> so in the past.  
    
Now I see what you're saying.  I'm not sure I agree, but I see your
point.

    Per> Still, that is a user-interface issue - i.e.
    Per> a gdb issue.  We should make sure the debug output emits
    Per> enough information so that the debugger can (in theory)
    Per> present the call/inline state clearly.  I agree that suggests
    Per> emiting the inlined callee's line numbers.  But we should
    Per> also emit some indication that the function *was* inlined.
    Per> Does dwarf2 have a defined way to do this?  If so, I'd like
    Per> Gcc to emit it.  -- --Per Bothner per@bothner.com

That makes sense.  But, it's beyond the scope of what I'm up to, which
is all at the tree level.  If the debugging back-ends learn to
represent this, then it will be straightforward to have the tree->rtl
stuff indicate this to the back-ends.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

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