Commit 63777579 authored by Simon Marlow's avatar Simon Marlow

Linker: some extra debugging / logging

parent ee8d1fac
......@@ -1465,6 +1465,27 @@ void ghci_enquire(SymbolAddr* addr)
}
}
}
void ghci_find(SymbolAddr *addr);
void ghci_find(SymbolAddr *addr)
{
ObjectCode *oc;
uint32_t i;
for (oc = objects; oc != NULL; oc = oc->next) {
for (i = 0; i < (uint32_t)oc->n_sections; i++) {
Section *section = &oc->sections[i];
if (addr > section->start &&
(StgWord)addr < (StgWord)section->start+section->size) {
debugBelch("%p is in %" PATH_FMT, addr,
oc->archiveMemberName ?
oc->archiveMemberName : oc->fileName);
debugBelch(", section %d, offset %lx\n", i,
(StgWord)addr - (StgWord)section->start);
}
}
}
}
#endif
#if RTS_LINKER_USE_MMAP
......@@ -2537,6 +2558,10 @@ int ocTryLoad (ObjectCode* oc) {
}
}
IF_DEBUG(linker, debugBelch("Resolving %" PATH_FMT "\n",
oc->archiveMemberName ?
oc->archiveMemberName : oc->fileName));
# if defined(OBJFORMAT_ELF)
r = ocResolve_ELF ( oc );
# elif defined(OBJFORMAT_PEi386)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment