aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386-nlmstub.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1994-04-26 22:39:20 +0000
committerStu Grossman <grossman@cygnus>1994-04-26 22:39:20 +0000
commit68ba2fa550a437a3de1e15b681b40ecc21d03399 (patch)
treecfef243f2869cf47e03ac426cb3dfe37f107a08e /gdb/i386-nlmstub.c
parent926ffe944662cb731d98a109817a4787e2cfbdd6 (diff)
downloadgdb-68ba2fa550a437a3de1e15b681b40ecc21d03399.zip
gdb-68ba2fa550a437a3de1e15b681b40ecc21d03399.tar.gz
gdb-68ba2fa550a437a3de1e15b681b40ecc21d03399.tar.bz2
* i386-nlmstub.c: More changes to be compatible with remote.c.
Diffstat (limited to 'gdb/i386-nlmstub.c')
-rw-r--r--gdb/i386-nlmstub.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/gdb/i386-nlmstub.c b/gdb/i386-nlmstub.c
index b50dd85..f56b137 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 */