]> git.pld-linux.org Git - packages/gdb.git/blame - gdb-6.7-charsign-test.patch
- typo
[packages/gdb.git] / gdb-6.7-charsign-test.patch
CommitLineData
3a58abaf
AM
1https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=224128
2
32007-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4
5 * gdb.base/charsign.exp, gdb.base/charsign.c: New files.
6 [ stripped ]
7
82007-10-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9
10 Port to GDB-6.7 - only the testcase left, patch has been reverted,
11 char-vectors restricted.
12
13--- /dev/null 1 Jan 1970 00:00:00 -0000
14+++ ./gdb/testsuite/gdb.base/charsign.c 26 Jan 2007 10:32:00 -0000
15@@ -0,0 +1,37 @@
16+/* This testcase is part of GDB, the GNU debugger.
17+
18+ Copyright 2007 Free Software Foundation, Inc.
19+
20+ This program is free software; you can redistribute it and/or modify
21+ it under the terms of the GNU General Public License as published by
22+ the Free Software Foundation; either version 2 of the License, or
23+ (at your option) any later version.
24+
25+ This program is distributed in the hope that it will be useful,
26+ but WITHOUT ANY WARRANTY; without even the implied warranty of
27+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28+ GNU General Public License for more details.
29+
30+ You should have received a copy of the GNU General Public License
31+ along with this program; if not, write to the Free Software
32+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
33+
34+ Please email any bugs, comments, and/or additions to this file to:
35+ bug-gdb@prep.ai.mit.edu */
36+
37+int main()
38+{
39+ return 0;
40+}
41+
42+char n[]="A";
43+signed char s[]="A";
44+unsigned char u[]="A";
45+
46+typedef char char_n;
47+typedef signed char char_s;
48+typedef unsigned char char_u;
49+
50+char_n n_typed[]="A";
51+char_s s_typed[]="A";
52+char_u u_typed[]="A";
53--- /dev/null 1 Jan 1970 00:00:00 -0000
54+++ ./gdb/testsuite/gdb.base/charsign.exp 26 Jan 2007 10:32:00 -0000
51a5ef0f 55@@ -0,0 +1,63 @@
3a58abaf
AM
56+# Copyright 2007 Free Software Foundation, Inc.
57+
58+# This program is free software; you can redistribute it and/or modify
59+# it under the terms of the GNU General Public License as published by
60+# the Free Software Foundation; either version 2 of the License, or
61+# (at your option) any later version.
62+#
63+# This program is distributed in the hope that it will be useful,
64+# but WITHOUT ANY WARRANTY; without even the implied warranty of
65+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
66+# GNU General Public License for more details.
67+#
68+# You should have received a copy of the GNU General Public License
69+# along with this program; if not, write to the Free Software
70+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
71+
3a58abaf
AM
72+set testfile charsign
73+set srcfile ${testfile}.c
74+set binfile ${objdir}/${subdir}/${testfile}
75+
76+proc do_test { cflags } {
77+ global srcdir
78+ global binfile
79+ global subdir
80+ global srcfile
81+ global gdb_prompt
82+
83+ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug additional_flags=$cflags]] != "" } {
84+ untested "Couldn't compile test program"
85+ return -1
86+ }
87+
88+ # Get things started.
89+
90+ gdb_exit
91+ gdb_start
92+ gdb_reinitialize_dir $srcdir/$subdir
93+ gdb_load ${binfile}
94+
95+ # For C programs, "start" should stop in main().
96+
97+ gdb_test "p n" \
98+ "= \"A\""
99+ gdb_test "p s" \
100+ "= \\{65 'A', 0 '\\\\0'\\}"
101+ gdb_test "p u" \
102+ "= \\{65 'A', 0 '\\\\0'\\}"
103+ gdb_test "p n_typed" \
104+ "= \"A\""
105+ gdb_test "p s_typed" \
106+ "= \\{65 'A', 0 '\\\\0'\\}"
107+ gdb_test "p u_typed" \
108+ "= \\{65 'A', 0 '\\\\0'\\}"
109+}
110+
111+# The string identification works despite the compiler flags below due to
112+# gdbtypes.c:
113+# if (name && strcmp (name, "char") == 0)
114+# TYPE_FLAGS (type) |= TYPE_FLAG_NOSIGN;
115+
116+do_test {}
117+do_test {-fsigned-char}
118+do_test {-funsigned-char}
This page took 0.049374 seconds and 4 git commands to generate.