[Lldb-commits] [PATCH] Allow MachO JIT debugging

Greg Clayton gclayton at apple.com
Thu Jun 5 09:37:19 PDT 2014


Can you explain a few things?:

- What is updateSectionLoadAddress(...) doing when it checks "if (section_sp->GetFileAddress() > 0x100000)"?
- Why are we preloading everything with the code:

                 // load the symbol table right away
                module_sp->GetObjectFile()->GetSymtab();

                module_sp->GetSymbolVendor()->GetNumCompileUnits();
                module_sp->GetSymbolVendor()->GetCompileUnitAtIndex(0);
                module_sp->ParseAllDebugSymbols();

This seems like we should just let it load things lazily. Parsing all debug symbols is not advised, it should be allowed to lazily parse the DWARF as it needs to.

- Your fix to ObjectFileMachO.cpp is not correct. If we have a process, then we load the symbol table from memory (the code in the "if (process)"), else we load it from the load commands (in the "else") and from the file itself. We don't want to always load the symbol table from the load commands as the symtab_load_command.symoff and symtab_load_command.stroff are not correct when a mach-o file is being read from memory.



> On Jun 3, 2014, at 9:46 AM, Keno Fischer <kfischer at college.harvard.edu> wrote:
> 
> This is the LLDB side of http://reviews.llvm.org/D4005
> 
> http://reviews.llvm.org/D4006
> 
> Files:
>  lib/Makefile
>  source/Core/Section.cpp
>  source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
>  source/Plugins/Makefile
>  source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
> <D4006.10055.patch>_______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits




More information about the lldb-commits mailing list