Different Windbg extensions for each OS?

Do I need to build a different debugger for my driver for each OS version,
ie. NT4, 2K, XP and .NET or will one extension work for all? Assume the
extension only references structure local to my driver.

I understand that if I was using OS specific structures in my commands I’d
have to do that.

Thanks,
Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ken Galipeau
Sent: Saturday, April 05, 2003 12:47 AM
To: Kernel Debugging Interest List
Subject: [windbg] RE: documentation for how to create Windbg extensions

I moved the samples dir into a dir with no spaces and it worked!

Thanks!
Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ken Galipeau
Sent: Friday, April 04, 2003 7:06 PM
To: Kernel Debugging Interest List
Subject: [windbg] RE: documentation for how to create Windbg extensions

I tried it and got the same results (see below).

Before and now I not only am missing a .dll but no .obj are built.

Thanks,
Ken

BUILD: Computing Include file dependencies:
BUILD: Examining c:\program files\debugging tools for
windows\sdk\samples\exts directory for files to compile. Compiling
c:\program files\debugging tools for windows\sdk\samples\exts directory
******************** ‘nmake.exe /c BUILDMSG=Stop. -i NTTEST= UMTEST=
NOLINK=1 NOPASS0=1 386=1’
1>BUILDMSG: Processing c:\program files\debugging tools for
windows\sdk\samples\exts
1> jvc /nologo /cp
C:\DEV\DDK\3763\public\sdk\classes\afc.zip;C:\DEV\DDK\3763\public\sdk\classe
s\classes.zip;C:\ProgramFiles\DebuggingToolsforWindows\sdk\samples\exts; /O
/w4 /d objfre_wnet_x86\i386
1>‘jvc’ is not recognized as an internal or external command, operable
1>program or batch file.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michael & Karen
Gilson
Sent: Friday, April 04, 2003 6:51 PM
To: Kernel Debugging Interest List
Subject: [windbg] RE: documentation for how to create Windbg extensions

You do not need to install J++

Add the following line to exts\sources

INCLUDE= $(INCLUDE);…..\inc

open a wnet build window and build it


You are currently subscribed to windbg as: xxxxx@legato.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@legato.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@legato.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

If you use the Windbg APIs and macros, yes, only one version is needed for all platforms (including 64-bit). For example, use GetTypeSize( “MyDriver!MyStruct” ) rather than sizeof(MyStruct), use GetFieldOffset() rather than FIELD_OFFSET() etc.

From: Ken Galipeau
> Date: 2003/04/07 Mon PM 09:21:52 CDT
> To: “Kernel Debugging Interest List”
> Subject: [windbg] Different Windbg extensions for each OS?
>
> Do I need to build a different debugger for my driver for each OS version,
> ie. NT4, 2K, XP and .NET or will one extension work for all? Assume the
> extension only references structure local to my driver.
>
> I understand that if I was using OS specific structures in my commands I’d
> have to do that.
>
> Thanks,
> Ken
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Ken Galipeau
> Sent: Saturday, April 05, 2003 12:47 AM
> To: Kernel Debugging Interest List
> Subject: [windbg] RE: documentation for how to create Windbg extensions
>
>
> I moved the samples dir into a dir with no spaces and it worked!
>
> Thanks!
> Ken
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Ken Galipeau
> Sent: Friday, April 04, 2003 7:06 PM
> To: Kernel Debugging Interest List
> Subject: [windbg] RE: documentation for how to create Windbg extensions
>
>
> I tried it and got the same results (see below).
>
> Before and now I not only am missing a .dll but no .obj are built.
>
> Thanks,
> Ken
>
> BUILD: Computing Include file dependencies:
> BUILD: Examining c:\program files\debugging tools for
> windows\sdk\samples\exts directory for files to compile. Compiling
> c:\program files\debugging tools for windows\sdk\samples\exts directory
> ********************‘nmake.exe /c BUILDMSG=Stop. -i NTTEST= UMTEST=
> NOLINK=1 NOPASS0=1 386=1’
> 1>BUILDMSG: Processing c:\program files\debugging tools for
> windows\sdk\samples\exts
> 1> jvc /nologo /cp
> C:\DEV\DDK\3763\public\sdk\classes\afc.zip;C:\DEV\DDK\3763\public\sdk\classe
> s\classes.zip;C:\ProgramFiles\DebuggingToolsforWindows\sdk\samples\exts; /O
> /w4 /d objfre_wnet_x86\i386
> 1>‘jvc’ is not recognized as an internal or external command, operable
> 1>program or batch file.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michael & Karen
> Gilson
> Sent: Friday, April 04, 2003 6:51 PM
> To: Kernel Debugging Interest List
> Subject: [windbg] RE: documentation for how to create Windbg extensions
>
>
> You do not need to install J++
>
> Add the following line to exts\sources
>
> INCLUDE= $(INCLUDE);…..\inc
>
> open a wnet build window and build it
>
>
>
>
>
>
>
> —
> You are currently subscribed to windbg as: xxxxx@legato.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> —
> You are currently subscribed to windbg as: xxxxx@legato.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
>
> —
> You are currently subscribed to windbg as: xxxxx@legato.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
>
> —
> You are currently subscribed to windbg as: xxxxx@gte.net
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

