| OLD | NEW |
| 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 #ifndef VM_DEBUGGER_H_ | 5 #ifndef VM_DEBUGGER_H_ |
| 6 #define VM_DEBUGGER_H_ | 6 #define VM_DEBUGGER_H_ |
| 7 | 7 |
| 8 #include "vm/object.h" | 8 #include "vm/object.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 kStepOver, | 259 kStepOver, |
| 260 kStepInto, | 260 kStepInto, |
| 261 kStepOut | 261 kStepOut |
| 262 }; | 262 }; |
| 263 | 263 |
| 264 void EnsureFunctionIsDeoptimized(const Function& func); | 264 void EnsureFunctionIsDeoptimized(const Function& func); |
| 265 void InstrumentForStepping(const Function& target_function); | 265 void InstrumentForStepping(const Function& target_function); |
| 266 SourceBreakpoint* SetBreakpoint(const Function& target_function, | 266 SourceBreakpoint* SetBreakpoint(const Function& target_function, |
| 267 intptr_t token_index); | 267 intptr_t token_index); |
| 268 void RemoveInternalBreakpoints(); | 268 void RemoveInternalBreakpoints(); |
| 269 void RemoveCodeBreakpoints(SourceBreakpoint* src_bpt); | 269 void UnlinkCodeBreakpoints(SourceBreakpoint* src_bpt); |
| 270 void RegisterSourceBreakpoint(SourceBreakpoint* bpt); | 270 void RegisterSourceBreakpoint(SourceBreakpoint* bpt); |
| 271 void RegisterCodeBreakpoint(CodeBreakpoint* bpt); | 271 void RegisterCodeBreakpoint(CodeBreakpoint* bpt); |
| 272 SourceBreakpoint* GetSourceBreakpoint(const Function& func, | 272 SourceBreakpoint* GetSourceBreakpoint(const Function& func, |
| 273 intptr_t token_index); | 273 intptr_t token_index); |
| 274 CodeBreakpoint* MakeCodeBreakpoint(const Function& func, | 274 CodeBreakpoint* MakeCodeBreakpoint(const Function& func, |
| 275 intptr_t token_index); | 275 intptr_t token_index); |
| 276 | 276 |
| 277 // Returns NULL if no breakpoint exists for the given address. | 277 // Returns NULL if no breakpoint exists for the given address. |
| 278 CodeBreakpoint* GetCodeBreakpoint(uword breakpoint_address); | 278 CodeBreakpoint* GetCodeBreakpoint(uword breakpoint_address); |
| 279 | 279 |
| 280 void SyncBreakpoint(SourceBreakpoint* bpt); | 280 void SyncBreakpoint(SourceBreakpoint* bpt); |
| 281 | 281 |
| 282 void SignalBpResolved(SourceBreakpoint *bpt); | 282 void SignalBpResolved(SourceBreakpoint *bpt); |
| 283 | 283 |
| 284 bool IsDebuggable(const Function& func); |
| 285 |
| 284 intptr_t nextId() { return next_id_++; } | 286 intptr_t nextId() { return next_id_++; } |
| 285 | 287 |
| 286 Isolate* isolate_; | 288 Isolate* isolate_; |
| 287 bool initialized_; | 289 bool initialized_; |
| 288 BreakpointHandler* bp_handler_; | 290 BreakpointHandler* bp_handler_; |
| 289 EventHandler* event_handler_; | 291 EventHandler* event_handler_; |
| 290 | 292 |
| 291 // ID number generator. | 293 // ID number generator. |
| 292 intptr_t next_id_; | 294 intptr_t next_id_; |
| 293 | 295 |
| 294 // Current stack trace. Valid while executing breakpoint callback code. | 296 // Current stack trace. Valid while executing breakpoint callback code. |
| 295 DebuggerStackTrace* stack_trace_; | 297 DebuggerStackTrace* stack_trace_; |
| 296 | 298 |
| 297 RemoteObjectCache* obj_cache_; | 299 RemoteObjectCache* obj_cache_; |
| 298 | 300 |
| 299 SourceBreakpoint* src_breakpoints_; | 301 SourceBreakpoint* src_breakpoints_; |
| 300 CodeBreakpoint* code_breakpoints_; | 302 CodeBreakpoint* code_breakpoints_; |
| 301 | 303 |
| 302 // Tells debugger what to do when resuming execution after a breakpoint. | 304 // Tells debugger what to do when resuming execution after a breakpoint. |
| 303 ResumeAction resume_action_; | 305 ResumeAction resume_action_; |
| 304 | 306 |
| 307 // If >= 0, last_bpt_line contains the line number of the last breakpoint |
| 308 // location for which the breakpoint callback function was called. |
| 309 intptr_t last_bpt_line_; |
| 310 |
| 305 // Do not call back to breakpoint handler if this flag is set. | 311 // Do not call back to breakpoint handler if this flag is set. |
| 306 // Effectively this means ignoring breakpoints. Set when Dart code may | 312 // Effectively this means ignoring breakpoints. Set when Dart code may |
| 307 // be run as a side effect of getting values of fields. | 313 // be run as a side effect of getting values of fields. |
| 308 bool ignore_breakpoints_; | 314 bool ignore_breakpoints_; |
| 309 | 315 |
| 310 friend class SourceBreakpoint; | 316 friend class SourceBreakpoint; |
| 311 DISALLOW_COPY_AND_ASSIGN(Debugger); | 317 DISALLOW_COPY_AND_ASSIGN(Debugger); |
| 312 }; | 318 }; |
| 313 | 319 |
| 314 | 320 |
| 315 } // namespace dart | 321 } // namespace dart |
| 316 | 322 |
| 317 #endif // VM_DEBUGGER_H_ | 323 #endif // VM_DEBUGGER_H_ |
| OLD | NEW |