From: Jim Ingham <jingham@apple.com>
To: gdb@sources.redhat.com
Subject: Re: deferred breakpoints
Date: Sat, 01 Mar 2003 02:16:00 -0000 [thread overview]
Message-ID: <D5074558-4B8B-11D7-B8F2-00039379E320@apple.com> (raw)
In-Reply-To: <1046355813.623.ezmlm@sources.redhat.com>
Kris,
That sounds fine. PB does that for all the GUI type breakpoints (where
the user actually clicks in a source window gutter somewhere). It goes
a little further, because it also knows what shared
library(s)/executable that file got build into, so it just waits for
that to get loaded before inserting the breakpoint.
One thing that you will have to be careful about when you are getting
the GUI to stop for shared library events is that when the user does a
"next" over a function that causes a shared library load, you are
probably going to lose control of the inferior and set it running. The
reason for this is that completing the "next" over the function is
implemented by a special breakpoint (step-resume). However, when the
target "really" stops, it deletes the step resume breakpoints (since
you might step again, and they don't stack). However, stopping when
you have stop-on-solib-event set to "true" is considered a "real" stop
- as indeed it is since the user regains total control. So then when
the GUI resumes, the step-resume breakpoint gets deleted, and there is
nothing to stop it anymore, so it just continues.
This doesn't happen often, but it is really annoying when it does...
I worked around this by adding a solib-step-bp and a solib-finish-bp,
and by "transferring" the step-resume breakpoint to one of these as
appropriate, you catch again. I am not sure this is the right way to
do it, because you run the risk of stranding these breakpoints (as you
would with the step-resume breakpoints...) Might be better to have an
"I promise all I am going to do is continue" type flag and when you hit
the solib and stop, you remind yourself NOT to remove the step-resume
breakpoints. You will also have to remember to hold onto the stepping
range so you will step to the end of the source line (the step-resume
breakpoint in on the return from the called function which is often not
the line end...)
Hope this helps,
Jim
On Thursday, February 27, 2003, at 06:23 AM,
gdb-digest-help@sources.redhat.com wrote:
> From: Kris Warkentin <kewarken@qnx.com>
> Date: Wed Feb 26, 2003 8:51:54 AM US/Pacific
> To: Jason Molenda <jmolenda@apple.com>
> Cc: gdb@sources.redhat.com
> Subject: Re: deferred breakpoints
>
>
> Looks like it might be a moot point. Deferred breakpoints are
> implementable
> from the ide side of things just by keeping an internal list of
> breakpoints
> and then attempting to apply them whenever there is a shlib event.
> Eclipse
> keeps breakpoints associated with libs and apps in its metadata so they
> persist across invocations so no special wiring in gdb will be
> required.
>
> cheers,
>
> Kris
>
--
Jim Ingham jingham@apple.com
Developer Tools
Apple Computer
next parent reply other threads:[~2003-03-01 2:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1046355813.623.ezmlm@sources.redhat.com>
2003-03-01 2:16 ` Jim Ingham [this message]
2003-02-25 21:36 Kris Warkentin
2003-02-25 21:59 ` Jason Molenda
2003-02-26 2:22 ` Kris Warkentin
2003-02-26 4:47 ` Jason Molenda
2003-02-26 16:51 ` Kris Warkentin
-- strict thread matches above, loose matches on Subject: below --
2003-02-25 20:51 Kris Warkentin
2003-02-25 20:57 ` Daniel Jacobowitz
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=D5074558-4B8B-11D7-B8F2-00039379E320@apple.com \
--to=jingham@apple.com \
--cc=gdb@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