Bug 602003: add jsd API to query valid script begin and end PCs, r=sayrer,jjb

This commit is contained in:
David Mandelin
2010-10-06 11:23:14 -07:00
parent 4c35a187f2
commit c870caca5b
12 changed files with 172 additions and 16 deletions

View File

@@ -486,6 +486,19 @@ JSD_GetScriptHook(JSDContext* jsdc, JSD_ScriptHookProc* hook, void** callerdata)
extern JSD_PUBLIC_API(jsuword)
JSD_GetClosestPC(JSDContext* jsdc, JSDScript* jsdscript, uintN line);
/*
* Get the first 'Program Counter' value where a breakpoint can be set.
*/
extern JSD_PUBLIC_API(jsuword)
JSD_GetFirstValidPC(JSDContext* jsdc, JSDScript* jsdscript);
/*
* Get the 'Program Counter' value just after the last byte of the script.
* 0 is returned for invalid scripts.
*/
extern JSD_PUBLIC_API(jsuword)
JSD_GetEndPC(JSDContext* jsdc, JSDScript* jsdscript);
/*
* Get the source line number for a given 'Program Counter' location.
* Returns 0 if no source line information is appropriate (or available) for