On 02/09/2012 06:22 AM, Jan Kratochvil wrote: > On Thu, 09 Feb 2012 00:39:42 +0100, Luis Gustavo wrote: >> + /* Sort by pspace. This effectively sorts locations by inferior in >> + a multi-inferior environment. */ >> + >> + if (a->pspace != b->pspace) >> + return (a->pspace> b->pspace) - (a->pspace< b->pspace); > > This does not follow the comment I made: > > /* Make the internal GDB representation stable across GDB runs > where A and B memory inside GDB can differ. > > I would prefer there (and it will not fit on a single line :-) ): > > return (a->pspace->num> b->pspace->num) - (a->pspace->num< b->pspace->num); > > NUM should be the same on each GDB run for the same inferior / command file. I would still like to keep an appropriate comment regarding multi-inferiors next to the pspace comparison, like the following... maybe it would've been best to keep the change above your new comment. Here's a new version. What do you think?