#ifndef V8_TOOLS_DEBUG_HELPER_DEBUG_HELPER_H_
#define V8_TOOLS_DEBUG_HELPER_DEBUG_HELPER_H_
#include <cstdint>
#include <memory>
#if defined(_WIN32)
#ifdef BUILDING_V8_DEBUG_HELPER
#define V8_DEBUG_HELPER_EXPORT …
#elif USING_V8_DEBUG_HELPER
#define V8_DEBUG_HELPER_EXPORT …
#else
#define V8_DEBUG_HELPER_EXPORT
#endif
#else
#ifdef BUILDING_V8_DEBUG_HELPER
#define V8_DEBUG_HELPER_EXPORT …
#else
#define V8_DEBUG_HELPER_EXPORT
#endif
#endif
namespace v8 {
namespace debug_helper {
enum class MemoryAccessResult { … };
enum class TypeCheckResult { … };
enum class PropertyKind { … };
struct PropertyBase { … };
struct StructProperty : public PropertyBase { … };
struct ObjectProperty : public PropertyBase { … };
struct ObjectPropertiesResult { … };
struct StackFrameResult { … };
MemoryAccessor;
struct HeapAddresses { … };
}
}
extern "C" {
V8_DEBUG_HELPER_EXPORT v8::debug_helper::ObjectPropertiesResult*
_v8_debug_helper_GetObjectProperties(
uintptr_t object, v8::debug_helper::MemoryAccessor memory_accessor,
const v8::debug_helper::HeapAddresses& heap_addresses,
const char* type_hint);
V8_DEBUG_HELPER_EXPORT void _v8_debug_helper_Free_ObjectPropertiesResult(
v8::debug_helper::ObjectPropertiesResult* result);
V8_DEBUG_HELPER_EXPORT v8::debug_helper::StackFrameResult*
_v8_debug_helper_GetStackFrame(
uintptr_t frame_pointer, v8::debug_helper::MemoryAccessor memory_accessor);
V8_DEBUG_HELPER_EXPORT void _v8_debug_helper_Free_StackFrameResult(
v8::debug_helper::StackFrameResult* result);
V8_DEBUG_HELPER_EXPORT const char* _v8_debug_helper_BitsetName(
uint64_t payload);
}
namespace v8 {
namespace debug_helper {
struct DebugHelperObjectPropertiesResultDeleter { … };
ObjectPropertiesResultPtr;
inline ObjectPropertiesResultPtr GetObjectProperties(
uintptr_t object, v8::debug_helper::MemoryAccessor memory_accessor,
const HeapAddresses& heap_addresses, const char* type_hint = nullptr) { … }
inline const char* BitsetName(uint64_t payload) { … }
struct DebugHelperStackFrameResultDeleter { … };
StackFrameResultPtr;
inline StackFrameResultPtr GetStackFrame(
uintptr_t frame_pointer, v8::debug_helper::MemoryAccessor memory_accessor) { … }
}
}
#endif