v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::wasm::gdb_server::GdbServer Class Reference

#include <gdb-server.h>

Collaboration diagram for v8::internal::wasm::gdb_server::GdbServer:

Classes

class  DebugDelegate
 
struct  WasmModuleInfo
 

Public Member Functions

 GdbServer (const GdbServer &)=delete
 
GdbServeroperator= (const GdbServer &)=delete
 
 ~GdbServer ()
 
std::vector< WasmModuleInfoGetLoadedModules (bool clear_module_list_changed_flag=false)
 
bool HasModuleListChanged () const
 
bool GetWasmGlobal (uint32_t frame_index, uint32_t index, uint8_t *buffer, uint32_t buffer_size, uint32_t *size)
 
bool GetWasmLocal (uint32_t frame_index, uint32_t index, uint8_t *buffer, uint32_t buffer_size, uint32_t *size)
 
bool GetWasmStackValue (uint32_t frame_index, uint32_t index, uint8_t *buffer, uint32_t buffer_size, uint32_t *size)
 
uint32_t GetWasmMemory (uint32_t module_id, uint32_t offset, uint8_t *buffer, uint32_t size)
 
uint32_t GetWasmData (uint32_t module_id, uint32_t offset, uint8_t *buffer, uint32_t size)
 
uint32_t GetWasmModuleBytes (wasm_addr_t address, uint8_t *buffer, uint32_t size)
 
bool AddBreakpoint (uint32_t wasm_module_id, uint32_t offset)
 
bool RemoveBreakpoint (uint32_t wasm_module_id, uint32_t offset)
 
std::vector< wasm_addr_tGetWasmCallStack () const
 
void AddIsolate (Isolate *isolate)
 
void RemoveIsolate (Isolate *isolate)
 
void Suspend ()
 
void PrepareStep ()
 
void QuitMessageLoopOnPause ()
 
template<typename Functor >
auto RunSyncTask (Functor &&callback) const
 

Static Public Member Functions

static std::unique_ptr< GdbServerCreate ()
 

Private Types

typedef std::map< uint64_t, int > BreakpointsMap
 
typedef std::map< uint32_t, WasmModuleDebugScriptsMap
 
typedef std::map< Isolate *, std::unique_ptr< DebugDelegate > > IsolateDebugDelegateMap
 

Private Member Functions

 GdbServer ()
 
void RunMessageLoopOnPause ()
 
template<typename Callback >
auto RunSyncTask (Callback &&callback) const
 
void AddWasmModule (uint32_t module_id, Local< debug::WasmScript > wasm_script)
 
bool GetModuleDebugHandler (uint32_t module_id, WasmModuleDebug **wasm_module_debug)
 
TargetGetTarget () const
 

Private Attributes

std::unique_ptr< GdbServerThreadthread_
 
std::unique_ptr< TaskRunnertask_runner_
 
std::atomic< boolhas_module_list_changed_
 
BreakpointsMap breakpoints_
 
ScriptsMap scripts_
 
IsolateDebugDelegateMap isolate_delegates_
 

Detailed Description

Definition at line 25 of file gdb-server.h.

Member Typedef Documentation

◆ BreakpointsMap

Definition at line 197 of file gdb-server.h.

◆ IsolateDebugDelegateMap

Definition at line 204 of file gdb-server.h.

◆ ScriptsMap

Definition at line 200 of file gdb-server.h.

Constructor & Destructor Documentation

◆ GdbServer() [1/2]

v8::internal::wasm::gdb_server::GdbServer::GdbServer ( const GdbServer & )
delete

◆ ~GdbServer()

v8::internal::wasm::gdb_server::GdbServer::~GdbServer ( )

Definition at line 137 of file gdb-server.cc.

◆ GdbServer() [2/2]

v8::internal::wasm::gdb_server::GdbServer::GdbServer ( )
private

Definition at line 108 of file gdb-server.cc.

Here is the caller graph for this function:

Member Function Documentation

◆ AddBreakpoint()

bool v8::internal::wasm::gdb_server::GdbServer::AddBreakpoint ( uint32_t wasm_module_id,
uint32_t offset )

Definition at line 268 of file gdb-server.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddIsolate()

void v8::internal::wasm::gdb_server::GdbServer::AddIsolate ( Isolate * isolate)

Definition at line 316 of file gdb-server.cc.

◆ AddWasmModule()

void v8::internal::wasm::gdb_server::GdbServer::AddWasmModule ( uint32_t module_id,
Local< debug::WasmScript > wasm_script )
private

Definition at line 371 of file gdb-server.cc.

Here is the call graph for this function:

◆ Create()

std::unique_ptr< GdbServer > v8::internal::wasm::gdb_server::GdbServer::Create ( )
static

Definition at line 121 of file gdb-server.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetLoadedModules()

std::vector< GdbServer::WasmModuleInfo > v8::internal::wasm::gdb_server::GdbServer::GetLoadedModules ( bool clear_module_list_changed_flag = false)

Definition at line 152 of file gdb-server.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetModuleDebugHandler()

bool v8::internal::wasm::gdb_server::GdbServer::GetModuleDebugHandler ( uint32_t module_id,
WasmModuleDebug ** wasm_module_debug )
private

