Gsoc 2025 debugger (#386)

* add debugger module

* simplify the workdir process

* Update main.c

* Update main.c

* update debugger

* change port to 6110

* Update main.c

* simplify the workdir process and minor optimizations

* implement exit event

* Fix memory management in setBreakpoints

* replace free to PK_FREE

---------

Co-authored-by: blueloveTH <blueloveth@foxmail.com>
This commit is contained in:
lightovernight 2025-08-09 15:40:06 +08:00 committed by GitHub
parent d0980c6934
commit d5d4a5f738
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -128,7 +128,7 @@ int c11_debugger_reset_breakpoints_by_source(const char* sourcesname) {
(c11_debugger_breakpoint*)c11_vector__emplace(&tmp_breakpoints);
*dst = *it;
} else {
free((void*)it->sourcename);
PK_FREE((void*)it->sourcename);
}
}

View File

@ -339,8 +339,8 @@ inline static void c11_dap_handle_message() {
pk_sprintf(&buffer, "Content-Length: %d\r\n\r\n%s", strlen(response_content), response_content);
c11_string* response = c11_sbuf__submit(&buffer);
c11_socket_send(server.toclient, response->data, response->size);
free((void*)message);
free((void*)response_content);
PK_FREE((void*)message);
PK_FREE((void*)response_content);
c11_string__delete(response);
}