Replace bsearch with a std::lower_bound-based search
authorChristian Biesinger <cbiesinger@google.com>
Mon, 21 Oct 2019 18:08:03 +0000 (13:08 -0500)
committerChristian Biesinger <cbiesinger@google.com>
Tue, 29 Oct 2019 19:06:26 +0000 (14:06 -0500)
commit35e65c49df7d8fac3c0a32fa0d696988a9de675d
tree4cb4567dd102a727ec1d639aba5fcca9c3f42d24
parented2a222951020d1117c5e1d4f37e82fd26761267
Replace bsearch with a std::lower_bound-based search

This is more type-safe and can be faster due to inlining and
avoiding overhead from calling through a function pointer.

gdb/ChangeLog:

2019-10-29  Christian Biesinger  <cbiesinger@google.com>

* Makefile.in (HFILES_NO_SRCDIR): Add gdb_binary_search.h.
* dwarf2-frame.c (bsearch_fde_cmp): Update.
(dwarf2_frame_find_fde): Replace bsearch with gdb::binary_search.
* gdbsupport/gdb_binary_search.h: New file.

Change-Id: I07e0a0e333f4062b27fc68d3a3f24881ebc68fd4
gdb/ChangeLog
gdb/Makefile.in
gdb/dwarf2-frame.c
gdb/gdbsupport/gdb_binary_search.h [new file with mode: 0644]
This page took 0.029558 seconds and 4 git commands to generate.