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}.
This commit is contained in:
Daniel Jacobowitz 2002-03-27 05:15:49 +00:00
parent 3130066b6c
commit 0e98d0a751
5 changed files with 34 additions and 11 deletions

View file

@ -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')