9#include "clang/AST/DeclCXX.h"
33 if (type_flags.
AllClear(eTypeHasValue)) {
38 if (type_flags.
AllSet(eTypeIsPointer)) {
41 if (pointee_flags.
AllSet(eTypeIsPointer)) {
44 ptr_value = process_sp->ReadPointerFromMemory(ptr_value,
error);
64 size_t ptr_size = process_sp->GetAddressByteSize();
69 uint64_t code = process_sp->ReadUnsignedIntegerFromMemory(code_location,
75 process_sp->ReadPointerFromMemory(domain_location,
error);
79 if (!domain_str_value) {
80 stream.
Printf(
"domain: nil - code: %" PRIu64, code);
91 "domain_str", isw.
GetAsData(process_sp->GetByteOrder()),
100 !domain_str_summary.
Empty()) {
101 stream.
Printf(
"domain: %s - code: %" PRIu64, domain_str_summary.
GetData(),
105 stream.
Printf(
"domain: nil - code: %" PRIu64, code);
148 size_t ptr_size = process_sp->GetAddressByteSize();
150 userinfo_location += 4 * ptr_size;
153 process_sp->ReadPointerFromMemory(userinfo_location,
error);
162 "_userInfo", isw.
GetAsData(process_sp->GetByteOrder()),
172 if (name == g_userInfo)
201 if (!descriptor.get() || !descriptor->IsValid())
204 const char *class_name = descriptor->GetClassName().GetCString();
206 if (!class_name || !*class_name)
209 if (!strcmp(class_name,
"NSError"))
211 else if (!strcmp(class_name,
"__NSCFError"))
static llvm::raw_ostream & error(Stream &strm)
static lldb::addr_t DerefToNSErrorPointer(ValueObject &valobj)
llvm::Expected< uint32_t > CalculateNumChildren() override
lldb::ChildCacheState Update() override
This function is assumed to always succeed and if it fails, the front-end should know to deal with it...
ValueObject * m_child_ptr
bool MightHaveChildren() override
~NSErrorSyntheticFrontEnd() override=default
lldb::ValueObjectSP GetChildAtIndex(uint32_t idx) override
size_t GetIndexOfChildWithName(ConstString name) override
NSErrorSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
Generic representation of a type in a programming language.
CompilerType GetPointeeType() const
If this type is a pointer type, return the type that the pointer points to, else return an invalid ty...
uint32_t GetTypeInfo(CompilerType *pointee_or_element_compiler_type=nullptr) const
A uniqued constant string class.
bool AllClear(ValueType mask) const
Test if all bits in mask are clear.
bool AllSet(ValueType mask) const
Test if all bits in mask are 1 in the current flags.
std::shared_ptr< ClassDescriptor > ClassDescriptorSP
static ObjCLanguageRuntime * Get(Process &process)
virtual ClassDescriptorSP GetClassDescriptor(ValueObject &in_value)
static lldb::TypeSystemClangSP GetForTarget(Target &target, std::optional< IsolatedASTKind > ast_kind=DefaultAST, bool create_on_demand=true)
Returns the scratch TypeSystemClang for the given target.
const char * GetData() const
A stream class that can stream formatted output to a file.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
lldb::ValueObjectSP CreateValueObjectFromData(llvm::StringRef name, const DataExtractor &data, const ExecutionContext &exe_ctx, CompilerType type)
CompilerType GetCompilerType()
lldb::ValueObjectSP GetSP()
lldb::ProcessSP GetProcessSP() const
virtual uint64_t GetValueAsUnsigned(uint64_t fail_value, bool *success=nullptr)
static lldb::ValueObjectSP CreateValueObjectFromData(llvm::StringRef name, const DataExtractor &data, const ExecutionContext &exe_ctx, CompilerType type)
virtual bool IsBaseClass()
virtual ValueObject * GetParent()
const ExecutionContextRef & GetExecutionContextRef() const
#define LLDB_INVALID_ADDRESS
A class that represents a running process on the host machine.
ChildCacheState
Specifies if children need to be re-computed after a call to SyntheticChildrenFrontEnd::Update.
@ eRefetch
Children need to be recomputed dynamically.
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::TypeSystemClang > TypeSystemClangSP