Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326636

Summary: [disassembly] Enable disassembly view as "editor"
Product: [Tools] CDT Reporter: Anton Leherbauer <aleherb+eclipse>
Component: cdt-debug-dsfAssignee: Anton Leherbauer <aleherb+eclipse>
Status: RESOLVED FIXED QA Contact: Pawel Piech <pawel.1.piech>
Severity: enhancement    
Priority: P3 CC: marc.khouzam, pawel.1.piech
Version: 7.0   
Target Milestone: 7.0.2   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 329729    
Attachments:
Description Flags
Work in progress
aleherb+eclipse: iplog-
Fix action enablement aleherb+eclipse: iplog-

Description Anton Leherbauer CLA 2010-09-30 03:28:36 EDT
The DSF Disassembly view implementation is basically also available as editor, but this has not been enabled and tested yet.

Things to consider are:
- source lookup / display
  The disassembly editor should be automatically opened on frames without source 
  info and on any frame when instruction stepping is enabled
- granularity of editors to open
  one for all or one per address space, etc.
  Disassembly editor needs to stick to a context depending on granularity
- Missing local toolbar needs a replacement
Comment 1 Anton Leherbauer CLA 2010-10-22 05:33:39 EDT
Created attachment 181482 [details]
Work in progress

This patch enables the disassembly "editor" and adds local toolbar support to it.
It is not integrated with source display yet, but this can be done pretty easily.
Comment 2 Anton Leherbauer CLA 2010-11-10 01:52:58 EST
I committed above patch to HEAD and cdt_7_0 to basically enable the editor.  I'll leave the integration with source display to another bug.
Comment 3 CDT Genie CLA 2010-11-10 02:23:02 EST
*** cdt cvs genie on behalf of aleherbau ***
Bug 326636 - [disassembly][source lookup] Enable disassembly view as &quot;editor&quot;

[*] DisassemblyEditor.java 1.3.2.1 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyEditor.java?root=Tools_Project&r1=1.3&r2=1.3.2.1
[*] DisassemblyView.java 1.4.2.1 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyView.java?root=Tools_Project&r1=1.4&r2=1.4.2.1
[*] DisassemblyPart.java 1.31.2.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java?root=Tools_Project&r1=1.31.2.2&r2=1.31.2.3

[*] AbstractDisassemblyAction.java 1.2.2.1 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AbstractDisassemblyAction.java?root=Tools_Project&r1=1.2&r2=1.2.2.1

[*] plugin.xml 1.20.2.1 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/plugin.xml?root=Tools_Project&r1=1.20&r2=1.20.2.1

[*] DisassemblyEditor.java 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyEditor.java?root=Tools_Project&r1=1.3&r2=1.4
[*] DisassemblyView.java 1.7 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyView.java?root=Tools_Project&r1=1.6&r2=1.7
[*] DisassemblyPart.java 1.35 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java?root=Tools_Project&r1=1.34&r2=1.35

[*] AbstractDisassemblyAction.java 1.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AbstractDisassemblyAction.java?root=Tools_Project&r1=1.2&r2=1.3

[*] plugin.xml 1.23 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/plugin.xml?root=Tools_Project&r1=1.22&r2=1.23
Comment 4 Marc Khouzam CLA 2010-11-11 10:21:29 EST
Is this fix plumbing only, or can I actually open the Disassembly Editor right now?  I'm curious to see how it feels.

Thanks
Comment 5 Anton Leherbauer CLA 2010-11-12 02:39:20 EST
(In reply to comment #4)
> Is this fix plumbing only, or can I actually open the Disassembly Editor right
> now?  I'm curious to see how it feels.

You cannot open it directly.  As a workaround, you could modify the extension point to associate it with a file name, e.g. "disassembly", then create a file with that name in a project and open it.  This should open the Disassembly editor.
Comment 6 Anton Leherbauer CLA 2010-11-12 04:35:26 EST
I just noticed that a few context menu actions don't enable, e.g. toggle breakpoints, run to line, etc.
Comment 7 Anton Leherbauer CLA 2010-11-12 04:57:19 EST
Created attachment 182974 [details]
Fix action enablement
Comment 8 Anton Leherbauer CLA 2010-11-12 05:03:50 EST
Committed last patch.
Comment 10 Marc Khouzam CLA 2010-11-18 19:37:18 EST
(In reply to comment #5)
> (In reply to comment #4)
> > Is this fix plumbing only, or can I actually open the Disassembly Editor right
> > now?  I'm curious to see how it feels.
> 
> You cannot open it directly.  As a workaround, you could modify the extension
> point to associate it with a file name, e.g. "disassembly", then create a file
> with that name in a project and open it.  This should open the Disassembly
> editor.

That worked great.  Thanks.
The editor looks great.  Exactly like the view.  What is advantage of using this instead?