[PATCH 1/3] libdw: Make srclines use a stable sort

Mark Wielaard mjw at redhat.com
Sat Dec 13 19:26:11 UTC 2014


On Thu, Dec 11, 2014 at 05:23:35PM -0800, Josh Stone wrote:
> This adds a sequence number to the linked-list entries, so the original
> order can break ties in sorting, making this a stable sort.
> 
> +2014-12-11  Josh Stone  <jistone at redhat.com>
> +
> +	* dwarf_getsrclines.c (struct linelist): Add sequence.
> +	(compare_lines): Take linelists, and break ties by sequence.
> +	(read_srclines): Use linelists for sorting.
> +	(read_srclines::add_new_line): Set sequence.

Looks good.

Thanks,

Mark


More information about the elfutils-devel mailing list