alxhoff / FreeRTOS-Emulator

POSIX based FreeRTOS emulator with SDL2 graphics interface and multiple async communications interfaces, aiming to make it possible to teach FreeRTOS without embedded hardware using similar processes
https://alxhoff.github.io/FreeRTOS-Emulator/
GNU General Public License v3.0
60 stars 105 forks source link

Parsing of Bin Folder Path fails when using gdbserver #6

Closed PhilippvK closed 4 years ago

PhilippvK commented 4 years ago

One of my solutions to connect VSCode with the VM makes use of a gdb server. The execution using it is failing right in the main function:

Failed to match 'FreeRTOS_Emulator' with '(.*)/', returning 1
n_

It seems like you only accept argv[0] to habe at least one forward slash / like common with ./FreeRTOS_Emulator and ../bin/FreeRTOS_Emulator, but in my case it is simply FreeRTOS_Emulator. Thus the REGEX is not satisfied.

The fix in getBinFolderPath should be trivial, but I would appreciate if you would take care of it.

alxhoff commented 4 years ago

I shall do it tonight as I sip on my beer

PhilippvK commented 4 years ago

Many thanks. No hurries.

PhilippvK commented 4 years ago

Works flawlessly.

PhilippvK commented 4 years ago

Unfortunately I found another bug with the new implementation.

If you have #define LOGO_FILENAME "../resources/freertos.jpg"

and run the executable inside the bin directory, the bin_path would be . making the concatenated path of the Image .../resources/freertos.jpg.

I think there is a / missing.

@alxhoff

alxhoff commented 4 years ago

ok. I will fix this up. There are a few gross problems like this floating about as I went for quick and dirty at the time.