public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "steven at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug java/1427] gcj should generate N_MAIN stab or DW_AT_entry_point dwarf2 debug info Date: Sat, 14 Oct 2006 14:17:00 -0000 [thread overview] Message-ID: <20061014141732.30762.qmail@sourceware.org> (raw) In-Reply-To: <bug-1427-360@http.gcc.gnu.org/bugzilla/> ------- Comment #19 from steven at gcc dot gnu dot org 2006-10-14 14:17 ------- 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?). Index: dwarf2out.c =================================================================== --- dwarf2out.c (revision 117672) +++ dwarf2out.c (working copy) @@ -11105,11 +11105,18 @@ add_calling_convention_attribute (dw_die { enum dwarf_calling_convention value = DW_CC_normal; - 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); - /* Only add the attribute if the backend requests it, and - is not DW_CC_normal. */ - if (value && (value != DW_CC_normal)) + /* Only add the attribute if it is not DW_CC_normal. */ + if (value != DW_CC_normal) add_AT_unsigned (subr_die, DW_AT_calling_convention, value); } -- steven at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |steven at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=1427
next prev parent reply other threads:[~2006-10-14 14:17 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-1427-360@http.gcc.gnu.org/bugzilla/> 2005-11-15 3:04 ` woodzltc at sources dot redhat dot com 2006-10-14 14:17 ` steven at gcc dot gnu dot org [this message] 2006-10-17 2:40 ` [Bug java/1427] gcc should allow gcj and gfortran to " drow at false dot org [not found] <20001220121944.1427.tromey@gcc.gnu.org> 2003-08-03 20:16 ` [Bug java/1427] gcj should " pinskia at physics dot uc dot edu 2003-11-03 18:19 ` aph at gcc dot gnu dot org 2005-08-08 11:28 ` aph at gcc dot gnu dot org 2005-08-08 15:20 ` green at redhat dot com 2005-08-08 15:24 ` aph at gcc dot gnu dot org 2005-08-08 15:45 ` pinskia at gcc dot gnu dot org 2005-08-08 15:48 ` drow at false dot org 2005-08-09 4:11 ` woodzltc at sources dot redhat dot com 2005-08-09 4:18 ` Daniel Berlin 2005-08-09 4:19 ` dberlin at dberlin dot org 2005-08-09 7:04 ` woodzltc at sources dot redhat dot com 2005-08-24 6:09 ` woodzltc at sources dot redhat dot com
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=20061014141732.30762.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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).