* Problem with setting register value using MI interface @ 2007-10-25 17:48 Grzegorz Cieslewski 2007-10-25 18:00 ` Vladimir Prus 0 siblings, 1 reply; 6+ messages in thread From: Grzegorz Cieslewski @ 2007-10-25 17:48 UTC (permalink / raw) To: gdb 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" GDB>> (gdb) GDB<< set $r1=1 GDB>> &"set $r1=1\n" GDB>> &"Cannot access memory at address 0x1\n" GDB>> ^error,msg="Cannot access memory at address 0x1" GDB>> (gdb) -- ===================================================== 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 ===================================================== ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem with setting register value using MI interface 2007-10-25 17:48 Problem with setting register value using MI interface Grzegorz Cieslewski @ 2007-10-25 18:00 ` Vladimir Prus 2007-10-25 18:06 ` Daniel Jacobowitz 2007-10-26 14:31 ` Grzegorz Cieslewski 0 siblings, 2 replies; 6+ messages in thread From: Vladimir Prus @ 2007-10-25 18:00 UTC (permalink / raw) To: gdb 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem with setting register value using MI interface 2007-10-25 18:00 ` Vladimir Prus @ 2007-10-25 18:06 ` Daniel Jacobowitz 2007-10-25 18:17 ` Vladimir Prus 2007-10-26 14:31 ` Grzegorz Cieslewski 1 sibling, 1 reply; 6+ messages in thread From: Daniel Jacobowitz @ 2007-10-25 18:06 UTC (permalink / raw) To: Vladimir Prus; +Cc: gdb On Thu, Oct 25, 2007 at 10:00:11PM +0400, Vladimir Prus wrote: > 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. It can if you're in the outermost frame (i.e. can not backtrace). I believe there's a PR about this; I know there were a couple of discussions about it, and there's a nasty hack in our local source tree for it too. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem with setting register value using MI interface 2007-10-25 18:06 ` Daniel Jacobowitz @ 2007-10-25 18:17 ` Vladimir Prus 0 siblings, 0 replies; 6+ messages in thread From: Vladimir Prus @ 2007-10-25 18:17 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: gdb On Thursday 25 October 2007 22:06:38 Daniel Jacobowitz wrote: > On Thu, Oct 25, 2007 at 10:00:11PM +0400, Vladimir Prus wrote: > > 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. > > It can if you're in the outermost frame (i.e. can not backtrace). I > believe there's a PR about this; I know there were a couple of > discussions about it, and there's a nasty hack in our local source > tree for it too. Yeah, I misremembered when this issue arises. Anyway, I'd rather have a complete reproduction recipe so that we can be sure it's this bug. - Volodya ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem with setting register value using MI interface 2007-10-25 18:00 ` Vladimir Prus 2007-10-25 18:06 ` Daniel Jacobowitz @ 2007-10-26 14:31 ` Grzegorz Cieslewski 2007-10-26 14:41 ` Grzegorz Cieslewski 1 sibling, 1 reply; 6+ messages in thread From: Grzegorz Cieslewski @ 2007-10-26 14:31 UTC (permalink / raw) To: gdb 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="<ATL_slaswp+184>",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 <ghost@cs.msu.su> 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 ===================================================== ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem with setting register value using MI interface 2007-10-26 14:31 ` Grzegorz Cieslewski @ 2007-10-26 14:41 ` Grzegorz Cieslewski 0 siblings, 0 replies; 6+ messages in thread From: Grzegorz Cieslewski @ 2007-10-26 14:41 UTC (permalink / raw) To: gdb When I do similar sequence of commands using regular interface I get weird warning/error "Cannot access memory at address 0x1" but when I check the value of the r1 register it is written correctly? Does anyone know the reason for that? (gdb) b *0x102cea88 Breakpoint 1 at 0x102cea88 (gdb) r Starting program: /hcs/home/cieslewski/projects/FaultInjection/gfi_svn/bin/LU Breakpoint 1, 0x102cea88 in ATL_slaswp () (gdb) info reg r1 r1 0x7fe21370 2145522544 (gdb) set $r1=1 Cannot access memory at address 0x1 (gdb) info reg r1 r1 0x1 1 (gdb) On 10/26/07, Grzegorz Cieslewski <cieslewski@hcs.ufl.edu> wrote: > 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="<ATL_slaswp+184>",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 <ghost@cs.msu.su> 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 > ===================================================== > -- ===================================================== 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 ===================================================== ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-10-26 14:41 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-10-25 17:48 Problem with setting register value using MI interface Grzegorz Cieslewski 2007-10-25 18:00 ` Vladimir Prus 2007-10-25 18:06 ` Daniel Jacobowitz 2007-10-25 18:17 ` Vladimir Prus 2007-10-26 14:31 ` Grzegorz Cieslewski 2007-10-26 14:41 ` Grzegorz Cieslewski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).