Extension DLL

How can I get an extension dll to call the “.reload /f /v” command?

Dave Vorhies

I know very little about the details of extension dlls so I will be of no
help. If the example program from OSR online did not help you might try
emailing them (www.osronline.com) and asking the question or googling the
user groups.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Dave Vorhies
Sent: Monday, January 17, 2005 9:15 AM
To: Kernel Debugging Interest List
Subject: [windbg] Extension DLL

How can I get an extension dll to call the “.reload /f /v” command?

Dave Vorhies


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

Dave,

If you are writing a DbgEngine DLL (as oppose to WDbgExt DLL), you can use
the DEBUG_CONTROL class.

Here’s a command handling sample:

HRESULT CALLBACK
testing_cmd1(PDEBUG_CLIENT Client, PCSTR args)
{
HRESULT Status;
PDEBUG_CONTROL localControl;

UNREFERENCED_PARAMETER(args);

//
// initialize the local control class.
//
if (S_OK == (Status = Client->QueryInterface(__uuidof(IDebugControl),
(void **)&localControl)))
{
//
// execute “!pcr” command with argument “1” specified.
// Feel free to play with other commands.
//
localControl->Execute(DEBUG_OUTCTL_ALL_CLIENTS |
DEBUG_OUTCTL_OVERRIDE_MASK |
DEBUG_OUTCTL_NOT_LOGGED,
“!pcr 1”,
DEBUG_EXECUTE_DEFAULT );

//
// release the class
//
localControl->Release();
}

return Status;
}

Executing the testing_cmd1 in kd

1: kd> !testing_cmd1
KPCR for Processor 1 at f7717000:
Major 1 Minor 1
NtTib.ExceptionList: f78aea14
NtTib.StackBase: f78aedf0
NtTib.StackLimit: f78ac000
NtTib.SubSystemTib: 00000000
NtTib.Version: 00000000
NtTib.UserPointer: 00000000
NtTib.SelfTib: 00000000

SelfPcr: f7717000
Prcb: f7717120
Irql: 00000000
IRR: 00000000
IDR: ffffffff
InterruptMode: 00000000
IDT: f771b560
GDT: f771b160
TSS: f7717d70

CurrentThread: f7719e20
NextThread: 00000000
IdleThread: f7719e20

DpcQueue:

HTH,
Calvin

Calvin Guan Software Engineer
ATI Technologies Inc. www.ati.com

-----Original Message-----
From: Dave Vorhies [mailto:xxxxx@yahoo.com]
Sent: January 17, 2005 10:15 AM
To: Kernel Debugging Interest List
Subject: [windbg] Extension DLL

How can I get an extension dll to call the “.reload /f /v” command?

Dave Vorhies


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