Skip to content

Build PDB for debugging on Windows #2685

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

Merged
merged 2 commits into from
Apr 14, 2025
Merged

Conversation

stevenjoezhang
Copy link
Contributor

@stevenjoezhang stevenjoezhang commented Apr 13, 2025

Your checklist for this pull request

  • I've documented or updated the documentation of every API function and struct this PR changes.
  • I've added tests that prove my fix is effective or that my feature works (if possible)

Detailed description

See #2642
Currently, using CMake can compile Capstone on Windows using Clang or MSVC toolchain to generate .lib static libraries and .dll dynamic libraries. However, the .pdb file corresponding to the dynamic library is not being installed. To facilitate debugging, this pull request adds support for generating and installing the .pdb file.

Test plan

On Windows:

git clone https://github.com/stevenjoezhang/capstone.git -b windows
cd capstone
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake -B build -T "ClangCL,host=x64" -A x64 -DCAPSTONE_BUILD_SHARED_LIBS=ON
cmake --build build --config Release --target install --clean-first
:: Then check "C:\Program Files\capstone\bin\capstone.pdb"

Closing issues

@Rot127
Copy link
Collaborator

Rot127 commented Apr 14, 2025

Also tested with https://github.com/Rot127/capstone/releases/tag/v43.0.0
The pdb file for the dll is also installed.

Copy link
Member

@kabeor kabeor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, merged.

@kabeor kabeor merged commit 895f2f2 into capstone-engine:next Apr 14, 2025
20 checks passed
@stevenjoezhang stevenjoezhang deleted the windows branch April 15, 2025 07:22
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

Successfully merging this pull request may close these issues.

3 participants