From: Petr Sorfa <petrs@caldera.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: "gdb-patches@sources.redhat.com" <gdb-patches@sources.redhat.com>
Subject: Re: [PATCH] DW_AT_calling_convention support
Date: Wed, 10 Jul 2002 07:03:00 -0000 [thread overview]
Message-ID: <3D2C3C5F.A74215A4@caldera.com> (raw)
In-Reply-To: <20020709215812.GA966@nevyn.them.org>
Hi Daniel,
> I'd rather save a pointer the symbol for the main function, or
> something along those lines - do you think that's workable?
Sounds good. Note that I'm making the assumption that the symbol is
associated with a type that is only associated with that symbol (iff).
I think it should be API driven, like set_main_symbol () and
get_main_symbol () and situated in symtab.c alonside set_main_name() and
main_name().
Petr
>
> On Tue, Jul 09, 2002 at 05:36:46PM -0400, Petr Sorfa wrote:
> > Hi Daniel,
> >
> > Valid point, however there is a (hopefully not misguided) reason; I use
> > it when printing a subroutine type for FORTRAN95. I make the assumption
> > that determining whether a symbol name is equivalent to main_name() is
> > not sufficient.
> >
> > Petr
> > > > 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
> >
> >
>
> --
> Daniel Jacobowitz Carnegie Mellon University
> MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2002-07-10 13:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-09 14:08 Petr Sorfa
2002-07-09 14:24 ` Daniel Jacobowitz
2002-07-09 14:58 ` Petr Sorfa
2002-07-09 15:05 ` Daniel Jacobowitz
2002-07-10 7:03 ` Petr Sorfa [this message]
2002-07-10 7:19 ` Daniel Jacobowitz
2002-07-10 7:25 ` Petr Sorfa
2002-07-10 8:02 ` Daniel Jacobowitz
2002-07-10 9:07 ` Jim Blandy
2002-07-10 10:00 ` Petr Sorfa
2002-07-10 10:18 ` Petr Sorfa
2002-07-10 10:33 ` Jim Blandy
2002-07-10 11:32 ` Petr Sorfa
2002-07-10 11:47 ` Jim Blandy
2002-07-10 11:49 ` Daniel Jacobowitz
2002-07-10 12:35 ` Jim Blandy
2002-07-10 12:27 ` Daniel Berlin
2002-07-10 8:26 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D2C3C5F.A74215A4@caldera.com \
--to=petrs@caldera.com \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox