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

Unified Diff: src/debug.h

Issue 22801003: Patch CEntry stub to swallow exception if liveedit/restart frame needs it. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: follow code review Created 7 years, 3 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 | « no previous file | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug.h
diff --git a/src/debug.h b/src/debug.h
index 2b5f43ab4959cc4b5cf28a9b0323fc689884344e..92da1e2d3504c83911363ebd9d93da57001c7e8f 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -369,7 +369,8 @@ class Debug {
k_after_break_target_address,
k_debug_break_return_address,
k_debug_break_slot_address,
- k_restarter_frame_function_pointer
+ k_restarter_frame_function_pointer,
+ k_c_entry_frame_to_ignore_exception
};
// Support for setting the address to jump to when returning from break point.
@@ -381,6 +382,14 @@ class Debug {
return reinterpret_cast<Address*>(address);
}
+ void set_c_entry_frame_to_ignore_exception(Address fp) {
+ thread_local_.c_entry_frame_to_ignore_exception_ = fp;
+ }
+
+ Address* c_entry_frame_to_ignore_exception_address() {
+ return &thread_local_.c_entry_frame_to_ignore_exception_;
+ }
+
// Support for saving/restoring registers when handling debug break calls.
Object** register_address(int r) {
return &registers_[r];
@@ -616,6 +625,10 @@ class Debug {
// of the pointer to function being restarted. Otherwise (most of the time)
// stores NULL. This pointer is used with 'step in' implementation.
Object** restarter_frame_function_pointer_;
+
+ // Store fp of CEntry frame, that should swallow exception and return
+ // normally (because calling frame has already been patched).
+ Address c_entry_frame_to_ignore_exception_;
};
// Storage location for registers when handling debug break calls
@@ -1022,6 +1035,10 @@ class Debug_Address {
return Debug_Address(Debug::k_restarter_frame_function_pointer);
}
+ static Debug_Address CEntryFrameToIgnoreException() {
+ return Debug_Address(Debug::k_c_entry_frame_to_ignore_exception);
+ }
+
Address address(Isolate* isolate) const {
Debug* debug = isolate->debug();
switch (id_) {
@@ -1034,6 +1051,9 @@ class Debug_Address {
case Debug::k_restarter_frame_function_pointer:
return reinterpret_cast<Address>(
debug->restarter_frame_function_pointer_address());
+ case Debug::k_c_entry_frame_to_ignore_exception:
+ return reinterpret_cast<Address>(
+ debug->c_entry_frame_to_ignore_exception_address());
default:
UNREACHABLE();
return NULL;
« no previous file with comments | « no previous file | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698