goal : single step trace in C-source-code-level using bochs
Steps:
1) press the "open" button to open your a.out elf file
2) the debugger will detect how many .c file is in that a.out
3) display all the .c files in bochs gui debugger
4) type in the physical address of the executable startup address (although the ELF have the startup address, but it is a virutal address, and bochs cannot set a virutal address breakpoint, so you have to enter the physical address)
5) double click on the source to set the breakpoint, because you have entered the physical address, so I can use that address plus the offset to calculate the actual breakpoint address.
6) everything done, press the "run" button, bochs will pause if the breakpoint is hit.
Is it good enough for OS developer to debug their ELF kernel/app? I think no, so please tell me your idea.
thanks
from Peter
proposal for bochs gui debugger
Re: proposal for bochs gui debugger
Doesn't BOCHS support GDB debugging? You can connect it to your favorite GUI.
I use QEMU myself at the moment with Eclipse to debug. As a bonus it's all running on my Mac OSX laptop
Mark
I use QEMU myself at the moment with Eclipse to debug. As a bonus it's all running on my Mac OSX laptop
Mark
Re: proposal for bochs gui debugger
Hi Mark. Is QEMU has a debugger? What do you mean by using your eclipse to debug your os?
I think I have these advantages:
1) GDB with bochs is not flexible, it assume my ELF is loaded at somewhere
2) I want to make a GUI that very fit to debug my OS
I think I have these advantages:
1) GDB with bochs is not flexible, it assume my ELF is loaded at somewhere
2) I want to make a GUI that very fit to debug my OS
Re: proposal for bochs gui debugger
I am not sure what you mean with that. You start GDB giving it the name of your binary, and you can't debug what isn't in memory, so how is that "not flexible"?mcheung63 wrote:1) GDB with bochs is not flexible, it assume my ELF is loaded at somewhere
There are several GUIs for GDB available, DDD being just one of them.2) I want to make a GUI that very fit to debug my OS
Every good solution is obvious once you've found it.
Re: proposal for bochs gui debugger
Hi Solar, cool, thanks
Re: proposal for bochs gui debugger
QEMU is the emulator that can emulate platforms other than x86. I'm using it for ARM coding. It has the ability to load an ELF kernel.
Re: proposal for bochs gui debugger
ok, can dump the line number now, look at the upper-right panel.