Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: "Gustavo, Luis" <luis_gustavo@mentor.com>, gdb-patches@sourceware.org
Subject: [patch] update_global_location_list my comment fix  [Re: [PATCH] Fix breakpoint updates for multi-inferior]
Date: Wed, 08 Feb 2012 17:28:00 -0000	[thread overview]
Message-ID: <20120208172728.GA6951@host2.jankratochvil.net> (raw)
In-Reply-To: <4F32990B.7060203@redhat.com>

On Wed, 08 Feb 2012 16:47:23 +0100, Pedro Alves wrote:
> We're already sorting by address first, so I'm not really sure what is
> it that's user-visible that we're trying to preserve.  Jan?

I no longer remember if

(a) I was wrongly expecting "duplicate"-marked locations are somehow visible
    in "info breakpoints".
or
(b) <the new patch comment below>.

I will check the comment change in, I hope everyone agrees with the reason.


> Even if that is still necessary, would it be ok to sort by address, then
> pspace, and only after by bkpt number?

I agree with Pedro, update_global_location_list was introduced as GDB
acceleration as the breakpoints performance became no longer bearable.

While update_global_location_list is far from perfect (it should be
incremental) we should not regress performance when it is enough to do it just
in a bit different way as Pedro suggests.


Thanks,
Jan


gdb/
2012-02-08  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* breakpoint.c (bp_location_compare): Fix comment.

--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -10589,8 +10589,9 @@ bp_location_compare (const void *ap, const void *bp)
   if (a_perm != b_perm)
     return (a_perm < b_perm) - (a_perm > b_perm);
 
-  /* Make the user-visible order stable across GDB runs.  Locations of
-     the same breakpoint can be sorted in arbitrary order.  */
+  /* Make the internal GDB representation stable across GDB runs
+     where A and B memory inside GDB can differ.  Breakpoint locations of
+     the same type at the same address can be sorted in arbitrary order.  */
 
   if (a->owner->number != b->owner->number)
     return (a->owner->number > b->owner->number)


  reply	other threads:[~2012-02-08 17:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-25 21:27 [PATCH] Fix breakpoint updates for multi-inferior Luis Gustavo
2012-02-07 23:44 ` Luis Gustavo
2012-02-08 15:17 ` Pedro Alves
2012-02-08 15:27   ` Luis Gustavo
2012-02-08 15:47     ` Pedro Alves
2012-02-08 17:28       ` Jan Kratochvil [this message]
2012-02-08 23:19         ` [patch] update_global_location_list my comment fix [Re: [PATCH] Fix breakpoint updates for multi-inferior] Luis Gustavo
2012-02-08 23:32           ` Joel Brobecker
2012-02-08 23:40             ` Luis Gustavo
2012-02-09  8:23               ` Jan Kratochvil
2012-02-09 11:05                 ` Luis Gustavo
2012-02-09 11:32                   ` Pedro Alves
2012-02-24 15:24                     ` Luis Gustavo
2012-02-09  8:21         ` [commit] " Jan Kratochvil

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=20120208172728.GA6951@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=luis_gustavo@mentor.com \
    --cc=palves@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