Trace32 question

I'm not sure if this group is suitable for this question. I am beginner in trace32 and it seems that trace32 doesn't show local variable in C language. Is this right or am I doing something wrong. Please answer. Thanks.

Reply to
JY Kim
Loading thread data ...

You should really see the local variables. It's no problem for Trace32 to show it. Can you see the C code (high level) at all? Maybe there's a problem with the path to your source code.

Reply to
KHR

Or the debug info is missing at all.

--
42Bastian
Do not email to bastian42@yahoo.com, it's a spam-only account :-)
 Click to see the full signature
Reply to
42Bastian Schick

Evenual you compile with -O2 (optimization) and the compiler removes the compiler cause of the optimization.

When you want to debug code maybee you must compile the relevant sourcefiles with -O0. Otherwise do not wondering about missing variables or Jumps when stepping through the code.

BTW: This is a systematic problem of debugging optimized code. Not only a problem of Trace32.

Best regards Martin

Reply to
Martin Kaul

Reply to
JY Kim

You haven't told us whether you are compiling with optimization disabled or not... What happens if you type 'V.V YourVarName'? (Do this when your on your breakpoint). Consider copy&paste from your Trace32 'D.L' window into here, so that we could see that part of code where your setting up your breakpoint AND both the 'C' and assembly code.

Reply to
tum_

Thanks for your answer. I have compiled this with 'Most' optimization level(good debug view, good code) in ADS. middle of three optimization level.

symbol not found message is displayed. with new window that show value of ?

copy&paste doesn't seems to be possible in d.l window.

Reply to
JY Kim

Then you shouldn't be suprised - your variable most probably is "optimized out" by the compiler. I.e. the compiler analyzed your code and found the way of getting the same result w/out using that particular variable. This is perfectly correct. As people told you before - if you want to debug your code "comfortably" - switch off optimization. (If you have level 'Most' in the IDE you use, I'd guess there should be level 'None' or something like this).

Yep, the variable was not created because it was not needed.

It is perfectly possible. Click on the icon in the top-left corner of the window and select 'Copy to clipboard' (not sure how exactly this is worded, don't have Trace32 at hand right now).

Reply to
tum_

Reply to
JY Kim

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.