b7cf1328a1
- Introduce Debugger class. - Each isolate has a debugger object. - Introduce stubs that can be put in place of static or dynamic Dart function calls. - Very rudimentary command line option to place a breakpoint at the beginning of a function. Review URL: http://codereview.chromium.org//8687037 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1928 260f80e4-7a28-3924-810f-c04153c831b5
43 lines
990 B
C++
43 lines
990 B
C++
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#ifndef VM_DEBUGGER_H_
|
|
#define VM_DEBUGGER_H_
|
|
|
|
#include "vm/object.h"
|
|
|
|
namespace dart {
|
|
|
|
class Breakpoint;
|
|
class Isolate;
|
|
class ObjectPointerVisitor;
|
|
|
|
class Debugger {
|
|
public:
|
|
Debugger();
|
|
|
|
void Initialize(Isolate* isolate);
|
|
|
|
// Set breakpoint at closest location to function entry.
|
|
void SetBreakpointAtEntry(const String& class_name,
|
|
const String& function_name);
|
|
|
|
void VisitObjectPointers(ObjectPointerVisitor* visitor);
|
|
|
|
// Returns NULL if no breakpoint exists for the given address.
|
|
Breakpoint* GetBreakpoint(uword breakpoint_address);
|
|
|
|
private:
|
|
void AddBreakpoint(Breakpoint* bpt);
|
|
|
|
bool initialized_;
|
|
Breakpoint* breakpoints_;
|
|
DISALLOW_COPY_AND_ASSIGN(Debugger);
|
|
};
|
|
|
|
|
|
} // namespace dart
|
|
|
|
#endif // VM_DEBUGGER_H_
|