Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Side by Side Diff: courgette/disassembler_win32_x86.h

Issue 7920004: Start refactoring to reduce executable type knowledge. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix windows compile warning. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « courgette/disassembler.cc ('k') | courgette/disassembler_win32_x86.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COURGETTE_DISASSEMBLER_WIN32_X86_H_
6 #define COURGETTE_DISASSEMBLER_WIN32_X86_H_
7
8 #include "base/basictypes.h"
9 #include "courgette/disassembler.h"
10 #include "courgette/image_info.h"
11 #include "courgette/memory_allocator.h"
12
13 namespace courgette {
14
15 class AssemblyProgram;
16
17 class DisassemblerWin32X86 : public Disassembler {
18 public:
19 explicit DisassemblerWin32X86(PEInfo* pe_info);
20
21 virtual bool Disassemble(AssemblyProgram* target);
22
23 protected:
24 PEInfo& pe_info() { return *pe_info_; }
25
26 CheckBool ParseFile(AssemblyProgram* target) WARN_UNUSED_RESULT;
27 bool ParseAbs32Relocs();
28 void ParseRel32RelocsFromSections();
29 void ParseRel32RelocsFromSection(const Section* section);
30
31 CheckBool ParseNonSectionFileRegion(uint32 start_file_offset,
32 uint32 end_file_offset, AssemblyProgram* program) WARN_UNUSED_RESULT;
33 CheckBool ParseFileRegion(const Section* section,
34 uint32 start_file_offset, uint32 end_file_offset,
35 AssemblyProgram* program) WARN_UNUSED_RESULT;
36
37 #if COURGETTE_HISTOGRAM_TARGETS
38 void HistogramTargets(const char* kind, const std::map<RVA, int>& map);
39 #endif
40
41 PEInfo* pe_info_;
42 bool incomplete_disassembly_; // 'true' if can leave out 'uninteresting' bits
43
44 std::vector<RVA> abs32_locations_;
45 std::vector<RVA> rel32_locations_;
46
47 #if COURGETTE_HISTOGRAM_TARGETS
48 std::map<RVA, int> abs32_target_rvas_;
49 std::map<RVA, int> rel32_target_rvas_;
50 #endif
51
52 DISALLOW_COPY_AND_ASSIGN(DisassemblerWin32X86);
53 };
54
55 } // namespace courgette
56 #endif // COURGETTE_DISASSEMBLER_WIN32_X86_H_
OLDNEW
« no previous file with comments | « courgette/disassembler.cc ('k') | courgette/disassembler_win32_x86.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698