Page 1 of 1

general debug question

Posted: Thu Mar 03, 2022 8:48 pm
by YonTan
Hi,

I'm trying to debug my code (crash due to seg-fault).
I used printfs in my code, and meanwhile I see my init() function passed successfully, but the crash happens before the ControlStep() function (I have a log at the beginning of the function).

Since I can't add logs to argos's files, I'm not sure how I can debug the flow. Is there a better way ?
I'm using:
DCMAKE_BUILD_TYPE=Debug

I tried to use gdb, but it didn't work for me (maybe I'm doing something wrong.. can't tell :( )

My question is - what is the best way to debug my code ?

Thank you!

Re: general debug question

Posted: Thu Mar 03, 2022 9:33 pm
by pincy
What didn't work for you when you used gdb?