diff options
author | Brian Carlstrom <bdc@google.com> | 2012-01-11 01:36:32 -0800 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2012-01-11 11:25:08 -0800 |
commit | 6e3b1d900cc456a2717944f1f562a2f4df000705 (patch) | |
tree | 99cfbf6d1ad1f6f550bb74a5613fade809bdc89e /src/dex_file.h | |
parent | 761bfa80704937024fdbe58c2b6fd4599760efaf (diff) | |
download | art-6e3b1d900cc456a2717944f1f562a2f4df000705.zip art-6e3b1d900cc456a2717944f1f562a2f4df000705.tar.gz art-6e3b1d900cc456a2717944f1f562a2f4df000705.tar.bz2 |
Combine OatDexFile and OatClasses sections of oat file
Change-Id: Ic300c0ee60f9699a2ef351c89121750af637dade
Diffstat (limited to 'src/dex_file.h')
-rw-r--r-- | src/dex_file.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/dex_file.h b/src/dex_file.h index 2ca4308..a62c28f 100644 --- a/src/dex_file.h +++ b/src/dex_file.h @@ -213,6 +213,12 @@ class DexFile { // Decode the dex magic version uint32_t GetVersion() const; + // Returns true if the byte string points to the magic value. + static bool IsMagicValid(const byte* magic); + + // Returns true if the byte string after the magic is the correct value. + static bool IsVersionValid(const byte* magic); + // Returns the number of string identifiers in the .dex file. size_t NumStringIds() const { CHECK(header_ != NULL) << GetLocation(); @@ -671,11 +677,8 @@ class DexFile { // Builds the index of descriptors to class definitions. void InitIndex(); - // Returns true if the byte string equals the magic value. - bool CheckMagic(const byte* magic); - - // Returns true if the header magic is of the expected value. - bool IsMagicValid(); + // Returns true if the header magic and version numbers are of the expected values. + bool CheckMagicAndVersion(); void DecodeDebugInfo0(const CodeItem* code_item, bool is_static, uint32_t method_idx, DexDebugNewPositionCb posCb, DexDebugNewLocalCb local_cb, |