I can't step over (F6) functions

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

I can't step over (F6) functions

5,526 次查看
El_Leon_Negro_237
Contributor I

I'm debugging a S32K146 with the PE Micro / Multilinkuniversal FX and can not step over functions. Every time I want to step over (F6), I'm landing in the function I don't want to debug. Did anyone add this problem?

I use the S32 Design Studio for ARM Version: 2018.R1 on Windows 10

0 项奖励
回复
10 回复数

5,480 次查看
El_Leon_Negro_237
Contributor I

but it always step in

0 项奖励
回复

5,474 次查看
jiri_kral
NXP Employee
NXP Employee

Hi, 

 

it always steps in each function or only to some particular one? What about breakpoints? Can you please share code snippet where debugger won't step over? 

 

Jiri

0 项奖励
回复

5,423 次查看
El_Leon_Negro_237
Contributor I

Another information: I doesn't compile my project with S32K design studio but with Greenhills. I use the design studio only to flash and debug my s32k hardware.

0 项奖励
回复

5,417 次查看
jiri_kral
NXP Employee
NXP Employee

Hi, 

 

this is the reason - GHS generates .elf file with debug info which is not fully compatible with GNU debugger and debugging is possible, but with limitations. I'm afraid that there is no solution for that. 

 

Jiri 

0 项奖励
回复

5,415 次查看
El_Leon_Negro_237
Contributor I

Thank you for your help jiri.

0 项奖励
回复

5,410 次查看
jiri_kral
NXP Employee
NXP Employee

Hi, 

I found this old response to similar issue from my colleague - you may find it helpful: 

Debugging an elf file generated by the GHS compiler may not work correctly: missing call
stack information, incorrect info on step into function, etc.

Workaround: In case of GHS generates the GDB incompatible debug information, it prevents
the debugger displaying the call stack. Sometimes gdb can still debug your program without this
information. The post-build step should be executed: open the project properties, click 
C/C++
Build 
Settings and select the Build Steps tab, then add the following command: gstrip –
r=.debug_frame
. Switch to Instruction Stepping Mode to be able to step through function.

Jiri

0 项奖励
回复

5,389 次查看
El_Leon_Negro_237
Contributor I

Hello Jiri,

it did not work. But thank you.

 

Léo

0 项奖励
回复

5,431 次查看
El_Leon_Negro_237
Contributor I

Hello Jiri,

it step in each function. It does not step in because of a breakpoint, then I don't use this in one of the functions. 

May be this another information could help you: The debugging mode is optimized. I can not see every content of some expressions and it sometime skip lines of the code. The cursor skipped the lines 2032, 2033 and 2034 though the breakpoint is at 2032.

El_Leon_Negro_237_0-1638432326945.png

 

El_Leon_Negro_237_0-1638431283727.png

All the simple variables in the previous bild are redefined integer but only 3 of them are visible with the expression view. The optimized variables are set but I can not see their content. May be you know how to turn off this optimisation?

 

Thanks, Léo

0 项奖励
回复

5,496 次查看
jiri_kral
NXP Employee
NXP Employee

Hi, 

do you have Optimization level set to None? 

jiri_kral_0-1637674585058.png

 

Jiri

0 项奖励
回复

5,486 次查看
El_Leon_Negro_237
Contributor I

Hi Jiri, yes the optimization level of the project is to None.

Leo

0 项奖励
回复