It definitely depends on how you write your extension.

You can build this kind of logic into your extensions to detect the OS
version and platform and thus only need one single extension that
handles all platforms and OSes. I’m not saying it is easy, but it is
possible.

The extension code specific to your driver usually doesn’t have to worry
about OS version because you have full PDB info available to the
extension (structures/types, locals, globals). You don’t have to
hard-code data structure knowledge into your extension anymore (with the
exception of kernel structures) if your build generates PDB symbols.

If you use OS structures in the extension you might be somewhat in this
boat. Kernel structure definitions are not available in NT4 public
symbols. However there may be alternative methods for you to accomplish
what you want to accomplish via certain dbgeng methods. When in doubt
just ask.

The splitting of the extensions by the debugger is more for legacy
support. Whenever possible, extensions that work globally for all
platforms from NT4 and above are added to the winext* extensions.
These extensions in winext* have no dependency on the OS version or
platform, or they do proper detection of OS version and platform and act
accordingly. That is the preferred way to write every extension.
Eventually it will be great if all the nt4* and w2k* extensions get
phased out and there is only one extension subdirectory. But it is a
lot of work to convert all the extensions in this way, so there is no
guarantee that the phase out will happen before the OSes themselves are
phased out.

-----Original Message-----
From: Ken Galipeau [mailto:xxxxx@legato.com]
Sent: Monday, April 07, 2003 7:22 PM
To: Kernel Debugging Interest List
Subject: [windbg] Different Windbg extensions for each OS?

Do I need to build a different debugger for my driver for each OS
version, ie. NT4, 2K, XP and .NET or will one extension work for all?
Assume the extension only references structure local to my driver.

I understand that if I was using OS specific structures in my commands
I’d have to do that.

Thanks,
Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ken Galipeau
Sent: Saturday, April 05, 2003 12:47 AM
To: Kernel Debugging Interest List
Subject: [windbg] RE: documentation for how to create Windbg extensions

I moved the samples dir into a dir with no spaces and it worked!

Thanks!
Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ken Galipeau
Sent: Friday, April 04, 2003 7:06 PM
To: Kernel Debugging Interest List
Subject: [windbg] RE: documentation for how to create Windbg extensions

I tried it and got the same results (see below).

Before and now I not only am missing a .dll but no .obj are built.

Thanks,
Ken

BUILD: Computing Include file dependencies:
BUILD: Examining c:\program files\debugging tools for
windows\sdk\samples\exts directory for files to compile. Compiling
c:\program files\debugging tools for windows\sdk\samples\exts directory
******************** ‘nmake.exe /c BUILDMSG=Stop. -i NTTEST= UMTEST=
NOLINK=1 NOPASS0=1 386=1’
1>BUILDMSG: Processing c:\program files\debugging tools for
windows\sdk\samples\exts
1> jvc /nologo /cp
C:\DEV\DDK\3763\public\sdk\classes\afc.zip;C:\DEV\DDK\3763\public\sdk\cl
asse
s\classes.zip;C:\ProgramFiles\DebuggingToolsforWindows\sdk\samples\exts;
/O /w4 /d objfre_wnet_x86\i386
1>‘jvc’ is not recognized as an internal or external command, operable
1>program or batch file.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michael & Karen
Gilson
Sent: Friday, April 04, 2003 6:51 PM
To: Kernel Debugging Interest List
Subject: [windbg] RE: documentation for how to create Windbg extensions

You do not need to install J++

Add the following line to exts\sources

INCLUDE= $(INCLUDE);…..\inc

