-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disassembly View: Milestone 2 #129762
Comments
@yuehuang010 Thanks for creating this. We can find all disassembly open issues by looking at what is linked from the test plan item here #129161 |
@isidorn Can you please help me to investigate how to fix an element from horizontally scrolling in a list? Thanks! |
@xisui-MSFT yes, but can you clarify, what is the actual issue? Elements should not automatically horizontally scroll as far as I know and there is no programatic way to control horizontal scrolling. |
@isidorn Yes. In the original PR we talked about changing the table to a list, to support horizontal scrolling. However, I wasn't able to find a way to fix the breakpoint column (or elements, since we don't have a column concept in list anymore) from scrolling horizontally. Original discussion: #125737 (comment) Also another question, we would like to implement show/hide source code function, so the source lines (zero or more) can be shown above the corresponding disassembly lines or hidden. I.e., switching between
and
I'm not sure we can do this easily using list? Also looked at trees, doesn't seem to be what we want since this is not a one-to-many map but more like a many-to-many one... It would be great if you could provide some suggestions. Thanks! |
|
Hi @isidorn, I am looking to adding Show Source Code. From the disassembly, it provides URI and line number. |
@yuehuang010 can you clarify? Do you have an |
@isidorn, here is the view in VS. The source code of cpp has is intereved between disassembly. The disassemble response contains "Source" information such as filepath, start/end line and column. The viewer needs to render the file content. It is like a simpler "peek" view. Showing "colorization" is an added benefit that is not required. A link to open the file should the user decide to make edits is possible. |
@yuehuang010 ok great, so you would handle the rendering in your table by having special elements that are actually representing the source lines, that way it would be inter-mingled. You will not have colorisation here easily. Context menu -> "Open Source in Editor" -> use the editor service to open the |
@isidorn, Is using NativeTextFileService nad TextModel the way to go? Or are there another way to open the file? |
@yuehuang010 you should just use the I hope that helps! |
Could we open the disassembly view in a new tab group to the right until this more involved solution is done? It's annoying having to drag it manually every time just to see both source code and assembly. Also another thought, when the source code is not available for whatever reason VS automatically shows the disassembly. |
Always opening the disassembly view On the Side might make sense. Let's see what @yuehuang010 and @xisui-MSFT think As for the second one (when source not available to automatically show), that sounds like a feature request. I suggest you file a new issue and then we can see to potentially add it in the future. I would not do this for starters, but only once we polish the current view much more. |
True if you step side-by-side it syncs properly as long as you stay in the same source file but doesn't jump to other files when you reach them. Also btw, I noticed when testing this with the C++ extension that a disassemble request is sent before I even switch to disassembly. Is this a bug on the vscode side? |
"disassemble called made when view is closed", Someone else mentioned it, I will look into it. soon. |
Currently it loads disassembly on pause debugging. We should probably add a focus check. |
A customer at CppCon has a few feature requests for Disassembly View:
|
@jureid We always show disassembly of the whole binary (load on scroll), and never a single function/file. |
+1 att is horrible. |
Is this something the C++ extension should handle? |
Yes. Disassembly flavor should be set by the debug adapter. |
Hello! I was wondering how hard it would be to get a working Disassembly view for other languages that can be debugged through GDB or LLDB? Basically we would like to get the Disassembly view working for the Ada language, but since the view is only available for C/C++ files, I can't get it work. Does someone have ideas on how could this work? Also, let me know if this discussion should occur on a separate issue, I can open one if needed! |
The disassembly support is not dependent on the language or even the debugger like gdb/lldb. Your debug adapters (interface between gdb/lldb and VSCode) have to support it and even they do not much care (in many instances) what language is being used. Not clear what debug adapter (or extension) you are using to debug your ADA program today...and this request would belong to that extension to support the protocols required by the VSCode disassembler (documented in the Debug Adapter Protocol). If you can debug via gdb/lldb however, then you can even use existing debuggers ( When you setup your launch.json for I can say this because I author a debug adapter extension that supports disassembly and any language is fine with us so long as we can debug with GDB. |
Thanks for this very detailed answer @haneefdm! Currently we are using the Native Debug extension to debug Ada code, which launches GDB basically. But when using it I don't get the 'Open disassembly view' contextual menu when debugging. I tried to use I will try again and keep you posted then! |
Yes, Native Debug will have to support disassembly. We originally forked from that several years ago, Note that the launch.json contents will be very different for cppdbg. Just follow instructions/examples for cppdbg as if you have a C++ program. cppdbg will not know the difference. |
So I have tried to use Any ideas of what could be wrong? I have attached my launch.json contents and a simple screenshot, if that helps. |
Can you get disassembly from gdb command line? If not neither can cpptools. It has to do with how you compiled (did you compile for debug and saving saving/debug info). You should file an issue with cpptools if gdb works but cpptools isn't giving you disassembly. Just for fun, try a larger program with at least a few thousand instructions. |
You can enable logging to see what commands are being sent to gdb, etc. But first, make sure your gdb is working. |
Yes, I can get disassembly from GDB's command line. Note that I am also able to get the Assembly view working in GNAT Studio (an IDE dedicated to Ada), with the same compiled executable (compiled with -g -O0) Attaching the whole GDB output: as you can see, the |
Any idea @haneefdm ? ;) |
You should approach the cpptools team for help. It appears they are doing the right thing but why you are seeing an empty Disassembly window, I cannot explain. https://github.com/microsoft/vscode-cpptools They may direct you to VSCode main repo |
Ok I will do that, thanks for your help ;) |
Can this scope also include a context menu which can be a contribution point for other extensions? ref: #171548 |
Use this to keep track of work for the next milestone.
Features:
Show/Hide/Rearrange ColumnsBugs from Test Disassembly View #129161
The text was updated successfully, but these errors were encountered: