binutils-gdb/gdbsupport
Simon Marchi 8f942ca8a5 gdbsupport: add unordered_dense.h 4.4.0
Add a copy of unordered_dense.h from [1].  This file implements an
efficient hash map and hash set with a nice C++ interface (a near
drop-in for std::unordered_map and std::unordered_set).  This is
expected to be used to replace uses of `htab_t`, for improved code
readability and type safety.  Performance-wise, it is preferred to the
std types (std::unordered_map and std::unordered_set) due to it using
open addressing vs closed addressing for the std types.

I chose this particular implementation because it is simple to use, it's
a standalone header and it typically performs well in benchmarks I have
seen (e.g. [2]).  The license being MIT, my understanding is that it's
not a problem to use it and re-distribute it.

Add two additional files, gdbsupport/unordered_map.h and
gdbsupport/unordered_set.h, which make the map and set offered by
gdbsupport/unordered_dense.h available as gdb::unordered_map and
gdb::unordered_set.

[1] https://github.com/martinus/unordered_dense
[2] https://jacksonallan.github.io/c_cpp_hash_tables_benchmark/#conclusion-which-hash-table-to-choose

Change-Id: I0c7469ccf9a14540465479e58b2a5140a2440a7d
Approved-By: Tom Tromey <tom@tromey.com>
2024-11-25 22:07:03 -05:00
..
.dir-locals.el
.gitattributes
acinclude.m4
aclocal.m4 [gdbsupport] Rerun autoreconf -f 2024-11-23 12:40:36 +01:00
agent.cc
agent.h
alt-stack.h
array-view.h [gdbsupport] Add gdb::array_view::{iterator,const_iterator} 2024-10-19 08:10:38 +02:00
ax.def
block-signals.h
break-common.h
btrace-common.cc [gdb] Fix some typos 2024-11-18 09:46:31 +01:00
btrace-common.h btrace: Enable event tracing on Linux for Intel PT. 2024-09-24 14:22:28 +02:00
buildargv.h
byte-vector.h
ChangeLog-2020-2021
check-defines.el
cleanups.cc
cleanups.h
common-debug.cc
common-debug.h
common-defs.h [gdb/build] Use -fno-hoist-adjacent-loads for gcc <= 13 2024-10-18 00:18:24 +02:00
common-exceptions.cc
common-exceptions.h
common-gdbthread.h
common-inferior.cc
common-inferior.h
common-regcache.cc
common-regcache.h [gdb/tdep] Use raw_supply_part_zeroed for AArch64 2024-11-12 11:37:50 +01:00
common-types.h
common-utils.cc
common-utils.h
common.m4
compiler-type.m4
config.in
configure [gdbsupport] Rerun autoreconf -f 2024-11-23 12:40:36 +01:00
configure.ac
create-version.sh
def-vector.h
default-init-alloc.h
eintr.h [gdb] Handle EINTR in ser-event.c 2024-11-22 17:44:29 +01:00
enum-flags.h
environ.cc
environ.h
errors.cc
errors.h
event-loop.cc
event-loop.h
event-pipe.cc [gdbsupport] Handle EINTR in event-pipe.cc 2024-11-22 17:44:29 +01:00
event-pipe.h
fileio.cc
fileio.h
filestuff.cc
filestuff.h
filtered-iterator.h
format.cc
format.h
forward-scope-exit.h
function-view.h
gdb_assert.h
gdb_binary_search.h
gdb_file.h
gdb_locale.h
gdb_obstack.cc
gdb_obstack.h
gdb_proc_service.h
gdb_ref_ptr.h
gdb_regex.cc
gdb_regex.h
gdb_select.h
gdb_setjmp.h
gdb_signals.h [gdb] Fix common misspellings 2024-10-06 07:59:48 +02:00
gdb_splay_tree.h
gdb_sys_time.h
gdb_tilde_expand.cc
gdb_tilde_expand.h
gdb_unique_ptr.h
gdb_unlinker.h
gdb_vecs.cc
gdb_vecs.h
gdb_wait.cc
gdb_wait.h
gdb-checked-static-cast.h
gdb-dlfcn.cc
gdb-dlfcn.h
gdb-hashtab.h
gdb-safe-ctype.h
gdb-sigmask.h
gdb-xfree.h
host-defs.h
intrusive_list.h gdbsupport/intrusive-list: add owning_intrusive_list 2024-09-13 07:38:56 -04:00
iterator-range.h
job-control.cc
job-control.h
libiberty.m4
Makefile.am gdb: split osabi support between gdb/ and gdbsupport/ directories 2024-10-10 17:36:21 +01:00
Makefile.in gdb: split osabi support between gdb/ and gdbsupport/ directories 2024-10-10 17:36:21 +01:00
netstuff.cc
netstuff.h
new-op.cc
next-iterator.h
observable.h
offset-type.h [gdb] Fix common misspellings 2024-10-06 07:59:48 +02:00
osabi.cc gdb: split osabi support between gdb/ and gdbsupport/ directories 2024-10-10 17:36:21 +01:00
osabi.def gdb: split osabi support between gdb/ and gdbsupport/ directories 2024-10-10 17:36:21 +01:00
osabi.h gdb: split osabi support between gdb/ and gdbsupport/ directories 2024-10-10 17:36:21 +01:00
owning_intrusive_list.h gdbsupport/intrusive-list: add owning_intrusive_list 2024-09-13 07:38:56 -04:00
packed.h
parallel-for.h [gdb/contrib] Add two rules in common-misspellings.txt 2024-11-23 12:20:34 +01:00
pathstuff.cc Pass current directory to gdb_abspath 2024-10-19 13:18:00 -06:00
pathstuff.h Pass current directory to gdb_abspath 2024-10-19 13:18:00 -06:00
poison.h
preprocessor.h
print-utils.cc
print-utils.h
ptid.cc
ptid.h
ptrace.m4
range-chain.h
README
refcounted-object.h
reference-to-pointer-iterator.h
rsp-low.cc
rsp-low.h
run-time-clock.cc
run-time-clock.h
safe-iterator.h
safe-strerror.cc
scope-exit.h [gdb] Make scope_exit constructor throw 2024-09-24 13:47:56 +02:00
scoped_fd.h
scoped_ignore_signal.h
scoped_ignore_sigttou.h
scoped_mmap.cc
scoped_mmap.h
scoped_restore.h
scoped_signal_handler.h gdb: Introduce RAII signal handler setter 2024-11-22 17:38:31 -03:00
search.cc
search.h
selftest.cc
selftest.h
selftest.m4
signals-state-save-restore.cc
signals-state-save-restore.h
signals.cc
symbol.h
task-group.cc
task-group.h
tdesc.cc
tdesc.h gdb/gdbserver: change shared set_tdesc_osabi to take gdb_osabi 2024-10-10 17:36:21 +01:00
thread-pool.cc
thread-pool.h
traits.h
underlying.h
unordered_dense.h gdbsupport: add unordered_dense.h 4.4.0 2024-11-25 22:07:03 -05:00
unordered_map.h gdbsupport: add unordered_dense.h 4.4.0 2024-11-25 22:07:03 -05:00
unordered_set.h gdbsupport: add unordered_dense.h 4.4.0 2024-11-25 22:07:03 -05:00
valid-expr.h
version.h
warning.m4
x86-xstate.h gdb, gdbserver, python, testsuite: Remove MPX. 2024-09-25 11:06:57 +00:00
xml-utils.cc
xml-utils.h

This is a helper library that is used by gdb and gdbserver.

To send patches, follow the gdb patch submission instructions in
../gdb/CONTRIBUTE.  For maintainers, see ../gdb/MAINTAINERS.