Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: potential patch for gdb bug c++/20020 - updated
@ 2018-12-07 12:57 Bob Steagall
  2018-12-07 15:49 ` Andrew Burgess
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Steagall @ 2018-12-07 12:57 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 285 bytes --]

Description:

This patch, against released version 8.2, fixes the
problem reported in gdb bug c++/20020, using the
approach described in comment 1 of that report.

Changelog entry:

2018-12-06  Bob Steagall   <bob.steagall.cpp@gmail.com>

        * cp-valprint.c: Fixes bug c++/20020.

[-- Attachment #2: fix-for-20020.patch --]
[-- Type: text/x-patch, Size: 615 bytes --]

--- gdb/cp-valprint.c	2018-09-05 03:27:13.000000000 -0400
+++ gdb/cp-valprint.c.new	2018-12-07 07:41:00.657110092 -0500
@@ -329,9 +329,10 @@ cp_print_value_fields (struct type *type
 		    }
 		  END_CATCH
 
-		  cp_print_static_field (TYPE_FIELD_TYPE (type, i),
-					 v, stream, recurse + 1,
-					 options);
+                  if (v != NULL)
+                      cp_print_static_field (TYPE_FIELD_TYPE (type, i),
+                                             v, stream, recurse + 1,
+                                             options);
 		}
 	      else if (i == vptr_fieldno && type == vptr_basetype)
 		{

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-07 15:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-07 12:57 potential patch for gdb bug c++/20020 - updated Bob Steagall
2018-12-07 15:49 ` Andrew Burgess

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox