diff options
| author | Greg Clayton <gclayton@apple.com> | 2015-02-05 02:01:34 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2015-02-05 02:01:34 +0000 |
| commit | 08928f308b0a7a738e1e9a14d0531db00cd8bf15 (patch) | |
| tree | 8a94b0942755d08569e2d97d01ac5ce13f76241f /lldb/source/Core/Module.cpp | |
| parent | 50ad72705182f9313578c587d6142e9d92dbe964 (diff) | |
| download | bcm5719-llvm-08928f308b0a7a738e1e9a14d0531db00cd8bf15.tar.gz bcm5719-llvm-08928f308b0a7a738e1e9a14d0531db00cd8bf15.zip | |
Don't wait for the dynamic loader to set a module as a dynamic link editor, figure it out through the ObjectFile.
Background: dyld binaries often have extra symbols in their symbol table like "malloc" and "free" for the early bringup of dyld and we often don't want to set breakpoints in dynamic linker binaries. We also don't want to call the "malloc" or "free" function in dyld when a user writes an expression like "(void *)malloc(123)" so we need to avoid doing name lookups in dyld. We mark Modules as being dynamic link editors and this helps do correct lookups for breakpoints by name and function lookups.
<rdar://problem/19716267>
llvm-svn: 228261
Diffstat (limited to 'lldb/source/Core/Module.cpp')
| -rw-r--r-- | lldb/source/Core/Module.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index 1672eed8fb9..891bd87a20d 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -152,7 +152,6 @@ Module::Module (const ModuleSpec &module_spec) : m_did_load_symbol_vendor (false), m_did_parse_uuid (false), m_did_init_ast (false), - m_is_dynamic_loader_module (false), m_file_has_changed (false), m_first_file_changed_log (false) { @@ -257,7 +256,6 @@ Module::Module(const FileSpec& file_spec, m_did_load_symbol_vendor (false), m_did_parse_uuid (false), m_did_init_ast (false), - m_is_dynamic_loader_module (false), m_file_has_changed (false), m_first_file_changed_log (false) { @@ -304,7 +302,6 @@ Module::Module () : m_did_load_symbol_vendor (false), m_did_parse_uuid (false), m_did_init_ast (false), - m_is_dynamic_loader_module (false), m_file_has_changed (false), m_first_file_changed_log (false) { @@ -1825,3 +1822,13 @@ Module::CreateJITModule (const lldb::ObjectFileJITDelegateSP &delegate_sp) return ModuleSP(); } +bool +Module::GetIsDynamicLinkEditor() +{ + ObjectFile * obj_file = GetObjectFile (); + + if (obj_file) + return obj_file->GetIsDynamicLinkEditor(); + + return false; +} |

