I can't step over (F6) functions

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I can't step over (F6) functions

1,755 Views
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 Kudos
Reply
10 Replies

1,709 Views
El_Leon_Negro_237
Contributor I

but it always step in

0 Kudos
Reply

1,703 Views
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 Kudos
Reply

1,652 Views
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 Kudos
Reply

1,646 Views
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 Kudos
Reply

1,644 Views
El_Leon_Negro_237
Contributor I

Thank you for your help jiri.

0 Kudos
Reply

1,639 Views
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 Kudos
Reply

1,618 Views
El_Leon_Negro_237
Contributor I

Hello Jiri,

it did not work. But thank you.

 

Léo

0 Kudos
Reply

1,660 Views
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 Kudos
Reply

1,725 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

do you have Optimization level set to None? 

jiri_kral_0-1637674585058.png

 

Jiri

0 Kudos
Reply

1,722 Views
El_Leon_Negro_237
Contributor I

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

Leo

0 Kudos
Reply