mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-19 19:13:22 +08:00
[0.3.x] added : expr supports cplusplus syntax
git-svn-id: https://pykd.svn.codeplex.com/svn@85198 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
4572e0927f
commit
30466d4587
@ -4,6 +4,7 @@
|
||||
#include "kdlib/typeinfo.h"
|
||||
|
||||
#include "dbgengine.h"
|
||||
#include "variant.h"
|
||||
|
||||
namespace pykd {
|
||||
|
||||
@ -131,13 +132,13 @@ std::wstring debugCommand( const std::wstring &command )
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
unsigned long long evaluate( const std::wstring &expression )
|
||||
python::object evaluate( const std::wstring &expression, bool cplusplus )
|
||||
{
|
||||
AutoRestorePyState pystate;
|
||||
|
||||
unsigned long long result = kdlib::evaluate(expression);
|
||||
kdlib::NumVariant var = kdlib::evaluate(expression, cplusplus );
|
||||
|
||||
return result;
|
||||
return pykd::NumVariantAdaptor::convertToPython( var );
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -21,7 +21,7 @@ void loadDump( const std::wstring &fileName );
|
||||
void attachKernel( const std::wstring &connectOptions = L"" );
|
||||
|
||||
std::wstring debugCommand( const std::wstring &command );
|
||||
unsigned long long evaluate( const std::wstring &expression );
|
||||
python::object evaluate( const std::wstring &expression, bool cplusplus = false );
|
||||
|
||||
python::tuple getSourceLine( kdlib::MEMOFFSET_64 offset = 0 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user