Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: Vladimir Prus <ghost@cs.msu.su>
Cc: Daniel Jacobowitz <drow@false.org>,
		Jim Blandy <jimb@codesourcery.com>,
	gdb-patches@sources.redhat.com
Subject: Re: MI: fix base members in references
Date: Thu, 07 Dec 2006 10:36:00 -0000	[thread overview]
Message-ID: <17783.60807.26167.746362@kahikatea.snap.net.nz> (raw)
In-Reply-To: <200612070921.25566.ghost@cs.msu.su>

 >                                                   I guess we need to first
 > commit the primary references patch and then fix c_number_of_children. Not
 > that I find references to pointers very common thing, but better be correct.

The patch below seems to fix it for me.  Its a diff on 1.63 _with_ your
yet to be committed changes.

Since we have been the only two people directly contributing to for a while now
MI, and as it would stop the patches piling up, perhaps Vladimir (if
interested) and me could now be jointly made maintainers of MI.  For the extent
of changes that we could make without prior approval, I have in mind all the
files in the mi directory plus varobj.c.  That should insulate the rest of GDB
while exposing Insight slightly.  In any case we would be conservative in our
changes, and now might be a good time to start with the next release from the
main trunk being a long way off.

WDYT?

-- 
Nick                                           http://www.inet.net.nz/~nickrob


*** /home/nickrob/src6/gdb/varobj.c~	2006-12-07 10:54:18.000000000 +1300
--- /home/nickrob/src6/gdb/varobj.c	2006-12-07 23:11:34.000000000 +1300
*************** cplus_number_of_children (struct varobj 
*** 2179,2184 ****
--- 2179,2186 ----
    if (!CPLUS_FAKE_CHILD (var))
      {
        type = get_type_deref (var);
+       if (TYPE_CODE (type) == TYPE_CODE_PTR)
+ 	type = get_target_type (type);
  
        if (((TYPE_CODE (type)) == TYPE_CODE_STRUCT) ||
  	  ((TYPE_CODE (type)) == TYPE_CODE_UNION))
*************** cplus_number_of_children (struct varobj 
*** 2205,2210 ****
--- 2207,2214 ----
        int kids[3];
  
        type = get_type_deref (var->parent);
+       if (TYPE_CODE (type) == TYPE_CODE_PTR)
+ 	type = get_target_type (type);
  
        cplus_class_num_children (type, kids);
        if (strcmp (var->name, "public") == 0)
*************** cplus_name_of_child (struct varobj *pare
*** 2269,2274 ****
--- 2273,2281 ----
    else
      type = get_type_deref (parent);
  
+   if (TYPE_CODE (type) == TYPE_CODE_PTR)
+     type = get_target_type (type);
+ 
    name = NULL;
    switch (TYPE_CODE (type))
      {
*************** cplus_value_of_child (struct varobj *par
*** 2404,2411 ****
    else
      type = get_type_deref (parent);
  
!   value = NULL;
  
    if (((TYPE_CODE (type)) == TYPE_CODE_STRUCT) ||
        ((TYPE_CODE (type)) == TYPE_CODE_UNION))
      {
--- 2411,2420 ----
    else
      type = get_type_deref (parent);
  
!   if (TYPE_CODE (type) == TYPE_CODE_PTR)
!     type = get_target_type (type);
  
+   value = NULL;
    if (((TYPE_CODE (type)) == TYPE_CODE_STRUCT) ||
        ((TYPE_CODE (type)) == TYPE_CODE_UNION))
      {
*************** cplus_type_of_child (struct varobj *pare
*** 2481,2486 ****
--- 2490,2498 ----
    else
      t = get_type_deref (parent);
  
+   if (TYPE_CODE (t) == TYPE_CODE_PTR)
+     t = get_target_type (t);
+ 
    type = NULL;
    switch (TYPE_CODE (t))
      {


  parent reply	other threads:[~2006-12-07 10:36 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-29 12:56 Vladimir Prus
2006-12-05 13:23 ` Vladimir Prus
2006-12-05 21:32   ` Jim Blandy
2006-12-05 20:59     ` Nick Roberts
2006-12-05 21:12       ` Daniel Jacobowitz
2006-12-05 21:25         ` Nick Roberts
2006-12-05 21:47           ` Daniel Jacobowitz
2006-12-05 22:27             ` Jim Blandy
2006-12-06  8:44             ` Vladimir Prus
2006-12-07  2:22             ` Nick Roberts
2006-12-07  5:24               ` Nick Roberts
2006-12-07  6:22                 ` Vladimir Prus
2006-12-07  6:53                   ` Vladimir Prus
2006-12-07 10:36                   ` Nick Roberts [this message]
2006-12-08 12:53                     ` Vladimir Prus
2006-12-09 22:10                     ` Vladimir Prus
2006-12-05 20:45 ` Daniel Jacobowitz
2006-12-06  9:04   ` Vladimir Prus
2006-12-06 20:29     ` Joel Brobecker
2006-12-06 20:33       ` Vladimir Prus
2006-12-09 21:27 Nick Roberts
2006-12-09 21:38 ` Vladimir Prus
2006-12-09 21:50   ` Nick Roberts
2006-12-09 22:15     ` Vladimir Prus
2006-12-10  4:19       ` Nick Roberts
2006-12-10 11:24         ` Vladimir Prus
2006-12-10 20:09           ` Nick Roberts
2006-12-10 20:42         ` Daniel Jacobowitz
2006-12-10 21:20           ` Nick Roberts
2006-12-11  2:35             ` Daniel Jacobowitz
2006-12-11  5:58               ` Nick Roberts
2006-12-11  7:22                 ` Vladimir Prus
2006-12-11  8:03                   ` Nick Roberts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17783.60807.26167.746362@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=ghost@cs.msu.su \
    --cc=jimb@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox