[Lldb-commits] [lldb] 8fb53dc - Improve materializer error messages to include type names.
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 11 17:59:09 PDT 2021
Author: Adrian Prantl
Date: 2021-06-11T17:59:00-07:00
New Revision: 8fb53dca2f61d2d15204ae0046339ee60b7f3b54
URL: https://github.com/llvm/llvm-project/commit/8fb53dca2f61d2d15204ae0046339ee60b7f3b54
DIFF: https://github.com/llvm/llvm-project/commit/8fb53dca2f61d2d15204ae0046339ee60b7f3b54.diff
LOG: Improve materializer error messages to include type names.
rdar://79201552
Added:
Modified:
lldb/source/Expression/Materializer.cpp
Removed:
################################################################################
diff --git a/lldb/source/Expression/Materializer.cpp b/lldb/source/Expression/Materializer.cpp
index a93c127dd0d0..3945f3a70f75 100644
--- a/lldb/source/Expression/Materializer.cpp
+++ b/lldb/source/Expression/Materializer.cpp
@@ -794,13 +794,15 @@ class EntityResultVariable : public Materializer::Entity {
llvm::Optional<uint64_t> byte_size = m_type.GetByteSize(exe_scope);
if (!byte_size) {
- err.SetErrorString("can't get size of type");
+ err.SetErrorStringWithFormat("can't get size of type \"%s\"",
+ m_type.GetTypeName().AsCString());
return;
}
llvm::Optional<size_t> opt_bit_align = m_type.GetTypeBitAlign(exe_scope);
if (!opt_bit_align) {
- err.SetErrorString("can't get the type alignment");
+ err.SetErrorStringWithFormat("can't get the alignment of type \"%s\"",
+ m_type.GetTypeName().AsCString());
return;
}
More information about the lldb-commits
mailing list