public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "tromey at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug breakpoints/10738] Cannot set breakpoint on inlined function
Date: Mon, 03 Jan 2011 20:53:00 -0000	[thread overview]
Message-ID: <bug-10738-4717-io1NpqJ2bz@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-10738-4717@http.sourceware.org/bugzilla/>

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.


  parent reply	other threads:[~2011-01-03 20:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-10738-4717@http.sourceware.org/bugzilla/>
2010-12-18  8:05 ` x.tong at utoronto dot ca
2010-12-23  2:05 ` tromey at redhat dot com
2010-12-23  2:09 ` x.tong at utoronto dot ca
2010-12-23  2:18 ` x.tong at utoronto dot ca
2010-12-27  0:48 ` tromey at redhat dot com
2011-01-03 20:53 ` tromey at redhat dot com [this message]
2011-01-03 21:32 ` x.tong at utoronto dot ca
2011-01-03 21:59 ` tromey at redhat dot com
2011-04-04 19:01 ` sergiodj at redhat dot com
2011-04-04 19:05 ` x.tong at utoronto dot ca
2011-04-14 15:34 ` jan.kratochvil at redhat dot com
2011-04-15  9:31 ` mjw at redhat dot com
2011-04-15 19:06 ` jan.kratochvil at redhat dot com
2011-05-13 14:05 ` jason at redhat dot com
2011-05-13 14:12 ` tromey at redhat dot com
2011-06-07 14:30 ` jan.kratochvil at redhat dot com
2011-06-24 23:57 ` jimenezrick at gmail dot com
2011-08-11 16:11 ` gbenson at redhat dot com
2011-08-17 16:20 ` tromey at redhat dot com
2011-12-02 14:25 ` gbenson at redhat dot com
2012-03-16 16:49 ` cvs-commit at gcc dot gnu.org
2012-03-16 16:54 ` gbenson at redhat dot com
2012-03-16 16:55 ` gbenson at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-10738-4717-io1NpqJ2bz@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).