From: Michael Elizabeth Chastain <mec@shout.net>
To: drow@mvista.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA/PATCH] breakpoint.c: fix until command
Date: Fri, 03 Jan 2003 17:40:00 -0000 [thread overview]
Message-ID: <200301031739.h03HdtO16125@duracef.shout.net> (raw)
> We support other compilers; we support other versions of GCC. The life
> of a debugger is that making people fix the compiler isn't going to
> fly.
Yeah, I see where you are coming from.
I am talking about a mapping from file:line to source function
without going through PC's at all. That would not handle the case
of 'until *0x12345678'. But it would handle other cases.
In your example: the target program is on line 11, "return a * baz()".
The user asks to proceed "until 4", which is the "-complicated" part of
inline function baz().
In my design, gdb would say: "error, line 4 is not in main". I think your
point is that code from line 4 actually is present in main() because baz()
got inlined into main. (And in your example, line 4 is present exactly
once in main, whereas in the general case it could be present multiple
times).
What happens right now when the user types "break 4" to break inside
the inline function? I'm experimenting, and it looks like gdb sets one
breakpoint on one caller to the inline function. "break 4" does not
work properly.
Once we have mechanism to implement "break 4", we can use the same
mechanism for "until 4". We can calculate the set of locations for "break
4" and intersect that with the low_pc and high_pc of the current frame.
If that set is null, then error. Then set momentary breakpoints on those
locations, restricted to the current frame, plus a momentary breakpoint
on the return location, and proceed.
Until "break 4" works, "until 4" can at least refuse to do anything.
> [Similarly, we need to stop assuming a symbol name maps to one PC.
This causes us to mess up constructor breakpoints right now. GDB has
essentially no support for debugging inline functions, and it's a
problem there too.]
I agree. The constructor part is really hurting users. With inline
functions, the programmer knows "I have copies of the object code
for the function everywhere, I understand why gdb is not smart enough
to handle that yet." With constructors, the programmer does not know
that they have multiple copies of the object code, so gdb's deficiency
shows up as a surprise.
Michael C
next reply other threads:[~2003-01-03 17:40 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-03 17:40 Michael Elizabeth Chastain [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-01-11 1:04 Michael Elizabeth Chastain
2003-01-07 4:05 Michael Elizabeth Chastain
2003-01-07 3:53 Michael Elizabeth Chastain
2003-01-04 0:37 Michael Elizabeth Chastain
2003-01-05 17:02 ` Andrew Cagney
2003-01-07 1:30 ` Michael Snyder
2003-01-03 18:03 Michael Elizabeth Chastain
2003-01-03 17:07 Michael Elizabeth Chastain
2003-01-03 17:51 ` Elena Zannoni
2003-01-03 16:48 Michael Elizabeth Chastain
2003-01-03 23:33 ` Michael Snyder
2003-01-03 16:38 Michael Elizabeth Chastain
2003-01-03 16:57 ` Daniel Jacobowitz
2003-01-03 6:49 Michael Elizabeth Chastain
2003-01-03 15:17 ` Daniel Jacobowitz
2003-01-03 4:15 Michael Elizabeth Chastain
2003-01-03 4:59 ` Daniel Jacobowitz
2003-01-03 21:52 ` Michael Snyder
2003-01-03 21:54 ` Daniel Jacobowitz
2003-01-03 22:39 ` Elena Zannoni
2003-01-03 23:09 ` Michael Snyder
2003-01-03 14:43 ` Elena Zannoni
2003-01-03 22:06 ` Michael Snyder
2003-01-03 22:43 ` Elena Zannoni
2003-01-03 23:13 ` Michael Snyder
2002-12-20 10:19 Elena Zannoni
2002-12-23 15:55 ` Michael Snyder
2002-12-23 16:13 ` Daniel Jacobowitz
2002-12-23 16:59 ` Michael Snyder
2002-12-23 19:23 ` Daniel Jacobowitz
2003-01-02 20:25 ` Michael Snyder
2003-01-02 20:34 ` Elena Zannoni
2003-01-02 20:40 ` Michael Snyder
2003-01-03 0:12 ` Elena Zannoni
2003-01-03 1:44 ` Michael Snyder
2003-01-03 1:50 ` Daniel Jacobowitz
2003-01-03 2:37 ` Michael Snyder
2003-01-03 14:29 ` Elena Zannoni
2003-01-03 23:51 ` Michael Snyder
2003-01-03 23:53 ` Elena Zannoni
2003-01-04 0:05 ` Michael Snyder
2003-01-04 1:54 ` Daniel Jacobowitz
2003-01-06 22:06 ` Elena Zannoni
2003-01-07 1:27 ` Michael Snyder
2003-01-07 1:45 ` Elena Zannoni
2003-01-07 2:09 ` Michael Snyder
2003-01-07 4:31 ` Daniel Jacobowitz
2003-01-08 22:08 ` Elena Zannoni
2003-01-09 1:52 ` Daniel Jacobowitz
2003-01-10 22:25 ` Elena Zannoni
2003-01-10 22:28 ` Daniel Jacobowitz
2003-01-10 23:20 ` Elena Zannoni
2003-01-03 14:15 ` Elena Zannoni
2003-01-03 23:31 ` Michael Snyder
2003-01-03 23:51 ` Elena Zannoni
2003-01-03 23:58 ` Michael Snyder
2003-01-03 14:13 ` Elena Zannoni
2003-01-03 23:28 ` Michael Snyder
2003-01-02 20:01 ` Elena Zannoni
2003-01-02 20:29 ` Michael Snyder
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=200301031739.h03HdtO16125@duracef.shout.net \
--to=mec@shout.net \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
/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