Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Using disassembly editor instead of the Source Editor Not Found editor

Hi Marc,

I've been wanting that for a while! I think the best would be to keep the top part "No source available for ..." then show the disassembly in the rest of the space. In fact, for cases where there are symbols but no source found, it could do the same thing and show the current buttons for Editing the source lookup but still show the disassembly below. Just some ideas!

Regards,
Marc-Andre


From: cdt-dev-bounces@xxxxxxxxxxx [cdt-dev-bounces@xxxxxxxxxxx] on behalf of Marc M [h4xx0rz@xxxxxxxxxx]
Sent: Tuesday, 23 February 2016 5:38 PM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Using disassembly editor instead of the Source Editor Not Found editor

Hi there,
When attaching to a process without having any source code, it shows the "No source available" editor. This can lead to a situation where only the "View Disassembly" button is visible:

In that case, it seems it would make more sense to use the Disassembly Editor instead of the Disassembly View. Also, if there is only one option for the user "View Disassembly", why not show directly the disassembly editor without clicking on a button first?
That way, if the user clicks on a method in the debug view, the disassembly editor is shown directly.

I have implemented this in DsfSourceDisplayAdapter like
private SourceLookupResult performLookup() {
....
            if (sourceElement == null) {
            if (fFrameData.fFile == null || fFrameData.fFile.isEmpty()) {
editorInput = DisassemblyEditorInput.PENDING_EDITOR_INPUT;
editorId = IDsfDebugUIConstants.DISASSEMBLY_EDITOR_ID;
            } else {
editorInput = new CSourceNotFoundEditorInput(new CSourceNotFoundElement(dmc, fSourceLookup.getLaunchConfiguration(), fFrameData.fFile));
editorId = ICDebugUIConstants.CSOURCENOTFOUND_EDITOR_ID;
            }



The editor is only shown in case no file is in the frame data, so the user couldn't attach source anyway.
I am planning to prepare a pull request.
Do you want to have a option to get the previous behaviour back? If yes, which should be the default?

Best regards,
Marc

Back to the top