public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] archer-jankratochvil-vla: Merge gdb.opt/fortran-string.exp into gdb.dwarf2/dw2-bound-loclist.exp without using unpredictable -O2 compilation.
@ 2011-01-25 20:20 jkratoch
0 siblings, 0 replies; only message in thread
From: jkratoch @ 2011-01-25 20:20 UTC (permalink / raw)
To: archer-commits
The branch, archer-jankratochvil-vla has been updated
via 343a8d223988ee76e7df61e7f0cb13c34b034391 (commit)
from 7e232e24ecbf52c751c3af7e9479cb4502845ab0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 343a8d223988ee76e7df61e7f0cb13c34b034391
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Tue Jan 25 21:19:06 2011 +0100
Merge gdb.opt/fortran-string.exp into gdb.dwarf2/dw2-bound-loclist.exp without
using unpredictable -O2 compilation.
-----------------------------------------------------------------------
Summary of changes:
gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S | 34 ++++++++++++++++++++
gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp | 3 ++
gdb/testsuite/gdb.opt/fortran-string.exp | 39 ------------------------
gdb/testsuite/gdb.opt/fortran-string.f90 | 28 -----------------
4 files changed, 37 insertions(+), 67 deletions(-)
delete mode 100644 gdb/testsuite/gdb.opt/fortran-string.exp
delete mode 100644 gdb/testsuite/gdb.opt/fortran-string.f90
First 500 lines of diff:
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S b/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
index 7fb00ea..aac3baa 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
@@ -62,6 +62,19 @@ vardata:
.4byte .Llenb_var-.Lcu1_begin /* DW_AT_upper_bound */
.byte 0 /* End of children of die */
+ /* DW_AT_upper_bound is referencing register. */
+.Larrayreg_type:
+ .uleb128 2 /* Abbrev: DW_TAG_array_type */
+ .4byte .Lchar_type-.Lcu1_begin /* DW_AT_type */
+
+ .uleb128 8 /* Abbrev: DW_TAG_subrange_type with block */
+ .4byte .Luint_type-.Lcu1_begin /* DW_AT_type */
+ .byte 0 /* DW_AT_lower_bound */
+ .byte 2f - 1f /* DW_AT_upper_bound */
+1: .byte 0x50 /* DW_OP_reg0 */
+2:
+ .byte 0 /* End of children of die */
+
.Luint_type:
.uleb128 4 /* Abbrev: DW_TAG_base_type */
.4byte .Luint_str /* DW_AT_name */
@@ -103,6 +116,15 @@ vardata:
.4byte vardata /* <addr> */
2:
+ /* DW_AT_upper_bound is referencing register. */
+ .uleb128 6 /* Abbrev: DW_TAG_variable DW_FORM_string */
+ .string "reg_string" /* DW_AT_name */
+ .4byte .Larrayreg_type-.Lcu1_begin /* DW_AT_type */
+ .byte 2f - 1f /* DW_AT_location */
+1: .byte 3 /* DW_OP_addr */
+ .4byte vardata /* <addr> */
+2:
+
.byte 0 /* End of children of CU */
.Lcu1_end:
@@ -200,6 +222,18 @@ vardata:
.byte 0x0 /* Terminator */
.byte 0x0 /* Terminator */
+ .uleb128 8 /* Abbrev code */
+ .uleb128 0x21 /* DW_TAG_subrange_type with block */
+ .byte 0x0 /* no children */
+ .uleb128 0x49 /* DW_AT_type */
+ .uleb128 0x13 /* DW_FORM_ref4 */
+ .uleb128 0x22 /* DW_AT_lower_bound */
+ .uleb128 0xb /* DW_FORM_data1 */
+ .uleb128 0x2f /* DW_AT_upper_bound */
+ .uleb128 0xa /* DW_FORM_block1 */
+ .byte 0x0 /* Terminator */
+ .byte 0x0 /* Terminator */
+
.byte 0x0 /* Terminator */
/* String table */
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp b/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp
index 5dbed3f..815ed93 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp
@@ -49,3 +49,6 @@ gdb_test "ptype a_string" {type = char \[4\]}
gdb_test "p b_string" { = (0x[0-9a-f]+ )?"seennotseen"}
gdb_test "ptype b_string" {type = char \[\]}
+
+# The register contains unpredictable value - the array size.
+gdb_test "ptype reg_string" {type = char \[-?[0-9]+\]}
diff --git a/gdb/testsuite/gdb.opt/fortran-string.exp b/gdb/testsuite/gdb.opt/fortran-string.exp
deleted file mode 100644
index c108ea5..0000000
--- a/gdb/testsuite/gdb.opt/fortran-string.exp
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 2009 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 2 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# This file was written by Jan Kratochvil <jan.kratochvil@redhat.com>.
-
-# Test GDB can cope with Fortran strings having their length present in a CPU
-# register. With -O0 the string length is passed on the stack. To make this
-# test meaningful the follow assertion should pass. It is not being checked
-# here as the "_s" symbol is compiler dependent:
-# (gdb) info address _s
-# Symbol "_s" is a variable in register XX.
-
-set test fortran-string
-set srcfile ${test}.f90
-if { [prepare_for_testing ${test}.exp ${test} ${srcfile} {debug f77 additional_flags=-O2}] } {
- return -1
-}
-
-if ![runto $srcfile:[gdb_get_line_number "s = s"]] then {
- perror "couldn't run to breakpoint MAIN__"
- continue
-}
-
-gdb_test "frame" ".*s='foo'.*"
-gdb_test "ptype s" "type = character\\*3"
-gdb_test "p s" "\\$\[0-9\]* = 'foo'"
diff --git a/gdb/testsuite/gdb.opt/fortran-string.f90 b/gdb/testsuite/gdb.opt/fortran-string.f90
deleted file mode 100644
index e48d520..0000000
--- a/gdb/testsuite/gdb.opt/fortran-string.f90
+++ /dev/null
@@ -1,28 +0,0 @@
-! Copyright 2009 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 2 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, write to the Free Software
-! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-!
-! Ihis file is the Fortran source file for dynamic.exp.
-! Original file written by Jakub Jelinek <jakub@redhat.com>.
-! Modified for the GDB testcase by Jan Kratochvil <jan.kratochvil@redhat.com>.
-
- subroutine f(s)
- character*(*) s
- s = s
- end
-
- program main
- call f ('foo')
- end
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-01-25 20:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-25 20:20 [SCM] archer-jankratochvil-vla: Merge gdb.opt/fortran-string.exp into gdb.dwarf2/dw2-bound-loclist.exp without using unpredictable -O2 compilation jkratoch
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).