This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Help, minor bug in testsuite


On Friday 04 June 2010 23:26:55, Michael Snyder wrote:
> OK, not sure what to do with this one.  The test in gdb.base/list.exp
> says:
> 
>      # Try listsize of 0 which suppresses printing.
> 
>      set_listsize 0
>      gdb_test "list 1" "" "listsize of 0 suppresses output"
> 
> 
> However, the test only passes because "" is the same as ".*".
> In fact, the output is NOT suppressed, and I can find nowhere
> in the documentation that says it SHOULD be suppressed.

(Without commenting on whether setting listsize to 0 to suppress
output had any value,) it appears to be a regression at some
point.  Note with GDB 6.0:

 >~/gdb/ancient/build-6.0/gdb/gdb ~/gdb/tests/main32
 GNU gdb 6.0
 Copyright 2003 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you are
 welcome to change it and/or distribute copies of it under certain conditions.
 Type "show copying" to see the conditions.
 There is absolutely no warranty for GDB.  Type "show warranty" for details.
 This GDB was configured as "i686-pc-linux-gnu"...
 (gdb) list 1
 1       #include <stdio.h>
 2
 3       int main (int argc, char **argv)
 4       {
 5         return 0;
 6       }
 (gdb) set listsize 0
 (gdb) list 1
 (gdb) 

vs current gdb:

 >./gdb ~/gdb/tests/main32
 GNU gdb (GDB) 7.1.50.20100601-cvs
 Copyright (C) 2010 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
 and "show warranty" for details.
 This GDB was configured as "x86_64-unknown-linux-gnu".
 For bug reporting instructions, please see:
 <http://www.gnu.org/software/gdb/bugs/>...
 Reading symbols from /home/pedro/gdb/tests/main32...done.
 (gdb) set listsize 0
 (gdb) list 1
 1       #include <stdio.h>
 2
 3       int main (int argc, char **argv)
 4       {
 5         return 0;
 6       }
 (gdb) 


> I'm not sure what to do with this test...

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]