gdbstub.c (f5316b4aea024da9266d740322a5481657f6ce59) | gdbstub.c (a0de055cf61338549b13079a5677ef2e1b6472ef) |
---|---|
1/* 2 * Kernel Debug Core 3 * 4 * Maintainer: Jason Wessel <jason.wessel@windriver.com> 5 * 6 * Copyright (C) 2000-2001 VERITAS Software Corporation. 7 * Copyright (C) 2002-2004 Timesys Corporation 8 * Copyright (C) 2003-2004 Amit S. Kale <amitkale@linsyssoft.com> --- 187 unchanged lines hidden (view full) --- 196static char gdbmsgbuf[BUFMAX + 1]; 197 198void gdbstub_msg_write(const char *s, int len) 199{ 200 char *bufptr; 201 int wcount; 202 int i; 203 | 1/* 2 * Kernel Debug Core 3 * 4 * Maintainer: Jason Wessel <jason.wessel@windriver.com> 5 * 6 * Copyright (C) 2000-2001 VERITAS Software Corporation. 7 * Copyright (C) 2002-2004 Timesys Corporation 8 * Copyright (C) 2003-2004 Amit S. Kale <amitkale@linsyssoft.com> --- 187 unchanged lines hidden (view full) --- 196static char gdbmsgbuf[BUFMAX + 1]; 197 198void gdbstub_msg_write(const char *s, int len) 199{ 200 char *bufptr; 201 int wcount; 202 int i; 203 |
204 if (len == 0) 205 len = strlen(s); 206 |
|
204 /* 'O'utput */ 205 gdbmsgbuf[0] = 'O'; 206 207 /* Fill and send buffers... */ 208 while (len > 0) { 209 bufptr = gdbmsgbuf + 1; 210 211 /* Calculate how many this time */ --- 468 unchanged lines hidden (view full) --- 680 } else { 681 static char tmpstr[23 + BUF_THREAD_ID_SIZE]; 682 683 sprintf(tmpstr, "shadowCPU%d", 684 (int)(-ks->threadid - 2)); 685 kgdb_mem2hex(tmpstr, remcom_out_buffer, strlen(tmpstr)); 686 } 687 break; | 207 /* 'O'utput */ 208 gdbmsgbuf[0] = 'O'; 209 210 /* Fill and send buffers... */ 211 while (len > 0) { 212 bufptr = gdbmsgbuf + 1; 213 214 /* Calculate how many this time */ --- 468 unchanged lines hidden (view full) --- 683 } else { 684 static char tmpstr[23 + BUF_THREAD_ID_SIZE]; 685 686 sprintf(tmpstr, "shadowCPU%d", 687 (int)(-ks->threadid - 2)); 688 kgdb_mem2hex(tmpstr, remcom_out_buffer, strlen(tmpstr)); 689 } 690 break; |
691#ifdef CONFIG_KGDB_KDB 692 case 'R': 693 if (strncmp(remcom_in_buffer, "qRcmd,", 6) == 0) { 694 int len = strlen(remcom_in_buffer + 6); 695 696 if ((len % 2) != 0) { 697 strcpy(remcom_out_buffer, "E01"); 698 break; 699 } 700 kgdb_hex2mem(remcom_in_buffer + 6, 701 remcom_out_buffer, len); 702 len = len / 2; 703 remcom_out_buffer[len++] = 0; 704 705 kdb_parse(remcom_out_buffer); 706 strcpy(remcom_out_buffer, "OK"); 707 } 708 break; 709#endif |
|
688 } 689} 690 691/* Handle the 'H' task query packets */ 692static void gdb_cmd_task(struct kgdb_state *ks) 693{ 694 struct task_struct *thread; 695 char *ptr; --- 300 unchanged lines hidden --- | 710 } 711} 712 713/* Handle the 'H' task query packets */ 714static void gdb_cmd_task(struct kgdb_state *ks) 715{ 716 struct task_struct *thread; 717 char *ptr; --- 300 unchanged lines hidden --- |