Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Disassembly issues

On Wed, Apr 23, 2008 at 7:09 PM, John Cortell <john.cortell@xxxxxxxxxxxxx> wrote:
At 06:17 AM 4/22/2008, Mikhail Khodjaiants wrote:
Content-Class: urn:content-classes:message
Content-Type: multipart/alternative;
         boundary="----_=_NextPart_001_01C8A46A.753B0AE3"


Hi all,
 
To move forward with the new disassembly implementation I need your feedback on the following proposals and issues.
 
1. Management of disassembly/source editors and source lookup
 
The only way to open a disassembly editor window is to use the "Open Disassembly" action from the Debug view's context menu or from the "Source Not Found" editor.
 
Once the disassembly editor is opened for a disassembly context it becomes the default editor for all elements that expose the same debug context.
There are two options on how to manage the source editors in this case:
a. always try to open the source editor in background if the source file is available
b. do not try to open the source editor. In this case to open it user has to close the disassembly editor and double click on the corresponding stack frame.
In both cases we need to maintain the IP position in the source editor if it is open, which means that we can not use the default ISourceDisplay adapter provided by the platform :(
 

Mikhail, I'd like to suggest a third option. Introduce a context menu action in the new Disassembly editor labeled "Show source" (or something to that effect). The action would close the Disassembly editor and open the Source one. If that's not possible, I would go with (b), but honestly, I'm not crazy about either alternative.

What if I want to see both Disassembly code and source code together? I think showing only disassembly or source code is not good idea, at least it is not useful. For instance if I see such assembler instructions

20A1C7AE A1 A4 45 B8 3D      mov         eax,dword ptr [_mrc_cmd_adm+0E4h (3DB845A4h)]
20A1C7B3 89 45 F0                 mov         dword ptr [ebp-10h],eax
20A1C7B6 8B 0D A0 45 B8 3D mov         ecx,dword ptr [_mrc_cmd_adm+0E0h (3DB845A0h)]
20A1C7BC 89 4D EC               mov         dword ptr [ebp-14h],ecx

it is hard to understand what is going on here, but if I see source + assembler like this

int a1 = mrc_cmd_adm.subcommands[0].touch;
20A1C7AE A1 A4 45 B8 3D   mov         eax,dword ptr [_mrc_cmd_adm+0E4h (3DB845A4h)]
20A1C7B3 89 45 F0              mov         dword ptr [ebp-10h],eax
int a2 = mrc_cmd_adm.subcommands[0].point_touch;
20A1C7B6 8B 0D A0 45 B8 3D mov         ecx,dword ptr [_mrc_cmd_adm+0E0h (3DB845A0h)]
20A1C7BC 89 4D EC               mov         dword ptr [ebp-14h],ecx

everything is clear!

This is my opinion :) By the way can you tell me please Mikhail, where from I can get latest sources of existing  disassembler. 

--
Best regards,
Aram.

Back to the top