Better error reporting when a variable can't be
read during materialization. First of all, report
if we can't read the data for some reason. Second,
consult the ValueObject's error and report that if
there's some problem.
<rdar://problem/16074201>
llvm-svn: 202552
diff --git a/lldb/source/DataFormatters/LibCxxUnorderedMap.cpp b/lldb/source/DataFormatters/LibCxxUnorderedMap.cpp
index 05b41d0..99cd08e 100644
--- a/lldb/source/DataFormatters/LibCxxUnorderedMap.cpp
+++ b/lldb/source/DataFormatters/LibCxxUnorderedMap.cpp
@@ -83,7 +83,10 @@
StreamString stream;
stream.Printf("[%zu]",idx);
DataExtractor data;
- val_hash.first->GetData(data);
+ Error error;
+ val_hash.first->GetData(data, error);
+ if (error.Fail())
+ return lldb::ValueObjectSP();
const bool thread_and_frame_only_if_stopped = true;
ExecutionContext exe_ctx = val_hash.first->GetExecutionContextRef().Lock(thread_and_frame_only_if_stopped);
return val_hash.first->CreateValueObjectFromData(stream.GetData(),