From 2f6845aa49702795e666bb49c31a92daf385d684 Mon Sep 17 00:00:00 2001 From: "SND\\kernelnet_cp" Date: Wed, 30 May 2012 09:39:53 +0000 Subject: [PATCH] [0.1.x] added : disasm::disasm method with offset parameter ( continue disassembling from the specified offset ) git-svn-id: https://pykd.svn.codeplex.com/svn@76813 9b283d60-5439-405e-af05-b73fd8c4d996 --- pykd/disasm.h | 9 +++++++-- pykd/pymod.cpp | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pykd/disasm.h b/pykd/disasm.h index 59ca560..793ad68 100644 --- a/pykd/disasm.h +++ b/pykd/disasm.h @@ -21,11 +21,16 @@ public: return s; } - std::string reset() { + std::string jump(ULONG64 offset) { + m_currentOffset = offset; + doDisasm(); + return disassemble(); + } + std::string reset() { m_currentOffset = m_beginOffset; doDisasm(); - return m_disasm; + return disassemble(); } std::string diff --git a/pykd/pymod.cpp b/pykd/pymod.cpp index 852528f..9af80be 100644 --- a/pykd/pymod.cpp +++ b/pykd/pymod.cpp @@ -649,6 +649,7 @@ BOOST_PYTHON_MODULE( pykd ) .def( python::init<>( "constructor" ) ) .def( python::init( boost::python::args("offset"), "constructor" ) ) .def( "disasm", &Disasm::disassemble, "Disassemble next instruction" ) + .def( "disasm", &Disasm::jump, "Disassemble from the specified offset" ) .def( "asm", &Disasm::assembly, "Insert assemblied instuction to current offset" ) .def( "begin", &Disasm::begin, "Return begin offset" ) .def( "current", &Disasm::current, "Return current offset" )