change offset_to_rva into file_offset_to_va, add comments

git-svn-id: file:///home/svn/framework3/trunk@9242 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Joshua Drake 2010-05-07 21:45:21 +00:00
parent e70dabf3e3
commit cd213c29c5
1 changed files with 8 additions and 2 deletions

View File

@ -184,10 +184,16 @@ class Pe < PeBase
(ptr_32?) ? ("0x%.8x" % va) : ("0x%.16x" % va)
end
def offset_to_rva(offset)
image_base + offset
#
# Converts a file offset into a virtual address
#
def file_offset_to_va(offset)
image_base + file_offset_to_rva(offset)
end
#
# Read raw bytes from the specified offset in the underlying file
#
def read(offset, len)
_isource.read(offset, len)
end