diff options
author | Johnny Chen <johnny.chen@apple.com> | 2012-02-02 19:55:18 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2012-02-02 19:55:18 +0000 |
commit | fd72fbef4138fa69f1910022e5f69f36af9ab32e (patch) | |
tree | 3a82d364fa6bb2961063c5f02d95035e324f02c2 /lldb/source/Core/Value.cpp | |
parent | b6d6508b1651bf19c8d8467f1c86e45854148ca3 (diff) | |
download | bcm5719-llvm-fd72fbef4138fa69f1910022e5f69f36af9ab32e.tar.gz bcm5719-llvm-fd72fbef4138fa69f1910022e5f69f36af9ab32e.zip |
For processes which are not in one of the "launched and stopped" state, 'target variable' command
should use Target::ReadMemory() call to read from the file section offset address.
Also remove the @expectedFailure decorator..
'target variable' command fails if the target program has been run
rdar://problem/9763907
llvm-svn: 149629
Diffstat (limited to 'lldb/source/Core/Value.cpp')
-rw-r--r-- | lldb/source/Core/Value.cpp | 15 |
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; |