public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Jim Blandy <jimb@codesourcery.com>,
	gdb@sourceware.org,
	        GDB Patches Mailing List <gdb-patches@sourceware.org>,
	drow@false.org
Subject: Re: Problems while debugging fortran
Date: Thu, 25 Oct 2007 20:36:00 -0000	[thread overview]
Message-ID: <4720FE48.8020200@linux.vnet.ibm.com> (raw)
In-Reply-To: <20071025202406.GC4063@adacore.com>

[-- Attachment #1: Type: text/plain, Size: 526 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Joel Brobecker wrote:
> I think that's a great comment. Let's use that one.
> 

All right. Here's the updated patch with Jim's comments. Ok now?

Regards,

- --
Carlos Eduardo Seo
Software Engineer
IBM Linux Technology Center
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHIP5Hqvq7Aov/qQARAg1wAKCKTPmOboGpEXy+4JOYI/t6ky5haQCfTSE4
K7lNORxqXOlJqRSJKSR/ZQk=
=aeaW
-----END PGP SIGNATURE-----

[-- Attachment #2: fortran-main.diff --]
[-- Type: text/x-patch, Size: 1468 bytes --]

2007-10-25  Wu Zhou  <woodzltc@cn.ibm.com>
	    Carlos Eduardo Seo  <cseo@linux.vnet.ibm.com>
	    Jim Blandy  <jimb@codesourcery.com>

	* dwarf2read.c (read_partial_die): check the value
	of DW_AT_calling_convention in Fortran programs.

Index: src/gdb/dwarf2read.c
===================================================================
--- src.orig/gdb/dwarf2read.c
+++ src/gdb/dwarf2read.c
@@ -5616,6 +5616,24 @@ read_partial_die (struct partial_die_inf
         case DW_AT_byte_size:
           part_die->has_byte_size = 1;
           break;
+	case DW_AT_calling_convention:
+	  /* DWARF doesn't provide a way to identify a program's source-level
+	     entry point.  DW_AT_calling_convention attributes are only meant
+	     to describe functions' calling conventions.
+
+	     However, because it's a necessary piece of information in
+	     Fortran, and because DW_CC_program is the only piece of debugging
+	     information whose definition refers to a 'main program' at all,
+	     several compilers have begun marking Fortran main programs with
+	     DW_CC_program --- even when those functions use the standard
+	     calling conventions.
+
+	     So until DWARF specifies a way to provide this information and
+	     compilers pick up the new representation, we'll support this
+	     practice.  */
+	  if ((DW_UNSND (&attr) == DW_CC_program) && (cu->language == language_fortran))
+	    set_main_name (part_die->name);
+	  break;
 	default:
 	  break;
 	}

[-- Attachment #3: fortran-main.diff.sig --]
[-- Type: application/octet-stream, Size: 65 bytes --]

  reply	other threads:[~2007-10-25 20:36 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-25 16:07 François-Xavier Coudert
2007-10-25 17:06 ` Daniel Jacobowitz
2007-10-25 18:44   ` Jim Blandy
2007-10-25 19:01     ` Daniel Jacobowitz
2007-10-25 19:27       ` Jim Blandy
2007-10-25 20:24         ` Joel Brobecker
2007-10-25 20:36           ` Carlos Eduardo Seo [this message]
2007-10-25 20:41             ` Joel Brobecker
     [not found]               ` <4721034D.2060502@linux.vnet.ibm.com>
2007-11-13 17:45                 ` Problems while debugging fortran -- DWARF Michael Eager
2007-10-25 20:55             ` Problems while debugging fortran Andreas Schwab
  -- strict thread matches above, loose matches on Subject: below --
2007-09-15 11:37 Carlos Eduardo Seo
2007-09-20 19:47 ` Joel Brobecker
2007-09-20 20:46   ` Carlos Eduardo Seo
2007-09-20 20:56     ` Joel Brobecker
2007-09-21  6:52       ` Daniel Jacobowitz
2007-09-26 21:46         ` Carlos Eduardo Seo
2007-09-26 21:51           ` Joel Brobecker
2007-10-24 16:20             ` Carlos Eduardo Seo
2007-10-24 19:33               ` Joel Brobecker
2007-10-24 19:57                 ` Daniel Jacobowitz
2007-10-24 20:16                   ` Carlos Eduardo Seo
2007-10-24 21:56                     ` Carlos Eduardo Seo
2007-09-26 21:51           ` Pierre Muller
2007-09-23  2:52       ` Carlos Eduardo Seo
2007-09-24 10:01         ` Joel Brobecker
2007-09-24 23:49           ` Carlos Eduardo Seo
2007-09-25  1:29             ` Joel Brobecker
2007-09-25 17:34               ` Carlos Eduardo Seo
2007-09-26  6:29                 ` Joel Brobecker

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=4720FE48.8020200@linux.vnet.ibm.com \
    --to=cseo@linux.vnet.ibm.com \
    --cc=brobecker@adacore.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=gdb@sourceware.org \
    --cc=jimb@codesourcery.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).