2012-02-24 Luis Machado <lgustavo@codesourcery.com>

* breakpoint.c (bp_location_compare): Sort by pspace before sorting by
	number.
This commit is contained in:
Luis Machado 2012-02-24 14:59:35 +00:00
parent 277e4e5235
commit dea2aa5f56
2 changed files with 13 additions and 0 deletions

View file

@ -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.

View file

@ -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);