From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4029 invoked by alias); 26 Oct 2007 14:31:02 -0000 Received: (qmail 4021 invoked by uid 22791); 26 Oct 2007 14:31:01 -0000 X-Spam-Check-By: sourceware.org Received: from wr-out-0506.google.com (HELO wr-out-0506.google.com) (64.233.184.235) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 26 Oct 2007 14:30:57 +0000 Received: by wr-out-0506.google.com with SMTP id 71so667662wri for ; Fri, 26 Oct 2007 07:30:54 -0700 (PDT) Received: by 10.78.180.18 with SMTP id c18mr2373190huf.1193409053397; Fri, 26 Oct 2007 07:30:53 -0700 (PDT) Received: by 10.78.154.10 with HTTP; Fri, 26 Oct 2007 07:30:53 -0700 (PDT) Message-ID: <7aa837f80710260730q65f698eax6c12049cdb5341cd@mail.gmail.com> Date: Fri, 26 Oct 2007 14:31:00 -0000 From: "Grzegorz Cieslewski" To: gdb@sourceware.org Subject: Re: Problem with setting register value using MI interface In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <7aa837f80710251047h2887f641kab9f0fcdda6ebd49@mail.gmail.com> X-Google-Sender-Auth: 6996e75c238bf186 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/msg00270.txt.bz2 Yes, that is complete output with no commands in between. I was able to replicate it by hand (without my front end) -break-insert *0x102cea88 ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x102cea88",at="",times="0"} (gdb) -exec-run ^running (gdb) *stopped,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x102cea88",func="ATL_slaswp",args=[]} (gdb) -var-create r1 * $r1 ^done,name="r1",numchild="0",value="2146255728",type="uint32_t" (gdb) -var-assign r1 1 &"mi_cmd_var_assign: Could not assign expression to variable object\n" ^error,msg="mi_cmd_var_assign: Could not assign expression to variable object" (gdb) I am currently running on powerpc. I did not get a chance to try this on x86, any ideas how can we debug without porting to x86? On 10/25/07, Vladimir Prus wrote: > 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 > > > -- ===================================================== Grzegorz Cieslewski Research Assistant High-performance Computing & Simulation (HCS) Research Laboratory University of Florida, Dept. of Electrical and Computer Engineering 330 Benton Hall, Gainesville, FL, 32611-6200 Phone: (352) 392-9041 Email: cieslewski@hcs.ufl.edu Web: www.hcs.ufl.edu =====================================================