This is the mail archive of the gdb-patches@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: New gdb 31 & 64 bit patches for S/390


> There are some target specific structures for to find out if I'm in a
> signal handler which I
> currently need see the s390_offsetof stuff in the tm-s390.c.
> 
> What about using the __attribute__(packed) gcc extension.
> & add a
> #ifndef gcc
> define __attribute__
> #endif

No.  So far GDB has managed to avoid a dependency on GCCoteric features, 
I don't see any reason to change this.

With regard to the other target specific structures, I suggested moving 
them to s390-nat.c since (I think) only that file would be using them 
(?correct). s390-nat.c is very host=target specific - it needs to 
correctly unpack the data returned from ptrace/procfs.  However, even 
there, the __attribute__(packed) should be removed.

 > for non gcc compilers this would get around some of the common problems,
 > the only other way is for me to
 > add #defines for all the offsets I need.

Remember s390-tdep.c analizes and implements an ABI.  That ABI is 
hopefully publised and defined.  It isn't going to change.  If it does 
then the debugger, the compiler and who knows what else will need to be 
modified.

Because the ABI is ``set in stone'' constants using enums (not #defines) 
are typically used in the *-tdep.c file.

For what its worth, BFD has adopted the strategy of:

	o	having the ABI constants wired in

	o	when host=target=s390-linux,
		verify that those constants havn't
		been changed by someones foobar.

	Andrew




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