public inbox for java-prs@sourceware.org help / color / mirror / Atom feed
From: "drow at false dot org" <gcc-bugzilla@gcc.gnu.org> To: java-prs@gcc.gnu.org Subject: [Bug java/1427] gcc should allow gcj and gfortran to generate N_MAIN stab or DW_AT_entry_point dwarf2 debug info Date: Tue, 17 Oct 2006 02:40:00 -0000 [thread overview] Message-ID: <20061017024023.17890.qmail@sourceware.org> (raw) In-Reply-To: <bug-1427-360@http.gcc.gnu.org/bugzilla/> ------- Comment #20 from drow at gcc dot gnu dot org 2006-10-17 02:40 ------- Subject: Re: gcj should generate N_MAIN stab or DW_AT_entry_point dwarf2 debug info On Sat, Oct 14, 2006 at 02:17:32PM -0000, steven at gcc dot gnu dot org wrote: > Someone should make gdb understand the DW_AT_calling_convention attribute. > This is the bit necessary to make it work for Fortran. I considered stealing a > bit on FUNCTION_DECL to mark it as the main program but it seems to me that > this hard-coded solution should be acceptable as well (but, your thoughts?). I don't remember the discussion entirely, and can't find it now, but I thought that the conclusion was that DW_AT_calling_convention was not appropriate for this purpose? In gfortran, main-ness doesn't affect whether the function can be called or not, or how to call it, I don't think. Compare to DW_CC_GNU_renesas_sh, indicating a different ABI. A flag for i386 regparm could also go here. I guess the language in the standard allows this usage, but it would make it impossible to mark a main routine as obeying a particular ABI. Ah, here: http://dwarf.freestandards.org/ShowIssue.php?issue=050808.2&type=closed Maybe someone out to poke the committee again. > - value = targetm.dwarf_calling_convention (type); > + if (is_fortran ()) > + { > + /* The subroutine named MAIN__ is the main program for Fortran. */ > + const char *subroutine_name = get_AT_string (subr_die, DW_AT_name); > + if (strcmp (subroutine_name, "MAIN__") == 0) > + value = DW_CC_program; > + } > + else > + value = targetm.dwarf_calling_convention (type); Probably ought to call the target hook in the fortran case eventually... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=1427
prev parent reply other threads:[~2006-10-17 2:40 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-1427-360@http.gcc.gnu.org/bugzilla/> 2005-11-15 3:04 ` [Bug java/1427] gcj should " woodzltc at sources dot redhat dot com 2006-10-14 14:17 ` steven at gcc dot gnu dot org 2006-10-17 2:40 ` drow at false dot org [this message]
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=20061017024023.17890.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=java-prs@gcc.gnu.org \ /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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).