[patch] update_global_location_list my comment fix [Re: [PATCH] Fix breakpoint updates for multi-inferior]
Jan Kratochvil
jan.kratochvil@redhat.com
Thu Feb 9 08:23:00 GMT 2012
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.
Thanks,
Jan
More information about the Gdb-patches
mailing list