From: Jim Blandy <jimb@redhat.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: woodzltc@cn.ibm.com, gdb@sources.redhat.com, fortran@gcc.gnu.org
Subject: Re: The root cause for SEGV in evaluating fortran function call, any solution or suggestion?
Date: Thu, 10 Nov 2005 00:49:00 -0000 [thread overview]
Message-ID: <vt2slu58gze.fsf@theseus.home.> (raw)
In-Reply-To: <20051107000229.GC19200@nevyn.them.org> (Daniel Jacobowitz's message of "Sun, 6 Nov 2005 19:02:29 -0500")
Daniel Jacobowitz <drow@false.org> writes:
> On Wed, Nov 02, 2005 at 11:42:36PM -0800, Jim Blandy wrote:
>> The types in the debug information should not reflect the extra level
>> of indirection; the fact that they're passed by reference is just part
>> of the meaning of a Fortran function call. But the location
>> expression should encode the extra level of indirection.
>
> This seems perfectly sensible to me. But the example Wu posted earlier
> does not agree: today gfortran apparently puts out the indirections
> explicitly.
You're talking about this, where 'm' is declared as 'integer', right?
<1><da>: Abbrev Number: 7 (DW_TAG_subprogram)
DW_AT_sibling : <10f>
DW_AT_external : 1
DW_AT_name : res_
DW_AT_decl_file : 1
DW_AT_decl_line : 23
DW_AT_type : <bb>
DW_AT_low_pc : 0x804863f
DW_AT_high_pc : 0x8048655
DW_AT_frame_base : 1 byte block: 55 (DW_OP_reg5)
<2><f5>: Abbrev Number: 8 (DW_TAG_formal_parameter)
DW_AT_name : m
DW_AT_type : <10f> =====> This is a const pointer to integer
DW_AT_artificial : 1
DW_AT_location : 2 byte block: 91 8 (DW_OP_fbreg: 8)
<1><10f>: Abbrev Number: 9 (DW_TAG_const_type)
DW_AT_type : <114>
<1><114>: Abbrev Number: 10 (DW_TAG_pointer_type)
DW_AT_byte_size : 4
DW_AT_type : <bb>
<1><bb>: Abbrev Number: 6 (DW_TAG_base_type)
DW_AT_name : integer
DW_AT_byte_size : 4
DW_AT_encoding : 5 (signed)
> So it sounds like gfortran will need to be fixed.
Yep. The types in the Dwarf information should match the types as
they appear in the source language.
next prev parent reply other threads:[~2005-11-10 0:49 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-22 10:14 [GDB & Fortran] Anyone has success experience with printing the result of Fortran function calls? Wu Zhou
2005-11-02 2:39 ` The root cause for SEGV in evaluating fortran function call, any solution or suggestion? Wu Zhou
2005-11-02 14:53 ` Daniel Jacobowitz
2005-11-03 3:12 ` Wu Zhou
2005-11-03 21:34 ` Mark Kettenis
2005-11-04 3:15 ` Wu Zhou
2005-11-04 3:52 ` Wu Zhou
2005-11-07 0:09 ` Daniel Jacobowitz
2005-11-07 4:49 ` Wu Zhou
2005-11-07 5:01 ` Daniel Jacobowitz
2005-11-07 5:16 ` Wu Zhou
2005-11-10 0:55 ` Jim Blandy
2005-11-10 0:59 ` Daniel Jacobowitz
2005-11-11 9:59 ` Jim Blandy
2005-11-04 11:20 ` Dave Korn
2005-11-06 23:58 ` Daniel Jacobowitz
2005-11-02 15:51 ` Mark Kettenis
2005-11-03 2:50 ` Wu Zhou
2005-11-03 7:42 ` Jim Blandy
2005-11-03 10:16 ` Wu Zhou
2005-11-07 0:02 ` Daniel Jacobowitz
2005-11-10 0:49 ` Jim Blandy [this message]
2005-11-10 1:00 ` Daniel Jacobowitz
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=vt2slu58gze.fsf@theseus.home. \
--to=jimb@redhat.com \
--cc=fortran@gcc.gnu.org \
--cc=gdb@sources.redhat.com \
--cc=mark.kettenis@xs4all.nl \
--cc=woodzltc@cn.ibm.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).