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

Npcap debug symbols package do not include wpcap.pdb #1844

Closed
desowin opened this issue Dec 4, 2019 · 7 comments
Closed

Npcap debug symbols package do not include wpcap.pdb #1844

desowin opened this issue Dec 4, 2019 · 7 comments

Comments

@desowin
Copy link

desowin commented Dec 4, 2019

Instead of wpcap.pdb the debug symbols package includes wpcap.dll. This makes it difficult to profile the performance (e.g. #1551) for people who do not have Npcap development environment set up (and thus are able to build their own wpcap.dll and matching wpcap.pdb).

Visual Studio profiler basically stops at first .dll for which symbols are not available. And thus even though the Packet.pdb is available the calls do not seem to be be available in analysis if they are called via calls to wpcap.dll.

@dmiller-nmap
Copy link

Thanks for this report. The inclusion of wpcap.dll is an unfortunate artifact of our build system not finding a PDB file for that DLL. This is because libpcap's build does not generate one by default. I need to investigate how to instruct it to do so, preferably using CMake command-line options, so that we can fix this. I did not realize the impact it had on profiling.

@desowin
Copy link
Author

desowin commented Dec 6, 2019

This is because libpcap's build does not generate one by default.

I don't remember anything special about getting the wpcap.pdb. For me the hardest part was to determine which Visual Studio version the code/project works with. After I managed to compile Npcap, I just found wpcap.pdb in the build directory.

@guyharris
Copy link

guyharris commented Dec 8, 2019

Thanks for this report. The inclusion of wpcap.dll is an unfortunate artifact of our build system not finding a PDB file for that DLL. This is because libpcap's build does not generate one by default. I need to investigate how to instruct it to do so, preferably using CMake command-line options

Or just by default without command-line options, i.e. generate them for all builds unless explicitly told not to. (It's not as if PDB files shouldn't be shipped with libpcap because it would help people reverse-engineer libpcap. :-))

Or is this just an issue of Release vs. RelWithDebInfo builds? Is the idea that Release builds shouldn't include debug information but RelWithDebInfo builds should? Or do Release builds generate less detailed sets of debug symbols than do RelWithDebInfo builds?

@guyharris
Copy link

I don't remember anything special about getting the wpcap.pdb. For me the hardest part was to determine which Visual Studio version the code/project works with.

Which project - libpcap or Npcap? libpcap should work with VS 2015, 2017, or 2019; if not, that's a bug that should be fixed.

After I managed to compile Npcap, I just found wpcap.pdb in the build directory.

Release, Debug, or RelWithDebInfo build?

@desowin
Copy link
Author

desowin commented Dec 8, 2019

Which project - libpcap or Npcap? libpcap should work with VS 2015, 2017, or 2019; if not, that's a bug that should be fixed.

Npcap. Looking at logs, the libpcap compiled fine with VS 2019. For Npcap I succeeded with Visual Studio 2013.

After I managed to compile Npcap, I just found wpcap.pdb in the build directory.

Release, Debug, or RelWithDebInfo build?

My build directory shows that I compiled both Debug and RelWithDebInfo. I profiled with RelWithDebInfo (as profiling Debug builds isn't as useful).

The pdbs I found were in npcap/wpcap/build/run/Debug/wpcap.pdb and wpcap/build/run/RelWithDebInfo/wpcap.pdb.

@dmiller-nmap
Copy link

Debug symbols package for Npcap 0.9991 includes PDBs for wpcap.dll from our installer. Thanks for your help!

@guyharris
Copy link

Debug symbols package for Npcap 0.9991 includes PDBs for wpcap.dll from our installer.

Is that in the npcap.pdb file?

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

3 participants