From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Jacobowitz To: Andrew Cagney Cc: Fabrice Gautier , jtc@redback.com, gdb@sources.redhat.com Subject: Re: gdbserver (was Re: parcelling up struct gdbarch) Date: Tue, 17 Jul 2001 11:21:00 -0000 Message-id: <20010717112123.A19942@nevyn.them.org> References: <3B536B0C.3060908@cygnus.com> <20010716154024.A9181@nevyn.them.org> <20010717012923.F61A.GAUTIER@email.enst.fr> <3B546F34.6030207@cygnus.com> <20010717101136.A16841@nevyn.them.org> <3B547FA1.2010605@cygnus.com> X-SW-Source: 2001-07/msg00216.html On Tue, Jul 17, 2001 at 02:10:41PM -0400, Andrew Cagney wrote: > > > > How so? It seems to me to be a much simpler problem, instead. It > > means that gdbserver needes target_signal_to_host and friends, which is > > much easier. If, that is, we change documentation and gdbserver rather than > > remote.c. > > > If gdbserver is going to pass ptrace() (i.e. target dependant) register > bufers then should it also pass back target dependant signal numbers? > > In fact, thinking about it, I know where my comment would have come from > - I would have looked at gdbserver and tried to document the current > behavour. Only later did I notice that the comment was wrong and > remote.c wasn't doing any conversion :-/ > > So, which is correct? Well, I can argue (and, confusingly, have argued :) both sides here. I'm not entirely sure. One advantage of passing target dependent signal numbers is that if we send a signal that has no target equivalent we can error before trying to communicate that to the target. I think it's outweighed by the fact that a host GDB may not even have the target's signal numbers available, though. ("But target.c knows them!" you say? Look where it gets them from - the host . The host is wrong for a cross gdb. Mind if I add at least a FIXME comment to target.c about this?) So for signals at least, documentation and gdbserver should change. For register buffers, see the other half of this thread. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer