[wdmaudiodev] Re: Using the VS debugger to debug KS Proxy code

  • From: "Chris Walton" <chris.r.walton@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Sat, 1 Nov 2008 06:52:24 +0100

On Sat, Nov 1, 2008 at 2:32 AM, Tim Roberts <timr@xxxxxxxxx> wrote:
> Chris Walton wrote:
>> >From what I've read, it seems that the standard VS debugger can't be
>> used to debug kernel-mode code. Does this include user-mode code that
>> interfaces with KS? (such as the DirectKS stuff, which I'm using)
>>
>
> No.  It's just like talking to any other driver.  The KS interface uses
> DeviceIoControl to cross the border, and everything up to the border can
> be debugged with VS.

Ah, that's good news (or at least partially).

>> I have a problem where a variable in a callback is mysteriously set to
>> 0, _unless_ I step manually, at which point the variable is set to the
>> correct value and the code continues to run correctly with that value.
>> If I don't step (let it run), the code executes correctly on the path
>> it takes when that variable is 0. I've used data breakpoints in VS to
>> try to see if I've got some heap corruption going on, but there's none
>> of that.
>>
>> Is my problem related?
>>
>
> Nice try ;), but no.  Sounds like a timing problem.

Too bad. What do you mean by timing problem?

The weird part is that the data breakpoint never hits in the next
callback iteration, though the code executes as if the variable was
set to 0. Unless I set a code breakpoint, at which point the data
breakpoint does get triggered for that one iteration so that the
variable is set to the right value.

(btw, the variable is at the same memory address every time).

-- Chris

> --
> Tim Roberts, timr@xxxxxxxxx
> Providenza & Boekelheide, Inc.
>
> ******************
>
> WDMAUDIODEV addresses:
> Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
> Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
> Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
> Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx
>
> URL to WDMAUDIODEV page:
> http://www.wdmaudiodev.com/
>
>
******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts: