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

Side by Side Diff: src/common/linux/synth_elf.cc

Issue 1550933002: Let breakpad build with -Wall on OS X and Linux. (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: . Created 4 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 unified diff | Download patch
« no previous file with comments | « src/common/linux/synth_elf.h ('k') | src/processor/minidump.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 #include "common/linux/synth_elf.h" 1 #include "common/linux/synth_elf.h"
2 2
3 #include <assert.h> 3 #include <assert.h>
4 #include <elf.h> 4 #include <elf.h>
5 #include <stdio.h> 5 #include <stdio.h>
6 #include <string.h> 6 #include <string.h>
7 7
8 #include "common/linux/elf_gnu_compat.h" 8 #include "common/linux/elf_gnu_compat.h"
9 #include "common/using_std_string.h" 9 #include "common/using_std_string.h"
10 10
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 program_count_label_ = program_count_; 206 program_count_label_ = program_count_;
207 207
208 // Section header table starts here. 208 // Section header table starts here.
209 Mark(&section_header_label_); 209 Mark(&section_header_label_);
210 Append(section_header_table_); 210 Append(section_header_table_);
211 } 211 }
212 212
213 SymbolTable::SymbolTable(Endianness endianness, 213 SymbolTable::SymbolTable(Endianness endianness,
214 size_t addr_size, 214 size_t addr_size,
215 StringTable& table) : Section(endianness), 215 StringTable& table) : Section(endianness),
216 addr_size_(addr_size),
217 table_(table) { 216 table_(table) {
217 #ifndef NDEBUG
218 addr_size_ = addr_size;
219 #endif
218 assert(addr_size_ == 4 || addr_size_ == 8); 220 assert(addr_size_ == 4 || addr_size_ == 8);
219 } 221 }
220 222
221 void SymbolTable::AddSymbol(const string& name, uint32_t value, 223 void SymbolTable::AddSymbol(const string& name, uint32_t value,
222 uint32_t size, unsigned info, uint16_t shndx) { 224 uint32_t size, unsigned info, uint16_t shndx) {
223 assert(addr_size_ == 4); 225 assert(addr_size_ == 4);
224 D32(table_.Add(name)); 226 D32(table_.Add(name));
225 D32(value); 227 D32(value);
226 D32(size); 228 D32(size);
227 D8(info); 229 D8(info);
(...skipping 24 matching lines...) Expand all
252 Append(reinterpret_cast<const uint8_t*>(&note_header), 254 Append(reinterpret_cast<const uint8_t*>(&note_header),
253 sizeof(note_header)); 255 sizeof(note_header));
254 AppendCString(name); 256 AppendCString(name);
255 Align(4); 257 Align(4);
256 Append(desc_bytes, desc_size); 258 Append(desc_bytes, desc_size);
257 Align(4); 259 Align(4);
258 } 260 }
259 261
260 } // namespace synth_elf 262 } // namespace synth_elf
261 } // namespace google_breakpad 263 } // namespace google_breakpad
OLDNEW
« no previous file with comments | « src/common/linux/synth_elf.h ('k') | src/processor/minidump.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698