This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project. See the GDB home page for more information.


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

[PATCH] Fix for miscexprs test "failure"


Hi.

Attached is a patch which solves the single "failure" in the
'miscexprs' tests - the problem is with the test program, not
gdb.

The test script asks gdb to print out the address of character
array member in a structure. The problem is that the array is not
initialized to anything, so when printing out the value, you
get something like

$1 = 0xbfffef34 "{stuff}"

and the test expects

$1 = 0xbfffef34 ""

My solution is simple as is indicated in the patch.

Enjoy.

Art Haas

==============================
--- gdb-4.17.86/gdb/testsuite/gdb.base/miscexprs.c.orig	Mon Jan  4 09:34:31 1999
+++ gdb-4.17.86/gdb/testsuite/gdb.base/miscexprs.c	Tue Mar 16 16:19:22 1999
@@ -61,6 +61,7 @@
 struct {
     short s[400];
 } sbig; 
+    cbig.c[0] = '\0';
     ibig.i[100] = 5;
     cbig.c[100] = 'A';
     fbig.f[100] = 11.99999;