pykd/pykd/disasm.h
SND\kernelnet_cp 89c524741a [pykd] added : class disasm
git-svn-id: https://pykd.svn.codeplex.com/svn@68358 9b283d60-5439-405e-af05-b73fd8c4d996
2011-07-28 08:10:10 +00:00

55 lines
1.0 KiB
C++

#pragma once
/////////////////////////////////////////////////////////////////////////////////
class disasm {
public:
disasm( ULONG64 offset = 0) :
m_beginOffset( offset ),
m_currentOffset( offset ) {
doDisasm();
}
std::string next() {
m_currentOffset += m_length;
doDisasm();
return m_disasm;
}
std::string instruction() const {
return m_disasm;
}
ULONG64 begin() const {
return m_beginOffset;
}
ULONG64 current() const {
return m_currentOffset;
}
ULONG length() const {
return m_length;
}
ULONG64 ea() const {
return m_ea;
}
private:
void doDisasm();
ULONG64 m_beginOffset;
ULONG64 m_currentOffset;
ULONG64 m_ea;
ULONG m_length;
std::string m_disasm;
};
/////////////////////////////////////////////////////////////////////////////////