From 0e98d0a7510d45111a189ecd2baed6d15c61a11b Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 27 Mar 2002 05:15:49 +0000 Subject: 2002-03-27 Daniel Jacobowitz * 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}. --- gdb/gdbserver/remote-utils.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'gdb/gdbserver/remote-utils.c') diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c index 2746f9a..adf5299 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') -- cgit v1.1