chromium/v8/test/cctest/test-debug-helper.cc

// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "include/v8-template.h"
#include "src/api/api-inl.h"
#include "src/debug/debug.h"
#include "src/execution/frames-inl.h"
#include "src/flags/flags.h"
#include "src/heap/read-only-spaces.h"
#include "test/cctest/cctest.h"
#include "tools/debug_helper/debug-helper.h"

namespace v8 {
namespace internal {

namespace {

d;

uintptr_t memory_fail_start =;
uintptr_t memory_fail_end =;

class MemoryFailureRegion {};

// Implement the memory-reading callback. This one just fetches memory from the
// current process, but a real implementation for a debugging extension would
// fetch memory from the debuggee process or crash dump.
d::MemoryAccessResult ReadMemory(uintptr_t address, void* destination,
                                 size_t byte_count) {}

void CheckPropBase(const d::PropertyBase& property, const char* expected_type,
                   const char* expected_name) {}

void CheckProp(const d::ObjectProperty& property, const char* expected_type,
               const char* expected_name,
               d::PropertyKind expected_kind = d::PropertyKind::kSingle,
               size_t expected_num_values = 1) {}

template <typename TValue>
void CheckProp(const d::ObjectProperty& property, const char* expected_type,
               const char* expected_name, TValue expected_value) {}

bool StartsWith(const std::string& full_string, const std::string& prefix) {}

bool Contains(const std::string& full_string, const std::string& substr) {}

void CheckStructProp(const d::StructProperty& property,
                     const char* expected_type, const char* expected_name,
                     size_t expected_offset, uint8_t expected_num_bits = 0,
                     uint8_t expected_shift_bits = 0) {}

const d::ObjectProperty& FindProp(const d::ObjectPropertiesResult& props,
                                  std::string name) {}

template <typename TValue>
TValue ReadProp(const d::ObjectPropertiesResult& props, std::string name) {}

// A simple implementation of ExternalStringResource that lets us control the
// result of IsCacheable().
class StringResource : public v8::String::ExternalStringResource {};

}  // namespace

class TestDebugHelper {};

TEST(GetObjectProperties) {}

static void FrameIterationCheck(
    v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) {}

THREADED_TEST(GetFrameStack) {}

TEST(SmallOrderedHashSetGetObjectProperties) {}

}  // namespace internal
}  // namespace v8