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

Side by Side Diff: src/gdb-jit.cc

Issue 7289013: Fix presubmit failure in gdb-jit.cc. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 virtual void PopulateHeader(Writer::Slot<Header> header) { 260 virtual void PopulateHeader(Writer::Slot<Header> header) {
261 header->addr = 0; 261 header->addr = 0;
262 header->size = 0; 262 header->size = 0;
263 header->offset = 0; 263 header->offset = 0;
264 header->align = align_; 264 header->align = align_;
265 header->reloff = 0; 265 header->reloff = 0;
266 header->nreloc = 0; 266 header->nreloc = 0;
267 header->flags = flags_; 267 header->flags = flags_;
268 header->reserved1 = 0; 268 header->reserved1 = 0;
269 header->reserved2 = 0; 269 header->reserved2 = 0;
270 memset(header->sectname, 0, 16); 270 memset(header->sectname, 0, sizeof(header->sectname));
271 memset(header->segname, 0, 16); 271 memset(header->segname, 0, sizeof(header->segname));
272 ASSERT(strlen(name_) < 16); 272 ASSERT(strlen(name_) < sizeof(header->sectname));
273 ASSERT(strlen(segment_) < 16); 273 ASSERT(strlen(segment_) < sizeof(header->segname));
274 strcpy(header->sectname, name_); 274 strncpy(header->sectname, name_, sizeof(header->sectname));
275 strcpy(header->segname, segment_); 275 strncpy(header->segname, segment_, sizeof(header->segname));
276 } 276 }
277 277
278 private: 278 private:
279 const char* name_; 279 const char* name_;
280 const char* segment_; 280 const char* segment_;
281 uintptr_t align_; 281 uintptr_t align_;
282 uint32_t flags_; 282 uint32_t flags_;
283 }; 283 };
284 284
285 285
286 struct ELFSectionHeader { 286 struct ELFSectionHeader {
287 uint32_t name; 287 uint32_t name;
288 uint32_t type; 288 uint32_t type;
289 uintptr_t flags; 289 uintptr_t flags;
290 uintptr_t address; 290 uintptr_t address;
291 uintptr_t offset; 291 uintptr_t offset;
292 uintptr_t size; 292 uintptr_t size;
293 uint32_t link; 293 uint32_t link;
294 uint32_t info; 294 uint32_t info;
295 uintptr_t alignment; 295 uintptr_t alignment;
296 uintptr_t entry_size; 296 uintptr_t entry_size;
297 }; 297 };
298 298
299 299
300 #if defined(__ELF) 300 #if defined(__ELF)
301 class ELFSection : public DebugSectionBase<ELFSectionHeader> { 301 class ELFSection : public DebugSectionBase<ELFSectionHeader> {
302 public: 302 public:
303 enum Type { 303 enum Type {
304 TYPE_NULL = 0, 304 TYPE_NULL = 0,
305 TYPE_PROGBITS = 1, 305 TYPE_PROGBITS = 1,
306 TYPE_SYMTAB = 2, 306 TYPE_SYMTAB = 2,
307 TYPE_STRTAB = 3, 307 TYPE_STRTAB = 3,
308 TYPE_RELA = 4, 308 TYPE_RELA = 4,
(...skipping 1840 matching lines...) Expand 10 before | Expand all | Expand 10 after
2149 ScopedLock lock(mutex_); 2149 ScopedLock lock(mutex_);
2150 ASSERT(!IsLineInfoTagged(line_info)); 2150 ASSERT(!IsLineInfoTagged(line_info));
2151 HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true); 2151 HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true);
2152 ASSERT(e->value == NULL); 2152 ASSERT(e->value == NULL);
2153 e->value = TagLineInfo(line_info); 2153 e->value = TagLineInfo(line_info);
2154 } 2154 }
2155 2155
2156 2156
2157 } } // namespace v8::internal 2157 } } // namespace v8::internal
2158 #endif 2158 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698