Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Siva Chandra <sivachandra@google.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC - Python Scripting] Extend Value.dereference to dereference C++ reference values
Date: Mon, 12 Mar 2012 21:04:00 -0000	[thread overview]
Message-ID: <87399do7jo.fsf@fleche.redhat.com> (raw)
In-Reply-To: <8762e9ppxq.fsf@fleche.redhat.com> (Tom Tromey's message of "Mon,	12 Mar 2012 13:41:37 -0600")

>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:

Siva> Unless I am missing something, I couldn't find anything which can do
Siva> this in the Python API. Attached is a patch which extends the Python
Siva> API method Value.dereference to 'dereference' C++ reference values as
Siva> well. I am probably overloading the term 'dereference' as used in the
Siva> normal (pointer dereferencing) sense.

Tom> I think that is fine.
[...]
Tom> The code bits are ok with those changes.

Oops, sorry, I am mistaken about this.

Right now, value_ind calls coerce_array, which calls coerce_ref.
So, if you have a reference to a pointer, Value.dereference will end up
dereferencing the pointer.
So, if your patch went in, it would be an incompatible change.

I think you will have to have a new method for this instead.

Tom


      reply	other threads:[~2012-03-12 21:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-12  5:33 Siva Chandra
2012-03-12 19:41 ` Tom Tromey
2012-03-12 21:04   ` Tom Tromey [this message]

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=87399do7jo.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sivachandra@google.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