FYI: fix pieces.exp failure

Tom Tromey tromey@redhat.com
Thu Jul 1 15:20:00 GMT 2010


I'm checking this in.

Yesterday Doug pointed out that one of the new pieces.exp tests was
failing.  I tracked this down to a missing "!" -- oops.

This patch fixes the bug.  I also renamed the field in lval_funcs,
because the old name was actively misleading.

Built and regtested on x86-64 (compile farm).
I also ran pieces.exp locally, since it isn't actually tested on x86-64.

Tom

2010-07-01  Tom Tromey  <tromey@redhat.com>

	* value.h (struct lval_funcs) <check_any_valid>: Rename from
	check_all_valid.
	* value.c (value_entirely_optimized_out): Invert result.  Update
	for new function name.

Index: value.c
===================================================================
RCS file: /cvs/src/src/gdb/value.c,v
retrieving revision 1.106
diff -u -r1.106 value.c
--- value.c	28 Jun 2010 21:16:02 -0000	1.106
+++ value.c	1 Jul 2010 15:18:16 -0000
@@ -521,7 +521,7 @@
   if (value->lval != lval_computed
       || !value->location.computed.funcs->check_validity)
     return 1;
-  return value->location.computed.funcs->check_all_valid (value);
+  return !value->location.computed.funcs->check_any_valid (value);
 }
 
 int
Index: value.h
===================================================================
RCS file: /cvs/src/src/gdb/value.h,v
retrieving revision 1.159
diff -u -r1.159 value.h
--- value.h	28 Jun 2010 21:16:02 -0000	1.159
+++ value.h	1 Jul 2010 15:18:16 -0000
@@ -170,7 +170,7 @@
   int (*check_validity) (const struct value *value, int offset, int length);
 
   /* Return 1 if any bit in VALUE is valid, 0 if they are all invalid.  */
-  int (*check_all_valid) (const struct value *value);
+  int (*check_any_valid) (const struct value *value);
 
   /* Return a duplicate of VALUE's closure, for use in a new value.
      This may simply return the same closure, if VALUE's is



More information about the Gdb-patches mailing list