This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gdbserver (was Re: parcelling up struct gdbarch)


> 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 <signal.h>.  The host <signal.h> 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.


A good rule of thumb is to not mix layers.  Something GDB isn't good at.

There are really two cases:

	target which is a UNIX like

	target which is not UNIX like

In the case of the latter, a fairly arbitrary decision was made to just 
use ``enum target_signal'' signal numberings and some cooked up packet. 
  The signal numbering decision was made on the basis that the protocol 
didn't allow the exchange of arbitrary events (it was to UNIX centric).

	Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]