| Index: src/debug.cc
|
| diff --git a/src/debug.cc b/src/debug.cc
|
| index 40ddabb3cb1a37a85958a2b6799bdc3ba1330ba7..da928159d8cb134d72d039814ad2f2cdf2f1170e 100644
|
| --- a/src/debug.cc
|
| +++ b/src/debug.cc
|
| @@ -892,27 +892,6 @@ void Debug::Iterate(ObjectVisitor* v) {
|
| }
|
|
|
|
|
| -// TODO(131642): Remove this when fixed.
|
| -void Debug::PutValuesOnStackAndDie(int start,
|
| - Address c_entry_fp,
|
| - Address last_fp,
|
| - Address larger_fp,
|
| - int count,
|
| - char* stack,
|
| - int end) {
|
| - OS::PrintError("start: %d\n", start);
|
| - OS::PrintError("c_entry_fp: %p\n", static_cast<void*>(c_entry_fp));
|
| - OS::PrintError("last_fp: %p\n", static_cast<void*>(last_fp));
|
| - OS::PrintError("larger_fp: %p\n", static_cast<void*>(larger_fp));
|
| - OS::PrintError("count: %d\n", count);
|
| - if (stack != NULL) {
|
| - OS::PrintError("stack: %s\n", stack);
|
| - }
|
| - OS::PrintError("end: %d\n", end);
|
| - OS::Abort();
|
| -}
|
| -
|
| -
|
| Object* Debug::Break(Arguments args) {
|
| Heap* heap = isolate_->heap();
|
| HandleScope scope(isolate_);
|
| @@ -1010,53 +989,16 @@ Object* Debug::Break(Arguments args) {
|
| 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).
|
| - // - current FP that's larger than last FP.
|
| - // - Counter for the number of steps to step out.
|
| - // - 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,
|
| - 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];
|
| - int length = Min(8192, stack->length());
|
| - String::WriteToFlat(*stack, buffer, 0, length - 1);
|
| - PutValuesOnStackAndDie(0xDEEEEEEE,
|
| - frame->fp(),
|
| - thread_local_.last_fp_,
|
| - it.frame()->fp(),
|
| - count,
|
| - buffer,
|
| - 0xFEEEEEEE);
|
| + // Check that we indeed found the frame we are looking for.
|
| + CHECK(!it.done() && (it.frame()->fp() == thread_local_.last_fp_));
|
| + if (step_count > 1) {
|
| + // Save old count and action to continue stepping after StepOut.
|
| + thread_local_.queued_step_count_ = step_count - 1;
|
| }
|
|
|
| - // If we found original frame
|
| - if (it.frame()->fp() == thread_local_.last_fp_) {
|
| - if (step_count > 1) {
|
| - // Save old count and action to continue stepping after
|
| - // StepOut
|
| - thread_local_.queued_step_count_ = step_count - 1;
|
| - }
|
| -
|
| - // Set up for StepOut to reach target frame
|
| - step_action = StepOut;
|
| - step_count = count;
|
| - }
|
| + // Set up for StepOut to reach target frame.
|
| + step_action = StepOut;
|
| + step_count = count;
|
| }
|
|
|
| // Clear all current stepping setup.
|
|
|