Closed
Bug 92087
Opened 23 years ago
Closed 23 years ago
console debugger: cannot display variables
Categories
(Other Applications Graveyard :: Venkman JS Debugger, defect, P1)
Other Applications Graveyard
Venkman JS Debugger
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla0.9.9
People
(Reporter: olaf.meincke, Assigned: rginda)
Details
(Keywords: regression, Whiteboard: [native])
Attachments
(1 file)
1.30 KB,
patch
|
rginda
:
review+
jband_mozilla
:
superreview+
|
Details | Diff | Splinter Review |
I am using the CVS sources from Jul 21 2001 and have applied the latest patch (id=42509) from bug #82188. Under certain circumstances I cannot display the content of variables using the show command in the console debugger. Running the following script: var a = 42; debugger; I can display the value of 'a' by typing: show('a') However, when doing the same thing in the following script: foo(); function foo() { var a = 42; debugger; } the console debugger displays 'undefined' for the value of 'a'. Olaf
Comment 1•23 years ago
|
||
Marking NEW.
Comment 2•23 years ago
|
||
If the function is not JSFUN_HEAVYWEIGHT, then it has no scope object, and all local variable and argument references are compiled into stack frame (argv and vars) slot gets and sets. But why isn't the compiler instance invoked from JS_EvaluateInStackFrame optimizing all local variable and argument references using the same bytecodes? To debug this, break in JS_EvaluateInStackFrame, then break in LookupArgOrVar in jsemit.c and follow the logic. /be
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P1
Assignee | ||
Comment 3•23 years ago
|
||
I may need to sit with Brendan on this one.
Target Milestone: --- → mozilla0.9.9
Assignee | ||
Updated•23 years ago
|
Whiteboard: [native]
Assignee | ||
Comment 4•23 years ago
|
||
Brendan and I had a look at this and found the problem in JS_EvaluateUCScriptInStackFrame (jsdbgapi.c:736.) Here JS_CompileUSScriptForPrincipals is called on the fp we're going to execute in, which doesn't have the EVAL_FRAME and DEBUGGER_FRAME flags set. js_EmitTree optimizes our script to death because of these missing flags.
Comment 5•23 years ago
|
||
Actually, the compiler uses the caller's frame, which is not special (neither eval nor debugger) -- the frame we're going to execute in won't be pushed until js_Execute is called, and that frame is on the C stack, so we can't readily share it with the compiler -- but no big deal. Patch coming right up. /be
Comment 6•23 years ago
|
||
If this works, let's put it in for 0.9.9. Cleanup later, probably after 1.0 in view of other priorities. /be
Comment 7•23 years ago
|
||
Does this fix things? Should we go with it? /be
Assignee | ||
Comment 8•23 years ago
|
||
Comment on attachment 68742 [details] [diff] [review] proposed hack fix Yeah, this fixes things. r=rginda
Attachment #68742 -
Flags: review+
Comment 9•23 years ago
|
||
Comment on attachment 68742 [details] [diff] [review] proposed hack fix sr=jband
Attachment #68742 -
Flags: superreview+
Comment 10•23 years ago
|
||
Fix is in, thanks. /be
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Product: Core → Other Applications
Updated•6 years ago
|
Product: Other Applications → Other Applications Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•