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

cinstall doesn't install PDB debug symbol files with MSVC #279

Closed
nirbheek opened this issue Sep 2, 2022 · 3 comments · Fixed by #373
Closed

cinstall doesn't install PDB debug symbol files with MSVC #279

nirbheek opened this issue Sep 2, 2022 · 3 comments · Fixed by #373
Labels
A-Cargo-problem A problem related to cargo itself F-MesonParity Mimic meson behaviour if possible

Comments

@nirbheek
Copy link
Contributor

nirbheek commented Sep 2, 2022

With MinGW, the debug information is embedded in the object files, but with MSVC it is split out into PDB files. These need to be installed alongside the object files to get symbols in the Visual Studio debugger. Some references to how meson handles this:

https://github.com/mesonbuild/meson/blob/a692395186b9a74817a584444418901da1d7306f/mesonbuild/backend/ninjabackend.py#L2427-L2474

https://github.com/mesonbuild/meson/blob/a692395186b9a74817a584444418901da1d7306f/mesonbuild/backend/ninjabackend.py#L3069-L3074

Compile args:

https://github.com/mesonbuild/meson/blob/a692395186b9a74817a584444418901da1d7306f/mesonbuild/compilers/mixins/visualstudio.py#L304-L308

https://github.com/mesonbuild/meson/blob/a692395186b9a74817a584444418901da1d7306f/mesonbuild/compilers/mixins/visualstudio.py#L410-L420

Linker args:

https://github.com/mesonbuild/meson/blob/a692395186b9a74817a584444418901da1d7306f/mesonbuild/linkers/linkers.py#L1225-L1230

tl;dr: if you install foo.dll you must also install foo.pdb next to it. Same with foo.exe. You can ignore static libraries.

@nirbheek
Copy link
Contributor Author

nirbheek commented Sep 2, 2022

I was looking at fixing this, but it looks like cargo work might be needed to get this working correctly, because there doesn't seem to be a 'corresponding PDB' for built targets, so that would need to be fixed first.

@lu-zero
Copy link
Owner

lu-zero commented Sep 2, 2022

Open an issue on cargo and link this one so once it is solved we won't forget about it :)

@lu-zero lu-zero added the A-Cargo-problem A problem related to cargo itself label Sep 2, 2022
@nirbheek
Copy link
Contributor Author

nirbheek commented Sep 6, 2022

Looks like I was wrong, cargo does build foo.pdb files for each library in the release directory.

@lu-zero lu-zero added the F-MesonParity Mimic meson behaviour if possible label May 3, 2024
amyspark added a commit to amyspark/cargo-c that referenced this issue May 4, 2024
amyspark added a commit to amyspark/cargo-c that referenced this issue May 4, 2024
amyspark added a commit to amyspark/cargo-c that referenced this issue May 9, 2024
amyspark added a commit to amyspark/cargo-c that referenced this issue May 28, 2024
amyspark added a commit to amyspark/cargo-c that referenced this issue May 29, 2024
lu-zero pushed a commit that referenced this issue May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Cargo-problem A problem related to cargo itself F-MesonParity Mimic meson behaviour if possible
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants