-
Notifications
You must be signed in to change notification settings - Fork 93
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
Enhancements for Assembly Debugging. #127
Comments
Hi,
Under Settings->Configuration->Editor you can change the foreground and background text for the Assembly Tab. Just double-click on the color to bring up a color dialog. Make sure to save the configuration. |
Hi,
Would this help? Seer has a notion of a project file. While in the Debug dialog, you can create a project file. This will save all settings (name of program, debug mode, pre and post commands, etc....) in the Debug dialog to a file. Then the next time you run Seer, you can do:
Or use the "Load Project" icon in the Debug dialog to load the project. The file is a simple Json file that can be manually edited/created. |
This should be fixed now. For Run/Start, this only applies to the Run mode. Now, if they choose Attach, Connect, or Corefile, those buttons are hidden. If the Assembly Tab is shown, and on top, The Next, Step, and Finish buttons are hidden. The Nexti and Stepi are shown. |
I've changed the behavior to match other debuggers. Double clicking on a breakpoint (in the Source or Assembly tabs) will now deleted the breakpoint instead of disabling it. It can still be disabled via the RMB action. |
@kevinferrare A couple questions about this one.
SP is stack pointer. What is SS? There's lots I can do to visualize the stack. The first question is how to format it? Do you want a simple hexdump?
Or do you want to be able to toggle between format types (hex, integer, octal, etc.) Also, how much of the stack to visualize? I suspect some easy entry field to quickly change how much to show. And, of course, where to show the stack info. Perhaps in the "Stack Info" area as a new tab called "Stack". Each time the program is stopped (after a Nexti, Stopi, etc...), this view would get updated. |
Hello, thank you for the updates! I didn't know about the --project option or the save and it made life easier indeed! Maybe reloading previous project by default would be a good option for most users? Regarding the stack:
Since you are supporting various architectures, I guess that being able to specify an expression for the stack top, a direction, and the columns you want to display would already be very good :) |
I've made improvements for this. There are now register profiles. You can create profiles to show registers that are meaning full. And not show others. See task #198 |
For the stack viewer, it looks like this. @kevinferrare , if you're still around give it a try in the latest "main". Issue #249 covers this. |
I just gave it a try! The view is nice, and I really like that you can specify an expression instead of just a register or a fixed address, makes the stack move along with the code :) One thing that would be cool would be to have this "expression interpreter" available in other windows as well like memory, and maybe have it editable by making the label showing the expression a button? Also, I tried the "go to address" in the assembly window, but it wasn't working, the view didn't move. |
The MemoryVisualizer? You can type in an expression too, there. Same with the Logger and Tracker. Some windows expect the result of the expression to be an address (like the MemoryVisualizer) so you may need to prefix the expression with "&" But maybe I misunderstand when you say "other windows". |
I'll check this out. |
Was the address in your current view? Or was it outside the listed lines? For me it works when the address is in the current assembly lines shown. If it's before or after the current lines, then it doesn't work. Just need confirmation if that's the same for you. I can fix this and get a new window of assembly around the address you enter. |
What would be nice would be to have a default project file where seer would save the current settings and reload them from this file when no project file is specified from command line, this would be the most intuitive and user friendly I think |
I think this is possible. The default would be customizable for the user. It there is none, then the current Seer method would be used. As the the project is a file, the question is where to put the default project? Current directory? Home directory? ~/.config/seergdb ? |
Probably under ~/.config/seergdb, that would make the file survive the various recompilations 😄 |
I like the idea. I'll create a separate task for it. |
This is related to discussions from task #100
Thanks @kevinferrare for your great suggestions. I've close task #100 and opened this new task to continue the discussions and I'll update here with Seer fixes and features.
Here's the list of problems and suggestions.
As you said, would be nice to be able to request more bytes to expand the assembly view when scrolling down. May not give good results all the times as data can be mixed with ASM.
Making the PC field editable to jump directly to an address would be good, this is what I tried intuitively. Or maybe have a go to address button like in text editors where you can specify which line you want to go? (FIXED)
Would be nice if connectivity settings were saved after restarting seer, currently I have to go to the connect tab, input my connection string, and input the before and after commands each time I restart it. (FIXED)
Would be nice if assembly view was shown by default when there is no source code.
There are buttons that don't work (run, start, next, step, finish) in assembly mode, for a good reason, but it would be nice if they were hidden because this could be confusing. (FIXED)
Double clicking on an address creates a breakpoint but double clicking on the breakpoint disables it instead of deleting it, which is not how IDEs like eclipse, intellij, rider behave. Not sure if it's better this way or not but it surprised me a bit. (FIXED)
Would be nice to have some colors on the disassembly, gray on white is a bit hard for the eyes. (FIXED)
Was going to say that command "set disassembly-flavor intel" does not work, but there is an option in the settings so this is all good :) (FIXED :)
In a similar fashion, would be nice to be able to set the architecture maybe? Personally I have a "set architecture i8086" in my gdbinit, but if this was in a setting accessible via the UI, it would be more accessible to people.
There are too many registers in the register view, depending on the target some regs are not present. (FIXED)
Didn't find a way to visualize the stack. You can see it with the memory view of course, but it is not very convenient. Would be nice to have an array view where you could choose the top of the array via an expression (SS*16+SP in my case) and display it in whatever order is needed. For x86 stack, this would be in reverse order as each new push decrements ESP by 2, 4 or 8. (FIXED)
One thing that would be nice to have for tools debugging purposes would be to record the conversation between gdb and the stub for each command seer is outputting with timestamps. I am saying this because:
For reasons I didn't investigate, connection between seer and spice86 is very slow (I measured ~16 seconds) whereas it is instantaneous with the gdb command line.
As a gdbserver dev, I know this would have helped me a lot when investigating which command was not providing results gdb was expecting, or investigating timeouts and locks.
The text was updated successfully, but these errors were encountered: