aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorLuis Machado <luisgpm@br.ibm.com>2012-02-24 14:59:35 +0000
committerLuis Machado <luisgpm@br.ibm.com>2012-02-24 14:59:35 +0000
commitdea2aa5f5641c14149396dd0e699ffc42b08e4ba (patch)
tree3338e20b1a3eb2b972091deda72b5d4b5cea2ccb /gdb
parent277e4e52359c0e04b388a2b351e8d6ea14fefc5f (diff)
downloadgdb-dea2aa5f5641c14149396dd0e699ffc42b08e4ba.zip
gdb-dea2aa5f5641c14149396dd0e699ffc42b08e4ba.tar.gz
gdb-dea2aa5f5641c14149396dd0e699ffc42b08e4ba.tar.bz2
2012-02-24 Luis Machado <lgustavo@codesourcery.com>
* breakpoint.c (bp_location_compare): Sort by pspace before sorting by number.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/breakpoint.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8c6b20d..46b1dc6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2012-02-24 Luis Machado <lgustavo@codesourcery.com>
+
+ * breakpoint.c (bp_location_compare): Sort by pspace before sorting by
+ number.
+
2012-02-24 Thomas Schwinge <thomas@codesourcery.com>
* sh-tdep.c (sh_skip_prologue): Use skip_prologue_using_sal.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 3740157..fd9dced 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -10609,6 +10609,14 @@ bp_location_compare (const void *ap, const void *bp)
if (a->address != b->address)
return (a->address > b->address) - (a->address < b->address);
+ /* Sort locations at the same address by their pspace number, keeping
+ locations of the same inferior (in a multi-inferior environment)
+ grouped. */
+
+ if (a->pspace->num != b->pspace->num)
+ return ((a->pspace->num > b->pspace->num)
+ - (a->pspace->num < b->pspace->num));
+
/* Sort permanent breakpoints first. */
if (a_perm != b_perm)
return (a_perm < b_perm) - (a_perm > b_perm);