OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COURGETTE_DISASSEMBLER_WIN32_X64_H_ | 5 #ifndef COURGETTE_DISASSEMBLER_WIN32_X64_H_ |
6 #define COURGETTE_DISASSEMBLER_WIN32_X64_H_ | 6 #define COURGETTE_DISASSEMBLER_WIN32_X64_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "courgette/disassembler_win32.h" | 12 #include "courgette/disassembler_win32.h" |
13 #include "courgette/image_utils.h" | 13 #include "courgette/image_utils.h" |
14 #include "courgette/types_win_pe.h" | 14 #include "courgette/types_win_pe.h" |
15 | 15 |
16 namespace courgette { | 16 namespace courgette { |
17 | 17 |
18 class AssemblyProgram; | |
19 class InstructionReceptor; | 18 class InstructionReceptor; |
20 | 19 |
21 class DisassemblerWin32X64 : public DisassemblerWin32 { | 20 class DisassemblerWin32X64 : public DisassemblerWin32 { |
22 public: | 21 public: |
23 // Returns true if a valid executable is detected using only quick checks. | 22 // Returns true if a valid executable is detected using only quick checks. |
24 static bool QuickDetect(const uint8_t* start, size_t length) { | 23 static bool QuickDetect(const uint8_t* start, size_t length) { |
25 return DisassemblerWin32::QuickDetect(start, length, | 24 return DisassemblerWin32::QuickDetect(start, length, |
26 kImageNtOptionalHdr64Magic); | 25 kImageNtOptionalHdr64Magic); |
27 } | 26 } |
28 | 27 |
(...skipping 20 matching lines...) Expand all Loading... |
49 return kOffsetOfDataDirectoryFromImageOptionalHeader64; | 48 return kOffsetOfDataDirectoryFromImageOptionalHeader64; |
50 } | 49 } |
51 | 50 |
52 private: | 51 private: |
53 DISALLOW_COPY_AND_ASSIGN(DisassemblerWin32X64); | 52 DISALLOW_COPY_AND_ASSIGN(DisassemblerWin32X64); |
54 }; | 53 }; |
55 | 54 |
56 } // namespace courgette | 55 } // namespace courgette |
57 | 56 |
58 #endif // COURGETTE_DISASSEMBLER_WIN32_X64_H_ | 57 #endif // COURGETTE_DISASSEMBLER_WIN32_X64_H_ |
OLD | NEW |