#include <optional>
#include <sstream>
#include "debug-helper-internal.h"
#include "heap-constants.h"
#include "include/v8-internal.h"
#include "src/execution/frame-constants.h"
#include "src/execution/frames.h"
#include "src/execution/isolate-utils.h"
#include "src/objects/string-inl.h"
#include "src/sandbox/external-pointer.h"
#include "src/strings/unicode-inl.h"
#include "torque-generated/class-debug-readers.h"
#include "torque-generated/debug-macros.h"
i;
namespace v8::internal::debug_helper_internal {
constexpr char kTaggedValue[] = …;
constexpr char kSmi[] = …;
constexpr char kHeapObject[] = …;
constexpr char kObjectAsStoredInHeap[] = …;
std::string AppendAddressAndType(const std::string& brief, uintptr_t address,
const char* type) { … }
std::string JoinWithSpace(const std::string& a, const std::string& b) { … }
struct TypedObject { … };
TypedObject GetTypedObjectByHint(uintptr_t address,
std::string type_hint_string) { … }
TypedObject GetTypedObjectForString(uintptr_t address, i::InstanceType type,
d::TypeCheckResult type_source) { … }
TypedObject GetTypedObjectByInstanceType(uintptr_t address,
i::InstanceType type,
d::TypeCheckResult type_source) { … }
bool IsTypedHeapObjectInstanceTypeOf(uintptr_t address,
d::MemoryAccessor accessor,
i::InstanceType instance_type) { … }
TypedObject GetTypedHeapObject(uintptr_t address, d::MemoryAccessor accessor,
const char* type_hint,
const d::HeapAddresses& heap_addresses) { … }
class ReadStringVisitor : public TqObjectVisitor { … };
class AddInfoVisitor : public TqObjectVisitor { … };
std::unique_ptr<ObjectPropertiesResult> GetHeapObjectPropertiesNotCompressed(
uintptr_t address, d::MemoryAccessor accessor, const char* type_hint,
const d::HeapAddresses& heap_addresses) { … }
std::unique_ptr<ObjectPropertiesResult> GetHeapObjectPropertiesMaybeCompressed(
uintptr_t address, d::MemoryAccessor memory_accessor,
d::HeapAddresses heap_addresses, const char* type_hint) { … }
std::unique_ptr<ObjectPropertiesResult> GetObjectProperties(
uintptr_t address, d::MemoryAccessor memory_accessor,
const d::HeapAddresses& heap_addresses, const char* type_hint) { … }
std::unique_ptr<StackFrameResult> GetStackFrame(
uintptr_t frame_pointer, d::MemoryAccessor memory_accessor) { … }
}
di;
extern "C" {
V8_DEBUG_HELPER_EXPORT d::ObjectPropertiesResult*
_v8_debug_helper_GetObjectProperties(uintptr_t object,
d::MemoryAccessor memory_accessor,
const d::HeapAddresses& heap_addresses,
const char* type_hint) { … }
V8_DEBUG_HELPER_EXPORT void _v8_debug_helper_Free_ObjectPropertiesResult(
d::ObjectPropertiesResult* result) { … }
V8_DEBUG_HELPER_EXPORT d::StackFrameResult* _v8_debug_helper_GetStackFrame(
uintptr_t frame_pointer, d::MemoryAccessor memory_accessor) { … }
V8_DEBUG_HELPER_EXPORT void _v8_debug_helper_Free_StackFrameResult(
d::StackFrameResult* result) { … }
}