From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: pedro@codesourcery.com (Pedro Alves)
Cc: tromey@redhat.com, gdb-patches@sourceware.org
Subject: Re: [00/19] Eliminate some more current_gdbarch uses
Date: Mon, 08 Jun 2009 14:38:00 -0000 [thread overview]
Message-ID: <200906081438.n58EcdKE022828@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <200906060031.14803.pedro@codesourcery.com> from "Pedro Alves" at Jun 06, 2009 12:31:14 AM
Pedro Alves wrote:
> I *know* we can do smarter, but exactly what's the best, I haven't
> thought much about. Some data points / suggestions:
>
> - longjmp breakpoints need to be installed as long as there's a
> thread nexting or stepping or whatever command that needs those,
> for non-stop mode. The fact that they're momentary breakpoints
> makes it so that a thread that is "continue"ing, simply thread
> hops them, since momentary breakpoints are thread specific, which is
> more efficient than having them all
> set longjmp-resume, hit-longjmp-resume,resume. The breakpoint location
> machinery takes care of not installing duplicates. The set of addresses
> where to install such breakpoints however, don't change per-address
> space --- we could cache minimal symbols on a per symbol/address space
> generic framework (similar to objfile_data), and reparse that only when
> symbols change (that is, breakpoint_re_set or similar).
>
> - perhaps the simplest and most likely the most effective easily: we
> can use the objfile_data mechanism to cache if there are longjmp-like
> functions in a given objfile. No use looking up the minimal symbol
> everytime.
I guess we could treat the longjmp breakpoint similarly to the
overlay event breakpoint and recompute its address(es) only when
objfiles change (i.e. in breakpoint_re_set_objfile).
Of course, this would mean the breakpoints were always active. However,
this could be improved upon by:
- having infrun ignore longjmp breakpoints if not stepping
- keeping them disabled unless stepping (and still have infrun ignore
longjmp breakpoints when hit in the wrong thread)
and/or
- keeping them always disabled, but installing momentary clones in
threads that are stepping
> - lookup_minimal_symbol still does a linear walk on all objfiles
> when you pass it an objfile. That may matter a bit. We could
> split that function in two to not do that loop when we know the
> objfile in advance.
This might be useful anyway ...
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2009-06-08 14:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-05 21:13 Ulrich Weigand
2009-06-05 22:24 ` Pedro Alves
2009-06-05 22:54 ` Tom Tromey
2009-06-05 23:30 ` Pedro Alves
2009-06-08 14:38 ` Ulrich Weigand [this message]
2009-06-08 14:48 ` Pedro Alves
2009-06-23 18:04 ` [rfc] longjmp breakpoints (Re: [00/19] Eliminate some more current_gdbarch uses) Ulrich Weigand
2009-06-24 15:02 ` Pedro Alves
2009-06-24 16:44 ` Ulrich Weigand
2009-06-17 18:58 ` [00/19] Eliminate some more current_gdbarch uses Ulrich Weigand
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=200906081438.n58EcdKE022828@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.com \
--cc=tromey@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