diff options
author | Daniel Jacobowitz <drow@false.org> | 2002-03-27 05:15:49 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2002-03-27 05:15:49 +0000 |
commit | 0e98d0a7510d45111a189ecd2baed6d15c61a11b (patch) | |
tree | 9e94d65be10c79416b88871a817df0092db5c8a7 /gdb/gdbserver/remote-utils.c | |
parent | 3130066b6cbb3de4f8f8d00b33c70accaca0f68b (diff) | |
download | binutils-0e98d0a7510d45111a189ecd2baed6d15c61a11b.zip binutils-0e98d0a7510d45111a189ecd2baed6d15c61a11b.tar.gz binutils-0e98d0a7510d45111a189ecd2baed6d15c61a11b.tar.bz2 |
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.c | 12 |
1 files changed, 5 insertions, 7 deletions
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') |