[Dwarf-discuss] DWARF Issue 050808.2&body=Re: <ahref=http://dwarf.freestandards.org/ShowIssue.php
Daniel Jacobowitz
drow
Thu Feb 23 20:38:50 GMT 2006
On Thu, Feb 23, 2006 at 11:08:00PM -0500, Daniel Berlin wrote:
> Proposal:
>
> I propose we modify the definition of the DW_TAG_entry_point tag
> definition to state that it is also usable for specifying the main
> entry point to a program, not just fortran alternate entry points.
>
> In order to determine which of the DW_TAG_entry_point is the single
> main entry point to the program, a flag attribute DW_AT_is_main(or
> something suitably named) should be added to the allowed attributes
> for DW_TAG_entry_point.
If we need a new flag anyway, then why shouldn't it be a flag on
the DW_TAG_subprogram for main? That seems to me like the clearest
choice.
"entry point" is an overloaded term already; this isn't necessarily the
program's entry point, but the high level language's starting point.
The actual entry point will be over in _start land.
> Alternatively, we could define it as the entry_point with
> DW_CC_program calling convention, and delete the text that says "The
> DW_CC_program value is intended to support Fortran main programs. It
> is not intended as a way of finding the entry address for the
> program."
This isn't appropriate because it would interfere with any other
DW_AT_calling_convention that applied to the main routine - for
instance, sh-elf-gcc with -mrenesas will mark main with
DW_CC_GNU_renesas_sh.
--
Daniel Jacobowitz
CodeSourcery
More information about the Dwarf-discuss
mailing list