]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/buildsym.c
Fix gdb.opt/inline-cmds.exp regressions
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Tue, 24 Oct 2017 14:33:53 +0000 (16:33 +0200)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Tue, 24 Oct 2017 14:33:53 +0000 (16:33 +0200)
commit5033013f17524964564dac5d422739ae5214729e
tree55a405e4aa9374571da53c069e836ae883922982
parent93f4de3929aeb3e21d57950bfa96539599a92f2a
Fix gdb.opt/inline-cmds.exp regressions

When sorting pending blocks in end_symtab_get_static_block, blocks
with the same starting address must remain in the original order
to preserve inline function caller/callee relationships.

The original code seems to have implicitly relied on the fact that the
glibc qsort implemention actually (in the common case) provides a stable
sort, although this is not guaranteed by the standard.  But the GNU
libstdc++ std::sort implementation is *not* stable.

gdb/ChangeLog:
2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>

* buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
gdb/ChangeLog
gdb/buildsym.c