c - gdb: "Left operand of assignment is not an lvalue." -


i debugging arm microcontroller remotely , trying modify variable gdb in following block of code:

for (int = 0; < 100; i++) {     __asm__("nop"); } 

when execute print i can see value of variable

(gdb) print $1 = 0 

executing whatis i returns this

whatis ~"type = int\n" 

but when try change variable following error

(gdb) set variable i=99 left operand of assignment not lvalue. 

what doing wrong here?

update: here assembler code

!        (int = 0; < 100; i++) { main+38: subs\tr3, #1 main+40: bne.n\t0x80001d0 <main+36> main+42: b.n\t0x80001c4 <main+24> main+44: lsrs\tr0, r0, #16 main+46: ands\tr2, r0 !            __asm__("nop"); main+36: nop     

the command set = 99


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -