[Lldb-commits] [PATCH] D145629: When a ValueObjectDynamicValue fails to update, return a not valid ValueObject so the static one is used instead

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 8 16:29:19 PST 2023


jingham created this revision.
jingham added reviewers: JDevlieghere, kastiglione, mib, delcypher.
Herald added a project: All.
jingham requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

When we can't find a valid type for a dynamic value (for instance we just have a void * and can't compute anything for it) we used to try to hand out a dynamic value that "behaves like the static value".  That mostly works, but getting something to behave like ValueObjectConstResult without being it didn't work - for instance AddressOf fails for this DynamicValue.

The comment before this section of code mentions that we might should return an invalid dynamic value instead, so that the static one would get used.  I switched over to that, and I just needed to fix up a few cases where we were handing out a dynamic value w/o making sure it was valid first.  That ends up being much simpler than trying to get this ValueObjectDynamicValue to be "just like" ValueObjectConstResult.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145629

Files:
  lldb/source/Core/ValueObject.cpp
  lldb/source/Core/ValueObjectConstResult.cpp
  lldb/source/Core/ValueObjectDynamicValue.cpp
  lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
  lldb/test/API/python_api/value/addr_of_void_star/Makefile
  lldb/test/API/python_api/value/addr_of_void_star/TestValueAPIAddressOfVoidStar.py
  lldb/test/API/python_api/value/addr_of_void_star/main.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145629.503554.patch
Type: text/x-patch
Size: 5591 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230309/c8d530f3/attachment.bin>


More information about the lldb-commits mailing list