Turn off register variables for debugging

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

Turn off register variables for debugging

2,926件の閲覧回数
sellynny
Contributor I
How can I turn off register variables for debugging?
ラベル(1)
0 件の賞賛
返信
6 返答(返信)

1,048件の閲覧回数
jag
Contributor IV

put the "volatile" keyword before the variables you want to see in the debugger.

 

Bye Jack 

0 件の賞賛
返信

1,048件の閲覧回数
J2MEJediMaster
Specialist I

I am not sure what you mean here. Are you talking about the debugger display, or how the compiler generates code? And what hardware target and Codewarrior version are you using?

 

---Tom

 

0 件の賞賛
返信

1,048件の閲覧回数
sellynny
Contributor I

My problem is that I have the same code running on Visual studio and it's fine. The same code running on CW doesn't have the good result. I tryed to debug step by step to compare but on CW I can't see some variables. In the debug window I have the wrong address for some variables (two different variables have the same address and nothing inside).

0 件の賞賛
返信

1,048件の閲覧回数
J2MEJediMaster
Specialist I

It sounds like you need to turn off all of the compiler optimizations in CodeWarrior. The optimizer will make statements and variables move about or disappear.

 

---Tom

0 件の賞賛
返信

1,048件の閲覧回数
sellynny
Contributor I
I already did it but nothing change.
0 件の賞賛
返信

1,048件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee

Please provide more details, for example which architecture you are using.

 

I want to avoid to give a tip for a coldfire compiler switch when in the end you are using a S08

(or something else).

 

Daniel

 

See:

 

http://forums.freescale.com/freescale/board/message?board.id=CWCOMM&message.id=3819

0 件の賞賛
返信