chromium/v8/src/wasm/wasm-debug.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/wasm/wasm-debug.h"

#include <iomanip>
#include <unordered_map>

#include "src/common/assert-scope.h"
#include "src/common/simd128.h"
#include "src/compiler/wasm-compiler.h"
#include "src/debug/debug-evaluate.h"
#include "src/debug/debug.h"
#include "src/execution/frames-inl.h"
#include "src/heap/factory.h"
#include "src/wasm/baseline/liftoff-compiler.h"
#include "src/wasm/baseline/liftoff-register.h"
#include "src/wasm/compilation-environment-inl.h"
#include "src/wasm/module-decoder.h"
#include "src/wasm/std-object-sizes.h"
#include "src/wasm/value-type.h"
#include "src/wasm/wasm-code-manager.h"
#include "src/wasm/wasm-engine.h"
#include "src/wasm/wasm-limits.h"
#include "src/wasm/wasm-module.h"
#include "src/wasm/wasm-objects-inl.h"
#include "src/wasm/wasm-opcodes-inl.h"
#include "src/wasm/wasm-subtyping.h"
#include "src/wasm/wasm-value.h"
#include "src/zone/accounting-allocator.h"

namespace v8 {
namespace internal {
namespace wasm {

namespace {

ImportExportKey;

enum ReturnLocation {};

Address FindNewPC(WasmFrame* frame, WasmCode* wasm_code, int byte_offset,
                  ReturnLocation return_location) {}

}  // namespace

void DebugSideTable::Print(std::ostream& os) const {}

void DebugSideTable::Entry::Print(std::ostream& os) const {}

size_t DebugSideTable::Entry::EstimateCurrentMemoryConsumption() const {}

size_t DebugSideTable::EstimateCurrentMemoryConsumption() const {}

class DebugInfoImpl {};

DebugInfo::DebugInfo(NativeModule* native_module)
    :{}

DebugInfo::~DebugInfo() = default;

int DebugInfo::GetNumLocals(Address pc, Isolate* isolate) {}

WasmValue DebugInfo::GetLocalValue(int local, Address pc, Address fp,
                                   Address debug_break_fp, Isolate* isolate) {}

int DebugInfo::GetStackDepth(Address pc, Isolate* isolate) {}

WasmValue DebugInfo::GetStackValue(int index, Address pc, Address fp,
                                   Address debug_break_fp, Isolate* isolate) {}

const wasm::WasmFunction& DebugInfo::GetFunctionAtAddress(Address pc,
                                                          Isolate* isolate) {}

void DebugInfo::SetBreakpoint(int func_index, int offset,
                              Isolate* current_isolate) {}

bool DebugInfo::PrepareStep(WasmFrame* frame) {}

void DebugInfo::PrepareStepOutTo(WasmFrame* frame) {}

void DebugInfo::ClearStepping(Isolate* isolate) {}

void DebugInfo::ClearStepping(WasmFrame* frame) {}

bool DebugInfo::IsStepping(WasmFrame* frame) {}

void DebugInfo::RemoveBreakpoint(int func_index, int offset,
                                 Isolate* current_isolate) {}

void DebugInfo::RemoveDebugSideTables(base::Vector<WasmCode* const> code) {}

DebugSideTable* DebugInfo::GetDebugSideTableIfExists(
    const WasmCode* code) const {}

void DebugInfo::RemoveIsolate(Isolate* isolate) {}

size_t DebugInfo::EstimateCurrentMemoryConsumption() const {}

}  // namespace wasm

namespace {

// Return the next breakable position at or after {offset_in_func} in function
// {func_index}, or 0 if there is none.
// Note that 0 is never a breakable position in wasm, since the first uint8_t
// contains the locals count for the function.
int FindNextBreakablePosition(wasm::NativeModule* native_module, int func_index,
                              int offset_in_func) {}

void SetBreakOnEntryFlag(Tagged<Script> script, bool enabled) {}
}  // namespace

// static
bool WasmScript::SetBreakPoint(DirectHandle<Script> script, int* position,
                               DirectHandle<BreakPoint> break_point) {}

// static
void WasmScript::SetInstrumentationBreakpoint(
    DirectHandle<Script> script, DirectHandle<BreakPoint> break_point) {}

// static
bool WasmScript::SetBreakPointOnFirstBreakableForFunction(
    DirectHandle<Script> script, int func_index,
    DirectHandle<BreakPoint> break_point) {}

// static
bool WasmScript::SetBreakPointForFunction(
    DirectHandle<Script> script, int func_index, int offset,
    DirectHandle<BreakPoint> break_point) {}

namespace {

int GetBreakpointPos(Isolate* isolate,
                     Tagged<Object> break_point_info_or_undef) {}

int FindBreakpointInfoInsertPos(Isolate* isolate,
                                DirectHandle<FixedArray> breakpoint_infos,
                                int position) {}

}  // namespace

// static
bool WasmScript::ClearBreakPoint(DirectHandle<Script> script, int position,
                                 DirectHandle<BreakPoint> break_point) {}

// static
bool WasmScript::ClearBreakPointById(DirectHandle<Script> script,
                                     int breakpoint_id) {}

// static
void WasmScript::ClearAllBreakpoints(Tagged<Script> script) {}

// static
void WasmScript::AddBreakpointToInfo(DirectHandle<Script> script, int position,
                                     DirectHandle<BreakPoint> break_point) {}

// static
bool WasmScript::GetPossibleBreakpoints(
    wasm::NativeModule* native_module, const v8::debug::Location& start,
    const v8::debug::Location& end,
    std::vector<v8::debug::BreakLocation>* locations) {}

namespace {

bool CheckBreakPoint(Isolate* isolate, DirectHandle<BreakPoint> break_point,
                     StackFrameId frame_id) {}

}  // namespace

// static
MaybeHandle<FixedArray> WasmScript::CheckBreakPoints(
    Isolate* isolate, DirectHandle<Script> script, int position,
    StackFrameId frame_id) {}

}  // namespace internal
}  // namespace v8