summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Value.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Core/Value.cpp')
-rw-r--r--lldb/source/Core/Value.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/lldb/source/Core/Value.cpp b/lldb/source/Core/Value.cpp
index c2589f33a89..e602514ca38 100644
--- a/lldb/source/Core/Value.cpp
+++ b/lldb/source/Core/Value.cpp
@@ -425,7 +425,20 @@ Value::GetValueAsData (ExecutionContext *exe_ctx,
{
Address so_addr(address, objfile->GetSectionList());
addr_t load_address = so_addr.GetLoadAddress (exe_ctx->GetTargetPtr());
- if (load_address != LLDB_INVALID_ADDRESS)
+ bool process_launched_and_stopped = false;
+ if (exe_ctx->GetProcessPtr())
+ switch (exe_ctx->GetProcessPtr()->GetState())
+ {
+ default:
+ break;
+ case eStateInvalid:
+ case eStateSuspended:
+ case eStateCrashed:
+ case eStateStopped:
+ process_launched_and_stopped = true;
+ }
+ // Don't use the load address if the process has exited.
+ if (load_address != LLDB_INVALID_ADDRESS && process_launched_and_stopped)
{
resolved = true;
address = load_address;
OpenPOWER on IntegriCloud