From b07f94c26a39b7712fae14562f10e3e470731de7 Mon Sep 17 00:00:00 2001 From: "mstarzinger@chromium.org" Date: Wed, 20 Mar 2013 11:29:46 +0000 Subject: [PATCH] Make GDBJIT interface compile again. Review URL: https://codereview.chromium.org/12952002 Patch from Haitao Feng . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14002 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/gdb-jit.cc | 39 ++++++++++++++++++++++----------------- src/gdb-jit.h | 4 ++-- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/src/gdb-jit.cc b/src/gdb-jit.cc index dde6bbd..cf8ca2d 100644 --- a/src/gdb-jit.cc +++ b/src/gdb-jit.cc @@ -187,7 +187,7 @@ class Writer BASE_EMBEDDED { byte* buffer_; }; -class StringTable; +class ELFStringTable; template class DebugSectionBase : public ZoneObject { @@ -338,7 +338,7 @@ class ELFSection : public DebugSectionBase { virtual ~ELFSection() { } - void PopulateHeader(Writer::Slot
header, StringTable* strtab); + void PopulateHeader(Writer::Slot
header, ELFStringTable* strtab); virtual void WriteBody(Writer::Slot
header, Writer* w) { uintptr_t start = w->position(); @@ -438,9 +438,9 @@ class FullHeaderELFSection : public ELFSection { }; -class StringTable : public ELFSection { +class ELFStringTable : public ELFSection { public: - explicit StringTable(const char* name) + explicit ELFStringTable(const char* name) : ELFSection(name, TYPE_STRTAB, 1), writer_(NULL), offset_(0), size_(0) { } @@ -488,7 +488,7 @@ class StringTable : public ELFSection { void ELFSection::PopulateHeader(Writer::Slot header, - StringTable* strtab) { + ELFStringTable* strtab) { header->name = strtab->Add(name_); header->type = type_; header->alignment = align_; @@ -631,7 +631,7 @@ class ELF BASE_EMBEDDED { public: ELF(Zone* zone) : sections_(6, zone) { sections_.Add(new(zone) ELFSection("", ELFSection::TYPE_NULL, 0), zone); - sections_.Add(new(zone) StringTable(".shstrtab"), zone); + sections_.Add(new(zone) ELFStringTable(".shstrtab"), zone); } void Write(Writer* w) { @@ -718,7 +718,7 @@ class ELF BASE_EMBEDDED { w->CreateSlotsHere(sections_.length()); // String table for section table is the first section. - StringTable* strtab = static_cast(SectionAt(1)); + ELFStringTable* strtab = static_cast(SectionAt(1)); strtab->AttachWriter(w); for (int i = 0, length = sections_.length(); i < length; @@ -832,7 +832,7 @@ class ELFSymbol BASE_EMBEDDED { }; #endif - void Write(Writer::Slot s, StringTable* t) { + void Write(Writer::Slot s, ELFStringTable* t) { // Convert symbol names from strings to indexes in the string table. s->name = t->Add(name); s->value = value; @@ -871,8 +871,8 @@ class ELFSymbolTable : public ELFSection { header->size = w->position() - header->offset; // String table for this symbol table should follow it in the section table. - StringTable* strtab = - static_cast(w->debug_object()->SectionAt(index() + 1)); + ELFStringTable* strtab = + static_cast(w->debug_object()->SectionAt(index() + 1)); strtab->AttachWriter(w); symbols.at(0).set(ELFSymbol::SerializedLayout(0, 0, @@ -905,7 +905,7 @@ class ELFSymbolTable : public ELFSection { private: void WriteSymbolsList(const ZoneList* src, Writer::Slot dst, - StringTable* strtab) { + ELFStringTable* strtab) { for (int i = 0, len = src->length(); i < len; i++) { @@ -1023,7 +1023,7 @@ static void CreateSymbolsTable(CodeDescription* desc, int text_section_index) { Zone* zone = desc->info()->zone(); ELFSymbolTable* symtab = new(zone) ELFSymbolTable(".symtab", zone); - StringTable* strtab = new(zone) StringTable(".strtab"); + ELFStringTable* strtab = new(zone) ELFStringTable(".strtab"); // Symbol table should be followed by the linked string table. elf->AddSection(symtab, zone); @@ -1996,7 +1996,7 @@ static GDBJITLineInfo* UntagLineInfo(void* ptr) { } -void GDBJITInterface::AddCode(Handle name, +void GDBJITInterface::AddCode(Handle name, Handle