Ignoring Asserts Automatically

Hi,

Is there a way I can setup WinDbg to automatically ignore assertions that
fail? I looked through all of the event filtering stuff but I cannot figure
out what will produce the results I desire.

Thanks, Chris

The simplest way is to simply do a free build, since ASSERT uses the flag as
as the debug macros.

Gary G. Little
Have Computer, Will Travel …
909-698-3191

“Chris Doré” wrote in message news:xxxxx@windbg…
>
> Hi,
>
> Is there a way I can setup WinDbg to automatically ignore assertions that
> fail? I looked through all of the event filtering stuff but I cannot
figure
> out what will produce the results I desire.
>
> Thanks, Chris
>
>
>
>

Hello,

Gary G. Little wrote:

“Chris Dor?” wrote in message news:xxxxx@windbg…

> > Is there a way I can setup WinDbg to automatically ignore assertions that
> > fail? I looked through all of the event filtering stuff but I cannot
> > figure
> > out what will produce the results I desire.

> The simplest way is to simply do a free build, since ASSERT uses the flag as
> as the debug macros.

another possibility: Do asserts only conditionally, as the
MS driver do it with their outputs, too.

For example, you can have

int DbgFlags;

#define ASSERT0( x ) { if (DbgFlags & DBGF_ASSERT0) ASSERT( x ); }
#define ASSERT1( x ) { if (DbgFlags & DBGF_ASSERT1) ASSERT( x ); }

(well, in reality, it is much more complex, but you get the idea.)

This way, you can enable or disable them at runtime. Personally,
I use the same variable DbgFlags I use for the verbosity level
of my debugging outputs, which I find quite useful.

If you mean disabling ASSERTs of drivers you don’t have the sources
for, I don’t have a clue.

HTH,
Spiro.

Hi,
If they are the same asserts time after time in drivers or libs you cannot
recompile you could relace them with NOP’s when you hit them ‘eb eip 90’ on
x86.

Yours
Roger


Roger Coote,
Senior Design Engineer
PowerVR Technologies, A Division of Imagination Technologies Ltd
Home Park Estate, Kings Langley, Hertfordshire, WD4 8LZ, UK
phone :+44 (1923) 260511 fax :+44 (1923) 268969
direct :+44 (1923) 277274
mailto:xxxxx@powervr.com www.powervr.com


-----Original Message-----
From: Spiro Trikaliotis
[mailto:xxxxx@ivs.cs.uni-magdeburg.de]
Sent: 02 October 2002 12:04
To: Kernel Debugging Interest List
Subject: [windbg] Re: Ignoring Asserts Automatically

Hello,

Gary G. Little wrote:

“Chris Doré” wrote in message news:xxxxx@windbg…

> > Is there a way I can setup WinDbg to automatically ignore assertions
that
> > fail? I looked through all of the event filtering stuff but I cannot
> > figure
> > out what will produce the results I desire.

> The simplest way is to simply do a free build, since ASSERT uses the flag
as
> as the debug macros.

another possibility: Do asserts only conditionally, as the
MS driver do it with their outputs, too.

For example, you can have

int DbgFlags;

#define ASSERT0( x ) { if (DbgFlags & DBGF_ASSERT0) ASSERT( x ); }
#define ASSERT1( x ) { if (DbgFlags & DBGF_ASSERT1) ASSERT( x ); }

(well, in reality, it is much more complex, but you get the idea.)

This way, you can enable or disable them at runtime. Personally,
I use the same variable DbgFlags I use for the verbosity level
of my debugging outputs, which I find quite useful.

If you mean disabling ASSERTs of drivers you don’t have the sources
for, I don’t have a clue.

HTH,
Spiro.


You are currently subscribed to windbg as: xxxxx@videologic.com
To unsubscribe send a blank email to %%email.unsub%%