This is the mail archive of the gdb-prs@sourceware.org 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]
Other format: [Raw text]

[Bug breakpoints/10738] Cannot set breakpoint on inlined function


http://sourceware.org/bugzilla/show_bug.cgi?id=10738

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW

--- Comment #6 from Tom Tromey <tromey at redhat dot com> 2011-01-03 20:53:34 UTC ---
(In reply to comment #5)

> "func" is not even included in the psymtab. I would like some pointers at this
> point. should I investigate why "func" is in dwarf2 but not in psymtab ? Any
> help would be greatly appreciated.

First, I'd like to note that what I am about to say may be wrong.
You will want to check it before making any decisions based on it.

Second, there are at least two cases to consider.  One case is the one
where all instances of a given function have been inlined.  Another
case is where the function has been inlined but also still exists as
an "out of line" function.

I think "break function" works ok if all instances have been inlined.

In the case where there is an out-of-line copy, I think it may be best
if "break function" noticed that "function" was inlined somewhere,
and then treat it as though "break file:line" were used instead.

You may want to trace through the "file:line" logic in this case to see
what happens.  That should tell you where to modify the gdb core to
make this happen.

You'll also need to change dwarf2read.c to read and respect DW_AT_inline.
Right now this is ignored.  In particular I think you need to check
for DW_INL_inlined, and use that to decide when to look for multiple
locations.

You may need to add a flag to function symbols to indicate when the special
inline processing should be done.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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