Addressed Jan's comments. On 13-03-27 10:50 AM, Jan Kratochvil wrote: > On Wed, 27 Mar 2013 15:38:29 +0100, Aleksandar Ristovski wrote: >> On 13-03-26 04:41 PM, Jan Kratochvil wrote: >>>>> + if (build_id_list_p) >>>>> + qsort (VEC_address (build_id_list_s, data.list), >>>>> + VEC_length (build_id_list_s, data.list), >>>>> + sizeof (build_id_list_s), compare_build_id_list); >>> It is always already sorted by Linux kernel, rather a for cycle to verify it >>> really is sorted. >> >> Can we guarantee this is always the case? > > Yes. > > The problem is that if it is unsorted there is a bug somewhere and that qsort > will hide that bug. Qsort removed. I didn't put any traversal; we are making assumption that the list will be sorted. The checks in the other bits make sure that we either find the right mapping or none at all, so worst case scenario is we don't get build-id communicated to gdb. Thanks, Aleksandar