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

Side by Side Diff: courgette/disassembler_elf_32.h

Issue 371153002: Fixes for re-enabling more MSVC level 4 warnings: courgette/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « no previous file | courgette/disassembler_elf_32_arm.cc » ('j') | courgette/encoded_program.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_ELF_32_H_ 5 #ifndef COURGETTE_DISASSEMBLER_ELF_32_H_
6 #define COURGETTE_DISASSEMBLER_ELF_32_H_ 6 #define COURGETTE_DISASSEMBLER_ELF_32_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "courgette/assembly_program.h" 10 #include "courgette/assembly_program.h"
(...skipping 12 matching lines...) Expand all
23 // ParseRelocationSection verifies the organization of the ELF 23 // ParseRelocationSection verifies the organization of the ELF
24 // relocation table, and ParseRel32RelocsFromSection finds branch 24 // relocation table, and ParseRel32RelocsFromSection finds branch
25 // targets by looking for relative jump/call opcodes in the particular 25 // targets by looking for relative jump/call opcodes in the particular
26 // architecture's machine code. 26 // architecture's machine code.
27 class DisassemblerElf32 : public Disassembler { 27 class DisassemblerElf32 : public Disassembler {
28 public: 28 public:
29 // Different instructions encode the target rva differently. This 29 // Different instructions encode the target rva differently. This
30 // class encapsulates this behavior. public for use in unit tests. 30 // class encapsulates this behavior. public for use in unit tests.
31 class TypedRVA { 31 class TypedRVA {
32 public: 32 public:
33 explicit TypedRVA(RVA rva) : rva_(rva), offset_(-1) { 33 explicit TypedRVA(RVA rva) : rva_(rva), offset_(static_cast<size_t>(-1)) {
34 } 34 }
35 35
36 virtual ~TypedRVA() { }; 36 virtual ~TypedRVA() { };
37 37
38 RVA rva() { 38 RVA rva() {
39 return rva_; 39 return rva_;
40 } 40 }
41 41
42 RVA relative_target() { 42 RVA relative_target() {
43 return relative_target_; 43 return relative_target_;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 201
202 std::vector<RVA> abs32_locations_; 202 std::vector<RVA> abs32_locations_;
203 ScopedVector<TypedRVA> rel32_locations_; 203 ScopedVector<TypedRVA> rel32_locations_;
204 204
205 DISALLOW_COPY_AND_ASSIGN(DisassemblerElf32); 205 DISALLOW_COPY_AND_ASSIGN(DisassemblerElf32);
206 }; 206 };
207 207
208 } // namespace courgette 208 } // namespace courgette
209 209
210 #endif // COURGETTE_DISASSEMBLER_ELF_32_H_ 210 #endif // COURGETTE_DISASSEMBLER_ELF_32_H_
OLDNEW
« no previous file with comments | « no previous file | courgette/disassembler_elf_32_arm.cc » ('j') | courgette/encoded_program.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698