File gdb-7.10-swo18929.patch of Package gdb.9459

https://sourceware.org/bugzilla/show_bug.cgi?id=18929

---
 gdb/cp-valprint.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: gdb-7.11/gdb/cp-valprint.c
===================================================================
--- gdb-7.11.orig/gdb/cp-valprint.c	2016-03-21 10:04:07.845131361 +0100
+++ gdb-7.11/gdb/cp-valprint.c	2016-03-21 10:04:49.089597879 +0100
@@ -313,11 +313,13 @@ cp_print_value_fields (struct type *type
 		}
 	      else if (field_is_static (&TYPE_FIELD (type, i)))
 		{
-		  struct value *v = NULL;
-
 		  TRY
 		    {
+		      struct value *v = NULL;
 		      v = value_static_field (type, i);
+		      cp_print_static_field (TYPE_FIELD_TYPE (type, i),
+					     v, stream, recurse + 1,
+					     options);
 		    }
 
 		  CATCH (ex, RETURN_MASK_ERROR)
@@ -327,10 +329,6 @@ cp_print_value_fields (struct type *type
 					ex.message);
 		    }
 		  END_CATCH
-
-		  cp_print_static_field (TYPE_FIELD_TYPE (type, i),
-					 v, stream, recurse + 1,
-					 options);
 		}
 	      else if (i == vptr_fieldno && type == vptr_basetype)
 		{
openSUSE Build Service is sponsored by