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::Target Class Reference

#include <target.h>

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

Public Member Functions

 Target (GdbServer *gdb_server)
 
 Target (const Target &)=delete
 
Targetoperator= (const Target &)=delete
 
void Run (Session *ses)
 
void Terminate ()
 
bool IsTerminated () const
 
void OnProgramBreak (Isolate *isolate, const std::vector< wasm_addr_t > &call_frames)
 
void OnException (Isolate *isolate, const std::vector< wasm_addr_t > &call_frames)
 
const std::vector< wasm_addr_tGetCallStack () const
 
wasm_addr_t GetCurrentPc () const
 
IsolateGetCurrentIsolate () const
 

Private Types

enum class  ErrorCode { None = 0 , BadFormat = 1 , BadArgs = 2 , Failed = 3 }
 
enum class  ProcessPacketResult { Paused , Continue , Detach , Kill }
 
enum class  Status { Running , WaitingForSuspension , Suspended , Terminated }
 
typedef std::map< std::string, std::string > QueryPropertyMap
 

Private Member Functions

void OnSuspended (Isolate *isolate, int signal, const std::vector< wasm_addr_t > &call_frames)
 
void InitQueryPropertyMap ()
 
void WaitForDebugEvent ()
 
void ProcessDebugEvent ()
 
void ProcessCommands ()
 
void Suspend ()
 
ProcessPacketResult ProcessPacket (Packet *pkt_in, Packet *pkt_out)
 
ErrorCode ProcessQueryPacket (const Packet *pkt_in, Packet *pkt_out)
 
void SetStopReply (Packet *pkt_out) const
 
void SetStatus (Status status, int8_t signal=0, std::vector< wasm_addr_t > call_frames_={}, Isolate *isolate=nullptr)
 

Private Attributes

GdbServergdb_server_
 
std::atomic< Statusstatus_
 
std::atomic< int8_t > cur_signal_
 
Sessionsession_
 
QueryPropertyMap query_properties_
 
bool debugger_initial_suspension_
 
v8::base::Semaphore semaphore_
 
v8::base::Mutex mutex_
 
Isolatecurrent_isolate_
 
std::vector< wasm_addr_tcall_frames_
 

Detailed Description

Definition at line 27 of file target.h.

Member Typedef Documentation

◆ QueryPropertyMap

std::map<std::string, std::string> v8::internal::wasm::gdb_server::Target::QueryPropertyMap
private

Definition at line 113 of file target.h.

Member Enumeration Documentation

◆ ErrorCode

Enumerator
None 
BadFormat 
BadArgs 
Failed 

Definition at line 75 of file target.h.

◆ ProcessPacketResult

Enumerator
Paused 
Continue 
Detach 
Kill 

Definition at line 77 of file target.h.

◆ Status

Enumerator
Running 
WaitingForSuspension 
Suspended 
Terminated 

Definition at line 96 of file target.h.

Constructor & Destructor Documentation

◆ Target() [1/2]

v8::internal::wasm::gdb_server::Target::Target ( GdbServer * gdb_server)
explicit

Definition at line 26 of file target.cc.

Here is the call graph for this function:

◆ Target() [2/2]

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

Member Function Documentation

◆ GetCallStack()

const std::vector< wasm_addr_t > v8::internal::wasm::gdb_server::Target::GetCallStack ( ) const

Definition at line 685 of file target.cc.

Here is the caller graph for this function:

◆ GetCurrentIsolate()

Isolate * v8::internal::wasm::gdb_server::Target::GetCurrentIsolate ( ) const
inline

Definition at line 51 of file target.h.

◆ GetCurrentPc()

wasm_addr_t v8::internal::wasm::gdb_server::Target::GetCurrentPc ( ) const

Definition at line 691 of file target.cc.

Here is the caller graph for this function:

◆ InitQueryPropertyMap()

void v8::internal::wasm::gdb_server::Target::InitQueryPropertyMap ( )
private

Definition at line 37 of file target.cc.

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

◆ IsTerminated()

bool v8::internal::wasm::gdb_server::Target::IsTerminated ( ) const
inline

Definition at line 38 of file target.h.

Here is the caller graph for this function:

◆ OnException()

