mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-08 20:56:13 +00:00
debug_engine: Fix a few typos (#1261)
no functional changes are intended. cf. https://sourceware.org/gdb/onlinedocs/gdb/General-Query-Packets.html#General-Query-Packets
This commit is contained in:
parent
2b49a0b817
commit
653efecd02
|
@ -1201,11 +1201,11 @@ wasm_debug_instance_get_global(WASMDebugInstance *instance, int32 frame_index,
|
||||||
|
|
||||||
uint64
|
uint64
|
||||||
wasm_debug_instance_mmap(WASMDebugInstance *instance, uint32 size,
|
wasm_debug_instance_mmap(WASMDebugInstance *instance, uint32 size,
|
||||||
int32 map_port)
|
int32 map_prot)
|
||||||
{
|
{
|
||||||
WASMExecEnv *exec_env;
|
WASMExecEnv *exec_env;
|
||||||
uint32 offset = 0;
|
uint32 offset = 0;
|
||||||
(void)map_port;
|
(void)map_prot;
|
||||||
|
|
||||||
if (!instance)
|
if (!instance)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -217,7 +217,7 @@ wasm_debug_instance_get_current_object_name(WASMDebugInstance *instance,
|
||||||
|
|
||||||
uint64
|
uint64
|
||||||
wasm_debug_instance_mmap(WASMDebugInstance *instance, uint32 size,
|
wasm_debug_instance_mmap(WASMDebugInstance *instance, uint32 size,
|
||||||
int32 map_port);
|
int32 map_prot);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
wasm_debug_instance_ummap(WASMDebugInstance *instance, uint64 addr);
|
wasm_debug_instance_ummap(WASMDebugInstance *instance, uint64 addr);
|
||||||
|
|
|
@ -19,8 +19,8 @@ struct packet_handler_elem {
|
||||||
#define DEL_HANDLER(r, h) [r] = { .request = r, .handler = h }
|
#define DEL_HANDLER(r, h) [r] = { .request = r, .handler = h }
|
||||||
|
|
||||||
static struct packet_handler_elem packet_handler_table[255] = {
|
static struct packet_handler_elem packet_handler_table[255] = {
|
||||||
DEL_HANDLER('Q', handle_generay_set),
|
DEL_HANDLER('Q', handle_general_set),
|
||||||
DEL_HANDLER('q', handle_generay_query),
|
DEL_HANDLER('q', handle_general_query),
|
||||||
DEL_HANDLER('v', handle_v_packet),
|
DEL_HANDLER('v', handle_v_packet),
|
||||||
DEL_HANDLER('?', handle_threadstop_request),
|
DEL_HANDLER('?', handle_threadstop_request),
|
||||||
DEL_HANDLER('H', handle_set_current_thread),
|
DEL_HANDLER('H', handle_set_current_thread),
|
||||||
|
|
|
@ -33,7 +33,7 @@ handle_interrupt(WASMGDBServer *server)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
handle_generay_set(WASMGDBServer *server, char *payload)
|
handle_general_set(WASMGDBServer *server, char *payload)
|
||||||
{
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
char *args;
|
char *args;
|
||||||
|
@ -141,7 +141,7 @@ process_wasm_global(WASMGDBServer *server, char *args)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
handle_generay_query(WASMGDBServer *server, char *payload)
|
handle_general_query(WASMGDBServer *server, char *payload)
|
||||||
{
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
char *args;
|
char *args;
|
||||||
|
@ -179,7 +179,7 @@ handle_generay_query(WASMGDBServer *server, char *payload)
|
||||||
name = args;
|
name = args;
|
||||||
|
|
||||||
if (!args) {
|
if (!args) {
|
||||||
LOG_ERROR("payload parse error during handle_generay_query");
|
LOG_ERROR("payload parse error during handle_general_query");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -669,7 +669,7 @@ handle_malloc(WASMGDBServer *server, char *payload)
|
||||||
{
|
{
|
||||||
char *args;
|
char *args;
|
||||||
uint64 addr, size;
|
uint64 addr, size;
|
||||||
int32 map_port = MMAP_PROT_NONE;
|
int32 map_prot = MMAP_PROT_NONE;
|
||||||
|
|
||||||
args = strstr(payload, ",");
|
args = strstr(payload, ",");
|
||||||
if (args) {
|
if (args) {
|
||||||
|
@ -687,19 +687,19 @@ handle_malloc(WASMGDBServer *server, char *payload)
|
||||||
if (size > 0) {
|
if (size > 0) {
|
||||||
while (*args) {
|
while (*args) {
|
||||||
if (*args == 'r') {
|
if (*args == 'r') {
|
||||||
map_port |= MMAP_PROT_READ;
|
map_prot |= MMAP_PROT_READ;
|
||||||
}
|
}
|
||||||
if (*args == 'w') {
|
if (*args == 'w') {
|
||||||
map_port |= MMAP_PROT_WRITE;
|
map_prot |= MMAP_PROT_WRITE;
|
||||||
}
|
}
|
||||||
if (*args == 'x') {
|
if (*args == 'x') {
|
||||||
map_port |= MMAP_PROT_EXEC;
|
map_prot |= MMAP_PROT_EXEC;
|
||||||
}
|
}
|
||||||
args++;
|
args++;
|
||||||
}
|
}
|
||||||
addr = wasm_debug_instance_mmap(
|
addr = wasm_debug_instance_mmap(
|
||||||
(WASMDebugInstance *)server->thread->debug_instance, size,
|
(WASMDebugInstance *)server->thread->debug_instance, size,
|
||||||
map_port);
|
map_prot);
|
||||||
if (addr) {
|
if (addr) {
|
||||||
snprintf(tmpbuf, sizeof(tmpbuf), "%" PRIx64, addr);
|
snprintf(tmpbuf, sizeof(tmpbuf), "%" PRIx64, addr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,10 +18,10 @@ void
|
||||||
handle_interrupt(WASMGDBServer *server);
|
handle_interrupt(WASMGDBServer *server);
|
||||||
|
|
||||||
void
|
void
|
||||||
handle_generay_set(WASMGDBServer *server, char *payload);
|
handle_general_set(WASMGDBServer *server, char *payload);
|
||||||
|
|
||||||
void
|
void
|
||||||
handle_generay_query(WASMGDBServer *server, char *payload);
|
handle_general_query(WASMGDBServer *server, char *payload);
|
||||||
|
|
||||||
void
|
void
|
||||||
handle_v_packet(WASMGDBServer *server, char *payload);
|
handle_v_packet(WASMGDBServer *server, char *payload);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user