WinDbg Extension

I have a kernel level driver has instantiated class variables. Can someone tell me how do I call member functions in a class that return data inside my extension dll using the WinDbgExts functions. GetFieldOffset and GetFieldData seem to only work for structure variables and not class variables. Would anyone have a simple example of an extension that calls a member function inside a class.
Any help appreciated

wrote in message news:xxxxx@windbg…
> I have a kernel level driver has instantiated class variables. Can someone
> tell me how do I call member functions in a class that return data inside
> my extension dll using the WinDbgExts functions. GetFieldOffset and
> GetFieldData seem to only work for structure variables and not class
> variables. Would anyone have a simple example of an extension that calls a
> member function inside a class.
> Any help appreciated
>

Debugger extensions for kernel mode do not call anything on the target.

–pa

I that because the driver is running in the context of the kernel on the
target whereas the debugger extension is executing in the context of the
WinDbg process on the host.

On Thu, Mar 17, 2011 at 5:46 PM, Pavel A. wrote:

> wrote in message news:xxxxx@windbg…
>
> I have a kernel level driver has instantiated class variables. Can someone
>> tell me how do I call member functions in a class that return data inside my
>> extension dll using the WinDbgExts functions. GetFieldOffset and
>> GetFieldData seem to only work for structure variables and not class
>> variables. Would anyone have a simple example of an extension that calls a
>> member function inside a class.
>> Any help appreciated
>>
>>
> Debugger extensions for kernel mode do not call anything on the target.
>
> --pa
>
>
>
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

I don’t understand what you are trying to do. There is no difference between
a variable in a structure and a variable in a class. I have extensions that
display class variables.

Bill Wandel

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Greg White
Sent: Friday, March 18, 2011 10:45 AM
To: Kernel Debugging Interest List
Subject: Re: [windbg] WinDbg Extension

I that because the driver is running in the context of the kernel on the
target whereas the debugger extension is executing in the context of the
WinDbg process on the host.

On Thu, Mar 17, 2011 at 5:46 PM, Pavel A. wrote:

wrote in message news:xxxxx@windbg…

I have a kernel level driver has instantiated class variables. Can someone
tell me how do I call member functions in a class that return data inside my
extension dll using the WinDbgExts functions. GetFieldOffset and
GetFieldData seem to only work for structure variables and not class
variables. Would anyone have a simple example of an extension that calls a
member function inside a class.
Any help appreciated

Debugger extensions for kernel mode do not call anything on the target.

–pa


WINDBG is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

— WINDBG is sponsored by OSR For our schedule of WDF, WDM, debugging and
other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Bill,
I believe I got some clarity on this this morning from another response.
The issue I think is that of context. I don’t think my WinDbg extension can
call a member function from an instantiated class in a kernel driver that is
running on the target. Perhaps I should have worded my question that way.

On Fri, Mar 18, 2011 at 8:24 AM, Bill Wandel wrote:

> I don’t understand what you are trying to do. There is no difference
> between
> a variable in a structure and a variable in a class. I have extensions that
> display class variables.
>
>
>
> Bill Wandel
>
>
>
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Greg White
> Sent: Friday, March 18, 2011 10:45 AM
> To: Kernel Debugging Interest List
> Subject: Re: [windbg] WinDbg Extension
>
>
>
> I that because the driver is running in the context of the kernel on the
> target whereas the debugger extension is executing in the context of the
> WinDbg process on the host.
>
> On Thu, Mar 17, 2011 at 5:46 PM, Pavel A. wrote:
>
> wrote in message news:xxxxx@windbg…
>
>
>
> I have a kernel level driver has instantiated class variables. Can someone
> tell me how do I call member functions in a class that return data inside
> my
> extension dll using the WinDbgExts functions. GetFieldOffset and
> GetFieldData seem to only work for structure variables and not class
> variables. Would anyone have a simple example of an extension that calls a
> member function inside a class.
> Any help appreciated
>
>
>
> Debugger extensions for kernel mode do not call anything on the target.
>
> --pa
>
>
>
>
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> — WINDBG is sponsored by OSR For our schedule of WDF, WDM, debugging and
> other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
> the
> List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

Greg White wrote:

Bill,
I believe I got some clarity on this this morning from another
response. The issue I think is that of context. I don’t think my
WinDbg extension can call a member function from an instantiated class
in a kernel driver that is running on the target. Perhaps I should
have worded my question that way.

I think you worded it just fine the first time. What you ask is not
possible. gdb has this feature on Linux, but only because it’s running
in the same address space as the process being debugged. WinDbg is
running on an entirely different computer. It can’t go create new
execution contexts and redirect the processor on the target.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.