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" )