addr2line: Avoid a name collision.
The RB_ macros define functions with a parameter named head, and gcc warns about this. MFC with: r357450
This commit is contained in:
parent
3d62f685d5
commit
35beedae40
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357462
@ -87,7 +87,7 @@ static char unknown[] = { '?', '?', '\0' };
|
||||
static Dwarf_Addr section_base;
|
||||
/* Need a new curlopc that stores last lopc value. */
|
||||
static Dwarf_Unsigned curlopc = ~0ULL;
|
||||
static RB_HEAD(cutree, CU) head = RB_INITIALIZER(&head);
|
||||
static RB_HEAD(cutree, CU) cuhead = RB_INITIALIZER(&cuhead);
|
||||
|
||||
static int
|
||||
lopccmp(struct CU *e1, struct CU *e2)
|
||||
@ -397,14 +397,14 @@ culookup(Dwarf_Unsigned addr)
|
||||
struct CU find, *res;
|
||||
|
||||
find.lopc = addr;
|
||||
res = RB_NFIND(cutree, &head, &find);
|
||||
res = RB_NFIND(cutree, &cuhead, &find);
|
||||
if (res != NULL) {
|
||||
if (res->lopc != addr)
|
||||
res = RB_PREV(cutree, &head, res);
|
||||
res = RB_PREV(cutree, &cuhead, res);
|
||||
if (res != NULL && addr >= res->lopc && addr < res->hipc)
|
||||
return (res);
|
||||
} else {
|
||||
res = RB_MAX(cutree, &head);
|
||||
res = RB_MAX(cutree, &cuhead);
|
||||
if (res != NULL && addr >= res->lopc && addr < res->hipc)
|
||||
return (res);
|
||||
}
|
||||
@ -509,7 +509,7 @@ translate(Dwarf_Debug dbg, Elf *e, const char* addrstr)
|
||||
cu->hipc = hipc;
|
||||
cu->die = die;
|
||||
STAILQ_INIT(&cu->funclist);
|
||||
RB_INSERT(cutree, &head, cu);
|
||||
RB_INSERT(cutree, &cuhead, cu);
|
||||
|
||||
curlopc = lopc;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user