* [RFA] gdbtypes.h: Add "calling_convention" field to struct main_type
@ 2004-10-07 9:46 Corinna Vinschen
2004-10-08 11:19 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Corinna Vinschen @ 2004-10-07 9:46 UTC (permalink / raw)
To: gdb-patches
Hi,
the below patch prepares the grounds for the bigger calling convention
patch still to follow.
The basic idea and the bigger picture of that patch has been published
on the GDB mailing list on 2003-08-22:
http://sources.redhat.com/ml/gdb/2003-08/msg00252.html
Several changes to GDB have outdated parts of the proposal, namely Andrew
Cagney's invention of EXTRACT_RETURN_VALUE and Randolf Chung's change to
give a struct value * to PUSH_DUMMY_CALL instead of just the function
address, but the general approach is still valid and has to be implemented
to get multiple ABIs working in an automated fashion. The necessary changes
to gcc are also WIP.
This tiny little patch attached to this posting just adds the
calling_convention field to struct main_type and an appropriate macro
to access it.
Ok to apply?
Corinna
* gdbtypes.h (struct_main_type): Add member calling_convention.
(TYPE_CALLING_CONVENTION): New macro.
Index: gdbtypes.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.h,v
retrieving revision 1.60
diff -u -p -r1.60 gdbtypes.h
--- gdbtypes.h 1 Oct 2004 10:23:09 -0000 1.60
+++ gdbtypes.h 7 Oct 2004 09:12:02 -0000
@@ -377,6 +377,13 @@ struct main_type
int flags;
+ /* For a function type, contains a value which ABI is used for this
+ function call. This is meaningful for targets which allow to mix
+ multiple calling conventions within the same executable. The
+ content of this field is written and evaluated by target specific
+ code only. */
+ int calling_convention;
+
/* Number of fields described for this type */
short nfields;
@@ -804,6 +811,7 @@ extern void allocate_cplus_struct_type (
#define TYPE_LENGTH(thistype) (thistype)->length
#define TYPE_OBJFILE(thistype) TYPE_MAIN_TYPE(thistype)->objfile
#define TYPE_FLAGS(thistype) TYPE_MAIN_TYPE(thistype)->flags
+#define TYPE_CALLING_CONVENTION(thistype) TYPE_MAIN_TYPE(thistype)->calling_convention
/* Note that TYPE_CODE can be TYPE_CODE_TYPEDEF, so if you want the real
type, you need to do TYPE_CODE (check_type (this_type)). */
#define TYPE_CODE(thistype) TYPE_MAIN_TYPE(thistype)->code
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat, Inc.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA] gdbtypes.h: Add "calling_convention" field to struct main_type
2004-10-07 9:46 [RFA] gdbtypes.h: Add "calling_convention" field to struct main_type Corinna Vinschen
@ 2004-10-08 11:19 ` Eli Zaretskii
2004-10-08 16:18 ` Corinna Vinschen
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2004-10-08 11:19 UTC (permalink / raw)
To: gdb-patches
> Date: Thu, 7 Oct 2004 11:47:27 +0200
> From: Corinna Vinschen <vinschen@redhat.com>
>
> * gdbtypes.h (struct_main_type): Add member calling_convention.
> (TYPE_CALLING_CONVENTION): New macro.
If this patch is approved, please review the relevant parts of
gdbint.texinfo and see if something there needs updating (perhaps just
mention this new macro or something).
TIA
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA] gdbtypes.h: Add "calling_convention" field to struct main_type
2004-10-08 11:19 ` Eli Zaretskii
@ 2004-10-08 16:18 ` Corinna Vinschen
2004-10-08 18:37 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Corinna Vinschen @ 2004-10-08 16:18 UTC (permalink / raw)
To: gdb-patches
On Oct 8 13:15, Eli Zaretskii wrote:
> > Date: Thu, 7 Oct 2004 11:47:27 +0200
> > From: Corinna Vinschen <vinschen@redhat.com>
> >
> > * gdbtypes.h (struct_main_type): Add member calling_convention.
> > (TYPE_CALLING_CONVENTION): New macro.
>
> If this patch is approved, please review the relevant parts of
> gdbint.texinfo and see if something there needs updating (perhaps just
> mention this new macro or something).
I had a look into gdbint.texinfo and it seems that none of these TYPE_*
macros nor the main_type fields made it into that document. The
documentation for the main_type fields is entirely in gdbtypes.h from
what I can tell.
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat, Inc.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA] gdbtypes.h: Add "calling_convention" field to struct main_type
2004-10-08 16:18 ` Corinna Vinschen
@ 2004-10-08 18:37 ` Eli Zaretskii
2004-10-08 20:18 ` Corinna Vinschen
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2004-10-08 18:37 UTC (permalink / raw)
To: gdb-patches
> Date: Fri, 8 Oct 2004 18:19:19 +0200
> From: Corinna Vinschen <vinschen@redhat.com>
>
> On Oct 8 13:15, Eli Zaretskii wrote:
> > > Date: Thu, 7 Oct 2004 11:47:27 +0200
> > > From: Corinna Vinschen <vinschen@redhat.com>
> > >
> > > * gdbtypes.h (struct_main_type): Add member calling_convention.
> > > (TYPE_CALLING_CONVENTION): New macro.
> >
> > If this patch is approved, please review the relevant parts of
> > gdbint.texinfo and see if something there needs updating (perhaps just
> > mention this new macro or something).
>
> I had a look into gdbint.texinfo and it seems that none of these TYPE_*
> macros nor the main_type fields made it into that document.
??? I can clearly see them mentioned in the section named "Types". It
is part of the node "Symbol Handling".
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA] gdbtypes.h: Add "calling_convention" field to struct main_type
2004-10-08 18:37 ` Eli Zaretskii
@ 2004-10-08 20:18 ` Corinna Vinschen
0 siblings, 0 replies; 5+ messages in thread
From: Corinna Vinschen @ 2004-10-08 20:18 UTC (permalink / raw)
To: gdb-patches
On Oct 8 20:33, Eli Zaretskii wrote:
> > Date: Fri, 8 Oct 2004 18:19:19 +0200
> > From: Corinna Vinschen <vinschen@redhat.com>
> >
> > On Oct 8 13:15, Eli Zaretskii wrote:
> > > > Date: Thu, 7 Oct 2004 11:47:27 +0200
> > > > From: Corinna Vinschen <vinschen@redhat.com>
> > > >
> > > > * gdbtypes.h (struct_main_type): Add member calling_convention.
> > > > (TYPE_CALLING_CONVENTION): New macro.
> > >
> > > If this patch is approved, please review the relevant parts of
> > > gdbint.texinfo and see if something there needs updating (perhaps just
> > > mention this new macro or something).
> >
> > I had a look into gdbint.texinfo and it seems that none of these TYPE_*
> > macros nor the main_type fields made it into that document.
>
> ??? I can clearly see them mentioned in the section named "Types". It
> is part of the node "Symbol Handling".
Well, not exactly. There are only basic descriptions of the TYPE_CODE_*
type codes, not any description ofthe TYPE_* macros to access the type
and main_type members. Nor descriptions of these struct members at all,
AFAICS.
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat, Inc.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-10-08 20:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-07 9:46 [RFA] gdbtypes.h: Add "calling_convention" field to struct main_type Corinna Vinschen
2004-10-08 11:19 ` Eli Zaretskii
2004-10-08 16:18 ` Corinna Vinschen
2004-10-08 18:37 ` Eli Zaretskii
2004-10-08 20:18 ` Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox