Re: Need Help Debugging



[Trimming and reformatting]

Yea, we're XP/2003. That AppVerifier sounds interesting, but doesn't
look like it works for services ? (since it asks for a file path to
launch).

You can just specify the full path (without spaces !) of the binary
that implements the execurtable.
That path will show un in the registry under "Image File Execution options"

I looked at the ADPlus.vbs before... then thought might be easier to
utilize drWatson, instead of copying all the files needed for it to
work to each systems -- but if you say it makes a better dump file
might be worth to try... So I noticed i just need to copy just 5
files to make it work... not too bad... two questions:

1) when running on a remote system (not the development PC) it warns
about not having the _NT_SYMBOL_PATH defined and it'll be forced to
use 'export' symbols -- is this a big deal ? do I need to copy the PDB
file to each system i'm debugging ? I did perform a 'test' crash on a
remote system, and it debugged ok on my PC and brought me to the line
of code that caused the crash.

You can decouple symbols availability on the production machine
using one of the many remoting options available:
`dbgsrv.exe + cdb.exe -premote` or `cdb -server + cdb -remote`

2) i noticed when cdb.exe is killed, it terminates the debugged
process as well - is there any way to avoid this ? i didn't find a
switch...

You can detach the debugger. Look at `qd` in the documentation
(Quit and Detach).

btw, the other thing I like about drWatson is that it seems non-
invasive.. it doesn't touch the process until it crashes... but with
cdb.exe is seems to inject itself into the process... maybe that's
what makes it better ? it definatley wouldn't be an option we can
always leave on... i guess only leave it active during the debug
phase (while drWatson could of always been there just in case).

You can configure cdb|ntsd|windbg to behave like drwtsn32.exe.
Look at `cdb.exe -iae` [Install as Auto Execute]

I tried !locks while attached to my process just for kicks, but it
just returned "Scanned 549 critical sections" -- is it normal ? ...how
do u make give more details ?

That sound about righ.
A healthy process with non trivial synchronization might have thousands of
them.
That suggest me that you have problems in the heap, and not the CritSec

--

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"Ben" <benm5678@xxxxxxxxx> wrote in message
news:1190750597.186003.3180@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Sep 25, 11:25 am, "Ivan Brugiolo [MSFT]"
<ivanb...@xxxxxxxxxxxxxxxxxxxx> wrote:
Assuming you are at least on WinXp/Win2003, then
AppVerifierhttp://www.microsoft.com/downloads/details.aspx?familyid=BD02C19C-125...
does a much better job to track Critical Section usage than other
home brewed components.
And, in any case, the OS, even without instrumentation, tracks critical
sections
for you (you can use !locks in any windbg|cdb|ntsd debugger, for
example).
As far as debugging crashes in production environments,
you should learn how to set-up Corporate Wrror Reporting / WER,
or, you should use straight and plain ADPlus.VBS from the debugger
package.
In any case, you will have a much better dump than Drtwtsn32.exe can
generate,
and, it will give you a much better idea of what's going on.

Once you have the minidump of your process, you
can load-it in windbg|cdb|ntsd and, after having set-up good symbols,
you can post to the newsgroup the output of `!analyze -f -v;r;~*kb`.

--

--
This posting is provided "AS IS" with no warranties, and confers no
rights.
Use of any included script samples are subject to the terms specified
athttp://www.microsoft.com/info/cpyright.htm


.



Relevant Pages

  • Re: App verifier - debugger required...
    ... If you want to run an application under debugger at all the times, ... you can specify a debugger, ... Use of any included script samples are subject to the terms specified at ... I did not see the option "Image File Execution Options". ...
    (microsoft.public.win32.programmer.tools)
  • DebuggerDisplay attribute Target property not working
    ... When I use the DebuggerDisplay attribute at the assembly level and specify ... debug string. ... If I look at this class in the VS2005 debugger, I do not get the specified ...
    (microsoft.public.vsnet.debugging)
  • Re: startpage for a project ?
    ... In VS.NET you can tell the debugger the start page ... to launch during debugging. ... specify the default page in the Internet Information Services applet. ... If you go to the Web application's Property pages and to the Documents tab, ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: startpage for a project ?
    ... In VS.NET you can tell the debugger the start ... > to launch during debugging. ... > specify the default page in the Internet Information Services ... You can add whatever filename you ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: [SLE] command line ftp copy
    ... make no difference how I specify the remote system: ... Have a look at the -u parameter to ftp ... It works if I do the command as; ...
    (SuSE)

Quantcast