Revision: 11999
Author: [email protected]
Date: Fri Jul 6 02:34:59 2012
Log: Put additional information onto the stack when crashing in
Debug::Break.
[email protected]
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10698116
http://code.google.com/p/v8/source/detail?r=11999
Modified:
/branches/bleeding_edge/src/debug.cc
/branches/bleeding_edge/src/debug.h
=======================================
--- /branches/bleeding_edge/src/debug.cc Thu Jul 5 01:07:01 2012
+++ /branches/bleeding_edge/src/debug.cc Fri Jul 6 02:34:59 2012
@@ -892,6 +892,7 @@
}
+// TODO(131642): Remove this when fixed.
void Debug::PutValuesOnStackAndDie(int start,
Address c_entry_fp,
Address last_fp,
@@ -1009,6 +1010,7 @@
it.Advance();
}
+ // TODO(131642): Remove this when fixed.
// Catch the cases that would lead to crashes and capture
// - C entry FP at which to start stack crawl.
// - FP of the frame at which we plan to stop stepping out (last FP).
@@ -1017,18 +1019,23 @@
// - stack trace string.
if (it.done()) {
// We crawled the entire stack, never reaching last_fp_.
+ Handle<String> stack = isolate_->StackTraceString();
+ char buffer[8192];
+ int length = Min(8192, stack->length());
+ String::WriteToFlat(*stack, buffer, 0, length - 1);
PutValuesOnStackAndDie(0xBEEEEEEE,
frame->fp(),
thread_local_.last_fp_,
reinterpret_cast<Address>(0xDEADDEAD),
count,
- NULL,
+ buffer,
0xCEEEEEEE);
} else if (it.frame()->fp() != thread_local_.last_fp_) {
// We crawled over last_fp_, without getting a match.
Handle<String> stack = isolate_->StackTraceString();
char buffer[8192];
- String::WriteToFlat(*stack, buffer, 0, 8191);
+ int length = Min(8192, stack->length());
+ String::WriteToFlat(*stack, buffer, 0, length - 1);
PutValuesOnStackAndDie(0xDEEEEEEE,
frame->fp(),
thread_local_.last_fp_,
=======================================
--- /branches/bleeding_edge/src/debug.h Fri Jun 29 08:11:16 2012
+++ /branches/bleeding_edge/src/debug.h Fri Jul 6 02:34:59 2012
@@ -232,6 +232,7 @@
void PreemptionWhileInDebugger();
void Iterate(ObjectVisitor* v);
+ // TODO(131642): Remove this when fixed.
NO_INLINE(void PutValuesOnStackAndDie(int start,
Address c_entry_fp,
Address last_fp,
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev