| 1 |
/* |
| 2 |
|
| 3 |
Copyright (C) 2015-2023 David Anderson. All Rights Reserved. |
| 4 |
|
| 5 |
This program is free software; you can redistribute it |
| 6 |
and/or modify it under the terms of version 2.1 of the |
| 7 |
GNU Lesser General Public License as published by the Free |
| 8 |
Software Foundation. |
| 9 |
|
| 10 |
This program is distributed in the hope that it would be |
| 11 |
useful, but WITHOUT ANY WARRANTY; without even the implied |
| 12 |
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 13 |
PURPOSE. |
| 14 |
|
| 15 |
Further, this software is distributed without any warranty |
| 16 |
that it is free of the rightful claim of any third person |
| 17 |
regarding infringement or the like. Any license provided |
| 18 |
herein, whether implied or otherwise, applies only to this |
| 19 |
software file. Patent licenses, if any, provided herein |
| 20 |
do not apply to combinations of this program with other |
| 21 |
software, or any other product whatsoever. |
| 22 |
|
| 23 |
You should have received a copy of the GNU Lesser General |
| 24 |
Public License along with this program; if not, write the |
| 25 |
Free Software Foundation, Inc., 51 Franklin Street - Fifth |
| 26 |
Floor, Boston MA 02110-1301, USA. |
| 27 |
|
| 28 |
*/ |
| 29 |
|
| 30 |
#define HASHSEARCH |
| 31 |
|
| 32 |
#ifdef HASHSEARCH |
| 33 |
/* Only needed for hash based search in a tsearch style. */ |
| 34 |
#define INITTREE(x,y) (x) = dwarf_initialize_search_hash(&(x),(y),0) |
| 35 |
#else |
| 36 |
#define INITTREE(x,y) |
| 37 |
#endif /* HASHSEARCH */ |
| 38 |
|
| 39 |
/* Contexts are in a list in a dbg and |
| 40 |
do not move once established. |
| 41 |
So saving one is ok. as long as the dbg |
| 42 |
exists. */ |
| 43 |
struct Dwarf_Tied_Entry_s { |
| 44 |
Dwarf_Sig8 dt_key; |
| 45 |
Dwarf_CU_Context dt_context; |
| 46 |
}; |
| 47 |
|
| 48 |
int _dwarf_tied_compare_function(const void *l, const void *r); |
| 49 |
void * _dwarf_tied_make_entry(Dwarf_Sig8 *key, Dwarf_CU_Context val); |
| 50 |
DW_TSHASHTYPE _dwarf_tied_data_hashfunc(const void *keyp); |