Re: peter-bochs , a bochs gui debugger
Posted: Sat Nov 21, 2009 11:31 am
Too goodstlw wrote:No, I don't have in-circuit-emulator of Intel CPU, if I am not sure how things should behave usually I test it on real hardware.This is very impossible. It is really really hard to know all the behaviour of intel CPU. I guess, you have a in-circuit-emulator, during the development of bochs, when you are not sure how cpu behaviour, you just use your ICE to emulate it. Am I right? If you are american, you should able to get a high paid job in Intel.stlw wrote: That easy. Just few years of experience as x86 expert and CPU architect.
And yes, I work for Intel already
There are not so many companies where I could do x86 or cpu architecture.
In windows, when the bochs is running, whatever key i send to it, it don't pauseBut if you know to send commands - you probably could send Ctrl-C as well, no ?The gui just sending the debug command to bochs and capture the result. But very sadly it can't run in windows
SIGINT is the only way you could talk with running Bochs window ? I thought you could send keys into it as well.
Yes, the second. Record the register/GDT/whatever on every jmp/call/interrupt/task-switch is a great feature for operating system developer, especially for the os dev beginner.What is back trace ?Yes, I will make it support x86-64. These feature i want to implement too
1) back trace (need to add some code to bochs's source)
2) c/c++ level single step trace (don't know how to make it)
Ability to "undo" every instruction or just ability to print X last instuctions occured ?
If second - probably I need to implement hardware CPU LBR feature (record last 16 branches occured in MSRs) and so you could read them in debugger and generate your backtrace offline.
Few years ago, my os will failure after running a whole night, I spent totally one month to trace this problem. This feature would save me.
Almost os developer write their os in c/c++, single step trace in assembly level may not too helpful. That's why we need this feature.
And what is c/c++ level single step trace ? How do you know which ask instructions correspond to single c/c++ line ?
And what about software not written in C/C++ ?
I see, thanks. What debugging command I can know x86-64 is compiled in bochs?> dregSome questions:
1) what debug command I get get DR0-DR7 ?
This is not difference between linux and windows - this is difference between x86-64 enabled and disabled.2) In linux , when i type in "r" , it will show eax. But in windows, it will show rax. Also, the output format is different. In windows, one line show two registers, but in linux, one line per register.
If x86-64 not compiled in Bochs looks slightly different as you could see ...
Just discovered tonight, the disassembly commands cannot disassemble from a physical address or virtual address
Stanislav