1 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=224128
3 2007-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5 * gdb.base/charsign.exp, gdb.base/charsign.c: New files.
8 2007-10-19 Jan Kratochvil <jan.kratochvil@redhat.com>
10 Port to GDB-6.7 - only the testcase left, patch has been reverted,
11 char-vectors restricted.
13 --- /dev/null 1 Jan 1970 00:00:00 -0000
14 +++ ./gdb/testsuite/gdb.base/charsign.c 26 Jan 2007 10:32:00 -0000
16 +/* This testcase is part of GDB, the GNU debugger.
18 + Copyright 2007 Free Software Foundation, Inc.
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.
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.
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.
34 + Please email any bugs, comments, and/or additions to this file to:
35 + bug-gdb@prep.ai.mit.edu */
44 +unsigned char u[]="A";
47 +typedef signed char char_s;
48 +typedef unsigned char char_u;
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
56 +# Copyright 2007 Free Software Foundation, Inc.
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.
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.
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.
72 +set testfile charsign
73 +set srcfile ${testfile}.c
74 +set binfile ${objdir}/${subdir}/${testfile}
76 +proc do_test { cflags } {
83 + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug additional_flags=$cflags]] != "" } {
84 + untested "Couldn't compile test program"
88 + # Get things started.
92 + gdb_reinitialize_dir $srcdir/$subdir
95 + # For C programs, "start" should stop in main().
100 + "= \\{65 'A', 0 '\\\\0'\\}"
102 + "= \\{65 'A', 0 '\\\\0'\\}"
103 + gdb_test "p n_typed" \
105 + gdb_test "p s_typed" \
106 + "= \\{65 'A', 0 '\\\\0'\\}"
107 + gdb_test "p u_typed" \
108 + "= \\{65 'A', 0 '\\\\0'\\}"
111 +# The string identification works despite the compiler flags below due to
113 +# if (name && strcmp (name, "char") == 0)
114 +# TYPE_FLAGS (type) |= TYPE_FLAG_NOSIGN;
117 +do_test {-fsigned-char}
118 +do_test {-funsigned-char}