UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
1,383 Views
Registered: ‎06-13-2012

Debug multiple entry

Hi all,

 

I'm debugging an application, after many days modifying the code now when I start the debug before make the first step  I find in the debug window a lot of entries, I expect to find only the line I'm debugging.

In the attached image 0x000002C0 XDp_RxAllocatePayloadStream(): xdp_mst.c, line 2989
Why is that?

Regardssdk_question.jpg

0 Kudos
13 Replies
Moderator
Moderator
1,356 Views
Registered: ‎07-01-2015

Re: Debug multiple entry

Hi @auricm,

 

Can you please clean the workspace and give it a try again?

Thanks,
Arpan
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
Explorer
Explorer
1,350 Views
Registered: ‎06-13-2012

Re: Debug multiple entry

Hi @arpansur,

 

I clean the project, no differences.
Deleted several times the .metadata folder (as it freezes about every hour then sdk will not start again until delete the folder), no differences.

Regards

0 Kudos
Moderator
Moderator
1,343 Views
Registered: ‎07-01-2015

Re: Debug multiple entry

Hi @auricm,

 

Are you seeing the same issue if you try with a different workspace also?

Thanks,
Arpan
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
Explorer
Explorer
1,340 Views
Registered: ‎06-13-2012

Re: Debug multiple entry

Hi @arpansur,

 

Yes, I saw the same issue in other projects with different workspaces, I try clean all and make a new project starting again from the beginning with the same source code.
It's ok for a while then start the issue.

Regards

0 Kudos
Explorer
Explorer
1,292 Views
Registered: ‎06-13-2012

Re: Debug multiple entry

Hi @arpansur,

 

no hints, suggestion?

 

regards

0 Kudos
Moderator
Moderator
1,256 Views
Registered: ‎10-06-2016

Re: Debug multiple entry

Hi @auricm,

 

From your screenshot it seems that your application code is executing something else before reaching the main function, so can you enable stop at program entry option in your debug configuration? That should stop the debugger from the very beggining point of the application so then you can try to reach the main and se what's going on.

 

BTW: Are you reseting the processor or system before downloading again the ELF file? Might be something is not being cleared (interrupt handler...) so you having this kind of behaviour?

 

Regards

Ibai


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Explorer
Explorer
1,160 Views
Registered: ‎06-13-2012

Re: Debug multiple entry

Hi @ibaie,

 

sorry for the late reply, I already enable the "stop at program entry" but no differences, I also reset and program the FPGA each time so I think that is not related to interrupt handler not cleared, even if when a interrupt is triggered the program jump on one of the function in the list.

 

Regards

 

 

0 Kudos
Scholar ericv
Scholar
1,097 Views
Registered: ‎04-13-2015

Re: Debug multiple entry

@auricm

 

What you are seeing is related to the GCC debug statements "cfi_..."

These debug statements are sprinkled in the generated code to identify what is held in the stack.

@ibaiehas correctly flagged the most likely root cause of that never ending stack trace back.

 

Don't get bother with that.

You'll more than likely see that all further (nested) function calls will have the correct trace-back information.

 

0 Kudos
Explorer
Explorer
915 Views
Registered: ‎06-13-2012

Re: Debug multiple entry

Hi @ericv

 

To debug step by step I've to put breakpoints in all lines and then use the "run" function.

0 Kudos
Scholar ericv
Scholar
900 Views
Registered: ‎04-13-2015

Re: Debug multiple entry

@auricm

 

the multiple display of XDp_RxAllocate... is one theing, single stepping is a different one.

The multiple display is caused by badly formed cfi_... statements in the code before main() and thisi has nothing to do with single stepping.

These cfi_.. statements are only used to display the stack trace back (nested called functions) and to know where "C" variables are on the stack when debugging a function.

If I remember correctly, CFI stands for Call Frame Information.

Single stepping, if done at the ASM level, does not involve any debug information from the elf file.

Single stepping "C" code involves debug information from the generated code (these cfi_... are not that debug info) as there are tags to group the multiple ASM statements that makes a single line of "C" code.

If you are not returning from the function you are single steeping into, it's more likely the code itself does not return.

Have you tried removing the compiler optimization? (set -O0).

It will be easier to see the single stepping in :"C" without optimization.

 

0 Kudos
Explorer
Explorer
898 Views
Registered: ‎06-13-2012

Re: Debug multiple entry

@ericv

 

I've already removed the compiler optimization -O0  

0 Kudos
Scholar ericv
Scholar
890 Views
Registered: ‎04-13-2015

Re: Debug multiple entry

@auricm

 

another possibility is the stack is too small or invalid.

 

 

0 Kudos