Debugger problem - Change variable value

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Debugger problem - Change variable value

1,107件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Jindra on Thu Mar 25 15:58:13 MST 2010
I have variable defined as:  volatile uint32_t tmpcnt;
I'm in debugger, code is suspended and I want change its value.
Lets say it now have value 5, and I want put 0 there.
I didn't found way how to, in Expressions tab, so I get address of variable and put it in Memory tab. There I see value 5, but if I try put 0 there, its value changed to 0x666E0000.

Why?
What the right way?
0 件の賞賛
返信
5 返答(返信)

1,098件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Jindra on Sun Apr 11 13:51:59 MST 2010
Now I was able to reproduce it again, but it happens randomly on same code. It put there some short textual pattern (something with clipboard?), which changed (or dissapear) after restart.
Also it shows different value in memory and in expression view, so close this thread and I wait to new release of Xpresso and belive that it gone with it.
0 件の賞賛
返信

1,098件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Jindra on Sun Apr 11 07:55:00 MST 2010
Sorry, I tried with new code, but can't reproduce. And as I'm now in phase of tests only, I haven't backups of code.
0 件の賞賛
返信

1,098件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Sat Mar 27 00:46:44 MST 2010
Hi,

Can you post your code and exact details of how to produce the problem, and we will investigate.

Thanks
0 件の賞賛
返信

1,098件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Jindra on Fri Mar 26 00:34:16 MST 2010
Thanks for quick response.
And I'm sorry to not provide more informations.

I use lpc1114. The variable is local in main fungtion. Debug build but using gc-sections to have smaller elf (for faster upload).

I haven't opened Variable view, and not even know that it exist. Because if I click right button in code on variable it offer only "Add watch expression" so I believe that "expressions" is the only window.
Now, in variable wiev it works.

But I'm still interested why I get value 0x666E0000 in expressions. It is because something, or only random depending on surrounding conditions?
0 件の賞賛
返信

1,098件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Mar 26 00:18:09 MST 2010
You should be able to change its value using the Variable View. [The variable view should be in a tab in the bottom left of the IDE window.] If it is a global, you will need to add it to the Variable View. Then you should be able to click on the variable and enter a new value for it.

Is the variable a global or a local?

Are you debugging a debug or release build? If a release build, then try using a Debug build.

If using a Debug build, check the linker options and if --gc-sections is being used, try deleting it from:

Project -> Properties -> C/C++ Build -> Settings -> Linker  -> Miscellaneous

Please let us know if this helps.

Regards,
CodeRedSupport
0 件の賞賛
返信