epasveer / seer

Seer - a gui frontend to gdb
GNU General Public License v3.0
2.11k stars 67 forks source link

Assembly mixed with source code #93

Closed Petross404 closed 1 year ago

Petross404 commented 1 year ago

Hi,

I found your project from Reddit and I like it very much. You wrote that you need feedback on other features as well, so I thought to give my 2 cents here.

Having a separate assembly tab is great. One can single step the assembly and inspect the code. But what if one could disassemble a single c/c++ statement?

Take for example kdbg (KDE debugger). You can disassemble a statement by clicking a + sign next to the number of the line. It takes some work to communicate this to gdb, read it's output and render it below the c statement, but it would be a nice addition.

Thank you for your time. Have fun and keep sharing your great work.

epasveer commented 1 year ago

Thanks for the suggestion! Keep them coming.

Yes, I've thought about that suggestion for the Assembly tab.

I've also looked at kdbg. It does it for all source files. Although I can do that, I think, at least initially, I can add a "show c/c++ code" option to the Assembly tab.

Gdb provides two methods for getting assembly and source code.

  1. Give me all assembly for a function, with source code intermixed.
  2. For a line of source code, give me the assembly.

Both require interrogation of the debug information in the executable. So it would slow things down (to some degree).

The method I'll look into for your suggestion is method 1.

Stay tuned :^)

Petross404 commented 1 year ago

Excellent news, let me know if I can help somehow.

epasveer commented 1 year ago

I implemented a source+assembly mode in the Assembly Tab. I'm not totally crazy about what I did. Let me know what you think.

Hit ^F to turn it on while in the Assembly Tab. Use Configuration->Settings->Assembly to set it permamently.

image

epasveer commented 1 year ago

A few more changes.

image

epasveer commented 1 year ago

I'm going to close this task. It can be reopened or a new task created.