added a couple of convenience methods
not sure if these are correct, but they worked for me git-svn-id: file:///home/svn/framework3/trunk@9230 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
a75929889a
commit
873f8bd1ed
|
@ -143,7 +143,7 @@ class Pe < PeBase
|
|||
self.hdr.config = self._config_header
|
||||
self.hdr.tls = self._tls_header
|
||||
self.hdr.exceptions = self._exception_header
|
||||
|
||||
|
||||
# We load the exception directory last as it relies on hdr.file to be created above.
|
||||
self._exception_header = _load_exception_directory()
|
||||
end
|
||||
|
@ -184,5 +184,13 @@ class Pe < PeBase
|
|||
(ptr_32?) ? ("0x%.8x" % va) : ("0x%.16x" % va)
|
||||
end
|
||||
|
||||
end end end
|
||||
def offset_to_rva(offset)
|
||||
image_base + offset
|
||||
end
|
||||
|
||||
def read(offset, len)
|
||||
_isource.read(offset, len)
|
||||
end
|
||||
|
||||
|
||||
end end end
|
||||
|
|
Loading…
Reference in New Issue