Index: src/codegen.cc |
diff --git a/src/codegen.cc b/src/codegen.cc |
index da479e8fc1e7564980f4730d6bfe0567f55145bf..443959eeb50ff90b81d1f920f87bd2c859abfe37 100644 |
--- a/src/codegen.cc |
+++ b/src/codegen.cc |
@@ -248,6 +248,9 @@ bool CodeGenerator::MakeCode(CompilationInfo* info) { |
// Generate code. |
const int kInitialBufferSize = 4 * KB; |
MacroAssembler masm(NULL, kInitialBufferSize); |
+#ifdef ENABLE_GDBJIT_INTERFACE |
+ masm.positions_recorder()->StartGDBJITLineInfoRecording(); |
+#endif |
CodeGenerator cgen(&masm); |
CodeGeneratorScope scope(&cgen); |
cgen.Generate(info); |
@@ -263,6 +266,14 @@ bool CodeGenerator::MakeCode(CompilationInfo* info) { |
code->SetNoStackCheckTable(); |
CodeGenerator::PrintCode(code, info); |
info->SetCode(code); // May be an empty handle. |
+#ifdef ENABLE_GDBJIT_INTERFACE |
+ if (!code.is_null()) { |
+ GDBJITLineInfo* lineinfo = |
+ masm.positions_recorder()->DetachGDBJITLineInfo(); |
+ |
+ GDBJIT(RegisterDetailedLineInfo(*code, lineinfo)); |
+ } |
+#endif |
return !code.is_null(); |
} |