peter-bochs , a bochs gui debugger
Posted: Tue Nov 17, 2009 2:58 am
The Place to Start for Operating System Developers
https://f.osdev.org/
I didn't understand why it is Linux only if it is written in java ...
I think you should open a process token via OpenProcess and call SuspendThread/ResumeThread on its threads. See http://www.codeproject.com/KB/threads/pausep.aspx for more.mcheung63 wrote:Hi, In linux, i can send a command "kill -3" to pause bochs.
But In windows, there is not SIGINT can be send between process, so I don't know how to pause bochs
BTW, if I add to Bochs a button (similar to reset and others) which will break Bochs into command line debugger - will it be good enough to support Win32 as well ?mcheung63 wrote:Thanks ru2aqare , after suspend the bochs debugger, it is just suspended (without responding), but cannot make bochs debugger get back to the command line.
thanks
from Peter
Why not modify/patch Bochs so that it receives commands from a named pipe? That would be the most straightforward solution. Or shared memory.mcheung63 wrote:thanks for the concern. If you add a button, it will not help. My bochs gui create the bochs debugger process, sending the command through the pipeline. If I want to pause bochs, I create another process which is "killall -3 bochs", which will send SIGINT to bochs, then bochs paused.
In windows, there is no SIGINT, so I don't know how to pause bochs.
If you are willing to help, here is the solution: When I want to pause bochs, i place a file into the directory, if bochs debugger see this file exist, then pause itself and delete that file. sound stupid, but must work
thanks
from Peter
Agree 100%.Why not modify/patch Bochs so that it receives commands from a named pipe? That would be the most straightforward solution. Or shared memory.
To continuously check for the existence of a file would - in my opinion - be a waste of resources and CPU cycles.
What do you mean ?mcheung63 wrote:Stanislav, what part you are working with bochs?
That easy. Just few years of experience as x86 expert and CPU architect.I feel amazing , why you know all the mechanism of cpu and write an emulator.
This is that I do by writing emulator and answering questions here.Would you like to share this knowledge with us?
The problem that I personally almost not using the debugger. I am studying x86 architecture and software to make hardware CPUs better. That I need is instrumentation and only some small part of debugger. Also I hate doing GUIMy personally opinion for bochs team is : enhance the debugger, the biggest advantage of bochs is just because it has a debugger, I believe many people think like me.
Saw it. Although I think page table corruption is better to be debugged using memory access tracing.I added a memory search, see bottom http://code.google.com/p/peter-bochs/wiki/features
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.I feel amazing , why you know all the mechanism of cpu and write an emulator.
The gui just sending the debug command to bochs and capture the result. But very sadly it can't run in windowsstlw wrote:This is that I do by writing emulator and answering questions here.Would you like to share this knowledge with us?
The problem that I personally almost not using the debugger. I am studying x86 architecture and software to make hardware CPUs better. That I need is instrumentation and only some small part of debugger. Also I hate doing GUIMy personally opinion for bochs team is : enhance the debugger, the biggest advantage of bochs is just because it has a debugger, I believe many people think like me.
So I prefer somebody else to take this job from me ...
BTW, your debugger GUI looks amazing to me and I would like to support it from inside.
But I have no idea how it works (because it is external app which doesn't(?) talk with Bochs) and if you need anything inside Bochs to make your life easier.
For the memory search, it accepts string as the inputstlw wrote:
Bochs debugger could be extended significantly but we need people who will: a) use it b) report problems and ask for features c) take part in development.
Also, wouldn't you like to extend debugger to x86-64 ?
Saw it. Although I think page table corruption is better to be debugged using memory access tracing.I added a memory search, see bottom http://code.google.com/p/peter-bochs/wiki/features
The only usage for search in memory I see - searching for ACPI or MP table signature in memory. It could be more useful if you will search for something larger inside memory - a string for example.
Stanislav
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.
But 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
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)
> 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.