[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 22 20:25:05 PDT 2024
================
@@ -668,6 +699,32 @@ class ValueObject {
CreateValueObjectFromData(llvm::StringRef name, const DataExtractor &data,
const ExecutionContext &exe_ctx, CompilerType type);
+ static lldb::ValueObjectSP
----------------
cmtice wrote:
CreateValueObjectFromBytes was being called from CreateValueObjectfrom{APInt,Pointer,Bool,Nullptr}, receivng the pointer to the appropriate values in the input parameter, putting the bytes into a DataExtractor, then calling CreateValueObjectFromData with the DataExtractor. I thought that would handle things like correct endianness, etc. However, I will move the "putting the bytes into the DataExtractor" into the callers for CreateValueObjectFromBytes & call CreateValueObjectFromData directly from each of them. This leads to a bit of code duplication, but I can see that it's safer. (This eliminates the CreateValueObjectFromBytes functions altogether).
https://github.com/llvm/llvm-project/pull/87197
More information about the lldb-commits
mailing list