chromium/v8/test/cctest/wasm/test-wasm-breakpoints.cc

// Copyright 2016 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 "src/codegen/assembler-inl.h"
#include "src/debug/debug-interface.h"
#include "src/execution/frames-inl.h"
#include "src/objects/property-descriptor.h"
#include "src/utils/utils.h"
#include "src/wasm/wasm-debug.h"
#include "src/wasm/wasm-objects-inl.h"
#include "test/cctest/cctest.h"
#include "test/cctest/wasm/wasm-run-utils.h"
#include "test/common/value-helper.h"
#include "test/common/wasm/test-signatures.h"
#include "test/common/wasm/wasm-macro-gen.h"

namespace v8 {
namespace internal {
namespace wasm {

namespace {

debug::Location TranslateLocation(WasmRunnerBase* runner,
                                  const debug::Location& loc) {}

void CheckLocations(
    WasmRunnerBase* runner, NativeModule* native_module, debug::Location start,
    debug::Location end,
    std::initializer_list<debug::Location> expected_locations_init) {}

void CheckLocationsFail(WasmRunnerBase* runner, NativeModule* native_module,
                        debug::Location start, debug::Location end) {}

class BreakHandler : public debug::DebugDelegate {};

Handle<BreakPoint> SetBreakpoint(WasmRunnerBase* runner, int function_index,
                                 int byte_offset,
                                 int expected_set_byte_offset = -1) {}

void ClearBreakpoint(WasmRunnerBase* runner, int function_index,
                     int byte_offset, DirectHandle<BreakPoint> break_point) {}

// Wrapper with operator<<.
struct WasmValWrapper {};

// Only needed in debug builds. Avoid unused warning otherwise.
#ifdef DEBUG
std::ostream& operator<<(std::ostream& out, const WasmValWrapper& wrapper) {}
#endif

class CollectValuesBreakHandler : public debug::DebugDelegate {};

// Special template to explicitly cast to WasmValue.
template <typename Arg>
WasmValue MakeWasmVal(Arg arg) {}
// Translate long to i64 (ambiguous otherwise).
template <>
WasmValue MakeWasmVal(long arg) {}

template <typename... Args>
std::vector<WasmValue> wasmVec(Args... args) {}

int GetIntReturnValue(MaybeHandle<Object> retval) {}

}  // namespace

WASM_COMPILED_EXEC_TEST(WasmCollectPossibleBreakpoints) {}

WASM_COMPILED_EXEC_TEST(WasmSimpleBreak) {}

WASM_COMPILED_EXEC_TEST(WasmNonBreakablePosition) {}

WASM_COMPILED_EXEC_TEST(WasmSimpleStepping) {}

WASM_COMPILED_EXEC_TEST(WasmStepInAndOut) {}

WASM_COMPILED_EXEC_TEST(WasmGetLocalsAndStack) {}

WASM_COMPILED_EXEC_TEST(WasmRemoveBreakPoint) {}

WASM_COMPILED_EXEC_TEST(WasmRemoveLastBreakPoint) {}

WASM_COMPILED_EXEC_TEST(WasmRemoveAllBreakPoint) {}

WASM_COMPILED_EXEC_TEST(WasmBreakInPostMVP) {}

WASM_COMPILED_EXEC_TEST(Regress10889) {}

}  // namespace wasm
}  // namespace internal
}  // namespace v8