* breakpoint.c (bp_location_compare): Sort by pspace before sorting by
number.
+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.
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);