From: Pedro Alves <pedro@codesourcery.com>
To: tromey@redhat.com
Cc: gdb-patches@sourceware.org, "Ulrich Weigand" <uweigand@de.ibm.com>
Subject: Re: [00/19] Eliminate some more current_gdbarch uses
Date: Fri, 05 Jun 2009 23:30:00 -0000 [thread overview]
Message-ID: <200906060031.14803.pedro@codesourcery.com> (raw)
In-Reply-To: <m34ouus386.fsf@fleche.redhat.com>
On Friday 05 June 2009 23:52:25, Tom Tromey wrote:
> >>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
>
> Pedro> - We should do something smarter about longjmp breakpoint
> Pedro> lookup at some point.
>
> If you have something in mind, I would like to hear it.
> The next-over-throw patch does something very similar to the longjmp
> code; I would be happy to update both at once.
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.
- 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.
- we can move the update_global_location_list to the caller of
create_longjmp_breakpoint, cutting its frequency by 4, if that
matters. Probably not currently.
--
Pedro Alves
next prev parent reply other threads:[~2009-06-05 23:30 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 [this message]
2009-06-08 14:38 ` Ulrich Weigand
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=200906060031.14803.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
--cc=uweigand@de.ibm.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