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

Unified Diff: src/debug/debug.h

Issue 1842683002: [Interpreter] Adds support to fetch return value on break at return. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed failures on linux-nosnap-dbg Created 4 years, 9 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/debug/arm64/debug-arm64.cc ('k') | src/debug/debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug.h
diff --git a/src/debug/debug.h b/src/debug/debug.h
index 600bc1a605bd6349f20faa983b473050ab5a3d9e..3e59adea1d0637c7e6a464cbc8be892a097ac0a4 100644
--- a/src/debug/debug.h
+++ b/src/debug/debug.h
@@ -427,8 +427,8 @@ class Debug {
// Internal logic
bool Load();
- void Break(Arguments args, JavaScriptFrame*);
- Object* SetAfterBreakTarget(JavaScriptFrame* frame);
+ void Break(JavaScriptFrame* frame);
+ void SetAfterBreakTarget(JavaScriptFrame* frame);
// Scripts handling.
Handle<FixedArray> GetLoadedScripts();
@@ -524,6 +524,11 @@ class Debug {
StackFrame::Id break_frame_id() { return thread_local_.break_frame_id_; }
int break_id() { return thread_local_.break_id_; }
+ Handle<Object> return_value() { return thread_local_.return_value_; }
+ void set_return_value(Handle<Object> value) {
+ thread_local_.return_value_ = value;
+ }
+
// Support for embedding into generated code.
Address is_active_address() {
return reinterpret_cast<Address>(&is_active_);
@@ -678,6 +683,10 @@ class Debug {
// Stores the way how LiveEdit has patched the stack. It is used when
// debugger returns control back to user script.
LiveEdit::FrameDropMode frame_drop_mode_;
+
+ // Value of accumulator in interpreter frames. In non-interpreter frames
+ // this value will be the hole.
+ Handle<Object> return_value_;
};
// Storage location for registers when handling debug break calls
@@ -719,6 +728,7 @@ class DebugScope BASE_EMBEDDED {
DebugScope* prev_; // Previous scope if entered recursively.
StackFrame::Id break_frame_id_; // Previous break frame id.
int break_id_; // Previous break id.
+ Handle<Object> return_value_; // Previous result.
bool failed_; // Did the debug context fail to load?
SaveContext save_; // Saves previous context.
PostponeInterruptsScope no_termination_exceptons_;
« no previous file with comments | « src/debug/arm64/debug-arm64.cc ('k') | src/debug/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698