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

Unified Diff: runtime/vm/elfgen.h

Issue 10827327: Add GDB JIT support back into Android build. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove extra blank lines as requested by reviewer. Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/debuginfo_linux.cc ('k') | runtime/vm/gdbjit_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/elfgen.h
diff --git a/runtime/vm/debuginfo_linux.cc b/runtime/vm/elfgen.h
similarity index 91%
copy from runtime/vm/debuginfo_linux.cc
copy to runtime/vm/elfgen.h
index 35a7824e2e039444a701cc936cbe954d42bad526..cf6abfd4e7bae5aba24be73b04744e59d023d555 100644
--- a/runtime/vm/debuginfo_linux.cc
+++ b/runtime/vm/elfgen.h
@@ -2,11 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-#include "vm/debuginfo.h"
+#ifndef VM_ELFGEN_H_
+#define VM_ELFGEN_H_
-#include "platform/utils.h"
-#include "vm/gdbjit_linux.h"
-#include "vm/os.h"
#include "vm/thread.h"
namespace dart {
@@ -495,65 +493,6 @@ bool ElfGen::WriteOutput(void* handle,
return true;
}
-
-DebugInfo::DebugInfo() {
- handle_ = reinterpret_cast<void*>(new ElfGen());
- ASSERT(handle_ != NULL);
-}
-
-
-DebugInfo::~DebugInfo() {
- ElfGen* elf_gen = reinterpret_cast<ElfGen*>(handle_);
- delete elf_gen;
-}
-
-
-void DebugInfo::AddCode(uword pc, intptr_t size) {
- ElfGen* elf_gen = reinterpret_cast<ElfGen*>(handle_);
- elf_gen->AddCode(pc, size);
-}
-
-
-void DebugInfo::AddCodeRegion(const char* name, uword pc, intptr_t size) {
- ElfGen* elf_gen = reinterpret_cast<ElfGen*>(handle_);
- elf_gen->AddCodeRegion(name, pc, size);
-}
-
-
-bool DebugInfo::WriteToMemory(ByteBuffer* region) {
- ElfGen* elf_gen = reinterpret_cast<ElfGen*>(handle_);
- return elf_gen->WriteToMemory(region);
-}
-
-
-DebugInfo* DebugInfo::NewGenerator() {
- return new DebugInfo();
-}
-
-
-void DebugInfo::RegisterSection(const char* name,
- uword entry_point,
- intptr_t size) {
- ElfGen* elf_section = new ElfGen();
- ASSERT(elf_section != NULL);
- elf_section->AddCode(entry_point, size);
- elf_section->AddCodeRegion(name, entry_point, size);
-
- ByteBuffer* dynamic_region = new ByteBuffer();
- ASSERT(dynamic_region != NULL);
-
- elf_section->WriteToMemory(dynamic_region);
-
- ::addDynamicSection(reinterpret_cast<const char*>(dynamic_region->data()),
- dynamic_region->size());
- dynamic_region->set_data(NULL);
- delete dynamic_region;
- delete elf_section;
-}
-
-
-void DebugInfo::UnregisterAllSections() {
- ::deleteDynamicSections();
-}
-
} // namespace dart
+
+#endif // VM_ELFGEN_H_
« no previous file with comments | « runtime/vm/debuginfo_linux.cc ('k') | runtime/vm/gdbjit_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698