On Thu, 22 Jan 2015 01:26:46 +0100, Doug Evans wrote: > Just some nits, no need to resubmit for review. Resubmitting it as a request for doc approval from Eli. > > +static int tp_array_compar_asc; > > This should probably have a comment. Done, I forgot. > > + > > +/* Sort an array for struct thread_info pointers by their ascending NUM. */ > > + > > +static int > > +tp_array_compar (const void *ap_voidp, const void *bp_voidp) [...] > > + return ((((*ap)->num > (*bp)->num) - ((*ap)->num < (*bp)->num)) > > + * (tp_array_compar_asc ? +1 : -1)); > > +} > > This triggers my "passing parameters as global variables" alarm, > and while one could instead have two different functions, I believe qsort_r() is more appropriate, using two different functions I would feel rather as a workaround of missing qsort_r(). But I guess (I cannot easily test due to missing slaves and no patch testing feature in Sergio's Buildbot yet) some of the supported platforms do not provide qsort_r() so it would need a new gdb/gnulib/ module. But at least one of my gdb/gnulib/ patches is still under review so it would create dependency between unrelated patchsets. > > + if (cmd && (check_for_argument (&cmd, "-asc", strlen ("-asc")))) > > cmd != NULL BTW this has been copy-paste but yes, my fault, I am aware of it. Thanks, Jan