Revision: 15460
Author:   da...@chromium.org
Date:     Wed Jul  3 01:29:46 2013
Log:      Make MachO gdbjit support compile again

R=mstarzin...@chromium.org

Review URL: https://chromiumcodereview.appspot.com/18621002
http://code.google.com/p/v8/source/detail?r=15460

Modified:
 /branches/bleeding_edge/src/gdb-jit.cc

=======================================
--- /branches/bleeding_edge/src/gdb-jit.cc      Fri Jun 28 08:34:48 2013
+++ /branches/bleeding_edge/src/gdb-jit.cc      Wed Jul  3 01:29:46 2013
@@ -500,10 +500,10 @@
 #if defined(__MACH_O)
 class MachO BASE_EMBEDDED {
  public:
-  MachO() : sections_(6) { }
+  explicit MachO(Zone* zone) : zone_(zone), sections_(6, zone) { }

   uint32_t AddSection(MachOSection* section) {
-    sections_.Add(section);
+    sections_.Add(section, zone_);
     return sections_.length() - 1;
   }

@@ -620,7 +620,7 @@
     cmd->filesize = w->position() - (uintptr_t)cmd->fileoff;
   }

-
+  Zone* zone_;
   ZoneList<MachOSection*> sections_;
 };
 #endif  // defined(__MACH_O)
@@ -1793,9 +1793,9 @@
                                 Zone* zone,
                                 DebugObject* obj) {
   if (desc->IsLineInfoAvailable()) {
-    obj->AddSection(new(zone) DebugInfoSection(desc), zone);
-    obj->AddSection(new(zone) DebugAbbrevSection(desc), zone);
-    obj->AddSection(new(zone) DebugLineSection(desc), zone);
+    obj->AddSection(new(zone) DebugInfoSection(desc));
+    obj->AddSection(new(zone) DebugAbbrevSection(desc));
+    obj->AddSection(new(zone) DebugLineSection(desc));
   }
 #if V8_TARGET_ARCH_X64
   obj->AddSection(new(zone) UnwindInfoSection(desc), zone);
@@ -1918,14 +1918,14 @@

static JITCodeEntry* CreateELFObject(CodeDescription* desc, Isolate* isolate) {
 #ifdef __MACH_O
-  MachO mach_o;
+  MachO mach_o(zone);
   Writer w(&mach_o);

-  mach_o.AddSection(new MachOTextSection(kCodeAlignment,
-                                         desc->CodeStart(),
-                                         desc->CodeSize()));
+  mach_o.AddSection(new(zone) MachOTextSection(kCodeAlignment,
+                                               desc->CodeStart(),
+                                               desc->CodeSize()));

-  CreateDWARFSections(desc, &mach_o);
+  CreateDWARFSections(desc, zone, &mach_o);

   mach_o.Write(&w, desc->CodeStart(), desc->CodeSize());
 #else

--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to