| Index: src/assembler.h
|
| ===================================================================
|
| --- src/assembler.h (revision 6384)
|
| +++ src/assembler.h (working copy)
|
| @@ -35,6 +35,7 @@
|
| #ifndef V8_ASSEMBLER_H_
|
| #define V8_ASSEMBLER_H_
|
|
|
| +#include "gdb-jit.h"
|
| #include "runtime.h"
|
| #include "top.h"
|
| #include "token.h"
|
| @@ -637,8 +638,30 @@
|
| class PositionsRecorder BASE_EMBEDDED {
|
| public:
|
| explicit PositionsRecorder(Assembler* assembler)
|
| - : assembler_(assembler) {}
|
| + : assembler_(assembler) {
|
| +#ifdef ENABLE_GDB_JIT_INTERFACE
|
| + gdbjit_lineinfo_ = NULL;
|
| +#endif
|
| + }
|
|
|
| +#ifdef ENABLE_GDB_JIT_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);
|
|
|
| @@ -657,6 +680,9 @@
|
| private:
|
| Assembler* assembler_;
|
| PositionState state_;
|
| +#ifdef ENABLE_GDB_JIT_INTERFACE
|
| + GDBJITLineInfo* gdbjit_lineinfo_;
|
| +#endif
|
|
|
| friend class PreservePositionScope;
|
|
|
|
|