Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: ppluzhnikov@google.com (Paul Pluzhnikov)
Cc: brobecker@adacore.com (Joel Brobecker),
	tromey@redhat.com,         gdb-patches@sourceware.org
Subject: Re: [rfc][patch] Eliminate quadratic slow-down on number of solibs.
Date: Mon, 22 Jun 2009 19:30:00 -0000	[thread overview]
Message-ID: <200906221928.n5MJSivT013948@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <8ac60eac0906221156o91c8059t17d1dd1bd2752dd0@mail.gmail.com> from "Paul Pluzhnikov" at Jun 22, 2009 11:56:28 AM

Paul Pluzhnikov wrote:

> > If you're going to reset only breakpoints
> > from one objfile, maybe you should likewise *delete* only breakpoints
> > from that objfile?
> 
> That sounds like a good approach :-)
> 
> Patch below tested on Linux/x86_64 with no new failures.

Thanks for the quick reply!

> Unfortunately I don't have any targets that support overlays, so I can't
> test this. Did this fail for you on spu? If so, does it pass with this patch?

Unfortunately, I don't have a ready test case, I noticed the problem
while reading the code ...  Mainline GDB does not yet support combined
Cell/B.E. debugging, and stand-alone SPU executables are always statically
linked so I'm never seeing more than one objfile anyway.

In any case, I don't think your patch fixes the problem in the case
where more than one objfile defines _ovly_debug_event:

> +    case bp_overlay_event:
> +      if (objfile == NULL
> +          || lookup_minimal_symbol_text (b->addr_string, objfile))
> +        {
> +          /* Delete overlay event breakpoints; they will be reset later by
> +             breakpoint_re_set.  */
> +          delete_breakpoint (b);
> +        }
> +      break;

If objfile actually defines _ovly_debug_event, the symbol lookup will
succeed for *all* bp_overlay_event breakpoints, as they all use the
same addr_string, and thus all breakpoints will be deleted.  But again,
only one of them will get re-inserted ...

I guess you'd have to verify that not only symbol lookup succeeded, but
it results in the address used to set this breakpoint.  But that's not
really correct either, because breakpoint_re_set may get called after
an objfile has been relocated.

In fact, I don't really see an easy way to identify the originating
objfile just from looking at the breakpoint.  Maybe we could set addr_string
to some string that uniquely identifies the objfile when creating the
breakpoint?  It isn't really used for a lot else for bp_overlay_event
breakpoints (except for the maint info breakpoint output).

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


  reply	other threads:[~2009-06-22 19:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-20 23:29 Paul Pluzhnikov
2009-04-21  1:06 ` Tom Tromey
2009-04-29 21:12   ` Paul Pluzhnikov
2009-05-12  8:48     ` Joel Brobecker
2009-05-12 21:21       ` Paul Pluzhnikov
2009-05-13  9:39         ` Joel Brobecker
2009-06-22 17:10         ` Ulrich Weigand
2009-06-22 18:56           ` Paul Pluzhnikov
2009-06-22 19:30             ` Ulrich Weigand [this message]
2009-06-22 19:42               ` Paul Pluzhnikov
2009-06-22 20:06                 ` Ulrich Weigand
2009-06-22 22:04                   ` Paul Pluzhnikov
2009-06-23  0:43                     ` Ulrich Weigand
2009-06-23  1:33                       ` Paul Pluzhnikov
2009-06-23 13:32                         ` Ulrich Weigand
2009-06-22 20:41             ` Doug Evans
2009-06-22 20:48               ` 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=200906221928.n5MJSivT013948@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ppluzhnikov@google.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