Hey guys, I would like to make a mini dbgview with process filter ( personal use only ). but
but I can not find information about how dbgview works… Does anyone know?
thanks
Why not use DbgView itself?
- S (Msft)
From: xxxxx@hotmail.com
Sent: 9/23/2012 11:09
To: Windows System Software Devs Interest List
Subject: [ntdev] How dbgView works?
Hey guys, I would like to make a mini dbgview with process filter ( personal use only ). but
but I can not find information about how dbgview works… Does anyone know?
thanks
NTDEV 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
heres some thing to chew about
a poor souls dbgprint logger ![]()
usable if you have a system that’s booted with /Debug Switch
if you create a shortcut in desktop and assign it a hot key
TARGET : C:\WINDOWS\system32\cmd.exe /C "C:\windbg\GetDbgPrint.exe
>dbgprintlog.txt"
STARTIN :C:\Windbg
SHORTCUTKEY: ctrl+alt+capslock
RUN: minimized
all you need is ctrl+alt+ to capture the debugprints
thats in the buffer to the file dbgprintlog.txt
after building this code drag drop the exe to windbg installation folder ![]()
Btw Does Someone Know HOW I CAN MAKE A INDEPENDENT RUNNING FROM ANY
FOLDER STANDALONE DEBUG EXTENSION PROGRAM ?
with out having any dependencies on exts.dll, symsrv.dll and all the
other windbg dlls ? or without drag dropping it to windbg
installation folder
#include <stdio.h>
#include <engextcpp.hpp>
int cdecl GetDbgPrint(void);
#ifndef__OUT_HPP
#define OUT_HPP
class StdioOutputCallbacks : public IDebugOutputCallbacks
{
public:
STDMETHOD(QueryInterface)( THIS_ IN REFIID InterfaceId, OUT PVOID* Interface);
STDMETHOD_(ULONG, AddRef)( THIS );
STDMETHOD_(ULONG, Release)( THIS);
STDMETHOD(Output)( THIS_ IN ULONG Mask, IN PCSTR Text );
};
#endif
STDMETHODIMP
StdioOutputCallbacks::QueryInterface( THIS_ IN REFIID InterfaceId,
OUT PVOID* Interface ) {
Interface = NULL;
if (IsEqualIID(InterfaceId,_uuidof(IUnknown)) ||
IsEqualIID(InterfaceId, uuidof(IDebugOutputCallbacks))) {
*Interface = (IDebugOutputCallbacks *)this;
AddRef();
return S_OK;
} else {
return E_NOINTERFACE;
}
}
STDMETHODIMP(ULONG)
StdioOutputCallbacks::AddRef( THIS ) {
return 1;
}
STDMETHODIMP(ULONG)
StdioOutputCallbacks::Release( THIS ) {
return 0;
}
STDMETHODIMP
StdioOutputCallbacks::Output( THIS IN ULONG Mask, IN PCSTR Text ) {
UNREFERENCED_PARAMETER(Mask);
fputs(Text, stdout);
return S_OK;
}
StdioOutputCallbacks g_Callback;
IDebugClient g_Client;
IDebugControl* g_Control;
int__cdecl GetDbgPrint(void){
if ((
DebugCreate( uuidof(IDebugClient), (void**)&g_Client ) ||
g_Client->QueryInterface(uuidof(IDebugControl), (void**)&g_Control ) ||
g_Client->AttachKernel( DEBUG_ATTACH_LOCAL_KERNEL, NULL) ||
g_Control->WaitForEvent( 0, INFINITE ) ||
g_Client->SetOutputCallbacks( &g_Callback ) ||
g_Control->Execute( DEBUG_OUTCTL_THIS_CLIENT, ".echo ; .time ;
.echo; !dbgprint ", DEBUG_EXECUTE_DEFAULT) ||
g_Client->SetOutputCallbacks( NULL ) ) !=S_OK ) {
return FALSE;
}
return TRUE;
}
int cdecl main( void ){
if ((GetDbgPrint()) == FALSE) {
printf(“some error go check\n”);
}
g_Control->Release();
g_Client->Release();
return 0;
}
output with timestamps
>> MSEnv extensibility IClassFactory::LockServer(TRUE), lock count: 1
Entering constructor for: Microsoft.VisualStudio.ComponentModelHost.HostPackage
Entering Initialize() of: Microsoft.VisualStudio.ComponentModelHost.HostPackage
>> MSEnv extensibility IClassFactory::LockServer(TRUE), lock count: 2
>> MSEnv extensibility IClassFactory::LockServer(TRUE), lock count: 3
>> MSEnv extensibility IClassFactory::LockServer(FALSE), lock count: 2
>> MSEnv extensibility IClassFactory::LockServer(FALSE), lock count: 1
Debug session time: Tue Sep 25 11:54:58.980 2012 (UTC + 5:30)
System Uptime: 0 days 1:16:43.024
ERROR: DavReadRegistryValues/RegQueryValueExW(4). WStatus = 5
ERROR: DavReadRegistryValues/RegQueryValueExW(5). WStatus = 5
ERROR: DavReadRegistryValues/RegQueryValueExW(6). WStatus = 5
watchdog!WdUpdateRecoveryState: Recovery enabled.
Constructing a new instance of SVsWindowManager
HR originated: -2147024774
Source File: d:\iso_whid\x86fre\base\isolation\com\copyout.cpp, line
On 9/24/12, Skywing wrote:
> Why not use DbgView itself?
>
> - S (Msft)
>__________________________
> From: xxxxx@hotmail.com
> Sent: 9/23/2012 11:09
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How dbgView works?
>
> Hey guys, I would like to make a mini dbgview with process filter ( personal
> use only ). but
> but I can not find information about how dbgview works… Does anyone
> know?
> thanks
>
> —
> NTDEV 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
>
> —
> NTDEV 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</engextcpp.hpp></stdio.h>