Blame SOURCES/gdb-rhbz795424-bitpos-lazyvalue.patch

190f2a
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
190f2a
From: Fedora GDB patches <invalid@email.com>
190f2a
Date: Fri, 27 Oct 2017 21:07:50 +0200
190f2a
Subject: gdb-rhbz795424-bitpos-lazyvalue.patch
190f2a
190f2a
;; Fix `GDB cannot access struct member whose offset is larger than 256MB'
190f2a
;; (RH BZ 795424).
190f2a
;;=push
190f2a
190f2a
diff --git a/gdb/testsuite/gdb.base/longest-types-64bit.S b/gdb/testsuite/gdb.base/longest-types-64bit.S
190f2a
new file mode 100644
190f2a
--- /dev/null
190f2a
+++ b/gdb/testsuite/gdb.base/longest-types-64bit.S
190f2a
@@ -0,0 +1,249 @@
190f2a
+/* This testcase is part of GDB, the GNU debugger.
190f2a
+
190f2a
+   Copyright 2012 Free Software Foundation, Inc.
190f2a
+
190f2a
+   This program is free software; you can redistribute it and/or modify
190f2a
+   it under the terms of the GNU General Public License as published by
190f2a
+   the Free Software Foundation; either version 3 of the License, or
190f2a
+   (at your option) any later version.
190f2a
+
190f2a
+   This program is distributed in the hope that it will be useful,
190f2a
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
190f2a
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
190f2a
+   GNU General Public License for more details.
190f2a
+
190f2a
+   You should have received a copy of the GNU General Public License
190f2a
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
190f2a
+
190f2a
+	.file	"longest-types-64bit.c"
190f2a
+	.text
190f2a
+.Ltext0:
190f2a
+	.globl main
190f2a
+main:
190f2a
+	.comm	f,8,8
190f2a
+.Letext0:
190f2a
+	.file 1 "gdb.base/longest-types-64bit.c"
190f2a
+	.section	.debug_info,"",@progbits
190f2a
+.Ldebug_info0:
190f2a
+	.4byte	0x9a	/* Length of Compilation Unit Info */
190f2a
+	.2byte	0x2	/* DWARF version number */
190f2a
+	.4byte	.Ldebug_abbrev0	/* Offset Into Abbrev. Section */
190f2a
+	.byte	0x8	/* Pointer Size (in bytes) */
190f2a
+	.uleb128 0x1	/* (DIE (0xb) DW_TAG_compile_unit) */
190f2a
+	.4byte	.LASF3	/* DW_AT_producer: "GNU C 4.7.3 20121109 (prerelease)" */
190f2a
+	.byte	0x1	/* DW_AT_language */
190f2a
+	.4byte	.LASF4	/* DW_AT_name: "gdb.base/longest-types-64bit.c" */
190f2a
+	.4byte	.LASF5	/* DW_AT_comp_dir: "" */
190f2a
+	.4byte	.Ldebug_line0	/* DW_AT_stmt_list */
190f2a
+	.uleb128 0x2	/* (DIE (0x1d) DW_TAG_structure_type) */
190f2a
+	.ascii "foo\0"	/* DW_AT_name */
190f2a
+	.4byte	0xff000002	/* DW_AT_byte_size */
190f2a
+	.byte	0x1	/* DW_AT_decl_file (gdb.base/longest-types-64bit.c) */
190f2a
+	.byte	0x12	/* DW_AT_decl_line */
190f2a
+	.4byte	0x4e	/* DW_AT_sibling */
190f2a
+	.uleb128 0x3	/* (DIE (0x2c) DW_TAG_member) */
190f2a
+	.ascii "buf\0"	/* DW_AT_name */
190f2a
+	.byte	0x1	/* DW_AT_decl_file (gdb.base/longest-types-64bit.c) */
190f2a
+	.byte	0x14	/* DW_AT_decl_line */
190f2a
+	.4byte	0x4e	/* DW_AT_type */
190f2a
+	.byte	0x2	/* DW_AT_data_member_location */
190f2a
+	.byte	0x23	/* DW_OP_plus_uconst */
190f2a
+	.uleb128 0
190f2a
+	.uleb128 0x4	/* (DIE (0x3a) DW_TAG_member) */
190f2a
+	.4byte	.LASF0	/* DW_AT_name: "buf2" */
190f2a
+	.byte	0x1	/* DW_AT_decl_file (gdb.base/longest-types-64bit.c) */
190f2a
+	.byte	0x15	/* DW_AT_decl_line */
190f2a
+	.4byte	0x73	/* DW_AT_type */
190f2a
+	.byte	0x7	/* DW_AT_data_member_location */
190f2a
+	.byte	0x23	/* DW_OP_plus_uconst */
190f2a
+	.uleb128 0xffff000000
190f2a
+	.byte	0	/* end of children of DIE 0x1d */
190f2a
+	.uleb128 0x5	/* (DIE (0x4e) DW_TAG_array_type) */
190f2a
+	.4byte	0x6c	/* DW_AT_type */
190f2a
+	.4byte	0x65	/* DW_AT_sibling */
190f2a
+	.uleb128 0x6	/* (DIE (0x57) DW_TAG_subrange_type) */
190f2a
+	.4byte	0x65	/* DW_AT_type */
190f2a
+	.quad	0xfffeffffff	/* DW_AT_upper_bound */
190f2a
+	.byte	0	/* end of children of DIE 0x4e */
190f2a
+	.uleb128 0x7	/* (DIE (0x65) DW_TAG_base_type) */
190f2a
+	.byte	0x8	/* DW_AT_byte_size */
190f2a
+	.byte	0x7	/* DW_AT_encoding */
190f2a
+	.4byte	.LASF1	/* DW_AT_name: "sizetype" */
190f2a
+	.uleb128 0x7	/* (DIE (0x6c) DW_TAG_base_type) */
190f2a
+	.byte	0x1	/* DW_AT_byte_size */
190f2a
+	.byte	0x6	/* DW_AT_encoding */
190f2a
+	.4byte	.LASF2	/* DW_AT_name: "char" */
190f2a
+	.uleb128 0x5	/* (DIE (0x73) DW_TAG_array_type) */
190f2a
+	.4byte	0x6c	/* DW_AT_type */
190f2a
+	.4byte	0x83	/* DW_AT_sibling */
190f2a
+	.uleb128 0x8	/* (DIE (0x7c) DW_TAG_subrange_type) */
190f2a
+	.4byte	0x65	/* DW_AT_type */
190f2a
+	.byte	0x1	/* DW_AT_upper_bound */
190f2a
+	.byte	0	/* end of children of DIE 0x73 */
190f2a
+	.uleb128 0x9	/* (DIE (0x83) DW_TAG_variable) */
190f2a
+	.ascii "f\0"	/* DW_AT_name */
190f2a
+	.byte	0x1	/* DW_AT_decl_file (gdb.base/longest-types-64bit.c) */
190f2a
+	.byte	0x16	/* DW_AT_decl_line */
190f2a
+	.4byte	0x97	/* DW_AT_type */
190f2a
+	.byte	0x1	/* DW_AT_external */
190f2a
+	.byte	0x9	/* DW_AT_location */
190f2a
+	.byte	0x3	/* DW_OP_addr */
190f2a
+	.quad	f
190f2a
+	.uleb128 0xa	/* (DIE (0x97) DW_TAG_pointer_type) */
190f2a
+	.byte	0x8	/* DW_AT_byte_size */
190f2a
+	.4byte	0x1d	/* DW_AT_type */
190f2a
+	.byte	0	/* end of children of DIE 0xb */
190f2a
+	.section	.debug_abbrev,"",@progbits
190f2a
+.Ldebug_abbrev0:
190f2a
+	.uleb128 0x1	/* (abbrev code) */
190f2a
+	.uleb128 0x11	/* (TAG: DW_TAG_compile_unit) */
190f2a
+	.byte	0x1	/* DW_children_yes */
190f2a
+	.uleb128 0x25	/* (DW_AT_producer) */
190f2a
+	.uleb128 0xe	/* (DW_FORM_strp) */
190f2a
+	.uleb128 0x13	/* (DW_AT_language) */
190f2a
+	.uleb128 0xb	/* (DW_FORM_data1) */
190f2a
+	.uleb128 0x3	/* (DW_AT_name) */
190f2a
+	.uleb128 0xe	/* (DW_FORM_strp) */
190f2a
+	.uleb128 0x1b	/* (DW_AT_comp_dir) */
190f2a
+	.uleb128 0xe	/* (DW_FORM_strp) */
190f2a
+	.uleb128 0x10	/* (DW_AT_stmt_list) */
190f2a
+	.uleb128 0x6	/* (DW_FORM_data4) */
190f2a
+	.byte	0
190f2a
+	.byte	0
190f2a
+	.uleb128 0x2	/* (abbrev code) */
190f2a
+	.uleb128 0x13	/* (TAG: DW_TAG_structure_type) */
190f2a
+	.byte	0x1	/* DW_children_yes */
190f2a
+	.uleb128 0x3	/* (DW_AT_name) */
190f2a
+	.uleb128 0x8	/* (DW_FORM_string) */
190f2a
+	.uleb128 0xb	/* (DW_AT_byte_size) */
190f2a
+	.uleb128 0x6	/* (DW_FORM_data4) */
190f2a
+	.uleb128 0x3a	/* (DW_AT_decl_file) */
190f2a
+	.uleb128 0xb	/* (DW_FORM_data1) */
190f2a
+	.uleb128 0x3b	/* (DW_AT_decl_line) */
190f2a
+	.uleb128 0xb	/* (DW_FORM_data1) */
190f2a
+	.uleb128 0x1	/* (DW_AT_sibling) */
190f2a
+	.uleb128 0x13	/* (DW_FORM_ref4) */
190f2a
+	.byte	0
190f2a
+	.byte	0
190f2a
+	.uleb128 0x3	/* (abbrev code) */
190f2a
+	.uleb128 0xd	/* (TAG: DW_TAG_member) */
190f2a
+	.byte	0	/* DW_children_no */
190f2a
+	.uleb128 0x3	/* (DW_AT_name) */
190f2a
+	.uleb128 0x8	/* (DW_FORM_string) */
190f2a
+	.uleb128 0x3a	/* (DW_AT_decl_file) */
190f2a
+	.uleb128 0xb	/* (DW_FORM_data1) */
190f2a
+	.uleb128 0x3b	/* (DW_AT_decl_line) */
190f2a
+	.uleb128 0xb	/* (DW_FORM_data1) */
190f2a
+	.uleb128 0x49	/* (DW_AT_type) */
190f2a
+	.uleb128 0x13	/* (DW_FORM_ref4) */
190f2a
+	.uleb128 0x38	/* (DW_AT_data_member_location) */
190f2a
+	.uleb128 0xa	/* (DW_FORM_block1) */
190f2a
+	.byte	0
190f2a
+	.byte	0
190f2a
+	.uleb128 0x4	/* (abbrev code) */
190f2a
+	.uleb128 0xd	/* (TAG: DW_TAG_member) */
190f2a
+	.byte	0	/* DW_children_no */
190f2a
+	.uleb128 0x3	/* (DW_AT_name) */
190f2a
+	.uleb128 0xe	/* (DW_FORM_strp) */
190f2a
+	.uleb128 0x3a	/* (DW_AT_decl_file) */
190f2a
+	.uleb128 0xb	/* (DW_FORM_data1) */
190f2a
+	.uleb128 0x3b	/* (DW_AT_decl_line) */
190f2a
+	.uleb128 0xb	/* (DW_FORM_data1) */
190f2a
+	.uleb128 0x49	/* (DW_AT_type) */
190f2a
+	.uleb128 0x13	/* (DW_FORM_ref4) */
190f2a
+	.uleb128 0x38	/* (DW_AT_data_member_location) */
190f2a
+	.uleb128 0xa	/* (DW_FORM_block1) */
190f2a
+	.byte	0
190f2a
+	.byte	0
190f2a
+	.uleb128 0x5	/* (abbrev code) */
190f2a
+	.uleb128 0x1	/* (TAG: DW_TAG_array_type) */
190f2a
+	.byte	0x1	/* DW_children_yes */
190f2a
+	.uleb128 0x49	/* (DW_AT_type) */
190f2a
+	.uleb128 0x13	/* (DW_FORM_ref4) */
190f2a
+	.uleb128 0x1	/* (DW_AT_sibling) */
190f2a
+	.uleb128 0x13	/* (DW_FORM_ref4) */
190f2a
+	.byte	0
190f2a
+	.byte	0
190f2a
+	.uleb128 0x6	/* (abbrev code) */
190f2a
+	.uleb128 0x21	/* (TAG: DW_TAG_subrange_type) */
190f2a
+	.byte	0	/* DW_children_no */
190f2a
+	.uleb128 0x49	/* (DW_AT_type) */
190f2a
+	.uleb128 0x13	/* (DW_FORM_ref4) */
190f2a
+	.uleb128 0x2f	/* (DW_AT_upper_bound) */
190f2a
+	.uleb128 0x7	/* (DW_FORM_data8) */
190f2a
+	.byte	0
190f2a
+	.byte	0
190f2a
+	.uleb128 0x7	/* (abbrev code) */
190f2a
+	.uleb128 0x24	/* (TAG: DW_TAG_base_type) */
190f2a
+	.byte	0	/* DW_children_no */
190f2a
+	.uleb128 0xb	/* (DW_AT_byte_size) */
190f2a
+	.uleb128 0xb	/* (DW_FORM_data1) */
190f2a
+	.uleb128 0x3e	/* (DW_AT_encoding) */
190f2a
+	.uleb128 0xb	/* (DW_FORM_data1) */
190f2a
+	.uleb128 0x3	/* (DW_AT_name) */
190f2a
+	.uleb128 0xe	/* (DW_FORM_strp) */
190f2a
+	.byte	0
190f2a
+	.byte	0
190f2a
+	.uleb128 0x8	/* (abbrev code) */
190f2a
+	.uleb128 0x21	/* (TAG: DW_TAG_subrange_type) */
190f2a
+	.byte	0	/* DW_children_no */
190f2a
+	.uleb128 0x49	/* (DW_AT_type) */
190f2a
+	.uleb128 0x13	/* (DW_FORM_ref4) */
190f2a
+	.uleb128 0x2f	/* (DW_AT_upper_bound) */
190f2a
+	.uleb128 0xb	/* (DW_FORM_data1) */
190f2a
+	.byte	0
190f2a
+	.byte	0
190f2a
+	.uleb128 0x9	/* (abbrev code) */
190f2a
+	.uleb128 0x34	/* (TAG: DW_TAG_variable) */
190f2a
+	.byte	0	/* DW_children_no */
190f2a
+	.uleb128 0x3	/* (DW_AT_name) */
190f2a
+	.uleb128 0x8	/* (DW_FORM_string) */
190f2a
+	.uleb128 0x3a	/* (DW_AT_decl_file) */
190f2a
+	.uleb128 0xb	/* (DW_FORM_data1) */
190f2a
+	.uleb128 0x3b	/* (DW_AT_decl_line) */
190f2a
+	.uleb128 0xb	/* (DW_FORM_data1) */
190f2a
+	.uleb128 0x49	/* (DW_AT_type) */
190f2a
+	.uleb128 0x13	/* (DW_FORM_ref4) */
190f2a
+	.uleb128 0x3f	/* (DW_AT_external) */
190f2a
+	.uleb128 0xc	/* (DW_FORM_flag) */
190f2a
+	.uleb128 0x2	/* (DW_AT_location) */
190f2a
+	.uleb128 0xa	/* (DW_FORM_block1) */
190f2a
+	.byte	0
190f2a
+	.byte	0
190f2a
+	.uleb128 0xa	/* (abbrev code) */
190f2a
+	.uleb128 0xf	/* (TAG: DW_TAG_pointer_type) */
190f2a
+	.byte	0	/* DW_children_no */
190f2a
+	.uleb128 0xb	/* (DW_AT_byte_size) */
190f2a
+	.uleb128 0xb	/* (DW_FORM_data1) */
190f2a
+	.uleb128 0x49	/* (DW_AT_type) */
190f2a
+	.uleb128 0x13	/* (DW_FORM_ref4) */
190f2a
+	.byte	0
190f2a
+	.byte	0
190f2a
+	.byte	0
190f2a
+	.section	.debug_aranges,"",@progbits
190f2a
+	.4byte	0x1c	/* Length of Address Ranges Info */
190f2a
+	.2byte	0x2	/* DWARF Version */
190f2a
+	.4byte	.Ldebug_info0	/* Offset of Compilation Unit Info */
190f2a
+	.byte	0x8	/* Size of Address */
190f2a
+	.byte	0	/* Size of Segment Descriptor */
190f2a
+	.2byte	0	/* Pad to 16 byte boundary */
190f2a
+	.2byte	0
190f2a
+	.quad	0
190f2a
+	.quad	0
190f2a
+	.section	.debug_line,"",@progbits
190f2a
+.Ldebug_line0:
190f2a
+	.section	.debug_str,"MS",@progbits,1
190f2a
+.LASF4:
190f2a
+	.string	"gdb.base/longest-types-64bit.c"
190f2a
+.LASF3:
190f2a
+	.string	"GNU C 4.7.3 20121109 (prerelease)"
190f2a
+.LASF0:
190f2a
+	.string	"buf2"
190f2a
+.LASF1:
190f2a
+	.string	"sizetype"
190f2a
+.LASF5:
190f2a
+	.string	""
190f2a
+.LASF2:
190f2a
+	.string	"char"
190f2a
+	.ident	"GCC: (GNU) 4.7.3 20121109 (prerelease)"
190f2a
+	.section	.note.GNU-stack,"",@progbits
190f2a
diff --git a/gdb/testsuite/gdb.base/longest-types-64bit.bz2.uu b/gdb/testsuite/gdb.base/longest-types-64bit.bz2.uu
190f2a
new file mode 100644
190f2a
--- /dev/null
190f2a
+++ b/gdb/testsuite/gdb.base/longest-types-64bit.bz2.uu
190f2a
@@ -0,0 +1,67 @@
190f2a
+begin 755 gdb.base/longest-types-64bit.bz2
190f2a
+M0EIH.3%!62936<'N#OH`"G/________^______?_Y______//]7SQD5'^/_%
190f2a
+M=VY7?F_[X`F]]SG7531-==V:Z-.FW;M.U7=';:UH@<&FD31,E3]J'HE-/TR@
190f2a
+M]4_5/32;%/U3]1--HU/U$#$R'I'J,FC0T-,)B'J#:CU,F@]0`/4:>F@CU/4,
190f2a
+MA@$S2>IH!H`TR/0-$$:9`C(&FHU3VE-J;4\%,@>4T:#]49-J/4`>HT!H#3)^
190f2a
+MJ`!H-``T]0&@-```:'J``&@`:9!`R9,@&3(`#3!#0!H``-#$--`,@``T`T#(
190f2a
+M:`:`&0&@::,0:-```:``-`E-$1#4-3:4]3R9-39(Q/)#3R-30:9#$T!D!H&@
190f2a
+M,CTGI!H#(#0T`#0``T`T`:``-``T`0,F3(!DR``TP0T`:``#0Q#30#(``-`-
190f2a
+M`R&@&@!D!H&FC$&C0``&@`#0)%)H32>JGZ&!)Z1B1X@)DTVC4>H`&0:``R&@
190f2a
+M,C0:``T``,C0``!H``#(`T`:#0U^\?]7K8M.96V/2[?M*DC)>WIUF)H7T\
190f2a
+M[0D)70G25.YB!,:;8Q(;&XPAB4+$Q%:P)PA-;E=!-&$KNR22EM>$:KKRE&\Q
190f2a
+M..M]L1*,!>D!X)RW,[,1I,9N%X-N&2+*:&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+:S%0_37D^EBP+1HU(D?3"%_O2R
190f2a
+M6-#X>AU#<$*!/,W6QC^;O^%]LR&_X'<8X$<3CUU_QFAJ;">H)2443GD4W!4#
190f2a
+?<55!2^6_8J$)-O<>\H0U/6Q^>UG0%W)%.%"0P>X.^@``
190f2a
+`
190f2a
+end
190f2a
diff --git a/gdb/testsuite/gdb.base/longest-types-64bit.c b/gdb/testsuite/gdb.base/longest-types-64bit.c
190f2a
new file mode 100644
190f2a
--- /dev/null
190f2a
+++ b/gdb/testsuite/gdb.base/longest-types-64bit.c
190f2a
@@ -0,0 +1,28 @@
190f2a
+/* This testcase is part of GDB, the GNU debugger.
190f2a
+
190f2a
+   Copyright 2012 Free Software Foundation, Inc.
190f2a
+
190f2a
+   This program is free software; you can redistribute it and/or modify
190f2a
+   it under the terms of the GNU General Public License as published by
190f2a
+   the Free Software Foundation; either version 3 of the License, or
190f2a
+   (at your option) any later version.
190f2a
+
190f2a
+   This program is distributed in the hope that it will be useful,
190f2a
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
190f2a
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
190f2a
+   GNU General Public License for more details.
190f2a
+
190f2a
+   You should have received a copy of the GNU General Public License
190f2a
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
190f2a
+
190f2a
+struct foo
190f2a
+{
190f2a
+  char buf[0xffff000000];
190f2a
+  char buf2[2];
190f2a
+} *f;
190f2a
+
190f2a
+int
190f2a
+main (void)
190f2a
+{
190f2a
+  return 0;
190f2a
+}
190f2a
diff --git a/gdb/testsuite/gdb.base/longest-types-64bit.exp b/gdb/testsuite/gdb.base/longest-types-64bit.exp
190f2a
new file mode 100644
190f2a
--- /dev/null
190f2a
+++ b/gdb/testsuite/gdb.base/longest-types-64bit.exp
190f2a
@@ -0,0 +1,59 @@
190f2a
+# This testcase is part of GDB, the GNU debugger.
190f2a
+
190f2a
+# Copyright 2012 Free Software Foundation, Inc.
190f2a
+
190f2a
+# This program is free software; you can redistribute it and/or modify
190f2a
+# it under the terms of the GNU General Public License as published by
190f2a
+# the Free Software Foundation; either version 3 of the License, or
190f2a
+# (at your option) any later version.
190f2a
+#
190f2a
+# This program is distributed in the hope that it will be useful,
190f2a
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
190f2a
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
190f2a
+# GNU General Public License for more details.
190f2a
+#
190f2a
+# You should have received a copy of the GNU General Public License
190f2a
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
190f2a
+
190f2a
+standard_testfile .c longest-types-64bit.S
190f2a
+
190f2a
+proc test { name } { with_test_prefix $name {
190f2a
+    # 64-bit array size should not overflow
190f2a
+    gdb_test "print &f->buf" {= \(char \(\*\)\[1099494850560\]\) 0x0}
190f2a
+
190f2a
+    # The offset should not overflow
190f2a
+    gdb_test "print &f->buf2" {= \(char \(\*\)\[2\]\) 0xffff000000}
190f2a
+}}
190f2a
+
190f2a
+
190f2a
+# Test 64-bit file first as it is not compiled so its compilation never fails.
190f2a
+
190f2a
+set file64bitbz2uu ${srcdir}/${subdir}/${testfile}.bz2.uu
190f2a
+set file64bit [standard_output_file ${testfile}]
190f2a
+
190f2a
+if {[catch "system \"uudecode -o - ${file64bitbz2uu} | bzip2 -dc >${file64bit}\""] != 0} {
190f2a
+    untested "failed uudecode or bzip2"
190f2a
+    return -1
190f2a
+}
190f2a
+file stat ${file64bit} file64bitstat
190f2a
+if {$file64bitstat(size) != 9501} {
190f2a
+    untested "uudecode or bzip2 produce invalid result"
190f2a
+    return -1
190f2a
+}
190f2a
+
190f2a
+clean_restart ${file64bit}
190f2a
+
190f2a
+#if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile2 {nodebug}] } {
190f2a
+#    return -1
190f2a
+#}
190f2a
+
190f2a
+test "64bit"
190f2a
+
190f2a
+
190f2a
+# And here is the native build test.
190f2a
+
190f2a
+if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile {debug quiet}] } {
190f2a
+    return -1
190f2a
+}
190f2a
+
190f2a
+test "native"