1 | /*
|
---|
2 | * Copyright (C) 1999-2001 Harri Porten ([email protected])
|
---|
3 | * Copyright (C) 2001 Peter Kelly ([email protected])
|
---|
4 | * Copyright (C) 2008 Apple Inc. All rights reserved.
|
---|
5 | *
|
---|
6 | * This library is free software; you can redistribute it and/or
|
---|
7 | * modify it under the terms of the GNU Lesser General Public
|
---|
8 | * License as published by the Free Software Foundation; either
|
---|
9 | * version 2 of the License, or (at your option) any later version.
|
---|
10 | *
|
---|
11 | * This library is distributed in the hope that it will be useful,
|
---|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
14 | * Lesser General Public License for more details.
|
---|
15 | *
|
---|
16 | * You should have received a copy of the GNU Lesser General Public
|
---|
17 | * License along with this library; if not, write to the Free Software
|
---|
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
---|
19 | *
|
---|
20 | */
|
---|
21 |
|
---|
22 | #ifndef Debugger_h
|
---|
23 | #define Debugger_h
|
---|
24 |
|
---|
25 | #include "protect.h"
|
---|
26 |
|
---|
27 | namespace JSC {
|
---|
28 |
|
---|
29 | class DebuggerCallFrame;
|
---|
30 | class ExecState;
|
---|
31 | class JSGlobalObject;
|
---|
32 | class SourceCode;
|
---|
33 | class UString;
|
---|
34 |
|
---|
35 | class Debugger {
|
---|
36 | public:
|
---|
37 | Debugger();
|
---|
38 | virtual ~Debugger();
|
---|
39 |
|
---|
40 | void attach(JSGlobalObject*);
|
---|
41 | void detach(JSGlobalObject*);
|
---|
42 |
|
---|
43 | virtual void sourceParsed(ExecState*, const SourceCode&, int errorLine, const UString& errorMsg) = 0;
|
---|
44 | virtual void exception(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0;
|
---|
45 | virtual void atStatement(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0;
|
---|
46 | virtual void callEvent(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0;
|
---|
47 | virtual void returnEvent(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0;
|
---|
48 |
|
---|
49 | virtual void willExecuteProgram(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0;
|
---|
50 | virtual void didExecuteProgram(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0;
|
---|
51 | virtual void didReachBreakpoint(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0;
|
---|
52 |
|
---|
53 | private:
|
---|
54 | HashSet<JSGlobalObject*> m_globalObjects;
|
---|
55 | };
|
---|
56 |
|
---|
57 | } // namespace JSC
|
---|
58 |
|
---|
59 | #endif // Debugger_h
|
---|