From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3241 invoked by alias); 12 Mar 2007 07:29:53 -0000 Received: (qmail 3228 invoked by uid 22791); 12 Mar 2007 07:29:52 -0000 X-Spam-Check-By: sourceware.org Received: from hb17.de (HELO ww17.hb17.de) (80.190.209.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 12 Mar 2007 07:29:47 +0000 Received: from insanenotebook (p57A29FF1.dip0.t-ipconnect.de [87.162.159.241]) by ww17.hb17.de (ww17.hb17.de) with ESMTP id 050F8180C036 for ; Mon, 12 Mar 2007 08:29:40 +0100 (CET) From: "Sascha" To: Subject: Assigning values to type casted vars Date: Mon, 12 Mar 2007 07:29:00 -0000 Message-ID: <000001c76478$30c5a1e0$02b2a8c0@insanenotebook> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-03/txt/msg00161.txt.bz2 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