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]
Other format: [Raw text]

Re: Where to set correct value for tdep->struct_return for Cygwin?


Hi,

I just found the following problem:

In i386-tdep.c::i386_gdbarch_init(), tdep->struct_return is set to
pcc_struct_return by default. Several i386 targets set this value
in their appropriate _init function to reg_struct_return (e. g. the
bsd and interix targets).


Cygwin is using reg_struct_return as well but unfortunately in contrast
to Interix it has no own tdep.c file and so there's no appropriate _init
function as e. g. i386_interix_init_abi() available to set that value. This results in having tdep->struct_return still set to pcc_struct_return
and about 25 fails in the testsuite.


So the question is, where to set that value?  Shall we add a new cygwin-tdep.c
file, just to set this one value?  Or is there some already existing obvious
place to do this?  win32-nat.c seems to be not a good chice, btw.

If both interix and cygwin are sharing a common ABI, then shouldn't that common ABI code live in i386-win32-tdep.c?


Andrew



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