From 68ba2fa550a437a3de1e15b681b40ecc21d03399 Mon Sep 17 00:00:00 2001 From: Stu Grossman Date: Tue, 26 Apr 1994 22:39:20 +0000 Subject: [PATCH] * i386-nlmstub.c: More changes to be compatible with remote.c. --- gdb/ChangeLog | 5 +++++ gdb/i386-nlmstub.c | 26 ++++++++++++++++---------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4dfeea04e2e..ec724d22fa0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ Tue Apr 26 10:23:04 1994 Stu Grossman (grossman at cygnus.com) + * i386-nlmstub.c: More changes to be compatible with remote.c. + + * dbxread.c: Move a bunch of strncmps out of process_one_symbol + into (the far less frequently called) dbx_symfile_read. + * i386-nlmstub.c: An interim version till we get PIN for the x86. Tue Apr 26 09:50:45 1994 Stu Grossman (grossman at cygnus.com) diff --git a/gdb/i386-nlmstub.c b/gdb/i386-nlmstub.c index b50dd85d2a3..f56b137ac39 100644 --- a/gdb/i386-nlmstub.c +++ b/gdb/i386-nlmstub.c @@ -680,13 +680,10 @@ handle_exception (T_StackFrame *old_frame) else { sigval = computeSignal (frame->ExceptionNumber); - remcomOutBuffer[0] = 'N'; + remcomOutBuffer[0] = 'S'; remcomOutBuffer[1] = hexchars[sigval >> 4]; remcomOutBuffer[2] = hexchars[sigval % 16]; - sprintf (remcomOutBuffer + 3, "%x;%x;%x", - handle->LDCodeImageOffset, - handle->LDDataImageOffset, - handle->LDDataImageOffset + handle->LDDataImageLength); + remcomOutBuffer[3] = 0; } if (! putpacket(remcomOutBuffer)) @@ -709,13 +706,10 @@ handle_exception (T_StackFrame *old_frame) { case '?': sigval = computeSignal (frame->ExceptionNumber); - remcomOutBuffer[0] = 'N'; + remcomOutBuffer[0] = 'S'; remcomOutBuffer[1] = hexchars[sigval >> 4]; remcomOutBuffer[2] = hexchars[sigval % 16]; - sprintf (remcomOutBuffer + 3, "%x;%x;%x", - handle->LDCodeImageOffset, - handle->LDDataImageOffset, - handle->LDDataImageOffset + handle->LDDataImageLength); + remcomOutBuffer[3] = 0; break; case 'd': remote_debug = !(remote_debug); /* toggle debug flag */ @@ -811,6 +805,18 @@ handle_exception (T_StackFrame *old_frame) KillMe (handle); ResumeThread (mainthread); return RETURN_TO_PROGRAM; + + case 'q': /* Query message */ + if (strcmp (&remcomInBuffer[1], "Offsets") == 0) + { + sprintf (remcomOutBuffer, "Text=%x;Data=%x;Bss=%x", + handle->LDCodeImageOffset, + handle->LDDataImageOffset, + handle->LDDataImageOffset + handle->LDDataImageLength); + } + else + sprintf (remcomOutBuffer, "E04, Unknown query %s", &remcomInBuffer[1]); + break; } /* reply to the request */ -- 2.30.2