jsdIStackFrame.pc semantics

"John J. Barton" <[email protected]>
Newsgroups gmane.comp.mozilla.devel.jsdebugger
Message-ID <[email protected]>
The doc for jsdIStackFrame.pc reads:

Current program counter in this stack frame.

I have code like this:
--------
var req = new XMLHttpRequest();

req.onreadystatechange = function() {  // line 3
     if( req.readyState == 4) {
	        eval( req.responseText);  // line 5
     }
};
---------

When the eval() executes, within which line should I
expect the program counter for the caller? I expected
line 5, but it comes out on line 6. (Well the numerical
value is 4 since it comes out of pcToLine relative to
the start of the function).

So one model is that the PC is somehow at the end of
the function call:

		eval( req.responseText);  // line 5
---------------------------------------^
so it is just on the next line "barely".

Or there is just another "off-by-one" problem in my code,
not the first I guess ;-).

But I see one case where the PC points to the line
with the eval().

This is all with PCMAP_PRETTYPRINT output, which I guess
really means source-like text decompiled from bytecodes.

Thanks,
John.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.