Closed
Bug 481230
Opened 16 years ago
Closed 16 years ago
LIR doesn't properly update the traits of locals (breaks debugger)
Categories
(Tamarin Graveyard :: Virtual Machine, defect)
Tamarin Graveyard
Virtual Machine
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: stejohns, Assigned: rreitmai)
References
Details
Attachments
(3 files, 5 obsolete files)
9.08 KB,
patch
|
stejohns
:
review+
|
Details | Diff | Splinter Review |
31.82 KB,
patch
|
edwsmith
:
review+
|
Details | Diff | Splinter Review |
7.25 KB,
patch
|
edwsmith
:
review+
|
Details | Diff | Splinter Review |
LIR attempts to track the traits of locals (when debugger() is non-null) so that a debugger can properly box the locals for presentation to the user. But, it's broken, because Verifier doesn't update the framestate until after the relevant local stores are emitted. (This used to work in MIR because MIR didn't update the local-traits until the end of a basic block, by which time the framestate had been updated.)
To fix, we either need to refactor Verifier to update the framestate traits sooner, or modify LIR to update the local-traits the same way MIR did.
Assignee | ||
Comment 1•16 years ago
|
||
assigned to rickr. Most likely have dependencies on Verifier work see 481275 and 478115
Assignee | ||
Comment 2•16 years ago
|
||
Assignee | ||
Comment 3•16 years ago
|
||
Attachment #366422 -
Flags: review?(stejohns)
Assignee | ||
Comment 4•16 years ago
|
||
Assignee | ||
Comment 5•16 years ago
|
||
Attachment #365796 -
Attachment is obsolete: true
Attachment #366424 -
Flags: review?(edwsmith)
Assignee | ||
Comment 6•16 years ago
|
||
Attachment #366426 -
Flags: review?(edwsmith)
Assignee | ||
Updated•16 years ago
|
Attachment #366423 -
Flags: review?(stejohns)
Reporter | ||
Comment 7•16 years ago
|
||
Comment on attachment 366423 [details] [diff] [review]
ver 1 - call stack node cleanup
review- only for two concerns, otherwise I like it:
(1) I think the call to debugEnter in CodegenLIR.cpp needs to be updated (since you changed the args) and I don't see that here. Did I miss it?
(2) We need to double-check to ensure that the pruned fields aren't in use by the Flash/AIR debuggers -- if not then let's prune away
Attachment #366423 -
Flags: review?(stejohns) → review-
Assignee | ||
Comment 8•16 years ago
|
||
re: comment #7
(1) you're correct and that change landed in patch #4. I was separating the patches manually and missed it. Have a look there, please.
(2) they are not used by flash/air and if they are we need to fix it! The fields were added in the early days when we were playing with the jit and debugging and just never got trimmed.
Reporter | ||
Comment 9•16 years ago
|
||
Comment on attachment 366426 [details] [diff] [review]
ver 1 - debugger functional once again
okey dokey then.
Attachment #366426 -
Flags: review?(edwsmith) → review+
Assignee | ||
Updated•16 years ago
|
Attachment #366426 -
Flags: review?(edwsmith)
Comment 10•16 years ago
|
||
Comment on attachment 366424 [details] [diff] [review]
ver 2 - get DebugCLI working again
Generally I like the direction and i'm eager to have a working standalone debugger.
issues with the patch:
* I can't get a working build / debugger given the info in the bug. what starting rev in redux should be used? (hg diff provides this, yet it's not here in these patches).
* i tried applying each patch in succession, the fourth didn't apply cleanly, and i can't find the base rev that lets the first patch even compile cleanly.
* applying the DebugCLI patch by itself doesn't result in a working debugger (avmplus -d foo.abc) doesn't enter the debugger unless the abc is compiled with debug symbols. (need an error!)
also in reviewing the code, the diagnostics for a missing source file were commented out, but no replacement was found. a useful error message could save substantial hair pulling.
Attachment #366424 -
Flags: review?(edwsmith) → review-
Comment 11•16 years ago
|
||
Comment on attachment 366426 [details] [diff] [review]
ver 1 - debugger functional once again
(generally) I can't get this to apply cleanly: recommend using hg diff to create patches (not git style!)
(specifically)
CodegenLIR:2559, localSet() traits parameter is commented out. the actual type could be null, void, String, or Namespace, correct?
Since localSet() requires a valid traits parameter for debugging to work, its best to make it a non-optional parameter.
line 2870: ClassClosure::newInstance() returns ScriptObject*, so the traits for the result pointer should be something specific. OBJECT_TYPE is incorrect because it implies the value is an Atom, which it isn't.
Attachment #366426 -
Flags: review?(edwsmith) → review-
Assignee | ||
Comment 12•16 years ago
|
||
I'll rebase the patches and supply the needed info.
Comment #10
Regarding the debugcli changes, seeing as it wasn't functioning at all and post-patch at least works, I'd consider that an improvement. Is it all that needs to be done, no; but its a start.
With regards to source-file-missing messages; the logic for locating the source file is weak and was causing issues for me; for instance repeated messages per debugger command. I agree it needs to be cleaned up.
Comment #11
* CodegenLIR:2559 : good catch. yes that needs fixing
* Agreed will make traits ptr non-optional.
* I'll mark it as CLASS_TYPE. That way it will go through the boxing logic correctly; see boxLocals. BTW, that section of code should also get fixed but that's for another day/bug.
Assignee | ||
Comment 13•16 years ago
|
||
the debugger patch must be laid down first.
Attachment #366423 -
Attachment is obsolete: true
Attachment #367127 -
Flags: review?(stejohns)
Assignee | ||
Comment 14•16 years ago
|
||
Attachment #366422 -
Attachment is obsolete: true
Attachment #366426 -
Attachment is obsolete: true
Attachment #367127 -
Attachment is obsolete: true
Attachment #367128 -
Flags: review?(edwsmith)
Attachment #366422 -
Flags: review?(stejohns)
Attachment #367127 -
Flags: review?(stejohns)
Assignee | ||
Comment 15•16 years ago
|
||
Attachment #367129 -
Flags: review?(edwsmith)
Assignee | ||
Updated•16 years ago
|
Attachment #366424 -
Attachment is obsolete: true
Assignee | ||
Updated•16 years ago
|
Attachment #367127 -
Attachment is obsolete: false
Attachment #367127 -
Flags: review?(stejohns)
Reporter | ||
Updated•16 years ago
|
Attachment #367127 -
Flags: review?(stejohns) → review+
Updated•16 years ago
|
Attachment #367129 -
Flags: review?(edwsmith) → review+
Updated•16 years ago
|
Attachment #367128 -
Flags: review?(edwsmith) → review+
Comment 16•16 years ago
|
||
Comment on attachment 367128 [details] [diff] [review]
ver 2 - debugger functional once again
* OP_pushundefined should be emitPtrConst(..., VOID_TYPE)
* in emitCall(), case OP_construct, when we call newInstance(), we know the result type, it's passed in as "result". ie s/CLASS_TYPE/result, i think.
* in epilogue(), localSet(..., exAtom, INT_TYPE) should be NULL (the exception atom is an atom == type * == NULL).
Assignee | ||
Comment 17•16 years ago
|
||
3 pts above addressed and change pushed 73f6fe8a9258: bug 481230 - AS debugging of variables - rev 1594
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•16 years ago
|
Comment 18•15 years ago
|
||
Resolved fixed engineering / work item that has been pushed. Setting status to verified.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•