cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
yachli
Participant
Participant
746 Views
Registered: ‎12-07-2015

Two problems debug within SDK 2018.1

1.Alternately success and fail with relaunch the application , that means the 1st,3rd,5th,7th.... times run the application success, but 2nd.4th,6th,8th... times fail.

if fail, report the first new memory error.

static void new_handler(){xil_printf("malloc memory failed\r\n");}

void* operator new(size_t size){
void *r;
if(size == 0) {size = 1;}

while((r = malloc(size)) == 0 && new_handler != 0) {new_handler();}
return r;
}

2.

Cannot use F6(step over) after timer start to work, F5(step in), F8 work well .

 

any help?thanks

0 Kudos
3 Replies
ibaie
Xilinx Employee
Xilinx Employee
691 Views
Registered: ‎10-06-2016

Hi yachli,

Could you elaborate bit more your issue description, after reading the message 3 times I still do not understand what's going on.

1. Problem:

What does mean alternate success with relaunch application? I mean is the launch process failing or the application is not able to allocate memory? Please provide more details, error messages....

2. Problem:

What does mean Step-Over does not work? does it work as resume? Did you check AR#71222?

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
yachli
Participant
Participant
671 Views
Registered: ‎12-07-2015

Could you elaborate bit more your issue description, after reading the message 3 times I still do not understand what's going on.

1. Problem:

What does mean alternate success with relaunch application? I mean is the launch process failing or the application is not able to allocate memory? Please provide more details, error messages....

That means the first time the application run well, now relanuch the application, it(application) cannot allocate memory.  Relauch again, all well.

one success , one fail, one success ,one fail.... 

2. Problem:

What does mean Step-Over does not work? does it work as resume? Did you check AR#71222?

It behaves most like resume,but really not.

That means press F6, it show resume, now press stop , it still there, not go down.

AR#71222 is a linux application, mine is ThreadX application doesnt have a agent file.

Thanks for your eye!

0 Kudos
ibaie
Xilinx Employee
Xilinx Employee
653 Views
Registered: ‎10-06-2016

Hi @yachli

1.As far as the issue is with the memory allocation function you need to take a look/debug further tha specific function. Are you using malloc or ThreadX specific memory allocation functions? The fact the issue only arises on alternate launches makes me suspect that you are not clearing the memory on each launch (select reset system checkbox). This definitivelly depends on your specific application but you might try to have a well defined starting point on your debug launches.

2. So does it mean that step-over just does not do nothing? Does the other debug steps (into, resume...) work fine? Did you test with non ThreadX application to check if it has any relation with it?

 

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos