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.c | |
parent | bf31fd38f02ca9b1a7d75e2d00ee0af665fd3efd (diff) | |
download | gdb-0589ca4e7ba9b8d60599706b57be22c007c1f4fa.zip gdb-0589ca4e7ba9b8d60599706b57be22c007c1f4fa.tar.gz gdb-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.c')
-rw-r--r-- | gdb/utils.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index 0be49a6..bda3b7b 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -2841,30 +2841,6 @@ gdb_argv_as_array_view_test () #endif /* GDB_SELF_TEST */ -/* Allocation function for the libiberty hash table which uses an - obstack. The obstack is passed as DATA. */ - -void * -hashtab_obstack_allocate (void *data, size_t size, size_t count) -{ - size_t total = size * count; - void *ptr = obstack_alloc ((struct obstack *) data, total); - - memset (ptr, 0, total); - return ptr; -} - -/* Trivial deallocation function for the libiberty splay tree and hash - table - don't deallocate anything. Rely on later deletion of the - obstack. DATA will be the obstack, although it is not needed - here. */ - -void -dummy_obstack_deallocate (void *object, void *data) -{ - return; -} - /* Simple, portable version of dirname that does not modify its argument. */ |