summaryrefslogtreecommitdiff
path: root/gdb/gdbserver/remote-utils.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2002-03-27 05:15:49 +0000
committerDaniel Jacobowitz <dan@debian.org>2002-03-27 05:15:49 +0000
commitda0dd106c65a61ce54c2f7020b11c1914f4235fb (patch)
tree32fa66b6889aade27e913ccee4b1e63df653f620 /gdb/gdbserver/remote-utils.c
parent3e9d86e6aaf3309a67cbecd767d11d5a5e03c4ed (diff)
downloadgdb-da0dd106c65a61ce54c2f7020b11c1914f4235fb.tar.gz
2002-03-27 Daniel Jacobowitz <drow@mvista.com>
* gdbserver/server.c (main): Call target_signal_to_host_p and target_signal_to_host on signals received from the remote. * gdbserver/remote-utils.c (prepare_resume_reply): Call target_signal_from_host on signals sent to the remote. * gdbserver/server.h: Add prototypes. Include "gdb/signals.h". * gdbserver/Makefile.in: Add signals.o. Add -I${INCLUDE_DIR}.
Diffstat (limited to 'gdb/gdbserver/remote-utils.c')
-rw-r--r--gdb/gdbserver/remote-utils.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index 2746f9a2986..adf52996094 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -463,17 +463,15 @@ outreg (int regno, char *buf)
void
prepare_resume_reply (char *buf, char status, unsigned char signo)
{
- int nib;
+ int nib, sig;
*buf++ = status;
- /* FIXME! Should be converting this signal number (numbered
- according to the signal numbering of the system we are running on)
- to the signal numbers used by the gdb protocol (see enum target_signal
- in gdb/target.h). */
- nib = ((signo & 0xf0) >> 4);
+ sig = (int)target_signal_from_host (signo);
+
+ nib = ((sig & 0xf0) >> 4);
*buf++ = tohex (nib);
- nib = signo & 0x0f;
+ nib = sig & 0x0f;
*buf++ = tohex (nib);
if (status == 'T')