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

Unified Diff: src/assembler.h

Issue 5965011: Basic GDB JIT Interface integration. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: minor formatting cleanup Created 10 years 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
Index: src/assembler.h
diff --git a/src/assembler.h b/src/assembler.h
index b68ad38970892491b039c28f589b2201263b3a2a..0deea15908f6d1b3e8dad6c5e1b9c0a7176936ed 100644
--- a/src/assembler.h
+++ b/src/assembler.h
@@ -35,6 +35,7 @@
#ifndef V8_ASSEMBLER_H_
#define V8_ASSEMBLER_H_
+#include "gdbjit.h"
Erik Corry 2011/01/05 09:00:15 The files should really be called gdb-jit.*
Vyacheslav Egorov (Chromium) 2011/01/18 16:10:42 Done.
#include "runtime.h"
#include "top.h"
#include "token.h"
@@ -632,7 +633,29 @@ struct PositionState {
class PositionsRecorder BASE_EMBEDDED {
public:
explicit PositionsRecorder(Assembler* assembler)
- : assembler_(assembler) {}
+ : assembler_(assembler) {
+#ifdef ENABLE_GDBJIT_INTERFACE
Erik Corry 2011/01/05 09:00:15 and the macro should really be called ENABLE_GDB_J
Vyacheslav Egorov (Chromium) 2011/01/18 16:10:42 Done.
+ gdbjit_lineinfo_ = NULL;
+#endif
+ }
+
+#ifdef ENABLE_GDBJIT_INTERFACE
+ ~PositionsRecorder() {
+ delete gdbjit_lineinfo_;
+ }
+
+ void StartGDBJITLineInfoRecording() {
+ if (FLAG_gdbjit) {
+ gdbjit_lineinfo_ = new GDBJITLineInfo();
+ }
+ }
+
+ GDBJITLineInfo* DetachGDBJITLineInfo() {
+ GDBJITLineInfo* lineinfo = gdbjit_lineinfo_;
+ gdbjit_lineinfo_ = NULL; // To prevent deallocation in destructor.
+ return lineinfo;
+ }
+#endif
// Set current position to pos.
void RecordPosition(int pos);
@@ -652,6 +675,9 @@ class PositionsRecorder BASE_EMBEDDED {
private:
Assembler* assembler_;
PositionState state_;
+#ifdef ENABLE_GDBJIT_INTERFACE
+ GDBJITLineInfo* gdbjit_lineinfo_;
+#endif
friend class PreservePositionScope;

Powered by Google App Engine
This is Rietveld 408576698