diff options
author | Enrico Granata <granata.enrico@gmail.com> | 2011-08-02 17:27:39 +0000 |
---|---|---|
committer | Enrico Granata <granata.enrico@gmail.com> | 2011-08-02 17:27:39 +0000 |
commit | c3e320a7a0ccf754bd9e4ec0cac252845d5a24d2 (patch) | |
tree | ffc06a5a8545d9043ff96ee8cd576a84238d1cfe /lldb/source/Core/Debugger.cpp | |
parent | 9ab728bb058429358fc1aba008e2d32c71106240 (diff) | |
download | bcm5719-llvm-c3e320a7a0ccf754bd9e4ec0cac252845d5a24d2.tar.gz bcm5719-llvm-c3e320a7a0ccf754bd9e4ec0cac252845d5a24d2.zip |
Fixed a bug where a variable could not be formatted in a summary if its datatype already had a custom format
Fixed a bug where Objective-C variables coming out of the expression parser could crash the Python synthetic providers:
- expression parser output has a "frozen data" component, which is a byte-exact copy of the value (in host memory),
if trying to read into memory based on the host address, LLDB would crash. we are now passing the correct (target)
pointer to the Python code
Objective-C "id" variables are now formatted according to their dynamic type, if the -d option to frame variable is used:
- Code based on the Objective-C 2.0 runtime is used to obtain this information without running code on the target
llvm-svn: 136695
Diffstat (limited to 'lldb/source/Core/Debugger.cpp')
-rw-r--r-- | lldb/source/Core/Debugger.cpp | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index a217ddb36ec..9442600a4d7 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -1010,22 +1010,35 @@ Debugger::FormatPrompt if (!vobj) break; + if (log) + log->Printf("initial string: %s",var_name_begin); + // check for *var and *svar if (*var_name_begin == '*') { do_deref_pointer = true; var_name_begin++; } + + if (log) + log->Printf("initial string: %s",var_name_begin); + if (*var_name_begin == 's') { vobj = vobj->GetSyntheticValue(lldb::eUseSyntheticFilter).get(); var_name_begin++; } + if (log) + log->Printf("initial string: %s",var_name_begin); + // should be a 'v' by now if (*var_name_begin != 'v') break; + if (log) + log->Printf("initial string: %s",var_name_begin); + ValueObject::ExpressionPathAftermath what_next = (do_deref_pointer ? ValueObject::eDereference : ValueObject::eNothing); ValueObject::GetValueForExpressionPathOptions options; @@ -1765,9 +1778,9 @@ Debugger::Formatting::ForceUpdate() } bool -Debugger::Formatting::ValueFormats::Get(ValueObject& vobj, ValueFormat::SharedPointer &entry) +Debugger::Formatting::ValueFormats::Get(ValueObject& vobj, lldb::DynamicValueType use_dynamic, ValueFormat::SharedPointer &entry) { - return GetFormatManager().Value().Get(vobj,entry); + return GetFormatManager().Value().Get(vobj,entry, use_dynamic); } void @@ -1808,15 +1821,17 @@ Debugger::Formatting::ValueFormats::GetCount() bool Debugger::Formatting::GetSummaryFormat(ValueObject& vobj, + lldb::DynamicValueType use_dynamic, lldb::SummaryFormatSP& entry) { - return GetFormatManager().Get(vobj, entry); + return GetFormatManager().Get(vobj, entry, use_dynamic); } bool Debugger::Formatting::GetSyntheticFilter(ValueObject& vobj, + lldb::DynamicValueType use_dynamic, lldb::SyntheticChildrenSP& entry) { - return GetFormatManager().Get(vobj, entry); + return GetFormatManager().Get(vobj, entry, use_dynamic); } bool |