[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 1 11:13:23 PDT 2024


================
@@ -618,6 +631,24 @@ class ValueObject {
   virtual lldb::ValueObjectSP CastPointerType(const char *name,
                                               lldb::TypeSP &type_sp);
 
+  /// Return the target load address assocaited with this value object.
+  lldb::addr_t GetLoadAddress();
+
+  lldb::ValueObjectSP CastDerivedToBaseType(CompilerType type,
+                                            const std::vector<uint32_t> &idx);
+
+  lldb::ValueObjectSP CastBaseToDerivedType(CompilerType type, uint64_t offset);
+
+  lldb::ValueObjectSP CastScalarToBasicType(CompilerType type, Status &error);
+
+  lldb::ValueObjectSP CastEnumToBasicType(CompilerType type);
+
+  lldb::ValueObjectSP CastPointerToBasicType(CompilerType type);
+
+  lldb::ValueObjectSP CastIntegerOrEnumToEnumType(CompilerType type);
+
+  lldb::ValueObjectSP CastFloatToEnumType(CompilerType type, Status &error);
----------------
bulbazord wrote:

Can you add some doxygen comments to these methods? It would help clarify the intent behind them as well as the purpose of some of the parameter (e.g. What does `idx` correspond to in `CastDerivedToBaseType`?)

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


More information about the lldb-commits mailing list