changeset 2398:8445e814d495

Implement gdb remote kill command
author Michael Pavone <pavone@retrodev.com>
date Sat, 23 Dec 2023 22:04:27 -0800
parents 39a009aea113
children 68eba54b60f7
files gdb_remote.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gdb_remote.c	Sat Dec 23 21:54:33 2023 -0800
+++ b/gdb_remote.c	Sat Dec 23 22:04:27 2023 -0800
@@ -307,6 +307,8 @@
 		gdb_send_command(send_buf);
 		break;
 	}
+	case 'k':
+		exit(0);
 	case 'm': {
 		char * rest;
 		uint32_t address = strtoul(command+1, &rest, 16);
@@ -469,6 +471,8 @@
 			default:
 				goto not_impl;
 			}
+		} else if (!memcmp("Kill;", command+1, strlen("Kill;"))) {
+			exit(0);
 		} else {
 			goto not_impl;
 		}