summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2014-12-03 22:04:31 +0000
committerZachary Turner <zturner@google.com>2014-12-03 22:04:31 +0000
commitb3ff719b044142e8a7f2b847b710db3dabe092bc (patch)
tree8d71cf75c0b6629b9d12f982d3de1509c3d92b2a
parentc6a6653ebb59a40f1701bd757540cdaf1108c969 (diff)
downloadbcm5719-llvm-b3ff719b044142e8a7f2b847b710db3dabe092bc.tar.gz
bcm5719-llvm-b3ff719b044142e8a7f2b847b710db3dabe092bc.zip
Manually call ModulesDidLoad when the executable is loaded.
This is a temporary workaround to get deferred breakpoint resolution working until Bug 21720 is addressed. Even with this workaround, it will only resolve deferred breakpoints in the executable module, and not in a shared library. llvm-svn: 223273
-rw-r--r--lldb/source/Plugins/Process/Windows/ProcessWindows.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/Windows/ProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/ProcessWindows.cpp
index b19bfbd0077..22aa3b435f4 100644
--- a/lldb/source/Plugins/Process/Windows/ProcessWindows.cpp
+++ b/lldb/source/Plugins/Process/Windows/ProcessWindows.cpp
@@ -418,6 +418,11 @@ ProcessWindows::CanDebug(Target &target, bool plugin_specified_by_name)
void
ProcessWindows::OnExitProcess(uint32_t exit_code)
{
+ ModuleSP executable_module = GetTarget().GetExecutableModule();
+ ModuleList unloaded_modules;
+ unloaded_modules.Append(executable_module);
+ GetTarget().ModulesDidUnload(unloaded_modules, true);
+
SetProcessExitStatus(nullptr, GetID(), true, 0, exit_code);
SetPrivateState(eStateExited);
}
@@ -431,6 +436,12 @@ ProcessWindows::OnDebuggerConnected(lldb::addr_t image_base)
bool load_addr_changed;
module->SetLoadAddress(GetTarget(), image_base, false, load_addr_changed);
+ // Notify the target that the executable module has loaded. This will cause any pending
+ // breakpoints to be resolved to explicit brekapoint sites.
+ ModuleList loaded_modules;
+ loaded_modules.Append(module);
+ GetTarget().ModulesDidLoad(loaded_modules);
+
DebuggerThreadSP debugger = m_session_data->m_debugger;
const HostThreadWindows &wmain_thread = debugger->GetMainThread().GetNativeThread();
m_session_data->m_new_threads[wmain_thread.GetThreadId()] = debugger->GetMainThread();
OpenPOWER on IntegriCloud