[Lldb-commits] [PATCH] D73148: [lldb/Value] Report size of Value as size of underlying data buffer
Vedant Kumar via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 22 15:07:48 PST 2020
vsk planned changes to this revision.
vsk added a comment.
In D73148#1832897 <https://reviews.llvm.org/D73148#1832897>, @clayborg wrote:
> Actually it would be nice to have a test that will trigger on at least one build bot that runs ASAN?
I'll add an end-to-end test for DW_OP_piece, though I worry it might be brittle.
As I was testing this more, I realized that CommandObjectFrameVariable may construct an empty Value and call GetValueByteSize on it. This patch breaks that code path because it makes the reported size 0 (instead of whatever GetCompilerType().GetByteSize() would be). I'm not sure what the best fix is. Some options:
1. Special-case 0-sized eValueTypeHostAddress Values, and fall back to the compiler type in this case.
2. Just make DW_OP_piece produce a type-sized buffer (by padding with zeroes when needed), as Greg suggested earlier.
Any advice appreciated. I'm leaning towards (1) as it's a simpler fix (and I've tested it out on an end-to-end example).
CHANGES SINCE LAST ACTION
More information about the lldb-commits