Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Sascha" <sascha@pasalacqua.de>
To: <gdb@sourceware.org>
Subject: Assigning values to type casted vars
Date: Mon, 12 Mar 2007 07:29:00 -0000	[thread overview]
Message-ID: <000001c76478$30c5a1e0$02b2a8c0@insanenotebook> (raw)

Hi,

Eclipse CDT supports casting variables to a different type. This is done by
creating an MI var like this:

1466-var-create - * (int)myValue
1466^done,name="var35",numchild="0",value="1",type="int"

1467-var-show-attributes var35
1467^done,attr="editable"

The var is "editable". But in most cases GDB does report an error when
assigning a value to the var:

1472-var-assign var35 0x1234
1472^error,msg="mi_cmd_var_assign: Could not assign expression to varible
object"


The error occurs for most casts like int -> int, int -> char, char -> int,
... . It only seems to work for struct -> int, struct -> short int, ...
(most of the time).

Does this happen for reason, or should I raise a bug ?

Eclipse CDT bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=73598

Sascha


             reply	other threads:[~2007-03-12  7:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-12  7:29 Sascha [this message]
2007-03-12 10:31 ` 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='000001c76478$30c5a1e0$02b2a8c0@insanenotebook' \
    --to=sascha@pasalacqua.de \
    --cc=gdb@sourceware.org \
    /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