Definition at line 170 of file gdb-server.cc.

Here is the caller graph for this function:

◆ GetTarget()

Target & v8::internal::wasm::gdb_server::GdbServer::GetTarget ( ) const
private

Definition at line 386 of file gdb-server.cc.

Here is the caller graph for this function:

◆ GetWasmCallStack()

std::vector< wasm_addr_t > v8::internal::wasm::gdb_server::GdbServer::GetWasmCallStack ( ) const

Definition at line 306 of file gdb-server.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWasmData()

uint32_t v8::internal::wasm::gdb_server::GdbServer::GetWasmData ( uint32_t module_id,
uint32_t offset,
uint8_t * buffer,
uint32_t size )

Definition at line 239 of file gdb-server.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWasmGlobal()

bool v8::internal::wasm::gdb_server::GdbServer::GetWasmGlobal ( uint32_t frame_index,
uint32_t index,
uint8_t * buffer,
uint32_t buffer_size,
uint32_t * size )

Definition at line 182 of file gdb-server.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWasmLocal()

bool v8::internal::wasm::gdb_server::GdbServer::GetWasmLocal ( uint32_t frame_index,
uint32_t index,
uint8_t * buffer,
uint32_t buffer_size,
uint32_t * size )

Definition at line 196 of file gdb-server.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWasmMemory()

uint32_t v8::internal::wasm::gdb_server::GdbServer::GetWasmMemory ( uint32_t module_id,
uint32_t offset,
uint8_t * buffer,
uint32_t size )

Definition at line 224 of file gdb-server.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWasmModuleBytes()

uint32_t v8::internal::wasm::gdb_server::GdbServer::GetWasmModuleBytes ( wasm_addr_t address,
uint8_t * buffer,
uint32_t size )

Definition at line 254 of file gdb-server.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWasmStackValue()

bool v8::internal::wasm::gdb_server::GdbServer::GetWasmStackValue ( uint32_t frame_index,
uint32_t index,
uint8_t * buffer,
uint32_t buffer_size,
uint32_t * size )

Definition at line 210 of file gdb-server.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasModuleListChanged()

bool v8::internal::wasm::gdb_server::GdbServer::HasModuleListChanged ( ) const
inline

Definition at line 50 of file gdb-server.h.

Here is the caller graph for this function:

◆ operator=()

GdbServer & v8::internal::wasm::gdb_server::GdbServer::operator= ( const GdbServer & )
delete

◆ PrepareStep()

void v8::internal::wasm::gdb_server::GdbServer::PrepareStep ( )

Definition at line 359 of file gdb-server.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ QuitMessageLoopOnPause()

void v8::internal::wasm::gdb_server::GdbServer::QuitMessageLoopOnPause ( )

Definition at line 150 of file gdb-server.cc.

Here is the caller graph for this function:

◆ RemoveBreakpoint()

bool v8::internal::wasm::gdb_server::GdbServer::RemoveBreakpoint ( uint32_t wasm_module_id,
uint32_t offset )

Definition at line 285 of file gdb-server.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveIsolate()

void v8::internal::wasm::gdb_server::GdbServer::RemoveIsolate ( Isolate * isolate)

Definition at line 324 of file gdb-server.cc.

◆ RunMessageLoopOnPause()

void v8::internal::wasm::gdb_server::GdbServer::RunMessageLoopOnPause ( )
private

Definition at line 148 of file gdb-server.cc.

◆ RunSyncTask() [1/2]

template<typename Callback >
auto v8::internal::wasm::gdb_server::GdbServer::RunSyncTask ( Callback && callback) const
private
Here is the caller graph for this function:

◆ RunSyncTask() [2/2]

template<typename Functor >
auto v8::internal::wasm::gdb_server::GdbServer::RunSyncTask ( Functor && callback) const

Definition at line 113 of file gdb-server.cc.

Here is the call graph for this function:

◆ Suspend()

void v8::internal::wasm::gdb_server::GdbServer::Suspend ( )

Definition at line 340 of file gdb-server.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ breakpoints_

BreakpointsMap v8::internal::wasm::gdb_server::GdbServer::breakpoints_
private

Definition at line 198 of file gdb-server.h.

◆ has_module_list_changed_

std::atomic<bool> v8::internal::wasm::gdb_server::GdbServer::has_module_list_changed_
private

Definition at line 191 of file gdb-server.h.

◆ isolate_delegates_

IsolateDebugDelegateMap v8::internal::wasm::gdb_server::GdbServer::isolate_delegates_
private

Definition at line 205 of file gdb-server.h.

◆ scripts_

ScriptsMap v8::internal::wasm::gdb_server::GdbServer::scripts_
private

Definition at line 201 of file gdb-server.h.

◆ task_runner_

std::unique_ptr<TaskRunner> v8::internal::wasm::gdb_server::GdbServer::task_runner_
private

Definition at line 189 of file gdb-server.h.

◆ thread_

std::unique_ptr<GdbServerThread> v8::internal::wasm::gdb_server::GdbServer::thread_
private

Definition at line 185 of file gdb-server.h.


The documentation for this class was generated from the following files: