This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug fortran/15208] New: Accessing a variable passed to a subroutineafter an inferior call is not possible
- From: "keven.boell at intel dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 27 Feb 2013 09:49:09 +0000
- Subject: [Bug fortran/15208] New: Accessing a variable passed to a subroutineafter an inferior call is not possible
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=15208
Bug #: 15208
Summary: Accessing a variable passed to a subroutine after an
inferior call is not possible
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned@sourceware.org
ReportedBy: keven.boell@intel.com
Classification: Unclassified
Created attachment 6905
--> http://sourceware.org/bugzilla/attachment.cgi?id=6905
reproducer/dejagnu test in a single patch
When trying to call a subroutine which has a parameter, using an inferior call,
GDB is not able to read the variable correctly. Instead a "error reading
variable: Cannot access memory at address" message is shown.
The simple test program [1] below was compiled using gfortran 4.6.3 with -g.
Additionally you'll find a simple dejagnu test as a single patch attached,
which reproduces the issue.
After starting the program in GDB, the user may try to call the subroutine
"sub" using an inferior call and pass a value to it. At the variable read (w =
v) a SIGSEGV will be reported to the user:
(gdb) call sub(42)
Program received signal SIGSEGV, Segmentation fault.
0x00000000004005d0 in s2 (v=<error reading variable: Cannot access memory at
address 0x2a>) at ic.f90:5
[1] Simple test program:
--
subroutine sub (v)
implicit none
INTEGER, intent(in) :: v
INTEGER :: w
w = v
return
END subroutine
PROGRAM inferior
implicit none
CALL sub(5)
END PROGRAM inferior
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.