open a wnet build window and build it


You are currently subscribed to windbg as: xxxxx@legato.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@legato.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@legato.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

How does one determine the Target OS Platform in an extension?

What is the recommended way to determine one’s own product version?
Unfortunately older versions don’t have the structures declared with a
structure tag, e.g. typedef struct { } X;, which means I’d have to
hard some structures.

Thanks,
Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David Holcomb
Sent: Tuesday, April 08, 2003 11:34 PM
To: Kernel Debugging Interest List
Subject: [windbg] RE: Different Windbg extensions for each OS?

It definitely depends on how you write your extension.

You can build this kind of logic into your extensions to detect the OS
version and platform and thus only need one single extension that handles
all platforms and OSes. I’m not saying it is easy, but it is possible.

The extension code specific to your driver usually doesn’t have to worry
about OS version because you have full PDB info available to the extension
(structures/types, locals, globals). You don’t have to hard-code data
structure knowledge into your extension anymore (with the exception of
kernel structures) if your build generates PDB symbols.

If you use OS structures in the extension you might be somewhat in this
boat. Kernel structure definitions are not available in NT4 public symbols.
However there may be alternative methods for you to accomplish what you want
to accomplish via certain dbgeng methods. When in doubt just ask.

The splitting of the extensions by the debugger is more for legacy support.
Whenever possible, extensions that work globally for all platforms from NT4
and above are added to the winext* extensions. These extensions in winext*
have no dependency on the OS version or platform, or they do proper
detection of OS version and platform and act accordingly. That is the
preferred way to write every extension. Eventually it will be great if all
the nt4* and w2k* extensions get phased out and there is only one extension
subdirectory. But it is a lot of work to convert all the extensions in this
way, so there is no guarantee that the phase out will happen before the OSes
themselves are phased out.

-----Original Message-----
From: Ken Galipeau [mailto:xxxxx@legato.com]
Sent: Monday, April 07, 2003 7:22 PM
To: Kernel Debugging Interest List
Subject: [windbg] Different Windbg extensions for each OS?

Do I need to build a different debugger for my driver for each OS version,
ie. NT4, 2K, XP and .NET or will one extension work for all? Assume the
extension only references structure local to my driver.

I understand that if I was using OS specific structures in my commands I’d
have to do that.

Thanks,
Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ken Galipeau
Sent: Saturday, April 05, 2003 12:47 AM
To: Kernel Debugging Interest List
Subject: [windbg] RE: documentation for how to create Windbg extensions

I moved the samples dir into a dir with no spaces and it worked!

Thanks!
Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ken Galipeau
Sent: Friday, April 04, 2003 7:06 PM
To: Kernel Debugging Interest List
Subject: [windbg] RE: documentation for how to create Windbg extensions

I tried it and got the same results (see below).

Before and now I not only am missing a .dll but no .obj are built.

Thanks,
Ken

BUILD: Computing Include file dependencies:
BUILD: Examining c:\program files\debugging tools for
windows\sdk\samples\exts directory for files to compile. Compiling
c:\program files\debugging tools for windows\sdk\samples\exts directory
********************‘nmake.exe /c BUILDMSG=Stop. -i NTTEST= UMTEST=
NOLINK=1 NOPASS0=1 386=1’
1>BUILDMSG: Processing c:\program files\debugging tools for
windows\sdk\samples\exts
1> jvc /nologo /cp
C:\DEV\DDK\3763\public\sdk\classes\afc.zip;C:\DEV\DDK\3763\public\sdk\cl
asse
s\classes.zip;C:\ProgramFiles\DebuggingToolsforWindows\sdk\samples\exts;
/O /w4 /d objfre_wnet_x86\i386
1>‘jvc’ is not recognized as an internal or external command, operable
1>program or batch file.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michael & Karen
Gilson
Sent: Friday, April 04, 2003 6:51 PM
To: Kernel Debugging Interest List
Subject: [windbg] RE: documentation for how to create Windbg extensions

You do not need to install J++

Add the following line to exts\sources

INCLUDE= $(INCLUDE);…..\inc

open a wnet build window and build it


You are currently subscribed to windbg as: xxxxx@legato.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@legato.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@legato.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@legato.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

If you look in dbgeng.h you will find methods for things like that.

IDebugControl::GetDebuggeeType
IDebugControl::GetActualProcessorType
IDebugControl::GetSystemVersion
IDebugSymbols2::GetModuleVersionInformation

