Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] varobj: call CHECK_TYPEDEF
@ 2003-04-24 20:47 Keith Seitz
  2003-04-24 20:52 ` Daniel Jacobowitz
       [not found] ` <3EA84A9B.5020308@redhat.com>
  0 siblings, 2 replies; 21+ messages in thread
From: Keith Seitz @ 2003-04-24 20:47 UTC (permalink / raw)
  To: gdb-patches

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

Hi,

Well, I am not really sure what this does, or why it is necessary
(check_typedef has no comment in gdbtypes.c), but it's what type_print
code does.

Occasionally, some (C++?) files can show no child objects because
nfields will be zero. After calling CHECK_TYPEDEF, nfields is suddenly
non-zero.

This was first reported as insight/219.

Keith

ChangeLog
2003-04-24  Keith Seitz  <keiths@redhat.com>

        * varobj.c (get_type): Call CHECK_TYPEDEF.
        (get_type_deref): Likewise.



[-- Attachment #2: varobj-check_typedef.patch --]
[-- Type: text/x-patch, Size: 651 bytes --]

Index: varobj.c
===================================================================
RCS file: /cvs/src/src/gdb/varobj.c,v
retrieving revision 1.38
diff -u -p -r1.38 varobj.c
--- varobj.c	4 Dec 2002 00:05:54 -0000	1.38
+++ varobj.c	24 Apr 2003 20:12:52 -0000
@@ -1394,6 +1394,7 @@ get_type (struct varobj *var)
   while (type != NULL && TYPE_CODE (type) == TYPE_CODE_TYPEDEF)
     type = TYPE_TARGET_TYPE (type);
 
+  CHECK_TYPEDEF (type);
   return type;
 }
 
@@ -1409,6 +1410,7 @@ get_type_deref (struct varobj *var)
 		       || TYPE_CODE (type) == TYPE_CODE_REF))
     type = get_target_type (type);
 
+  CHECK_TYPEDEF (type);
   return type;
 }
 

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

end of thread, other threads:[~2003-06-19 21:30 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-24 20:47 [RFA] varobj: call CHECK_TYPEDEF Keith Seitz
2003-04-24 20:52 ` Daniel Jacobowitz
2003-04-24 21:51   ` Keith Seitz
2003-04-24 21:55     ` Daniel Jacobowitz
2003-04-24 22:18       ` Keith Seitz
     [not found] ` <3EA84A9B.5020308@redhat.com>
2003-04-24 22:27   ` Keith Seitz
2003-04-24 22:31     ` Andrew Cagney
2003-04-25  0:18       ` Keith Seitz
2003-04-25  2:15         ` Daniel Jacobowitz
2003-04-25  3:47           ` Andrew Cagney
2003-04-25  5:32             ` Daniel Jacobowitz
2003-06-11 20:07       ` Keith Seitz
2003-06-11 21:01         ` Andrew Cagney
2003-06-11 23:51         ` David Carlton
2003-06-12  0:28           ` Keith Seitz
2003-06-12  1:28             ` Daniel Jacobowitz
2003-06-19 19:28               ` Daniel Jacobowitz
2003-06-19 19:53                 ` Daniel Jacobowitz
2003-06-19 20:33                   ` Keith Seitz
2003-06-19 20:43                     ` Daniel Jacobowitz
2003-06-19 21:30                       ` Keith Seitz

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