[commit: ghc] master: rts/MachO: Add a bit more debugging output to getNames (9e0a23b)
git at git.haskell.org
git at git.haskell.org
Thu Nov 22 21:05:09 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/9e0a23b95c285c4019fd2d36102374ee582f1dcb/ghc
>---------------------------------------------------------------
commit 9e0a23b95c285c4019fd2d36102374ee582f1dcb
Author: Dario Bertini <berdario at google.com>
Date: Fri Nov 16 15:46:54 2018 +0100
rts/MachO: Add a bit more debugging output to getNames
>---------------------------------------------------------------
9e0a23b95c285c4019fd2d36102374ee582f1dcb
rts/linker/MachO.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/rts/linker/MachO.c b/rts/linker/MachO.c
index e28d173..46fb657 100644
--- a/rts/linker/MachO.c
+++ b/rts/linker/MachO.c
@@ -1613,14 +1613,17 @@ ocGetNames_MachO(ObjectCode* oc)
"ocGetNames_MachO(oc->symbols)");
if (oc->info->symCmd) {
+ debugBelch("ocGetNames_MachO: %d macho symbols\n", oc->info->n_macho_symbols);
for (size_t i = 0; i < oc->info->n_macho_symbols; i++) {
+ SymbolName* nm = oc->info->macho_symbols[i].name;
if(oc->info->nlist[i].n_type & N_STAB)
- ;
+ {
+ IF_DEBUG(linker, debugBelch("ocGetNames_MachO: Skip STAB: %s\n", nm));
+ }
else if((oc->info->nlist[i].n_type & N_TYPE) == N_SECT)
{
if(oc->info->nlist[i].n_type & N_EXT)
{
- SymbolName* nm = oc->info->macho_symbols[i].name;
if ( (oc->info->nlist[i].n_desc & N_WEAK_DEF)
&& lookupSymbol_(nm)) {
// weak definition, and we already have a definition
@@ -1644,12 +1647,12 @@ ocGetNames_MachO(ObjectCode* oc)
}
else
{
- IF_DEBUG(linker, debugBelch("ocGetNames_MachO: \t...not external, skipping\n"));
+ IF_DEBUG(linker, debugBelch("ocGetNames_MachO: \t...not external, skipping %s\n", nm));
}
}
else
{
- IF_DEBUG(linker, debugBelch("ocGetNames_MachO: \t...not defined in this section, skipping\n"));
+ IF_DEBUG(linker, debugBelch("ocGetNames_MachO: \t...not defined in this section, skipping %s\n", nm));
}
}
}
More information about the ghc-commits
mailing list