[Winpcap-users] Debugging a winpcap exception
chmorgan at gmail.com
Wed Jan 6 12:24:43 PST 2010
On Wed, Jan 6, 2010 at 3:19 PM, Gianluca Varenni
<gianluca.varenni at cacetech.com> wrote:
> From: "Chris Morgan" <chmorgan at gmail.com>
> Sent: Wednesday, January 06, 2010 11:56 AM
> To: "Gianluca Varenni" <gianluca.varenni at cacetech.com>
> Cc: <winpcap-users at winpcap.org>
> Subject: Re: [Winpcap-users] Debugging a winpcap exception
>> On Wed, Jan 6, 2010 at 11:31 AM, Gianluca Varenni
>> <gianluca.varenni at cacetech.com> wrote:
>>> From: "Chris Morgan" <chmorgan at gmail.com>
>>> Sent: Monday, January 04, 2010 1:45 PM
>>> To: <winpcap-users at winpcap.org>
>>> Subject: [Winpcap-users] Debugging a winpcap exception
>>>> I'm trying to debug some very odd behavior in a .net application that
>>>> pinvokes winpcap to capture network packets. The behavior I see seems
>>>> indicative of memory corruption, when I run under the vs debugger all
>>>> events seem to stop until I do a 'break all' and continue after
>>>> setting breakpoints. Even then things only run for a short while.
>>>> I switched to using windbg and after running I see this exception
>>>> which may or may not be the issue. I'm having trouble continuing
>>>> because I'm having difficulty building wpcap.dll in debug mode, it
>>>> wants packet.lib but after building packet.lib it still won't build.
>>> Which configuration of packet.dll did you build? Did you follow the
>>> instructions at
>>> Have a nice day
>> I was trying to follow the instructions there. I've been doing
>> software development for a long time now and those instructions are
>> pretty confusing. It might make sense to have a single solution that
>> contains both the packet and wpcap projects and so the targets can be
>> synchronized to avoid the problem below. Also putting the solution at
>> a parent directory instead of a subdirectory to make it easier to
>> find. I can submit patches if there is any interest or not if there is
>> a good reason why things are how they are that I'm unaware of.
> I've been working on something like that, but nothing is public yet. It's a
> bit of a pain because there is a single flavor for wpcap.dll but several
> flavors of packet.dll (NT4, NT5, NT6) and this makes things quite complex.
Ahh thats good news. It would make those instructions a lot simpler if
one could just pick a target :-)
>> I'm building the 'Debug No Netmon' target for the packet solution. The
>> 'Debug' target says npptools.lib can't be found.
> This is not normal. Are you using Visual Studio 2005 SP1 to build?
I'm running vs2008 sp1 here.
>> Looking at the linker arguments for wpcap the additional linker
>> directory is set to '..\..\packetNtx\Dll\Project\Debug\x86' which is
>> the output directory for the 'Debug' target of the packet solution.
>> Can I just change this to point at the
>> '..\..\packetNtx\Dll\Project\Debug No Netmon\x86' directory?
Cool. Let me try that.
More information about the Winpcap-users