Commit 57f46c01 authored by danno@chromium.org's avatar danno@chromium.org

Make MachO gdbjit support compile again

R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/18621002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15460 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent de80207a
...@@ -500,10 +500,10 @@ void ELFSection::PopulateHeader(Writer::Slot<ELFSection::Header> header, ...@@ -500,10 +500,10 @@ void ELFSection::PopulateHeader(Writer::Slot<ELFSection::Header> header,
#if defined(__MACH_O) #if defined(__MACH_O)
class MachO BASE_EMBEDDED { class MachO BASE_EMBEDDED {
public: public:
MachO() : sections_(6) { } explicit MachO(Zone* zone) : zone_(zone), sections_(6, zone) { }
uint32_t AddSection(MachOSection* section) { uint32_t AddSection(MachOSection* section) {
sections_.Add(section); sections_.Add(section, zone_);
return sections_.length() - 1; return sections_.length() - 1;
} }
...@@ -620,7 +620,7 @@ class MachO BASE_EMBEDDED { ...@@ -620,7 +620,7 @@ class MachO BASE_EMBEDDED {
cmd->filesize = w->position() - (uintptr_t)cmd->fileoff; cmd->filesize = w->position() - (uintptr_t)cmd->fileoff;
} }
Zone* zone_;
ZoneList<MachOSection*> sections_; ZoneList<MachOSection*> sections_;
}; };
#endif // defined(__MACH_O) #endif // defined(__MACH_O)
...@@ -1793,9 +1793,9 @@ static void CreateDWARFSections(CodeDescription* desc, ...@@ -1793,9 +1793,9 @@ static void CreateDWARFSections(CodeDescription* desc,
Zone* zone, Zone* zone,
DebugObject* obj) { DebugObject* obj) {
if (desc->IsLineInfoAvailable()) { if (desc->IsLineInfoAvailable()) {
obj->AddSection(new(zone) DebugInfoSection(desc), zone); obj->AddSection(new(zone) DebugInfoSection(desc));
obj->AddSection(new(zone) DebugAbbrevSection(desc), zone); obj->AddSection(new(zone) DebugAbbrevSection(desc));
obj->AddSection(new(zone) DebugLineSection(desc), zone); obj->AddSection(new(zone) DebugLineSection(desc));
} }
#if V8_TARGET_ARCH_X64 #if V8_TARGET_ARCH_X64
obj->AddSection(new(zone) UnwindInfoSection(desc), zone); obj->AddSection(new(zone) UnwindInfoSection(desc), zone);
...@@ -1918,14 +1918,14 @@ static void UnregisterCodeEntry(JITCodeEntry* entry) { ...@@ -1918,14 +1918,14 @@ static void UnregisterCodeEntry(JITCodeEntry* entry) {
static JITCodeEntry* CreateELFObject(CodeDescription* desc, Isolate* isolate) { static JITCodeEntry* CreateELFObject(CodeDescription* desc, Isolate* isolate) {
#ifdef __MACH_O #ifdef __MACH_O
MachO mach_o; MachO mach_o(zone);
Writer w(&mach_o); Writer w(&mach_o);
mach_o.AddSection(new MachOTextSection(kCodeAlignment, mach_o.AddSection(new(zone) MachOTextSection(kCodeAlignment,
desc->CodeStart(), desc->CodeStart(),
desc->CodeSize())); desc->CodeSize()));
CreateDWARFSections(desc, &mach_o); CreateDWARFSections(desc, zone, &mach_o);
mach_o.Write(&w, desc->CodeStart(), desc->CodeSize()); mach_o.Write(&w, desc->CodeStart(), desc->CodeSize());
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment