public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Where to set correct value for tdep->struct_return for Cygwin?
@ 2003-03-20 15:20 Corinna Vinschen
  2003-03-20 15:27 ` Andrew Cagney
  0 siblings, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2003-03-20 15:20 UTC (permalink / raw)
  To: gdb

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.

Corinna

-- 
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.
mailto:vinschen@redhat.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Where to set correct value for tdep->struct_return for Cygwin?
  2003-03-20 15:20 Where to set correct value for tdep->struct_return for Cygwin? Corinna Vinschen
@ 2003-03-20 15:27 ` Andrew Cagney
  2003-03-20 15:39   ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2003-03-20 15:27 UTC (permalink / raw)
  To: gdb, Corinna Vinschen

> 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Where to set correct value for tdep->struct_return for Cygwin?
  2003-03-20 15:27 ` Andrew Cagney
@ 2003-03-20 15:39   ` Corinna Vinschen
  2003-03-20 16:55     ` Andrew Cagney
  0 siblings, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2003-03-20 15:39 UTC (permalink / raw)
  To: gdb

On Thu, Mar 20, 2003 at 10:27:55AM -0500, Andrew Cagney wrote:
> >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?

I didn't say Interix and Cygwin share a common ABI.  It's just this
one the same.  Interix adds some additional stuff which isn't the
same for Cygwin.

Corinna

-- 
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.
mailto:vinschen@redhat.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Where to set correct value for tdep->struct_return for Cygwin?
  2003-03-20 15:39   ` Corinna Vinschen
@ 2003-03-20 16:55     ` Andrew Cagney
  2003-03-21  5:00       ` Eli Zaretskii
  2003-10-09 21:32       ` Michael Snyder
  0 siblings, 2 replies; 6+ messages in thread
From: Andrew Cagney @ 2003-03-20 16:55 UTC (permalink / raw)
  To: Corinna Vinschen


>> If both interix and cygwin are sharing a common ABI, then shouldn't that 
>> common ABI code live in i386-win32-tdep.c?
> 
> 
> I didn't say Interix and Cygwin share a common ABI.  It's just this
> one the same.  Interix adds some additional stuff which isn't the
> same for Cygwin.

What about djgpp?

Anyway, if the abi is cygwin specific, it will need a cygwin specific 
i386-${OS}-tdep.c file that implements a cygwin OS ABI sniffer et.al.. 
I get the feeling that win32-nat.c should have been called cygwin-nat.c?

Andrew


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Where to set correct value for tdep->struct_return for Cygwin?
  2003-03-20 16:55     ` Andrew Cagney
@ 2003-03-21  5:00       ` Eli Zaretskii
  2003-10-09 21:32       ` Michael Snyder
  1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2003-03-21  5:00 UTC (permalink / raw)
  To: ac131313; +Cc: gdb

> Date: Thu, 20 Mar 2003 11:55:13 -0500
> From: Andrew Cagney <ac131313@redhat.com>
> 
> What about djgpp?

Sorry, I cannot answer that.  I didn't yet have time to try the
multi-arched version of GDB.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Where to set correct value for tdep->struct_return for Cygwin?
  2003-03-20 16:55     ` Andrew Cagney
  2003-03-21  5:00       ` Eli Zaretskii
@ 2003-10-09 21:32       ` Michael Snyder
  1 sibling, 0 replies; 6+ messages in thread
From: Michael Snyder @ 2003-10-09 21:32 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Corinna Vinschen

Andrew Cagney wrote:
> 
>[...] I 
> get the feeling that win32-nat.c should have been called cygwin-nat.c?

Probably not.  It works on win32 target without cygwin, I think.
Something called mingw, isn't it?  Anyway, it can debug native
microsoft code in minimal mode (without using the debug info).


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-10-09 21:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-20 15:20 Where to set correct value for tdep->struct_return for Cygwin? Corinna Vinschen
2003-03-20 15:27 ` Andrew Cagney
2003-03-20 15:39   ` Corinna Vinschen
2003-03-20 16:55     ` Andrew Cagney
2003-03-21  5:00       ` Eli Zaretskii
2003-10-09 21:32       ` Michael Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).