1 http://sourceware.org/ml/gdb-patches/2011-05/msg00002.html
2 Subject: [patch] testsuite: Test readline-6.2 "ask" regression
6 this problem does not affect default FSF GDB build as it is using bundled
7 readline-5.1. But with system readline-6.2 and build using:
8 --with-system-readline use installed readline library
10 GDB will no longer ask about displaying too many symbols and dumps them all
15 Display all 21482 possibilities? (y or n)_
19 Display all 22129 possibilities? (y or n)
20 ../../bfd/aout-target.h cs_to_section
21 ../../bfd/aout32.c ctime
22 <screens and screens of dumps without any question>
24 This regression will soon start affecting distros:
25 FSF GDB HEAD - PASS - using bundled readline-5.1
26 fedora-15 - FAIL - using system readline-6.2
27 fedora-14 - PASS - using system readline-6.1
28 debian-6.0 - PASS - using system readline-6.1
29 kubuntu-10.10 - PASS - using system readline-6.1
31 I have asked about it on readline ml:
32 Re: [Bug-readline] callback mode pager disable status
33 https://lists.gnu.org/archive/html/bug-readline/2011-04/msg00012.html
34 The suggested workaround (in fact the readline-5.1 code state) going to patch
35 into the proposed FSF GDB bundled readline-6.2. Distros then can stop using
36 --with-system-readline to still feature recent and system matching readline
37 until readline-7.0 gets released.
39 This regression has been so far caught only with system debug infos installed:
40 -PASS: gdb.base/completion.exp: complete (2) 'p no_var_named_this-'
41 -PASS: gdb.base/completion.exp: complete 'p values[0].a'
42 -PASS: gdb.base/completion.exp: complete 'p values[0] . a'
43 -PASS: gdb.base/completion.exp: complete 'p &values[0] -> a'
44 -PASS: gdb.base/completion.exp: copmletion of field in anonymous union
45 +FAIL: gdb.base/completion.exp: (timeout) complete (2) 'p no_var_named_this-'
46 +FAIL: gdb.base/completion.exp: (timeout) complete 'p values[0].a' 2
47 +FAIL: gdb.base/completion.exp: (timeout) complete 'p values[0] . a' 2
48 +FAIL: gdb.base/completion.exp: (timeout) complete 'p &values[0] -> a' 2
49 +FAIL: gdb.base/completion.exp: copmletion of field in anonymous union
51 I will check it in with no comments.
59 2011-05-01 Jan Kratochvil <jan.kratochvil@redhat.com>
61 * gdb.base/readline-ask.c: New file.
62 * gdb.base/readline-ask.exp: New file.
63 * gdb.base/readline-ask.inputrc: New file.
66 +++ b/gdb/testsuite/gdb.base/readline-ask.c
68 +/* This testcase is part of GDB, the GNU debugger.
70 + Copyright 2011 Free Software Foundation, Inc.
72 + This program is free software; you can redistribute it and/or modify
73 + it under the terms of the GNU General Public License as published by
74 + the Free Software Foundation; either version 3 of the License, or
75 + (at your option) any later version.
77 + This program is distributed in the hope that it will be useful,
78 + but WITHOUT ANY WARRANTY; without even the implied warranty of
79 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
80 + GNU General Public License for more details.
82 + You should have received a copy of the GNU General Public License
83 + along with this program. If not, see <http://www.gnu.org/licenses/>. */
86 +symbol_01_length_40_____________________,
87 +symbol_02_length_40_____________________,
88 +symbol_03_length_40_____________________,
89 +symbol_04_length_40_____________________,
90 +symbol_10_length_40_____________________;
92 +++ b/gdb/testsuite/gdb.base/readline-ask.exp
94 +# Copyright (C) 2011 Free Software Foundation, Inc.
96 +# This program is free software; you can redistribute it and/or modify
97 +# it under the terms of the GNU General Public License as published by
98 +# the Free Software Foundation; either version 3 of the License, or
99 +# (at your option) any later version.
101 +# This program is distributed in the hope that it will be useful,
102 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
103 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
104 +# GNU General Public License for more details.
106 +# You should have received a copy of the GNU General Public License
107 +# along with this program. If not, see <http://www.gnu.org/licenses/>.
109 +set testfile readline-ask
110 +set executable ${testfile}.x
111 +set srcfile ${testfile}.c
112 +set binfile ${objdir}/${subdir}/${executable}
113 +set inputrc ${srcdir}/${subdir}/${testfile}.inputrc
115 +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug}] != "" } {
116 + untested ${testfile}.exp
120 +# INPUTRC gets reset for the next testfile.
121 +setenv INPUTRC $inputrc
122 +clean_restart ${executable}
124 +gdb_test_no_output "set width 50"
125 +gdb_test_no_output "set height 3"
127 +set cmd "p symbol_0"
129 +set test "bell for more message"
130 +gdb_test_multiple "" $test {
137 +set test "more message for 01 and 02"
138 +gdb_test_multiple "" $test {
139 + -re "^\r\nsymbol_01_length_40_____________________\r\nsymbol_02_length_40_____________________\r\n--More--$" {
142 + -re "$gdb_prompt " {
147 +# There get some VT100 characters printed.
150 +set test "more message for 03"
151 +gdb_test_multiple "" $test {
152 + -re "\rsymbol_03_length_40_____________________\r\n--More--$" {
157 +# "$gdb_prompt $" will not match as $cmd gets output: $gdb_prompt p symbol_0
158 +# And "$gdb_prompt p symbol_0" cannot be matched as the default "$gdb_prompt $"
159 +# string from gdb_test_multiple could match earlier.
162 +set test "more finish for 04"
163 +gdb_test_multiple "" $test {
164 + -re "\rsymbol_04_length_40_____________________\r\n$gdb_prompt " {
169 +gdb_test "foo" {No symbol "symbol_0foo" in current context\.} "abort more message"
173 +set test "bell for ask message"
174 +gdb_test_multiple "" $test {
181 +set test "ask message"
182 +gdb_test_multiple "" $test {
183 + -re "^\r\nDisplay all 5 possibilities\\? \\(y or n\\)$" {
186 + -re "$gdb_prompt " {
193 +set test "ask message for 01 and 02"
194 +gdb_test_multiple "" $test {
195 + -re "^\r\nsymbol_01_length_40_____________________\r\nsymbol_02_length_40_____________________\r\n--More--$" {
200 +# There get some VT100 characters printed.
201 +# See the "$gdb_prompt " match like in "more finish for 04".
204 +set test "ask message no"
205 +gdb_test_multiple "" $test {
206 + -re "\r$gdb_prompt " {
211 +gdb_test "foo" {No symbol "symbol_foo" in current context\.} "abort ask message"
213 +++ b/gdb/testsuite/gdb.base/readline-ask.inputrc
215 +# Copyright (C) 2011 Free Software Foundation, Inc.
217 +# This program is free software; you can redistribute it and/or modify
218 +# it under the terms of the GNU General Public License as published by
219 +# the Free Software Foundation; either version 3 of the License, or
220 +# (at your option) any later version.
222 +# This program is distributed in the hope that it will be useful,
223 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
224 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
225 +# GNU General Public License for more details.
227 +# You should have received a copy of the GNU General Public License
228 +# along with this program. If not, see <http://www.gnu.org/licenses/>.
230 +set completion-query-items 5