This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 186306 - Autos view
Summary: Autos view
Status: RESOLVED FIXED
Alias: None
Product: third-party
Classification: Unclassified
Component: DBX-Gui (show other bugs)
Version: 6.x
Hardware: PC Solaris
: P3 normal (vote)
Assignee: Egor Ushakov
URL:
Keywords:
Depends on: 187266
Blocks:
  Show dependency tree
 
Reported: 2010-05-18 14:47 UTC by Egor Ushakov
Modified: 2010-06-10 23:48 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Egor Ushakov 2010-05-18 14:47:07 UTC
Support autos view in variables (as in cnd)
Comment 1 Egor Ushakov 2010-06-07 13:16:38 UTC
UI part in:
http://lessing.sfbay.sun.com/hg/toolshg/rev/6ab530a104e3
Comment 2 ivan 2010-06-08 04:08:31 UTC
PARTFIX
        http://lessing.sfbay.sun.com/hg/toolshg/rev/02262f85b4ad
        Prep work:
        - Added public NativeDebugger.visitedLocation(). This allows us to
          know the current src file and line #. It used to be a protected
          method called visit_loc().
        - Added EditorBridge.documentFor() to convert file pathnames
          to Documents.
        - Adedd infrastructure to track, in a NativeDebugger, when
          showAutos is turned on and off:
          o NatievDebuggerIMpl.setAustos()/isAutos().
          o Register ActionListener in LocalModel constructor
          o Call setAutos() in LocalModel.add/removeModelListener().

        The following only done for dbx ...

        First attempt:
        Enhanced Egors LocalModel.getAutos() to filter list of local
        Variables with the Set returned by Autos. But this doesn't handle
        globals, member variables and more complex expressions.

        Second attempt:
        DbxDebuggerImpl.requestAutos() iterates through the list provided
        by Autos and sends individual expression evaluation requests to dbx.
        When the last response arrives we trigger a pull of locals which
        retrieves autos via NativeDebugger.getAutos().

        This allows for a more accurate LocalModel.getChildrenCount().

        I first triggerred requestAutos() in setLocals() but unfortunately
        visitedLocation gets set _after_ setLocals(). Currently requestAutos
        gets triggerred in DbxDebuggerImpl.makeCurrent().

        This works reasonably well with frame and stack switches.

        However we still have some issues:
        - Pointer chasing is (sometimes) inoperative.
          Even after getting it to work remembering which variabels were chased
          will be tricky as teh set of chased pointers will arrive before
          the answers to requestAutos().
          Given that Autos sometimes returns fields (e.g. p.f1) we could
          disable pointer chasing for autos.
        - switching showAutos's on and off doesn't always refresh the view.
        - When in disassembly autos don't get cleared.
        - view not cleared on proc_gone ... possibly other state transitions.
        - The mgmt for NativeDebugger auto state needs a bit of work still.
          It requires the view button to be on _and_ locals to be displayed.
Comment 3 Egor Ushakov 2010-06-08 10:03:55 UTC
Thanks a lot!
I've fixed difference in line numbering with:
http://lessing.sfbay.sun.com/hg/toolshg/rev/a5dc8ccc62e9

Noticed an issue:
- locals are not set if in autos mode (there is a check for that in setLocals), because of that switch back to locals mode shows empty list of locals
Comment 4 ivan 2010-06-10 23:48:50 UTC
        http://lessing.sfbay.sun.com/hg/toolshg/rev/a2642342b6d5
        Dealt with leftover issues ...

        - Pointer chasing works for autos.
          But there's no memory from step to step. The reason for this
          is that dbx pushes the vaues of remembered opened nodes before
          we have the opportunity to handle the autos for the current line.

        - Autos gets cleared properly when debuggee is killed or
          we switch to a frame with only assembly level information.

        - Commented out debugging printfs.

        - Renamed NativeDebugger autos property to showAutos so
          it's not confused with actual 'autos' list.