-----Original Message-----
From: Ken Galipeau [mailto:xxxxx@legato.com]
Sent: Thursday, April 10, 2003 10:15 PM
To: Kernel Debugging Interest List
Subject: [windbg] RE: Different Windbg extensions for each OS?

How does one determine the Target OS Platform in an extension?

What is the recommended way to determine one’s own product version?
Unfortunately older versions don’t have the structures declared with a
structure tag, e.g. typedef struct { } X;, which means I’d have to
hard some structures.

Thanks,
Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David Holcomb
Sent: Tuesday, April 08, 2003 11:34 PM
To: Kernel Debugging Interest List
Subject: [windbg] RE: Different Windbg extensions for each OS?

It definitely depends on how you write your extension.

You can build this kind of logic into your extensions to detect the OS
version and platform and thus only need one single extension that
handles all platforms and OSes. I’m not saying it is easy, but it is
possible.

The extension code specific to your driver usually doesn’t have to worry
about OS version because you have full PDB info available to the
extension (structures/types, locals, globals). You don’t have to
hard-code data structure knowledge into your extension anymore (with the
exception of kernel structures) if your build generates PDB symbols.

If you use OS structures in the extension you might be somewhat in this
boat. Kernel structure definitions are not available in NT4 public
symbols. However there may be alternative methods for you to accomplish
what you want to accomplish via certain dbgeng methods. When in doubt
just ask.

The splitting of the extensions by the debugger is more for legacy
support. Whenever possible, extensions that work globally for all
platforms from NT4 and above are added to the winext* extensions. These
extensions in winext* have no dependency on the OS version or platform,
or they do proper detection of OS version and platform and act
accordingly. That is the preferred way to write every extension.
Eventually it will be great if all the nt4* and w2k* extensions get
phased out and there is only one extension subdirectory. But it is a
lot of work to convert all the extensions in this way, so there is no
guarantee that the phase out will happen before the OSes themselves are
phased out.

-----Original Message-----
From: Ken Galipeau [mailto:xxxxx@legato.com]
Sent: Monday, April 07, 2003 7:22 PM
To: Kernel Debugging Interest List
Subject: [windbg] Different Windbg extensions for each OS?

Do I need to build a different debugger for my driver for each OS
version, ie. NT4, 2K, XP and .NET or will one extension work for all?
Assume the extension only references structure local to my driver.

I understand that if I was using OS specific structures in my commands
I’d have to do that.

Thanks,
Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ken Galipeau
Sent: Saturday, April 05, 2003 12:47 AM
To: Kernel Debugging Interest List
Subject: [windbg] RE: documentation for how to create Windbg extensions

I moved the samples dir into a dir with no spaces and it worked!

Thanks!
Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ken Galipeau
Sent: Friday, April 04, 2003 7:06 PM
To: Kernel Debugging Interest List
Subject: [windbg] RE: documentation for how to create Windbg extensions

I tried it and got the same results (see below).

Before and now I not only am missing a .dll but no .obj are built.

Thanks,
Ken

BUILD: Computing Include file dependencies:
BUILD: Examining c:\program files\debugging tools for
windows\sdk\samples\exts directory for files to compile. Compiling
c:\program files\debugging tools for windows\sdk\samples\exts directory
********************‘nmake.exe /c BUILDMSG=Stop. -i NTTEST= UMTEST=
NOLINK=1 NOPASS0=1 386=1’
1>BUILDMSG: Processing c:\program files\debugging tools for
windows\sdk\samples\exts
1> jvc /nologo /cp
C:\DEV\DDK\3763\public\sdk\classes\afc.zip;C:\DEV\DDK\3763\public\sdk\cl
asse
s\classes.zip;C:\ProgramFiles\DebuggingToolsforWindows\sdk\samples\exts;
/O /w4 /d objfre_wnet_x86\i386
1>‘jvc’ is not recognized as an internal or external command, operable
1>program or batch file.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michael & Karen
Gilson
Sent: Friday, April 04, 2003 6:51 PM
To: Kernel Debugging Interest List
Subject: [windbg] RE: documentation for how to create Windbg extensions

You do not need to install J++

Add the following line to exts\sources

INCLUDE= $(INCLUDE);…..\inc

open a wnet build window and build it


You are currently subscribed to windbg as: xxxxx@legato.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@legato.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@legato.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@legato.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com