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

Unified Diff: src/gdb-jit.h

Issue 957673004: Rebase GDBJIT interface solely on JITCodeEvent (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Address nits Created 5 years, 10 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 | « src/flag-definitions.h ('k') | src/gdb-jit.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gdb-jit.h
diff --git a/src/gdb-jit.h b/src/gdb-jit.h
index 14536cf0b38e287937cbad1c7fcef697082bcc0a..45382702da4a9fea2df09632d1437c7618871c95 100644
--- a/src/gdb-jit.h
+++ b/src/gdb-jit.h
@@ -5,50 +5,35 @@
#ifndef V8_GDB_JIT_H_
#define V8_GDB_JIT_H_
-#include "src/allocation.h"
+#include "src/v8.h"
//
-// Basic implementation of GDB JIT Interface client.
-// GBD JIT Interface is supported in GDB 7.0 and above.
-// Currently on x64 and ia32 architectures and Linux OS are supported.
+// GDB has two ways of interacting with JIT code. With the "JIT compilation
+// interface", V8 can tell GDB when it emits JIT code. Unfortunately to do so,
+// it has to create platform-native object files, possibly with platform-native
+// debugging information. Currently only ELF and Mach-O are supported, which
+// limits this interface to Linux and Mac OS. This JIT compilation interface
+// was introduced in GDB 7.0. V8 support can be enabled with the --gdbjit flag.
+//
+// The other way that GDB can know about V8 code is via the "custom JIT reader"
+// interface, in which a GDB extension parses V8's private data to determine the
+// function, file, and line of a JIT frame, and how to unwind those frames.
+// This interface was introduced in GDB 7.6. This interface still relies on V8
+// to register its code via the JIT compilation interface, but doesn't require
+// that V8 create ELF images. Support will be added for this interface in the
+// future.
//
-
-#ifdef ENABLE_GDB_JIT_INTERFACE
-#include "src/v8.h"
-
-#include "src/factory.h"
namespace v8 {
namespace internal {
-
-class CompilationInfo;
-
-class GDBJITInterface: public AllStatic {
- public:
- enum CodeTag { NON_FUNCTION, FUNCTION };
-
- // Main entry point into GDB JIT realized as a JitCodeEventHandler.
- static void EventHandler(const v8::JitCodeEvent* event);
-
- static void AddCode(Handle<Name> name,
- Handle<Script> script,
- Handle<Code> code,
- CompilationInfo* info);
-
- static void RemoveCodeRange(Address start, Address end);
-
- private:
- static void AddCode(const char* name, Code* code, CodeTag tag, Script* script,
- CompilationInfo* info);
-
- static void RemoveCode(Code* code);
-};
-
-#define GDBJIT(action) GDBJITInterface::action
-
-} } // namespace v8::internal
-#else
-#define GDBJIT(action) ((void) 0)
+namespace GDBJITInterface {
+#ifdef ENABLE_GDB_JIT_INTERFACE
+// JitCodeEventHandler that creates ELF/Mach-O objects and registers them with
+// GDB.
+void EventHandler(const v8::JitCodeEvent* event);
#endif
+} // namespace GDBJITInterface
+} // namespace internal
+} // namespace v8
#endif
« no previous file with comments | « src/flag-definitions.h ('k') | src/gdb-jit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698