Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backslashes in include paths not processed properly #120

Open
shyun3 opened this issue Nov 25, 2021 · 0 comments
Open

Backslashes in include paths not processed properly #120

shyun3 opened this issue Nov 25, 2021 · 0 comments

Comments

@shyun3
Copy link

shyun3 commented Nov 25, 2021

Hello, I tried using compiledb on Windows and it looks like backslashes in include paths get deleted.

Here's a make output:

make: Entering directory `C:/projects/test/build'
echo 'Building file: ../test.c'
echo 'Invoking: GNU ARM C Compiler'
arm-none-eabi-gcc -mcpu=cortex-m33 -mthumb -I"C:\projects\test" -o "test.o" "../test.c"
echo 'Finished building: ../test.c'
echo ' '
make: Leaving directory `C:/projects/test/build'

Note that this has been manually sanitized from an original.

Resulting compile_commands.json after running compiledb --parse:

[
 {
  "directory": "C:\\projects\\test\\build",
  "arguments": [
   "arm-none-eabi-gcc",
   "-mcpu=cortex-m33",
   "-mthumb",
   "-IC:projectstest",
   "-o",
   "test.o",
   "../test.c"
  ],
  "file": "../test.c"
 }
]

This output has also been manually sanitized but should get the point across.

Note how the backslashes in the -I parameter are not present. Obviously, the result is not a valid path.

ydamigos added a commit to ydamigos/compiledb that referenced this issue Oct 26, 2022
Unescape input to bashlex parser.
It should address issues nickdiego#124, nickdiego#120

Signed-off-by: Ioannis Damigos <[email protected]>
marzojr pushed a commit to marzojr/compiledb that referenced this issue Feb 22, 2024
Unescape input to bashlex parser.
It should address issues nickdiego#124, nickdiego#120

Signed-off-by: Ioannis Damigos <[email protected]>
marzojr pushed a commit to marzojr/compiledb that referenced this issue Feb 22, 2024
Unescape input to bashlex parser.
It should address issues nickdiego#124, nickdiego#120

Signed-off-by: Ioannis Damigos <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant