2011-02-03 13:06:21 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
2013-04-16 20:47:10 +00:00
|
|
|
* vim: set ts=8 sts=4 et sw=4 tw=99:
|
2012-05-21 11:12:37 +00:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
1998-03-28 02:44:41 +00:00
|
|
|
|
2013-08-27 02:05:20 +00:00
|
|
|
#ifndef js_OldDebugAPI_h
|
|
|
|
#define js_OldDebugAPI_h
|
2013-08-09 04:30:15 +00:00
|
|
|
|
1998-03-28 02:44:41 +00:00
|
|
|
/*
|
|
|
|
* JS debugger API.
|
|
|
|
*/
|
2013-07-24 00:34:18 +00:00
|
|
|
|
2013-09-19 19:24:53 +00:00
|
|
|
#include "mozilla/NullPtr.h"
|
2014-01-17 18:09:38 +00:00
|
|
|
|
2014-02-25 15:43:14 +00:00
|
|
|
#include "jsapi.h"
|
2013-07-26 05:52:58 +00:00
|
|
|
#include "jsbytecode.h"
|
2013-07-26 05:52:59 +00:00
|
|
|
|
2013-08-27 02:05:19 +00:00
|
|
|
#include "js/CallArgs.h"
|
2013-08-28 02:59:14 +00:00
|
|
|
#include "js/TypeDecls.h"
|
2013-08-27 02:05:19 +00:00
|
|
|
|
2013-07-26 05:52:59 +00:00
|
|
|
class JSAtom;
|
2014-06-19 00:57:51 +00:00
|
|
|
struct JSFreeOp;
|
1998-03-28 02:44:41 +00:00
|
|
|
|
2014-02-07 11:21:12 +00:00
|
|
|
namespace js {
|
2014-03-19 08:28:57 +00:00
|
|
|
class InterpreterFrame;
|
2014-05-15 17:30:45 +00:00
|
|
|
class FrameIter;
|
|
|
|
class ScriptSource;
|
2014-02-07 11:21:12 +00:00
|
|
|
}
|
2013-07-26 04:23:14 +00:00
|
|
|
|
2014-02-25 15:43:14 +00:00
|
|
|
|
2011-02-03 13:06:21 +00:00
|
|
|
namespace JS {
|
|
|
|
|
2012-08-16 00:28:33 +00:00
|
|
|
extern JS_PUBLIC_API(char *)
|
2013-08-08 22:53:04 +00:00
|
|
|
FormatStackDump(JSContext *cx, char *buf, bool showArgs, bool showLocals, bool showThisProps);
|
2012-08-16 00:28:33 +00:00
|
|
|
|
2014-01-08 00:53:17 +00:00
|
|
|
} // namespace JS
|
2011-02-03 13:06:21 +00:00
|
|
|
|
2013-12-06 23:03:08 +00:00
|
|
|
# ifdef JS_DEBUG
|
2013-08-27 02:05:19 +00:00
|
|
|
JS_FRIEND_API(void) js_DumpValue(const JS::Value &val);
|
2011-10-04 14:06:54 +00:00
|
|
|
JS_FRIEND_API(void) js_DumpId(jsid id);
|
2014-03-19 08:28:57 +00:00
|
|
|
JS_FRIEND_API(void) js_DumpInterpreterFrame(JSContext *cx, js::InterpreterFrame *start = nullptr);
|
2012-08-30 01:04:42 +00:00
|
|
|
# endif
|
2012-08-27 20:32:51 +00:00
|
|
|
|
|
|
|
JS_FRIEND_API(void)
|
|
|
|
js_DumpBacktrace(JSContext *cx);
|
|
|
|
|
2013-08-09 04:30:15 +00:00
|
|
|
typedef enum JSTrapStatus {
|
|
|
|
JSTRAP_ERROR,
|
|
|
|
JSTRAP_CONTINUE,
|
|
|
|
JSTRAP_RETURN,
|
|
|
|
JSTRAP_THROW,
|
|
|
|
JSTRAP_LIMIT
|
|
|
|
} JSTrapStatus;
|
|
|
|
|
2011-02-03 13:06:21 +00:00
|
|
|
extern JS_PUBLIC_API(JSString *)
|
2014-01-17 18:09:38 +00:00
|
|
|
JS_DecompileScript(JSContext *cx, JS::HandleScript script, const char *name, unsigned indent);
|
2011-02-03 13:06:21 +00:00
|
|
|
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
|
|
/************************************************************************/
|
|
|
|
|
2014-07-25 12:26:40 +00:00
|
|
|
// Raw JSScript* because this needs to be callable from a signal handler.
|
2012-02-28 23:11:11 +00:00
|
|
|
extern JS_PUBLIC_API(unsigned)
|
2014-07-25 12:26:40 +00:00
|
|
|
JS_PCToLineNumber(JSContext *cx, JSScript *script, jsbytecode *pc);
|
2010-07-15 06:19:36 +00:00
|
|
|
|
2014-07-25 12:26:40 +00:00
|
|
|
extern JS_PUBLIC_API(jsbytecode *)
|
|
|
|
JS_LineNumberToPC(JSContext *cx, JSScript *script, unsigned lineno);
|
2010-07-15 06:19:36 +00:00
|
|
|
|
1998-04-24 00:31:11 +00:00
|
|
|
extern JS_PUBLIC_API(JSScript *)
|
2014-03-17 16:17:58 +00:00
|
|
|
JS_GetFunctionScript(JSContext *cx, JS::HandleFunction fun);
|
1998-03-28 02:44:41 +00:00
|
|
|
|
2011-11-28 15:43:31 +00:00
|
|
|
|
1998-03-28 02:44:41 +00:00
|
|
|
/************************************************************************/
|
2011-12-21 01:42:45 +00:00
|
|
|
|
|
|
|
extern JS_PUBLIC_API(const char *)
|
2014-07-25 12:26:40 +00:00
|
|
|
JS_GetScriptFilename(JSScript *script);
|
1998-03-28 02:44:41 +00:00
|
|
|
|
2014-07-22 04:43:21 +00:00
|
|
|
extern JS_PUBLIC_API(const char16_t *)
|
2011-07-29 15:44:45 +00:00
|
|
|
JS_GetScriptSourceMap(JSContext *cx, JSScript *script);
|
|
|
|
|
2012-02-28 23:11:11 +00:00
|
|
|
extern JS_PUBLIC_API(unsigned)
|
1998-03-28 02:44:41 +00:00
|
|
|
JS_GetScriptBaseLineNumber(JSContext *cx, JSScript *script);
|
|
|
|
|
2012-02-28 23:11:11 +00:00
|
|
|
extern JS_PUBLIC_API(unsigned)
|
1998-03-28 02:44:41 +00:00
|
|
|
JS_GetScriptLineExtent(JSContext *cx, JSScript *script);
|
|
|
|
|
1998-07-31 00:07:22 +00:00
|
|
|
|
2001-02-02 20:52:06 +00:00
|
|
|
/************************************************************************/
|
|
|
|
|
2011-07-26 22:56:09 +00:00
|
|
|
/**
|
|
|
|
* Add various profiling-related functions as properties of the given object.
|
|
|
|
*/
|
2013-08-08 22:53:04 +00:00
|
|
|
extern JS_PUBLIC_API(bool)
|
2011-01-15 01:58:40 +00:00
|
|
|
JS_DefineProfilingFunctions(JSContext *cx, JSObject *obj);
|
2008-01-16 20:42:50 +00:00
|
|
|
|
2011-07-27 23:03:34 +00:00
|
|
|
/* Defined in vm/Debugger.cpp. */
|
2013-08-08 22:53:04 +00:00
|
|
|
extern JS_PUBLIC_API(bool)
|
2014-03-17 16:17:58 +00:00
|
|
|
JS_DefineDebuggerObject(JSContext *cx, JS::HandleObject obj);
|
2011-04-14 20:41:31 +00:00
|
|
|
|
2011-11-10 20:34:24 +00:00
|
|
|
extern JS_PUBLIC_API(void)
|
2014-04-02 14:28:03 +00:00
|
|
|
JS_DumpPCCounts(JSContext *cx, JS::HandleScript script);
|
2011-11-10 20:34:24 +00:00
|
|
|
|
|
|
|
extern JS_PUBLIC_API(void)
|
|
|
|
JS_DumpCompartmentPCCounts(JSContext *cx);
|
|
|
|
|
2013-08-27 02:05:20 +00:00
|
|
|
#endif /* js_OldDebugAPI_h */
|