Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <ghost@cs.msu.su>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: gdb@sources.redhat.com
Subject: Re: Behaviour of invalid varobjs
Date: Thu, 22 Mar 2007 10:41:00 -0000	[thread overview]
Message-ID: <200703221341.00513.ghost@cs.msu.su> (raw)
In-Reply-To: <17922.23339.685826.963727@kahikatea.snap.net.nz>

On Thursday 22 March 2007 13:32, Nick Roberts wrote:
>  > I think current mainline does something strange
>  > about varobjs that cannot be evaluated:
>  > 
>  >         -var-create null_ptr * **0
>  >         ^done,name="null_ptr",numchild="0",value="0",type="int"
>  >         (gdb)
>  >         -var-update null_ptr
>  >         ^done,changelist=[{name="null_ptr",in_scope="false"}]
>  > 
>  > First, the value of "**0" is not 0, in fact there's no value at all.
>  > Second, given that nothing was changed between the two commands,
>  > it's strange that 'null_ptr' is mentioned in -var-update.
>  > 
>  > Before I go changing code, do everybody agree that:
>  > 
>  > 1. The output of -var-create should either have no "value"
>  > field at all, or value="", as is used in some other context.
>  > 2. The output of -var-update should not include anything.
>  > 
>  > Also, we probably should include in_scope="false" in output of
> 
>             probably should not include?
> 
>  > -var-create, but I'm not quite sure.
> 
> Are there any real situations where you would want to create a variable object
> of a constant?  If not, then, apart from ensuring that such objects don't crash
> GDB, I don't think this is an urgent issue.

That's testcase example. Replace **0 with "**some_pointer" and you have a real
use-case.

- Volodya


  reply	other threads:[~2007-03-22 10:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-18 10:40 Vladimir Prus
2007-03-22 10:32 ` Nick Roberts
2007-03-22 10:41   ` Vladimir Prus [this message]
2007-03-22 23:53     ` Nick Roberts
2007-03-25 10:30       ` Vladimir Prus
2007-03-25 12: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=200703221341.00513.ghost@cs.msu.su \
    --to=ghost@cs.msu.su \
    --cc=gdb@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