comparison gdb_remote.c @ 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 d74d3998482c
comparison
equal deleted inserted replaced
2397:39a009aea113 2398:8445e814d495
305 cur += 8; 305 cur += 8;
306 *cur = 0; 306 *cur = 0;
307 gdb_send_command(send_buf); 307 gdb_send_command(send_buf);
308 break; 308 break;
309 } 309 }
310 case 'k':
311 exit(0);
310 case 'm': { 312 case 'm': {
311 char * rest; 313 char * rest;
312 uint32_t address = strtoul(command+1, &rest, 16); 314 uint32_t address = strtoul(command+1, &rest, 16);
313 uint32_t size = strtoul(rest+1, NULL, 16); 315 uint32_t size = strtoul(rest+1, NULL, 16);
314 if (size > (sizeof(send_buf)-1)/2) { 316 if (size > (sizeof(send_buf)-1)/2) {
467 break; 469 break;
468 } 470 }
469 default: 471 default:
470 goto not_impl; 472 goto not_impl;
471 } 473 }
474 } else if (!memcmp("Kill;", command+1, strlen("Kill;"))) {
475 exit(0);
472 } else { 476 } else {
473 goto not_impl; 477 goto not_impl;
474 } 478 }
475 break; 479 break;
476 case '?': 480 case '?':