From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31136 invoked by alias); 25 Oct 2007 18:00:39 -0000 Received: (qmail 31126 invoked by uid 22791); 25 Oct 2007 18:00:38 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 25 Oct 2007 18:00:32 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Il70H-00031k-6I for gdb@sources.redhat.com; Thu, 25 Oct 2007 18:00:21 +0000 Received: from 77.246.241.246 ([77.246.241.246]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 25 Oct 2007 18:00:21 +0000 Received: from ghost by 77.246.241.246 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 25 Oct 2007 18:00:21 +0000 To: gdb@sources.redhat.com From: Vladimir Prus Subject: Re: Problem with setting register value using MI interface Date: Thu, 25 Oct 2007 18:00:00 -0000 Message-ID: References: <7aa837f80710251047h2887f641kab9f0fcdda6ebd49@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.4 X-IsSubscribed: yes 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-10/txt/msg00235.txt.bz2 Grzegorz Cieslewski wrote: > Hi, > > I am trying to write a value to a register using MI2 interface. > Unfortunately sometimes th -var-assign command fails and gives me > error. Does any one know why is that? > > GDB<< -var-create r1 * $r1 > GDB>> ^done,name="r1",numchild="0",value="2140372880",type="uint32_t" > GDB>> (gdb) > GDB<< -var-info-type r1 > GDB>> ^done,type="uint32_t" > GDB>> (gdb) > GDB<< -var-set-format r1 hexadecimal > GDB>> ^done,format="hexadecimal" > GDB>> (gdb) > GDB<< -var-evaluate-expression r1 > GDB>> ^done,value="0x7f937f90" > GDB>> (gdb) > GDB<< -var-info-type r1 > GDB>> ^done,type="uint32_t" > GDB>> (gdb) > GDB<< -var-set-format r1 hexadecimal > GDB>> ^done,format="hexadecimal" > GDB>> (gdb) > GDB<< -var-assign r1 1 > GDB>> &"mi_cmd_var_assign: Could not assign expression to variable > object\n" GDB>> ^error,msg="mi_cmd_var_assign: Could not assign expression > to variable object" Is this a complete output, with no commands in between? Can you reproduce this on x86, and if so, can you post a complete reproduction recipe? The only 'error' I immediately see on that code path is this: if (!frame) error (_("Value being assigned to is no longer active.")); in value_assign, but I don't think it can ever fire unless you change frames above. - Volodya