Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <ghost@cs.msu.su>
To: gdb-patches@sources.redhat.com,Nick Roberts <nickrob@snap.net.nz>
Subject: Re: -var-update @
Date: Fri, 11 Apr 2008 22:01:00 -0000	[thread overview]
Message-ID: <E1JkPUi-0001nX-As@zigzag.lvk.cs.msu.su> (raw)
In-Reply-To: <200804041331.44206.vladimir@codesourcery.com>

Vladimir Prus wrote:

> On Friday 04 April 2008 00:04:03 Nick Roberts wrote:
>> Vladimir Prus writes:
>>  > On Sunday 30 March 2008 07:54:08 Nick Roberts wrote:
>>  > >  > So, we still don't know why the current code does not work? I think
>>  > >  > we still get to figure out, to make sure that whatever bug there is
>>  > >  > does not affect other cases.
>>  > > 
>>  > > My patch didn't do the right thing (it always marked a floating variable
>>  > > object as changed) but it's along the right lines.  How about this one?
>>  > 
>>  > This patch seem to go in the right direction. I'm somewhat surprised that
>>  > evaluating previous expression gets bogus value, as opposed to getting value
>>  > in the frame where varobj was originally created. Any ideas why is that?
>> 
>> I've not tried to understand _exactly_ what value was being retrieved, but
>> basically var->root->exp was obtained once from gdb_parse_exp_1 in
>> varobj_create and this has symbol information in var->root->exp->elts[2].
>> Previously this would be the symbol information for the variable in the frame
>> for which the variable object was created.  At the same time var->value was
>> being updated relative to the selected frame, which gave an incorrect address
>> value in value->address.  I guess a variable's numeric value on the stack is
>> computed using both the frame address and an address in the symbol table and
>> these were inconsistent.
>> 
>> /* Update expression to new frame.  */
>> tmp_exp = var->root->exp;
>> var->root->exp = tmp_var->root->exp;
>> tmp_var->root->exp = tmp_exp;
>> 
>> Moving var->root->exp into tmp_var->root->exp just ensures that this memory
>> gets freed when tmp_var is deleted:
>> 
>> varobj_delete (tmp_var, NULL, 0);
>> 
>>  > Do you think you can write some test to go along this patch?
>> 
>> We need some tests and documentation at some stage before the next release
>> but perhaps Bogdan can confirm that this patch works for him first.
> 
> Well, if your patch fixes the issue that *you* saw, then it's already an improvement,
> and we better get it into the tree as soon as possible.

Nick,
for avoidance of doubt -- are you planning to finish this patch in near future?
If not, I'll pick it up.

- Volodya



  reply	other threads:[~2008-04-11 20:05 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-26 14:54 Vladimir Prus
2008-03-27  5:17 ` Nick Roberts
2008-03-27  7:00   ` Vladimir Prus
2008-03-27  9:54     ` Nick Roberts
2008-03-27 10:38       ` Vladimir Prus
2008-03-27 13:25         ` Marc Khouzam
2008-03-27 13:37           ` Vladimir Prus
2008-03-27 20:58           ` Nick Roberts
2008-03-28 14:32             ` Marc Khouzam
2008-03-28 16:22               ` Vladimir Prus
2008-03-28 16:33                 ` Marc Khouzam
2008-04-01 13:37             ` André Pönitz
2008-04-01 13:56               ` Marc Khouzam
2008-04-01 14:30                 ` André Pönitz
2008-04-03 19:10                   ` Daniel Jacobowitz
2008-04-03 19:31             ` Daniel Jacobowitz
2008-04-03 20:05               ` Michael Snyder
2008-03-29  5:16         ` Nick Roberts
2008-03-29  6:38           ` Vladimir Prus
2008-03-30  3:54             ` Nick Roberts
2008-04-03 18:55               ` Vladimir Prus
2008-04-03 21:30                 ` Nick Roberts
2008-04-04 11:45                   ` Vladimir Prus
2008-04-11 22:01                     ` Vladimir Prus [this message]
2008-04-11 23:22                       ` 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=E1JkPUi-0001nX-As@zigzag.lvk.cs.msu.su \
    --to=ghost@cs.msu.su \
    --cc=gdb-patches@sources.redhat.com \
    --cc=nickrob@snap.net.nz \
    /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