diff options
author | paulgazz@chromium.org <paulgazz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-23 21:18:19 +0000 |
---|---|---|
committer | paulgazz@chromium.org <paulgazz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-23 21:18:19 +0000 |
commit | 144c8e950add26b44467784568d0ca5387a1047d (patch) | |
tree | 74c55e162f2128d67552a654d1cc57fb21b91afe /courgette/disassembler.h | |
parent | 63d353f9d7a70dc827bad25e0932967711d595f3 (diff) | |
download | chromium_src-144c8e950add26b44467784568d0ca5387a1047d.zip chromium_src-144c8e950add26b44467784568d0ca5387a1047d.tar.gz chromium_src-144c8e950add26b44467784568d0ca5387a1047d.tar.bz2 |
Added a TypedRVA to track what kind of branch instruction is used for
the jump and compute the target RVA accordingly. Also updated the
unit test to use TypedRVA and check that only X86 RVAs are found by
the X86 "disassembler".
BUG=258645
Review URL: https://chromiumcodereview.appspot.com/18055007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213220 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'courgette/disassembler.h')
-rw-r--r-- | courgette/disassembler.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/courgette/disassembler.h b/courgette/disassembler.h index 2de67fd..8f6deb1 100644 --- a/courgette/disassembler.h +++ b/courgette/disassembler.h @@ -67,6 +67,10 @@ class Disassembler { return *reinterpret_cast<const uint32*>(address); } + static uint16 Read16LittleEndian(const void* address) { + return *reinterpret_cast<const uint16*>(address); + } + // Reduce the length of the image in memory. Does not actually free // (or realloc) any memory. Usually only called via ParseHeader() void ReduceLength(size_t reduced_length); |