forked from Imagelibrary/binutils-gdb
Fortran provides additional entry-points to an subprogram. Those entry-points may have only a subset of parameters of the original subprogram as well. Add support for parsing DW_TAG_entry_point's for Fortran. 2016-06-01 Bernhard Heckel <bernhard.heckel@intel.com> gdb/Changelog: * gdb/dwarf2read.c (add_partial_symbol): Handle DW_TAG_entry_point. (add_partial_entry_point): New. (add_partial_subprogram): Search for entry_points. (process_die): Handle DW_TAG_entry_point. (dwarf2_get_pc_bounds): Update low pc from DWARF. (load_partial_dies): Save DW_TAG_entry_point's. (load_partial_dies): Save DW_TAG_entry_point to hash table. (load_partial_dies): Look into child's of DW_TAG_sub_program for fortran. (new_symbol_full): Process DW_TAG_entry_point. (read_type_die_1): Handle DW_TAG_entry_point. gdb/Testsuite/Changelog: * gdb.fortran/entry_point.f90: New. * gdb.fortran/entry_point.exp: New. Change-Id: I886699802fc940cd9b995806c32a85a05cf57dc4
49 lines
1.1 KiB
Fortran
Executable File
49 lines
1.1 KiB
Fortran
Executable File
! Copyright 2016 Free Software Foundation, Inc.
|
|
!
|
|
! This program is free software; you can redistribute it and/or modify
|
|
! it under the terms of the GNU General Public License as published by
|
|
! the Free Software Foundation; either version 3 of the License, or
|
|
! (at your option) any later version.
|
|
!
|
|
! This program is distributed in the hope that it will be useful,
|
|
! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
! GNU General Public License for more details.
|
|
!
|
|
! You should have received a copy of the GNU General Public License
|
|
! along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
program TestEntryPoint
|
|
|
|
call foo(1,2,3,4)
|
|
call bar(4,5,6,7)
|
|
call tim(1)
|
|
|
|
end program TestEntryPoint
|
|
|
|
subroutine bar(I,J,K,I1)
|
|
INTEGER I,J,K,L,I1
|
|
INTEGER A
|
|
REAL C
|
|
|
|
A = 0
|
|
C = 0.0
|
|
|
|
A = I + K + I1
|
|
goto 1000
|
|
|
|
entry foo(J,K,L,I1)
|
|
A = J + K + L + I1
|
|
|
|
200 C = J
|
|
goto 1000
|
|
|
|
entry tim(J)
|
|
goto 200
|
|
|
|
1000 A = C + 1
|
|
C = J * 1.5
|
|
|
|
return
|
|
end subroutine
|