Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] ptype: show members of an unnamed struct inside an union
@ 2007-08-16 22:39 Carlos Eduardo Seo
  2007-08-24 15:48 ` Joel Brobecker
  2007-08-28 17:14 ` Joel Brobecker
  0 siblings, 2 replies; 22+ messages in thread
From: Carlos Eduardo Seo @ 2007-08-16 22:39 UTC (permalink / raw)
  To: gdb-patches

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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello!

The attached patched fixes an issue described on this post:

http://sourceware.org/ml/gdb-patches/2002-04/msg01114.html

Any comments?

Thanks and regards,

- --
Carlos Eduardo Seo
Software Engineer
IBM Linux Technology Center
E-Mail: cseo@linux.vnet.ibm.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGxNINqvq7Aov/qQARAvUXAKCLQ5hF+jNzreDyiubG2cHFRbDMNQCfYudG
Kuve0/kwqXrVF9k8rxLwtto=
=8Qjd
-----END PGP SIGNATURE-----

[-- Attachment #2: ptype_issue.diff --]
[-- Type: text/plain, Size: 715 bytes --]

2007-08-16   Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>

	gdb/c-typeprint.c (c_type_print_base): check value of 
	TYPE_NFIELDS (type) when displaying members of an
	unnamed struct inside an union.

Index: src-git/gdb/c-typeprint.c
===================================================================
--- src-git.orig/gdb/c-typeprint.c	2007-08-16 15:28:04.000000000 -0700
+++ src-git/gdb/c-typeprint.c	2007-08-16 15:29:07.000000000 -0700
@@ -735,7 +735,7 @@
 	    fputs_filtered (" ", stream);
 	}
       wrap_here ("    ");
-      if (show < 0)
+      if ((show < 0) && (TYPE_NFIELDS (type) == 0))
 	{
 	  /* If we just printed a tag name, no need to print anything else.  */
 	  if (TYPE_TAG_NAME (type) == NULL)

[-- Attachment #3: ptype_issue.diff.sig --]
[-- Type: application/octet-stream, Size: 65 bytes --]

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

end of thread, other threads:[~2007-08-29 21:01 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-16 22:39 [patch] ptype: show members of an unnamed struct inside an union Carlos Eduardo Seo
2007-08-24 15:48 ` Joel Brobecker
2007-08-24 16:02   ` Carlos Eduardo Seo
2007-08-24 17:39     ` Joel Brobecker
2007-08-28 17:14 ` Joel Brobecker
2007-08-28 19:03   ` Luis Machado
2007-08-28 20:04     ` Joel Brobecker
2007-08-28 20:12       ` Carlos Eduardo Seo
2007-08-28 20:34         ` Joel Brobecker
2007-08-29  2:56           ` Daniel Jacobowitz
2007-08-29  4:36             ` Joel Brobecker
2007-08-29 16:30               ` Daniel Jacobowitz
2007-08-29 18:32                 ` Joel Brobecker
2007-08-29 18:36                   ` Daniel Jacobowitz
2007-08-29 18:48                     ` Joel Brobecker
2007-08-29 18:50                       ` Carlos Eduardo Seo
2007-08-29 20:14                       ` Carlos Eduardo Seo
2007-08-29 20:23                         ` Daniel Jacobowitz
2007-08-29 20:26                           ` Carlos Eduardo Seo
2007-08-29 20:41                             ` Joel Brobecker
2007-08-29 20:44                               ` Daniel Jacobowitz
2007-08-29 21:01                                 ` Joel Brobecker

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