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

Unified Diff: src/full-codegen.cc

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/full-codegen.cc
diff --git a/src/full-codegen.cc b/src/full-codegen.cc
index 58540f07bc663a6ef61f0fc7a55f2f66257d7419..2f847ac80f6b7439cf7f322ff07290bc1cdc28ec 100644
--- a/src/full-codegen.cc
+++ b/src/full-codegen.cc
@@ -286,6 +286,9 @@ bool FullCodeGenerator::MakeCode(CompilationInfo* info) {
CodeGenerator::MakeCodePrologue(info);
const int kInitialBufferSize = 4 * KB;
MacroAssembler masm(NULL, kInitialBufferSize);
+#ifdef ENABLE_GDBJIT_INTERFACE
+ masm.positions_recorder()->StartGDBJITLineInfoRecording();
+#endif
FullCodeGenerator cgen(&masm);
cgen.Generate(info);
@@ -304,6 +307,14 @@ bool FullCodeGenerator::MakeCode(CompilationInfo* info) {
code->set_stack_check_table_start(table_offset);
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();
}

Powered by Google App Engine
This is Rietveld 408576698