Skip to content

Commit 079dab6

Browse files
ivanivanov884jeffmahoney
authored andcommitted
gdb-fortran-frame-string.patch
;; Display Fortran strings in backtraces. ;;=fedoratest http://sourceware.org/ml/gdb-patches/2014-07/msg00709.html Hi, for Fortran it fixes displaying normal strings also in frames/backtraces: (gdb) frame -> The patch is simple and I do not see why it should not be this way. For C/C++ TYPE_CODE_STRING is not used. I am not aware of Pascal but that language is currently not really much supported in GDB anyway. This was a part of my archer/jankratochvil/vla branch but it is not a part of the Intel VLA patchset as it in fact is completely unrelated to "VLA". No regressions on {x86_64,x86_64-m32,i686}-fedora22pre-linux-gnu. Thanks, Jan
1 parent 5dbe136 commit 079dab6

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright 2014 Free Software Foundation, Inc.
2+
3+
# This program is free software; you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation; either version 2 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program; if not, write to the Free Software
15+
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16+
17+
standard_testfile .f90
18+
if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90}] } {
19+
return -1
20+
}
21+
22+
if ![runto MAIN__] then {
23+
perror "couldn't run to breakpoint MAIN__"
24+
continue
25+
}
26+
27+
gdb_breakpoint [gdb_get_line_number "s = s"]
28+
gdb_continue_to_breakpoint "s = s"
29+
30+
gdb_test "ptype s" {type = character\*3}
31+
gdb_test "p s" " = 'foo'"
32+
33+
# Fix rejected upstream:
34+
# https://sourceware.org/ml/gdb-patches/2014-07/msg00768.html
35+
setup_kfail "rejected" *-*-*
36+
gdb_test "frame" { \(s='foo', .*}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
! Copyright 2014 Free Software Foundation, Inc.
2+
!
3+
! This program is free software; you can redistribute it and/or modify
4+
! it under the terms of the GNU General Public License as published by
5+
! the Free Software Foundation; either version 2 of the License, or
6+
! (at your option) any later version.
7+
!
8+
! This program is distributed in the hope that it will be useful,
9+
! but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
! GNU General Public License for more details.
12+
!
13+
! You should have received a copy of the GNU General Public License
14+
! along with this program; if not, write to the Free Software
15+
! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16+
!
17+
! Ihis file is the Fortran source file for dynamic.exp.
18+
! Original file written by Jakub Jelinek <[email protected]>.
19+
! Modified for the GDB testcase by Jan Kratochvil <[email protected]>.
20+
21+
subroutine f(s)
22+
character*3 s
23+
s = s
24+
end
25+
26+
program main
27+
call f ('foo')
28+
end

0 commit comments

Comments
 (0)