public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Wu Zhou <woodzltc@cn.ibm.com>
To: gdb@sources.redhat.com
Subject: The root cause for SEGV in evaluating fortran function call, any solution or suggestion?
Date: Wed, 02 Nov 2005 02:39:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.63.0511021033530.3549@linux.site> (raw)
In-Reply-To: <Pine.LNX.4.63.0508221743470.10411@linux.site>

Hi all,

I had found the reason why gdb will drop into SEGV when evaluating the 
fortran function calls.  In g77 (gfortran might be the same), when we try 
to call FUNC_NAME (ARGS), the ARGS is passed as the pointer to the real 
parameters.  

While we issue "print FUNC_NAME (ARGS), these ARGS are passed as the 
original types.  So fortran code can't handle that and SEGV occurs.  
Considering this special argument-passing mechanism, do we have any 
workaround for it in gdb's evaluation code?  Create a dummy memory address 
for the arguments and pass that address instead?  or any others? 

Your comments are highly appreciated.  Thanks a lot. 

Regards
- Wu Zhou

On Mon, 22 Aug 2005, Wu Zhou wrote:

> 
> I just found a problem while using gdb to debug fortran program: gdb will 
> drop into SEGV error while trying to print the result of a function call. 
> I had tried the same test on FC4, SLES9, FC2 and RH9, all reported the 
> same error.
> 
> Anyone has success experience with this?  If you do, please tell me 
> the configuration.  Thanks a buch for that in advance!
> 
> Maybe I need to try more ancient configuration?
> 
> Regards
> - Wu Zhou 
> 

  reply	other threads:[~2005-11-02  2:39 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 ` Wu Zhou [this message]
2005-11-02 14:53   ` The root cause for SEGV in evaluating fortran function call, any solution or suggestion? 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
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=Pine.LNX.4.63.0511021033530.3549@linux.site \
    --to=woodzltc@cn.ibm.com \
    --cc=gdb@sources.redhat.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).