Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: MI testsuite failures [PATCH]
Date: Mon, 08 Jan 2007 22:33:00 -0000	[thread overview]
Message-ID: <17826.50865.340113.767106@kahikatea.snap.net.nz> (raw)
In-Reply-To: <20070108171149.GC15412@nevyn.them.org>

 > > Here's a patch with fixes for the testsuite.  I've made a further change to
 > > varobj.c to fix a failure in mi-var-child.exp.
 > 
 > Was this:
 > 
 > FAIL: gdb.mi/mi-var-child.exp: update all vars int_ptr_ptr and children changed
 > FAIL: gdb.mi/mi-var-child.exp: update all vars struct_declarations.long_array.0 changed
 > 
 > ?

Certainly the second, which was to do with value == NULL and
var->value != NULL.

 > The patch below fixes those, and this one too:
 > 
 > FAIL: gdb.mi/mi-var-cmd.exp: assign same value to func (update)

Yes, this looks right and is much simpler, but I just couldn't see how to do
it.

 > I can't quite tell what your patch does, but I do see why these
 > failures happen.  Because the var->updated and the var->value
 > previously NULL cases were not updating print_value, you sometimes had
 > to -var-update twice to get a value to leave the list.

My patch defers the updating of the variable object until -var-update is
issued.

 > This is the same reason you had to add spurious -var-update's to the
 > testsuite.  

I don't know that I'd call them spurious.  The command -var-assign seems a bit
anomalous to me.  It could just set the value like "set var i=10".  I think the
updating of variable objects should be left to -var-update, but this change
might be too radical at this stage.

 > The first time we do that it's a good thing, i.e. we want lpcharacter
 > to be listed now.  The second time it's kind of dodgy: lpcharacter
 > is not a NULL terminated string and it just so happens that linteger
 > is right after lcharacter in memory, so -var-assign'ing to linteger
 > "changes" the string pointer to by lpcharacter.

I think that's the best we can do; the `string' will be displayed differently
in the watch window.

 > 2007-01-08  Daniel Jacobowitz  <dan@codesourcery.com>
 > 
 > 	* varobj.c (install_new_value): Always update print_value.
 > 	(value_get_print_value): Immediately return NULL for missing
 > 	values.
 > 
 > 2007-01-08  Nick Roberts  <nickrob@snap.net.nz>
 > 	    Daniel Jacobowitz  <dan@codesourcery.com>
 > 
 > 	* gdb.mi/mi-var-cmd.exp: Expect lpcharacter to update when
 > 	lcharacter or linteger change.  Correct duplicated test name.
 > 	* gdb.mi/mi2-var-cmd.exp: Likewise.

Yes, I'd be happy to see these changes installed.

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


  reply	other threads:[~2007-01-08 22:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-07 23:34 MI testsuite failures Nick Roberts
2007-01-08  5:53 ` MI testsuite failures [PATCH] Nick Roberts
2007-01-08 17:11   ` Daniel Jacobowitz
2007-01-08 22:33     ` Nick Roberts [this message]
2007-01-08 22:45       ` Daniel Jacobowitz
2007-01-08 23:27         ` Nick Roberts
2007-01-09 14:26           ` Daniel Jacobowitz
2007-01-09 22:18             ` Nick Roberts
2007-01-09 22:50               ` Daniel Jacobowitz
2007-01-10  7:09                 ` Nick Roberts
2007-01-10 20:23                   ` Daniel Jacobowitz
2007-01-08  7:44 ` MI testsuite failures Vladimir Prus
2007-01-08  8:15   ` Nick Roberts
2007-01-08  9:40     ` Vladimir Prus

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=17826.50865.340113.767106@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.redhat.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