mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[pykd] added: debuggerPath routine ( Return full path to the process image that uses pykd )
git-svn-id: https://pykd.svn.codeplex.com/svn@70089 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
4dc9bba048
commit
a7855ea4d1
@ -221,6 +221,8 @@ BOOST_PYTHON_MODULE( pykd )
|
|||||||
"Delete synthetic symbols by virtual address" );
|
"Delete synthetic symbols by virtual address" );
|
||||||
boost::python::def( "delSynSymbolsMask", &delSyntheticSymbolsMask,
|
boost::python::def( "delSynSymbolsMask", &delSyntheticSymbolsMask,
|
||||||
"Delete synthetic symbols by mask of module and symbol name");
|
"Delete synthetic symbols by mask of module and symbol name");
|
||||||
|
boost::python::def( "debuggerPath", &getDebuggerImage,
|
||||||
|
"Return full path to the process image that uses pykd" );
|
||||||
|
|
||||||
boost::python::class_<TypeInfo>( "typeInfo",
|
boost::python::class_<TypeInfo>( "typeInfo",
|
||||||
"Class representing non-primitive type info: structure, union, etc. attributes is a fields of non-primitive type" )
|
"Class representing non-primitive type info: structure, union, etc. attributes is a fields of non-primitive type" )
|
||||||
@ -253,7 +255,7 @@ BOOST_PYTHON_MODULE( pykd )
|
|||||||
DEF_PY_GLOBAL( "ulong_t", TypeInfo("", "unsigned long") );
|
DEF_PY_GLOBAL( "ulong_t", TypeInfo("", "unsigned long") );
|
||||||
DEF_PY_GLOBAL( "int_t", TypeInfo("", "int") );
|
DEF_PY_GLOBAL( "int_t", TypeInfo("", "int") );
|
||||||
DEF_PY_GLOBAL( "uint_t", TypeInfo("", "unsigned int") );
|
DEF_PY_GLOBAL( "uint_t", TypeInfo("", "unsigned int") );
|
||||||
DEF_PY_GLOBAL( "ptr_t", TypeInfo("", "void*") );
|
//DEF_PY_GLOBAL( "ptr_t", TypeInfo("", "void*") );
|
||||||
DEF_PY_GLOBAL( "double_t", TypeInfo("", "double") );
|
DEF_PY_GLOBAL( "double_t", TypeInfo("", "double") );
|
||||||
DEF_PY_GLOBAL( "longlong_t", TypeInfo("", "int64") );
|
DEF_PY_GLOBAL( "longlong_t", TypeInfo("", "int64") );
|
||||||
DEF_PY_GLOBAL( "ulonglong_t", TypeInfo("", "unsigned int64") );
|
DEF_PY_GLOBAL( "ulonglong_t", TypeInfo("", "unsigned int64") );
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
#include <psapi.h>
|
||||||
|
|
||||||
#include "dbgext.h"
|
#include "dbgext.h"
|
||||||
#include "dbgexcept.h"
|
#include "dbgexcept.h"
|
||||||
#include "dbgsystem.h"
|
#include "dbgsystem.h"
|
||||||
@ -124,3 +126,13 @@ isDumpAnalyzing()
|
|||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
std::string
|
||||||
|
getDebuggerImage()
|
||||||
|
{
|
||||||
|
std::vector<char> buffer(MAX_PATH);
|
||||||
|
GetModuleFileNameExA( GetCurrentProcess(), NULL, &buffer[0], buffer.size() );
|
||||||
|
return std::string( &buffer[0] );
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
@ -28,4 +28,8 @@ isKernelDebugging();
|
|||||||
bool
|
bool
|
||||||
isDumpAnalyzing();
|
isDumpAnalyzing();
|
||||||
|
|
||||||
|
std::string
|
||||||
|
getDebuggerImage();
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
@ -66,7 +66,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="dbgeng.lib "
|
AdditionalDependencies="dbgeng.lib dbghelp.lib psapi.lib"
|
||||||
OutputFile="$(OutDir)\$(ProjectName).pyd"
|
OutputFile="$(OutDir)\$(ProjectName).pyd"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
AdditionalLibraryDirectories=""$(DBG_SDK_ROOT)\lib\i386";"$(PYTHON_ROOT)\x86\libs";"$(BOOST_ROOT)\stage\lib""
|
AdditionalLibraryDirectories=""$(DBG_SDK_ROOT)\lib\i386";"$(PYTHON_ROOT)\x86\libs";"$(BOOST_ROOT)\stage\lib""
|
||||||
@ -151,7 +151,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="dbgeng.lib dbghelp.lib"
|
AdditionalDependencies="dbgeng.lib dbghelp.lib psapi.lib"
|
||||||
OutputFile="$(OutDir)\$(ProjectName).pyd"
|
OutputFile="$(OutDir)\$(ProjectName).pyd"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
AdditionalLibraryDirectories=""$(DBG_SDK_ROOT)\lib\amd64";"$(PYTHON_ROOT)\x64\libs";"$(BOOST_ROOT)\stage64\lib""
|
AdditionalLibraryDirectories=""$(DBG_SDK_ROOT)\lib\amd64";"$(PYTHON_ROOT)\x64\libs";"$(BOOST_ROOT)\stage64\lib""
|
||||||
@ -230,7 +230,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="dbgeng.lib"
|
AdditionalDependencies="dbgeng.lib dbghelp.lib psapi.lib"
|
||||||
OutputFile="$(OutDir)\$(ProjectName).pyd"
|
OutputFile="$(OutDir)\$(ProjectName).pyd"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
AdditionalLibraryDirectories=""$(DBG_SDK_ROOT)\lib\i386";"$(PYTHON_ROOT)\x86\libs";"$(BOOST_ROOT)\stage\lib""
|
AdditionalLibraryDirectories=""$(DBG_SDK_ROOT)\lib\i386";"$(PYTHON_ROOT)\x86\libs";"$(BOOST_ROOT)\stage\lib""
|
||||||
@ -311,7 +311,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="dbgeng.lib dbghelp.lib"
|
AdditionalDependencies="dbgeng.lib dbghelp.lib psapi.lib"
|
||||||
OutputFile="$(OutDir)\$(ProjectName).pyd"
|
OutputFile="$(OutDir)\$(ProjectName).pyd"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
AdditionalLibraryDirectories=""$(DBG_SDK_ROOT)\lib\amd64";"$(PYTHON_ROOT)\x64\libs";"$(BOOST_ROOT)\stage64\lib""
|
AdditionalLibraryDirectories=""$(DBG_SDK_ROOT)\lib\amd64";"$(PYTHON_ROOT)\x64\libs";"$(BOOST_ROOT)\stage64\lib""
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="dbgeng.lib "
|
AdditionalDependencies="dbgeng.lib psapi.lib"
|
||||||
OutputFile="$(OutDir)\$(ProjectName).pyd"
|
OutputFile="$(OutDir)\$(ProjectName).pyd"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
AdditionalLibraryDirectories=""$(DBG_SDK_ROOT)\lib\i386";"$(PYTHON_ROOT)\x86\libs";"$(BOOST_ROOT)\stage\lib""
|
AdditionalLibraryDirectories=""$(DBG_SDK_ROOT)\lib\i386";"$(PYTHON_ROOT)\x86\libs";"$(BOOST_ROOT)\stage\lib""
|
||||||
@ -151,7 +151,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="dbgeng.lib"
|
AdditionalDependencies="dbgeng.lib psapi.lib"
|
||||||
OutputFile="$(OutDir)\$(ProjectName).pyd"
|
OutputFile="$(OutDir)\$(ProjectName).pyd"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
AdditionalLibraryDirectories=""$(DBG_SDK_ROOT)\lib\amd64";"$(PYTHON_ROOT)\x64\libs";"$(BOOST_ROOT)\stage64\lib""
|
AdditionalLibraryDirectories=""$(DBG_SDK_ROOT)\lib\amd64";"$(PYTHON_ROOT)\x64\libs";"$(BOOST_ROOT)\stage64\lib""
|
||||||
@ -227,7 +227,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalOptions="/pdbpath:none"
|
AdditionalOptions="/pdbpath:none"
|
||||||
AdditionalDependencies="dbgeng.lib"
|
AdditionalDependencies="dbgeng.lib psapi.lib"
|
||||||
OutputFile="$(OutDir)\$(ProjectName).pyd"
|
OutputFile="$(OutDir)\$(ProjectName).pyd"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
AdditionalLibraryDirectories=""$(DBG_SDK_ROOT)\lib\i386";"$(PYTHON_ROOT)\x86\libs";"$(BOOST_ROOT)\stage\lib""
|
AdditionalLibraryDirectories=""$(DBG_SDK_ROOT)\lib\i386";"$(PYTHON_ROOT)\x86\libs";"$(BOOST_ROOT)\stage\lib""
|
||||||
@ -306,7 +306,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalOptions="/pdbpath:none"
|
AdditionalOptions="/pdbpath:none"
|
||||||
AdditionalDependencies="dbgeng.lib"
|
AdditionalDependencies="dbgeng.lib psapi.lib"
|
||||||
OutputFile="$(OutDir)\$(ProjectName).pyd"
|
OutputFile="$(OutDir)\$(ProjectName).pyd"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
AdditionalLibraryDirectories=""$(DBG_SDK_ROOT)\lib\amd64";"$(PYTHON_ROOT)\x64\libs";"$(BOOST_ROOT)\stage64\lib""
|
AdditionalLibraryDirectories=""$(DBG_SDK_ROOT)\lib\amd64";"$(PYTHON_ROOT)\x64\libs";"$(BOOST_ROOT)\stage64\lib""
|
||||||
|
Loading…
Reference in New Issue
Block a user