2024-01-05 04:14 AM
Hi
I'm trying to debug a Windows C application that was written using Atollic. It uses the gdb debugger.
The program has some options that have to be parsed into the program. I have entered the options into the "Arguments" tab in the run/debug configuration.
When I debug the program, the arguments are not being recognised by the application. After I added a print statement of the options I realised that quotation (') marks are being added around the arguments.
If I run the program in Atollic or directly in a command prompt the arguments are parsed correctly, and the program runs ok.
App.exe '-c' 'com9' '-s' 'firm.srec' '-l' 'list.txt' <------- Incorrect in debug
App.exe -c com9 -s firm.srec - l list.txt <------- Correctly run
Hope someone can help
Thanks
2024-01-05 05:42 AM
Modify the program to remove single quotes from arguments that contain them. Should be straightfoward to debug, pause at main, and examine argc/argv to see if that is indeed the issue.
2024-01-15 12:35 AM - edited 2024-01-15 12:36 AM
Thanks for replying.
Yes I have done this now. However I wanted to know why it's doing it.
I am debugging existing code and there are a lot of lines of code. So I didn't really want to do lots of changes.
2024-01-15 05:59 AM
Given the focus is on embedded development, I don't think that feature is something that got a lot of attention. TrueSTUDIO has been deprecated for many years. Whatever the reason, it's unlikely to change in the future.