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

Open
desowin opened this issue Dec 4, 2019 · 5 comments
Open

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

desowin opened this issue Dec 4, 2019 · 5 comments

Comments

@desowin
Copy link

@desowin 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

This comment has been minimized.

Copy link

@dmiller-nmap dmiller-nmap commented Dec 5, 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, so that we can fix this. I did not realize the impact it had on profiling.

@desowin

This comment has been minimized.

Copy link
Author

@desowin 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

This comment has been minimized.

Copy link

@guyharris 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

This comment has been minimized.

Copy link

@guyharris guyharris commented Dec 8, 2019

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

This comment has been minimized.

Copy link
Author

@desowin 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.