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

Side by Side Diff: courgette/disassembler.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/courgette_tool.cc ('k') | courgette/disassembler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 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_H_ 5 #ifndef COURGETTE_DISASSEMBLER_H_
6 #define COURGETTE_DISASSEMBLER_H_ 6 #define COURGETTE_DISASSEMBLER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 namespace courgette { 10 namespace courgette {
11 11
12 class AssemblyProgram; 12 class AssemblyProgram;
13 class PEInfo; 13 class PEInfo;
14 14
15 class Disassembler { 15 class Disassembler {
16 public: 16 public:
17 // Factory methods for making disassemblers for various kinds of executables. 17 virtual ~Disassembler() {}
18 // We have only one so far.
19
20 static Disassembler* MakeDisassemberWin32X86(PEInfo* pe_info);
21 18
22 // Disassembles the item passed to the factory method into the output 19 // Disassembles the item passed to the factory method into the output
23 // parameter 'program'. 20 // parameter 'program'.
24 virtual bool Disassemble(AssemblyProgram* program) = 0; 21 virtual bool Disassemble(AssemblyProgram* program) = 0;
25 22
26 // Deletes 'this' disassembler.
27 virtual void Destroy() = 0;
28
29 protected: 23 protected:
30 Disassembler() {} 24 Disassembler() {}
31 virtual ~Disassembler() {}
32 25
33 private: 26 private:
34 DISALLOW_COPY_AND_ASSIGN(Disassembler); 27 DISALLOW_COPY_AND_ASSIGN(Disassembler);
35 }; 28 };
36 29
37 } // namespace courgette 30 } // namespace courgette
38 #endif // COURGETTE_DISASSEMBLER_H_ 31 #endif // COURGETTE_DISASSEMBLER_H_
OLDNEW
« no previous file with comments | « courgette/courgette_tool.cc ('k') | courgette/disassembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698