This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] DW_AT_calling_convention support
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Petr Sorfa <petrs at caldera dot com>
- Cc: "gdb-patches at sources dot redhat dot com" <gdb-patches at sources dot redhat dot com>
- Date: Tue, 9 Jul 2002 17:15:20 -0400
- Subject: Re: [PATCH] DW_AT_calling_convention support
- References: <3D2B5385.997D474D@caldera.com>
On Tue, Jul 09, 2002 at 05:20:05PM -0400, Petr Sorfa wrote:
> Patch for supporting DW_AT_calling_convention. This helps GDB identify
> the "main" program for languages that do not have a starting subroutine
> called "main". The patch also adds a new type flag,
> TYPE_FLAG_MAIN_PROGRAM which is set if the type is describing a "main"
> entry point. This can be used, for example, in noting a subroutine type
> as a FORTRAN PROGRAM.
> 2002-07-09 Petr Sorfa (firstname.lastname@example.org)
> * dwarf2read.c (read_subroutine_type): Expanded to recognize
> the DW_AT_calling_convention DWARF attribute and for
> DW_CC_program set the TYPE_FLAG_MAIN_PROGRAM type flag
> and call set_main_name ().
> (read_partial_die): Now recognizes the
> DW_AT_calling_convention attribute and calls set_main_name().
> Note that TYPE_FLAG_MAIN_PROGRAM type flag is not set, as
> the partial_die might not denote a subroutine type.
> * gdbtypes.h (TYPE_FLAG_MAIN_PROGRAM): New type flag which
> indicates whether the type denotes a main program subroutine.
> (TYPE_MAIN_PROGRAM): New macro that returns a non-zero value
> if the type describes a main program subroutine.
Why is the type flag necessary? It seems wasteful to allocate a bit in
every type when there will presumably only be one such routine.
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer