peter-bochs , a bochs gui debugger
Re: peter-bochs , a bochs gui debugger
I didn't understand why it is Linux only if it is written in java ...
Stanislav
Re: peter-bochs , a bochs gui debugger
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
But In windows, there is not SIGINT can be send between process, so I don't know how to pause bochs
Re: peter-bochs , a bochs gui debugger
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
Re: peter-bochs , a bochs gui debugger
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
thanks
from Peter
Re: peter-bochs , a bochs gui debugger
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
The button called PAUSE could just PAUSE for case internal debugger isn't enabled (similar to effect CONFIG button pressed but with no dialogs opened) and break to debugger command line if it exists.
Stanislav
Re: peter-bochs , a bochs gui debugger
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
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
Re: peter-bochs , a bochs gui debugger
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
To continuously check for the existence of a file would - in my opinion - be a waste of resources and CPU cycles.
Re: peter-bochs , a bochs gui debugger
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.
I think the right way of dealing with Bochs should be through named pipe/socket using some protocol.
Ideal way of doing GUI for Bochs is RFB GUI - Bochs connecting with display viewer (VNC) through socket. Idea way of doing debugger is also placing Bochs in external binary and connect with Bochs using some "bochs debugger" protocol. This way anyone could develop any GUI for Bochs debugger using his favorite language - even for money.
The problem that I don't write any external debugger for Bochs so I am not a person to define such protocol.
And nobody else seems to be interested
Stanislav
Re: peter-bochs , a bochs gui debugger
Stanislav, what part you are working with bochs?
Re: peter-bochs , a bochs gui debugger
What do you mean ?mcheung63 wrote:Stanislav, what part you are working with bochs?
Me and Volker are currently only developers in Bochs.
I do CPU and debugger and Volker all the rest
I still hope somebody will join us and take some part ...
Stanislav
Re: peter-bochs , a bochs gui debugger
I feel amazing , why you know all the mechanism of cpu and write an emulator. Would you like to share this knowledge with us?
My 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.
I added a memory search, see bottom http://code.google.com/p/peter-bochs/wiki/features
My 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.
I added a memory search, see bottom http://code.google.com/p/peter-bochs/wiki/features
Re: peter-bochs , a bochs gui debugger
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.
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.
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
Re: peter-bochs , a bochs gui debugger
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
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)
Some questions:
1) what debug command I get get DR0-DR7 ?
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.
thanks
from Peter
Re: peter-bochs , a bochs gui debugger
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.
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
SIGINT is the only way you could talk with running Bochs window ? I thought you could send keys into it as well.
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.
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++ ?
> 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 ...
Stanislav