diff options
author | Tom Tromey <tom@tromey.com> | 2021-12-21 16:48:38 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-01-18 10:14:43 -0700 |
commit | 0589ca4e7ba9b8d60599706b57be22c007c1f4fa (patch) | |
tree | 7fdde22953de4f48839190426acf158768445dc4 /gdb/utils.h | |
parent | bf31fd38f02ca9b1a7d75e2d00ee0af665fd3efd (diff) | |
download | binutils-0589ca4e7ba9b8d60599706b57be22c007c1f4fa.zip binutils-0589ca4e7ba9b8d60599706b57be22c007c1f4fa.tar.gz binutils-0589ca4e7ba9b8d60599706b57be22c007c1f4fa.tar.bz2 |
Introduce gdb-hashtab module in gdbsupport
gdb has some extensions and helpers for working with the libiberty
hash table. This patch consolidates these and moves them to
gdbsupport.
Diffstat (limited to 'gdb/utils.h')
-rw-r--r-- | gdb/utils.h | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/gdb/utils.h b/gdb/utils.h index 5ac34eb..8e9c204 100644 --- a/gdb/utils.h +++ b/gdb/utils.h @@ -123,27 +123,6 @@ extern int parse_escape (struct gdbarch *, const char **); /* Cleanup utilities. */ -/* A deleter for a hash table. */ -struct htab_deleter -{ - void operator() (htab *ptr) const - { - htab_delete (ptr); - } -}; - -/* A unique_ptr wrapper for htab_t. */ -typedef std::unique_ptr<htab, htab_deleter> htab_up; - -/* A wrapper for 'delete' that can used as a hash table entry deletion - function. */ -template<typename T> -void -htab_delete_entry (void *ptr) -{ - delete (T *) ptr; -} - extern void init_page_info (void); /* Temporarily set BATCH_FLAG and the associated unlimited terminal size. @@ -384,11 +363,6 @@ extern void demangler_warning (const char *file, int line, /* Misc. utilities. */ -/* Allocation and deallocation functions for the libiberty hash table - which use obstacks. */ -void *hashtab_obstack_allocate (void *data, size_t size, size_t count); -void dummy_obstack_deallocate (void *object, void *data); - #ifdef HAVE_WAITPID extern pid_t wait_to_die_with_timeout (pid_t pid, int *status, int timeout); #endif |