Skip to content

Commit ee98b58

Browse files
authored
debug-engine: Fix process_port handling (#1415)
process_port=1 means "use port 1"
1 parent 7c75f6c commit ee98b58

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

core/iwasm/libraries/debug-engine/debug_engine.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ control_thread_routine(void *arg)
8282
control_thread->port =
8383
(g_debug_engine->process_base_port == 0)
8484
? 0
85-
: g_debug_engine->process_base_port + debug_inst->id;
85+
: g_debug_engine->process_base_port + debug_inst->id - 1;
8686

8787
LOG_WARNING("control thread of debug object %p start\n", debug_inst);
8888

@@ -290,7 +290,6 @@ wasm_debug_engine_init(char *ip_addr, int32 process_port)
290290
}
291291

292292
if (g_debug_engine) {
293-
process_port -= 1;
294293
g_debug_engine->process_base_port =
295294
(process_port > 0) ? process_port : 0;
296295
if (ip_addr)

0 commit comments

Comments
 (0)