summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/FormatEntity.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-11-18 06:34:45 +0000
committerZachary Turner <zturner@google.com>2016-11-18 06:34:45 +0000
commit655c4525346dc1440dae23db47717cda1d00d29b (patch)
treee966092d61ca7ef54153eb2087231e69dc68fd2e /lldb/source/Core/FormatEntity.cpp
parent12450b20b4c3a5d3864236c43b90e295d780e92e (diff)
downloadbcm5719-llvm-655c4525346dc1440dae23db47717cda1d00d29b.tar.gz
bcm5719-llvm-655c4525346dc1440dae23db47717cda1d00d29b.zip
Revert "Remove an out param from ValueObject::GetValueForExpressionPath."
This reverts commit r287315, as it introduces a bug that breaks many things. llvm-svn: 287320
Diffstat (limited to 'lldb/source/Core/FormatEntity.cpp')
-rw-r--r--lldb/source/Core/FormatEntity.cpp42
1 files changed, 24 insertions, 18 deletions
diff --git a/lldb/source/Core/FormatEntity.cpp b/lldb/source/Core/FormatEntity.cpp
index f9da3f7a707..4d85c3686c2 100644
--- a/lldb/source/Core/FormatEntity.cpp
+++ b/lldb/source/Core/FormatEntity.cpp
@@ -614,6 +614,7 @@ static ValueObjectSP ExpandIndexedExpression(ValueObject *valobj, size_t index,
if (log)
log->Printf("[ExpandIndexedExpression] name to deref: %s",
ptr_deref_buffer.c_str());
+ const char *first_unparsed;
ValueObject::GetValueForExpressionPathOptions options;
ValueObject::ExpressionPathEndResultType final_value_type;
ValueObject::ExpressionPathScanEndReason reason_to_stop;
@@ -621,18 +622,20 @@ static ValueObjectSP ExpandIndexedExpression(ValueObject *valobj, size_t index,
(deref_pointer ? ValueObject::eExpressionPathAftermathDereference
: ValueObject::eExpressionPathAftermathNothing);
ValueObjectSP item = valobj->GetValueForExpressionPath(
- ptr_deref_buffer.c_str(), &reason_to_stop, &final_value_type, options,
- &what_next);
+ ptr_deref_buffer.c_str(), &first_unparsed, &reason_to_stop,
+ &final_value_type, options, &what_next);
if (!item) {
if (log)
- log->Printf("[ExpandIndexedExpression] ERROR: why stopping = %d,"
+ log->Printf("[ExpandIndexedExpression] ERROR: unparsed portion = %s, why "
+ "stopping = %d,"
" final_value_type %d",
- reason_to_stop, final_value_type);
+ first_unparsed, reason_to_stop, final_value_type);
} else {
if (log)
- log->Printf("[ExpandIndexedExpression] ALL RIGHT: why stopping = %d, "
- "final_value_type %d",
- reason_to_stop, final_value_type);
+ log->Printf("[ExpandIndexedExpression] ALL RIGHT: unparsed portion = %s, "
+ "why stopping = %d,"
+ " final_value_type %d",
+ first_unparsed, reason_to_stop, final_value_type);
}
return item;
}
@@ -721,6 +724,7 @@ static bool DumpValue(Stream &s, const SymbolContext *sc,
int64_t index_lower = -1;
int64_t index_higher = -1;
bool is_array_range = false;
+ const char *first_unparsed;
bool was_plain_var = false;
bool was_var_format = false;
bool was_var_indexed = false;
@@ -758,23 +762,25 @@ static bool DumpValue(Stream &s, const SymbolContext *sc,
log->Printf("[Debugger::FormatPrompt] symbol to expand: %s",
expr_path.c_str());
- target =
- valobj
- ->GetValueForExpressionPath(expr_path.c_str(), &reason_to_stop,
- &final_value_type, options, &what_next)
- .get();
+ target = valobj
+ ->GetValueForExpressionPath(expr_path.c_str(), &first_unparsed,
+ &reason_to_stop, &final_value_type,
+ options, &what_next)
+ .get();
if (!target) {
if (log)
- log->Printf("[Debugger::FormatPrompt] ERROR: expr = %s, "
- "why stopping = %d, final_value_type %d",
- expr_path.c_str(), reason_to_stop, final_value_type);
+ log->Printf("[Debugger::FormatPrompt] ERROR: unparsed portion = %s, "
+ "why stopping = %d,"
+ " final_value_type %d",
+ first_unparsed, reason_to_stop, final_value_type);
return false;
} else {
if (log)
- log->Printf("[Debugger::FormatPrompt] ALL RIGHT: expr = %s, "
- "why stopping = %d, final_value_type %d",
- expr_path.c_str(), reason_to_stop, final_value_type);
+ log->Printf("[Debugger::FormatPrompt] ALL RIGHT: unparsed portion = "
+ "%s, why stopping = %d,"
+ " final_value_type %d",
+ first_unparsed, reason_to_stop, final_value_type);
target = target
->GetQualifiedRepresentationIfAvailable(
target->GetDynamicValueType(), true)
OpenPOWER on IntegriCloud