[Lldb-commits] [lldb] [LLDB][Value] Require type size when reading a scalar (PR #153386)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 14 06:34:35 PDT 2025


================
@@ -347,6 +347,9 @@ Status Value::GetValueAsData(ExecutionContext *exe_ctx, DataExtractor &data,
     else
       data.SetAddressByteSize(sizeof(void *));
 
+    if (!type_size)
+      return Status::FromErrorString("type does not have a size");
----------------
Michael137 wrote:

Might be missing something but I was thinking just testing `Value::GetValueAsData`. Which we could accomplish by creating a `Scalar`.

The PR I linked was fixing something for `ValueObject`, but did so by adjusting something in `Value`. Maybe that's where the confusion came from?

https://github.com/llvm/llvm-project/pull/153386


More information about the lldb-commits mailing list