void v8::internal::wasm::gdb_server::Target::OnException ( Isolate * isolate,
const std::vector< wasm_addr_t > & call_frames )

Definition at line 71 of file target.cc.

Here is the call graph for this function:

◆ OnProgramBreak()

void v8::internal::wasm::gdb_server::Target::OnProgramBreak ( Isolate * isolate,
const std::vector< wasm_addr_t > & call_frames )

Definition at line 67 of file target.cc.

Here is the call graph for this function:

◆ OnSuspended()

void v8::internal::wasm::gdb_server::Target::OnSuspended ( Isolate * isolate,
int signal,
const std::vector< wasm_addr_t > & call_frames )
private

Definition at line 75 of file target.cc.

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

◆ operator=()

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

◆ ProcessCommands()

void v8::internal::wasm::gdb_server::Target::ProcessCommands ( )
private

Definition at line 152 of file target.cc.

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

◆ ProcessDebugEvent()

void v8::internal::wasm::gdb_server::Target::ProcessDebugEvent ( )
private

Definition at line 113 of file target.cc.

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

◆ ProcessPacket()

Target::ProcessPacketResult v8::internal::wasm::gdb_server::Target::ProcessPacket ( Packet * pkt_in,
Packet * pkt_out )
private

Definition at line 204 of file target.cc.

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

◆ ProcessQueryPacket()

Target::ErrorCode v8::internal::wasm::gdb_server::Target::ProcessQueryPacket ( const Packet * pkt_in,
Packet * pkt_out )
private

Definition at line 453 of file target.cc.

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

◆ Run()

void v8::internal::wasm::gdb_server::Target::Run ( Session * ses)

Definition at line 91 of file target.cc.

Here is the call graph for this function:

◆ SetStatus()

void v8::internal::wasm::gdb_server::Target::SetStatus ( Status status,
int8_t signal = 0,
std::vector< wasm_addr_t > call_frames_ = {},
Isolate * isolate = nullptr )
private

Definition at line 670 of file target.cc.

Here is the caller graph for this function:

◆ SetStopReply()

void v8::internal::wasm::gdb_server::Target::SetStopReply ( Packet * pkt_out) const
private

Definition at line 650 of file target.cc.

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

◆ Suspend()

void v8::internal::wasm::gdb_server::Target::Suspend ( )
private

Definition at line 135 of file target.cc.

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

◆ Terminate()

void v8::internal::wasm::gdb_server::Target::Terminate ( )

Definition at line 62 of file target.cc.

Here is the call graph for this function:

◆ WaitForDebugEvent()

void v8::internal::wasm::gdb_server::Target::WaitForDebugEvent ( )
private

Definition at line 102 of file target.cc.

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

Member Data Documentation

◆ call_frames_

std::vector<wasm_addr_t> v8::internal::wasm::gdb_server::Target::call_frames_
private

Definition at line 131 of file target.h.

◆ cur_signal_

std::atomic<int8_t> v8::internal::wasm::gdb_server::Target::cur_signal_
private

Definition at line 107 of file target.h.

◆ current_isolate_

Isolate* v8::internal::wasm::gdb_server::Target::current_isolate_
private

Definition at line 128 of file target.h.

◆ debugger_initial_suspension_

bool v8::internal::wasm::gdb_server::Target::debugger_initial_suspension_
private

Definition at line 116 of file target.h.

◆ gdb_server_

GdbServer* v8::internal::wasm::gdb_server::Target::gdb_server_
private

Definition at line 102 of file target.h.

◆ mutex_

v8::base::Mutex v8::internal::wasm::gdb_server::Target::mutex_
mutableprivate

Definition at line 121 of file target.h.

◆ query_properties_

QueryPropertyMap v8::internal::wasm::gdb_server::Target::query_properties_
private

Definition at line 114 of file target.h.

◆ semaphore_

v8::base::Semaphore v8::internal::wasm::gdb_server::Target::semaphore_
private

Definition at line 119 of file target.h.

◆ session_

Session* v8::internal::wasm::gdb_server::Target::session_
private

Definition at line 110 of file target.h.

◆ status_

std::atomic<Status> v8::internal::wasm::gdb_server::Target::status_
private

Definition at line 104 of file target.h.


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