]> git.saurik.com Git - apple/javascriptcore.git/blame - debugger/Debugger.h
JavaScriptCore-1097.13.tar.gz
[apple/javascriptcore.git] / debugger / Debugger.h
CommitLineData
9dae56ea
A
1/*
2 * Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
3 * Copyright (C) 2001 Peter Kelly (pmk@post.com)
f9bf01c6 4 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
9dae56ea
A
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
f9bf01c6 25#include <wtf/HashSet.h>
9dae56ea
A
26
27namespace JSC {
28
29 class DebuggerCallFrame;
30 class ExecState;
f9bf01c6 31 class JSGlobalData;
9dae56ea 32 class JSGlobalObject;
f9bf01c6 33 class JSValue;
14957cd0 34 class SourceProvider;
9dae56ea
A
35 class UString;
36
6fe7ccc8 37 class JS_EXPORT_PRIVATE Debugger {
9dae56ea 38 public:
9dae56ea
A
39 virtual ~Debugger();
40
41 void attach(JSGlobalObject*);
ba379fdc 42 virtual void detach(JSGlobalObject*);
9dae56ea 43
14957cd0 44 virtual void sourceParsed(ExecState*, SourceProvider*, int errorLineNumber, const UString& errorMessage) = 0;
f9bf01c6
A
45 virtual void exception(const DebuggerCallFrame&, intptr_t sourceID, int lineNumber, bool hasHandler) = 0;
46 virtual void atStatement(const DebuggerCallFrame&, intptr_t sourceID, int lineNumber) = 0;
47 virtual void callEvent(const DebuggerCallFrame&, intptr_t sourceID, int lineNumber) = 0;
48 virtual void returnEvent(const DebuggerCallFrame&, intptr_t sourceID, int lineNumber) = 0;
9dae56ea 49
f9bf01c6
A
50 virtual void willExecuteProgram(const DebuggerCallFrame&, intptr_t sourceID, int lineNumber) = 0;
51 virtual void didExecuteProgram(const DebuggerCallFrame&, intptr_t sourceID, int lineNumber) = 0;
52 virtual void didReachBreakpoint(const DebuggerCallFrame&, intptr_t sourceID, int lineNumber) = 0;
53
54 void recompileAllJSFunctions(JSGlobalData*);
9dae56ea
A
55
56 private:
57 HashSet<JSGlobalObject*> m_globalObjects;
58 };
59
f9bf01c6 60 // This function exists only for backwards compatibility with existing WebScriptDebugger clients.
6fe7ccc8 61 JS_EXPORT_PRIVATE JSValue evaluateInGlobalCallFrame(const UString&, JSValue& exception, JSGlobalObject*);
9dae56ea
A
62
63} // namespace JSC
64
65#endif // Debugger_h