From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5331 invoked by alias); 9 Jul 2002 21:15:24 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 5322 invoked from network); 9 Jul 2002 21:15:23 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 9 Jul 2002 21:15:23 -0000 Received: from dsl254-114-096.nyc1.dsl.speakeasy.net ([216.254.114.96] helo=nevyn.them.org) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17S2KP-0002ik-00; Tue, 09 Jul 2002 16:15:21 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17S2KO-0005kF-00; Tue, 09 Jul 2002 17:15:20 -0400 Date: Tue, 09 Jul 2002 14:24:00 -0000 From: Daniel Jacobowitz To: Petr Sorfa Cc: "gdb-patches@sources.redhat.com" Subject: Re: [PATCH] DW_AT_calling_convention support Message-ID: <20020709211520.GA21948@nevyn.them.org> Mail-Followup-To: Petr Sorfa , "gdb-patches@sources.redhat.com" References: <3D2B5385.997D474D@caldera.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3D2B5385.997D474D@caldera.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-07/txt/msg00164.txt.bz2 On Tue, Jul 09, 2002 at 05:20:05PM -0400, Petr Sorfa wrote: > Hi, > > 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 (petrs@caldera.com) > > * 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