feat(nemu): gdb remote debug

This commit is contained in:
xinyangli 2024-04-25 16:54:27 +08:00
parent a54c0d6480
commit 7f0d1ba75a
Signed by: xin
SSH key fingerprint: SHA256:qZ/tzd8lYRtUFSrfBDBMcUqV4GHKxqeqRA3huItgvbk
22 changed files with 613 additions and 846 deletions

View file

@ -13,7 +13,9 @@
* See the Mulan PSL v2 for more details.
***************************************************************************************/
#include "debug.h"
#include <cpu/cpu.h>
#include <gdbstub.h>
void sdb_mainloop();
@ -22,6 +24,10 @@ void engine_start() {
cpu_exec(-1);
#else
/* Receive commands from user. */
sdb_mainloop();
int nemu_gdbstub_run();
if (nemu_gdbstub_run()) {
Error("gdbstub exited abnormally");
exit(1);
}
#endif
}