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

Unified Diff: courgette/disassembler_win32.h

Issue 2583373002: [Courgette] Simple AssemblyProgram and Disassembler cleanups. (Closed)
Patch Set: Tune up header inclusion. Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « courgette/disassembler_elf_32_x86_unittest.cc ('k') | courgette/disassembler_win32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/disassembler_win32.h
diff --git a/courgette/disassembler_win32.h b/courgette/disassembler_win32.h
index be7635af28c9a8c7acf926003b0f60b0540ac690..76f57104fcb839249be219b87ddfc20e3ae89153 100644
--- a/courgette/disassembler_win32.h
+++ b/courgette/disassembler_win32.h
@@ -31,9 +31,10 @@ class DisassemblerWin32 : public Disassembler {
RVA FileOffsetToRVA(FileOffset file_offset) const override;
FileOffset RVAToFileOffset(RVA rva) const override;
ExecutableType kind() const override = 0;
+ uint64_t image_base() const override { return image_base_; }
RVA PointerToTargetRVA(const uint8_t* p) const override = 0;
bool ParseHeader() override;
- bool Disassemble(AssemblyProgram* target) override;
+ bool Disassemble(AssemblyProgram* program) override;
// Exposed for test purposes
bool has_text_section() const { return has_text_section_; }
@@ -92,10 +93,6 @@ class DisassemblerWin32 : public Disassembler {
void HistogramTargets(const char* kind, const std::map<RVA, int>& map) const;
#endif
- // Most addresses are represented as 32-bit RVAs. The one address we can't
- // do this with is the image base address.
- uint64_t image_base() const { return image_base_; }
-
const ImageDataDirectory& base_relocation_table() const {
return base_relocation_table_;
}
@@ -130,7 +127,7 @@ class DisassemblerWin32 : public Disassembler {
RVA base_of_code_ = 0;
RVA base_of_data_ = 0;
- uint64_t image_base_ = 0; // Range limited to 32 bits for 32 bit executable
+ uint64_t image_base_ = 0; // Range limited to 32 bits for 32 bit executable.
uint32_t size_of_image_ = 0;
int number_of_data_directories_ = 0;
« no previous file with comments | « courgette/disassembler_elf_32_x86_unittest.cc ('k') | courgette/disassembler_win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698