Obtaining KJS debugging information from ExecState and Object classes...
seemanta at gmail.com
seemanta at gmail.com
Thu Sep 6 13:54:32 BST 2007
Hi,
I am trying to write an interactive debugger for KJS. I am overriding
the virtual functions from
KJS::Debugger() class for my purpose.
The overridden function interfaces are more or less similar with only certain
kinds of objects being passed back and forth.
So pretty much ExecState, Object, SourceId are at my disposal.
>From these objects, I need to extract information like:
1. file being parsed,
2. line number being parsed,
3. current function being executed(for generating a backtrace etc).
Line number is evident from the firstLine and lastLine parameters.
File name information also I obtained from the sourceParsed method by
dereferencing
the sourceURL parameter.
However, I am struggling hard to obtain the function name being parsed.
The type of the parameter called 'function' in callEvent() interface
is 'Object'.
However when I tried to delve into the structures I was overwhelmed by
the level of
nesting.
It would be great if you can provide some information regarding as to how to
extract the function name or any other information from the 'Object' object
Also, I need to know how to map the sourceId into the correct source code
line being parsed. Any pointers ?
Thanks in advance,
regards,
Seemanta
--
Codito ergo sum.
( I code, therefore I am)
More information about the kfm-devel
mailing list