This is the mail archive of the
mailing list for the GDB project.
Re: [RFA] Support for multiple calling conventions, patch 1/3: Add calling convention to struct type
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Thu, 17 Apr 2008 12:21:00 -0400
- Subject: Re: [RFA] Support for multiple calling conventions, patch 1/3: Add calling convention to struct type
- References: <20080415115138.GD23852@calimero.vinschen.de>
On Tue, Apr 15, 2008 at 01:51:38PM +0200, Corinna Vinschen wrote:
> The result looks like this:
> ftype->calling_convention == 0
> if no debug information is available for the function or if the
> debug information is not given as dwarf2.
> ftype->calling_convention == DW_CC_normal
> if dwarf2 debug information is available for the function but no
> DW_AT_calling_convention attribute has been given for the function.
> ftype->calling_convention == DW_UNSND(DW_AT_calling_convention)
> if dwarf2 debug information is available for the function and the
> DW_AT_calling_convention attribute has been specified.
This part looks generally fine. My only complaint is the size
and placement of the new field. struct type is a hefty portion
of GDB's memory usage.
For a first optimization, it can go in main_type instead. Then
there won't be an extra copy for every const or volatile type
variant. For a second optimization, it's only for TYPE_CODE_FUNC - so
I think it will fit in union type_specific.
Assuming that's right, changed version is OK.