This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: Testsuite regression
I tested your fix on solaris and linux, it seems to work fine. I have
committed it. (Sorry, I know I shouldn't have done it w/o official
approval from Stan).
Elena
Peter.Schauer writes:
> I noticed this to, it is caused by:
>
> 2000-03-14 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
>
> * gdb.base/printcmds.c: Add typedeffed arrays.
>
> which now puts a nonzero word after ctable2 in gdb.base/printcmds.c via
> ArrayInt a1 = {2,4,6,8,10,12,14,16,18,20};
>
> Previous versions had
> int int1dim[12] = {0,1,2,3,4,5,6,7,8,9,10,11};
> after ctable2, putting a zero word there.
>
> So we now have a non zero byte after ctable2 (but only on little endian
> targets).
>
> p &ctable2[15*16]
> asks GDB to print an unsigned char pointer and GDB puts out the contents
> of the pointer as a string as well. As the string is no longer zero
> terminated, GDB appends ellipsis.
>
> It could be fixed by appending a zero byte to ctable2 (but I have tested
> this only lightly):
>
> *** gdb/testsuite/gdb.base/printcmds.c.orig Wed Mar 22 19:08:22 2000
> --- gdb/testsuite/gdb.base/printcmds.c Sun Mar 26 21:34:20 2000
> ***************
> *** 53,59 ****
> 'a','a','a','a','a','a','a','a','a','a','a','a','a','X','X','X',
> 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','X','X',
> 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','X',
> ! 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a'
> };
>
> /* Single and multidimensional arrays to test access and printing of array
> --- 53,59 ----
> 'a','a','a','a','a','a','a','a','a','a','a','a','a','X','X','X',
> 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','X','X',
> 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','X',
> ! 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a', 0
> };
>
> /* Single and multidimensional arrays to test access and printing of array
>
> > Hi all,
> >
> > Somewhere between March 9 and March 15, the following failure appears:
> >
> > FAIL: gdb.base/printcmds.exp: p &ctable2[15*16] with print elements set to 16
> >
> > This is the output from a run where the test still passed:
> >
> > p &ctable2[15*16]
> > $538 = (unsigned char *) 'a' <repeats 16 times>
> >
> > And this the current output:
> >
> > p &ctable2[15*16]
> > $538 = (unsigned char *) 'a' <repeats 16 times>...
> >
> > I'm a bit puzzled though what change is responsible for this
> > regression. Is there anybody else observing this failure?
> >
> > Mark
>
> --
> Peter Schauer pes@regent.e-technik.tu-muenchen.de