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

Side by Side Diff: runtime/vm/debugger.cc

Issue 292173005: Fix issue 18834. Collect stack trace before the frame is prepared for OSR. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« runtime/vm/code_generator.cc ('K') | « runtime/vm/code_generator.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/debugger.h" 5 #include "vm/debugger.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 DebuggerEvent event(kBreakpointResolved); 1179 DebuggerEvent event(kBreakpointResolved);
1180 event.breakpoint = bpt; 1180 event.breakpoint = bpt;
1181 (*event_handler_)(&event); 1181 (*event_handler_)(&event);
1182 } 1182 }
1183 } 1183 }
1184 1184
1185 1185
1186 ActivationFrame* Debugger::CollectDartFrame(Isolate* isolate, 1186 ActivationFrame* Debugger::CollectDartFrame(Isolate* isolate,
1187 uword pc, 1187 uword pc,
1188 StackFrame* frame, 1188 StackFrame* frame,
1189 const Code& code_param, 1189 const Code& code,
1190 const Array& deopt_frame, 1190 const Array& deopt_frame,
1191 intptr_t deopt_frame_offset, 1191 intptr_t deopt_frame_offset,
1192 ActivationFrame* callee_activation, 1192 ActivationFrame* callee_activation,
1193 const Context& entry_ctx) { 1193 const Context& entry_ctx) {
1194 // TODO(turnidge): Remove the workaround below once... 1194 ASSERT(code.ContainsInstructionAt(pc));
1195 // https://code.google.com/p/dart/issues/detail?id=18384
1196 // ...is fixed.
1197 Code& code = Code::Handle(isolate);
1198 code = code_param.raw();
1199 if (!code.ContainsInstructionAt(pc)) {
1200 code = Code::LookupCode(pc);
1201 ASSERT(!code.IsNull());
1202 ASSERT(code.ContainsInstructionAt(pc));
1203 }
1204
1205 // We provide either a callee activation or an entry context. Not both. 1195 // We provide either a callee activation or an entry context. Not both.
1206 ASSERT(((callee_activation != NULL) && entry_ctx.IsNull()) || 1196 ASSERT(((callee_activation != NULL) && entry_ctx.IsNull()) ||
1207 ((callee_activation == NULL) && !entry_ctx.IsNull())); 1197 ((callee_activation == NULL) && !entry_ctx.IsNull()));
1208 ActivationFrame* activation = 1198 ActivationFrame* activation =
1209 new ActivationFrame(pc, frame->fp(), frame->sp(), code, 1199 new ActivationFrame(pc, frame->fp(), frame->sp(), code,
1210 deopt_frame, deopt_frame_offset); 1200 deopt_frame, deopt_frame_offset);
1211 1201
1212 // Is there a closure call at the current PC? 1202 // Is there a closure call at the current PC?
1213 // 1203 //
1214 // We can't just check the callee_activation to see if it is a 1204 // We can't just check the callee_activation to see if it is a
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after
2533 } 2523 }
2534 2524
2535 2525
2536 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { 2526 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) {
2537 ASSERT(bpt->next() == NULL); 2527 ASSERT(bpt->next() == NULL);
2538 bpt->set_next(code_breakpoints_); 2528 bpt->set_next(code_breakpoints_);
2539 code_breakpoints_ = bpt; 2529 code_breakpoints_ = bpt;
2540 } 2530 }
2541 2531
2542 } // namespace dart 2532 } // namespace dart
OLDNEW
« runtime/vm/code_generator.cc ('K') | « runtime/vm/code_generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698