Bug with command -file-exec-and-symbols
Hi,
this took my quite a time to find :)
When I execute this command:
-file-exec-and-symbols "C:\dlang\projects\mago-dap\test\helloworld.exe"
an error is returned:
^error,msg="Executable file not found: C:\\dlang\\projects\\mago-dap\\est\\helloworld.exe"
Please note, instead of foldername test, it now says est.
Just for testing, I tried to copy the folder test to est. Now the command
-file-exec-and-symbols "C:\dlang\projects\mago-dap\test\helloworld.exe"
works, because it finds the folder est.
It seems this command make strange things to the folder name...
Kind regadrs André
Copilot assumes this issue:
This is a string escaping issue. In C++, \t is interpreted as a tab character escape sequence. When the path is being constructed or passed as a string literal, the \t in
std::wstring path = L"C:\dlang\projects\mago-dap\test\helloworld.exe";
is being treated as a tab character, which then gets replaced or mangled.
String argument processing is here: https://github.com/rainers/mago/blob/master/MagoMI/mago-mi/source/miutils.cpp#L271, added with the comment "CDT compatibility fixes". I suspect always escaping \ as \\ is expected.
Thanks I will try to make a pull request