This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] update_global_location_list my comment fix [Re: [PATCH] Fix breakpoint updates for multi-inferior]


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]