Daniel Jacobowitz escreveu: > On Sat, Feb 24, 2007 at 11:23:56PM +0000, Pedro Alves wrote: >> Hi all, >> >> This patch converts the send_signal function in target_ops to use enum >> target_signal >> instead of the real target number. I originally needed this for the >> WinCE gdbserver port. >> Windows CE doesn't have signals support, and doesn't define SIGINT in >> any header. >> Because of that, remote-utils.c wouldn't compile. I still want to have >> support of stopping >> a debuggee - this patch paves the way to that, with minimal interface >> changes. I will handle >> TARGET_SIGNAL_INT in the send_signal handler on the target side. >> >> Ok? > > Maybe this is the wrong abstraction entirely? Because most signals > are passed to the continue / resume support, maybe the target method > here doesn't need a signal number at all. We could replace it with > just send_interrupt. > > What do you think? > I agree. I looked at shoehorning this into target_ops->(*resume)() with TARGET_SIGNAL_INT, but that would be wrong, as resume expects an already stopped process, and send_signal was used to do the actual stopping. How does this look? Cheers, Pedro Alves --- gdb/gdbserver/ChangeLog: * target.h (target_ops): Rename send_signal to request_interrupt, and remove enum target_signal parameter. * linux-low.c (linux_request_interrupt): Rename from linux_send_signal, and always send SIGINT. * spu-low.c (spu_request_interrupt): Rename from spu_send_signal, and always send SIGINT. * remote-utils.c (putpkt_binary): Call request_interrupt, instead of send_signal. (input_interrupt): Likewise.