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

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: add test Created 7 years, 4 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') | src/ia32/code-stubs-ia32.cc » ('J')
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 67debc7543cfc265485c3e3db3832ce8f2489a99..02023f98a9639ea6e2773aeee39a9938e35bc08c 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -365,7 +365,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.
@@ -377,6 +378,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];
@@ -612,6 +621,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
@@ -1018,6 +1031,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_) {
@@ -1030,6 +1047,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') | src/ia32/code-stubs-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698