Opened 4 years ago

#12957 new enhancement

Improve handling of inlined functions

Reported by: anevilyak Owned by: anevilyak
Priority: low Milestone: Unscheduled
Component: Applications/Debugger Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All


Currently, inlined functions are more or less ignored. This can be problematic for a number of reasons though ; for instance, when a call is made to an inlined function, it is currently not possible to see the execution of that function. The requisite information to do so is present in the DWARF information generated by GCC4/5 though.

Another case that currently isn't properly handled is that gcc appears to generate a line number program that maps source lines for inlined functions that are not optimized out entirely. The line numbers are mapped to the corresponding inlined addresses in the calling function though, which plays havoc with how we currently map source lines to statements. It is currently assumed that if we could not find a function whose source line start/end map directly to the line in question, then the previous function might overlap. This behavior probably needs to be made more intelligent, though it first needs to be investigated if the debug information provides the necessary information to indicate that the function containing the inlined call does in fact include those lines as well, since they may be at an entirely different file/compilation unit from the actual function itself.

Note that the above cases are mainly only of concern when the combination of optimization and debug information is used.

Change History (0)

Note: See TracTickets for help on using tickets.