ptbindadapter

in this func in MUX protocol.c the do while loop is written as
do{…}While(FALSE);

what is the significance of such a loop when it WIL only run once!!!

it is a C technique for defining a local block scope where declarations can
be made and/or can be exited easily with a break statement (instead of a
goto).

cheers,
dave


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of A P
Sent: Wednesday, January 24, 2007 7:02 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] ptbindadapter

in this func in MUX protocol.c the do while loop is written as
do{…}While(FALSE);

what is the significance of such a loop when it WIL only run once!!!

— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List
Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Hi all,

In the code for the above mentioned function, in MUX example what is the
event used for? pAdapt->Event

also when i debug the code i always find the following automatically set

bp /1 /c @$csp @$ra;g

i never set it, why does it get set??

in PtBootStrapVElans(…)

what is the acutal name for the velans from the registry keys???


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of A P
Sent: Thursday, February 01, 2007 8:27 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] PtBindAdapter

Hi all,

In the code for the above mentioned function, in MUX example what is the
event used for? pAdapt->Event

[PCAUSA] Search the source code for pAdapt->Event. You will find various
places where the Event is used.

also when i debug the code i always find the following automatically set

bp /1 /c @$csp @$ra;g

i never set it, why does it get set??

[PCAUSA] I’ve never seen it. Read the debugger help to learn how to clear
breakpoints.

Good luck,

Thomas F. Divine

in PtBootStrapVElans(…)

what is the acutal name for the velans from the registry keys???

— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List
Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

.*PCAUSA] Search the source code for pAdapt->Event. You will find various
places where the Event is used.*
**
*no i wanted to know the logic of its usage!*
**
*.Read the debugger help to learn how to clear breakpoints.*
**
*yet again, the issue here is that that debugger automatically sets it again
after i do a bc!*
**
**

> .PCAUSA] Search the source code for pAdapt->Event. You will find various

places where the Event is used.

no i wanted to know the logic of its usage!

The event is used to wait for calls that return NDIS_STATUS_PENDING to
complete. Read the DDK/WDK documentation on the call that returns
NDIS_STATUS_PENDING. If you look through the code, you’ll see that the
completion routines set the event.

.Read the debugger help to learn how to clear breakpoints.

yet again, the issue here is that that debugger automatically sets it again
after i do a bc!

Are you running a startup script? [I.e. Are you using the flags -cf with kd or $\<, $\>\<, or the $$ versions with windbg?] Have you tried running “bc *”?

-Preston

Are you running a startup script? [I.e. Are you using the flags -cf with kd or $\<, $\>\<, or the $$ versions with windbg?] Have you tried running “bc *”?

no none, simple debugging. and i did a bc* too. nothing changs.

[quote] ?
also when i debug the code i always find the following automatically set

bp /1 /c @$csp @$ra;g

i never set it, why does it get set??
[/quote]

Basically, that’s the text the debugger emits on your behalf when you are single-stepping your code while source level debugging.

So, actually, you did at least request it be set, and your debugging session hopefully benefited from its use.

My bad- it’s the code emitted when you step “out” of the current function, not single-stepping.

bp /1 /c @$csp @$ra;g

bp (set a breakpoint on an executable address)
/1 (single-shot= fires once and vanishes)
/c @$csp (only when stack is no deeper than it currently is, so you don’t trigger on any recursive calls from your current location)
@$ra (at the current return address on the stack)
;g (now go and do as you’re told, you frustrating piece of code!)

Look up “pseudoregisters” in the debugger reference, drink six cups of high-test coffee, and all will eventually become clear (maybe after a nap or two)- so saith Doctor Bob on this fine dark Friday Puget Sound morning.

But you “did” still ask for it:).

PS- no insults intended- the above blather was more of a commentary on my own work habits than anything else…