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

Side by Side Diff: courgette/disassembler.h

Issue 8477045: Add Elf 32 Support to Courgette. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Remove debug printf present by mistake. Created 9 years, 1 month 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.gyp ('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) 2011 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 #include "courgette/courgette.h" 10 #include "courgette/courgette.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 uint64 ReadU64(const uint8* address, size_t offset) { 62 uint64 ReadU64(const uint8* address, size_t offset) {
63 return *reinterpret_cast<const uint64*>(address + offset); 63 return *reinterpret_cast<const uint64*>(address + offset);
64 } 64 }
65 65
66 static uint32 Read32LittleEndian(const void* address) { 66 static uint32 Read32LittleEndian(const void* address) {
67 return *reinterpret_cast<const uint32*>(address); 67 return *reinterpret_cast<const uint32*>(address);
68 } 68 }
69 69
70 // Reduce the length of the image in memory. Does not actually free 70 // Reduce the length of the image in memory. Does not actually free
71 // (or realloc) any memory. Unusally only called via ParseHeader() 71 // (or realloc) any memory. Usually only called via ParseHeader()
72 void ReduceLength(size_t reduced_length); 72 void ReduceLength(size_t reduced_length);
73 73
74 private: 74 private:
75 const char* failure_reason_; 75 const char* failure_reason_;
76 76
77 // 77 //
78 // Basic information that is always valid after Construction, though 78 // Basic information that is always valid after Construction, though
79 // ParseHeader may shorten the length if the executable is shorter than 79 // ParseHeader may shorten the length if the executable is shorter than
80 // the total data. 80 // the total data.
81 // 81 //
82 size_t length_; // In current memory. 82 size_t length_; // In current memory.
83 const uint8* start_; // In current memory, base for 'file offsets'. 83 const uint8* start_; // In current memory, base for 'file offsets'.
84 const uint8* end_; // In current memory. 84 const uint8* end_; // In current memory.
85 85
86 DISALLOW_COPY_AND_ASSIGN(Disassembler); 86 DISALLOW_COPY_AND_ASSIGN(Disassembler);
87 }; 87 };
88 88
89 } // namespace courgette 89 } // namespace courgette
90 #endif // COURGETTE_DISASSEMBLER_H_ 90 #endif // COURGETTE_DISASSEMBLER_H_
OLDNEW
« no previous file with comments | « courgette/courgette.gyp ('k') | courgette/disassembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698