Issue: The outputs of bochs and bochsdbg are different

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
nbdd0121
Member
Member
Posts: 60
Joined: Thu Jul 25, 2013 8:10 am

Issue: The outputs of bochs and bochsdbg are different

Post by nbdd0121 »

I use memcpy and then display the copied data. In bochs, it works fine, but in bochsdbg(--enable-debugger), it outputs all zeros.
Image
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Issue: The outputs of bochs and bochsdbg are different

Post by Combuster »

I doubt that the debugger is the problem as the simulations run out of sync, which means you have other configuration/build differences as well.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
nbdd0121
Member
Member
Posts: 60
Joined: Thu Jul 25, 2013 8:10 am

Re: Issue: The outputs of bochs and bochsdbg are different

Post by nbdd0121 »

Combuster wrote:I doubt that the debugger is the problem as the simulations run out of sync, which means you have other configuration/build differences as well.
Sorry, I can't quitely understand your meaning of "run out of sync". And as for build, I use the same img file to run bochs. As for configuration, I use "--enable-smp" to compile "bochs", and use "--enable-smp --enable-debugger --enable-disasm" to compile "bochsdbg". I think the configuration should have no influence on output result.
stlw
Member
Member
Posts: 357
Joined: Fri Apr 04, 2008 6:43 am
Contact:

Re: Issue: The outputs of bochs and bochsdbg are different

Post by stlw »

nbdd0121 wrote:
Combuster wrote:I doubt that the debugger is the problem as the simulations run out of sync, which means you have other configuration/build differences as well.
Sorry, I can't quitely understand your meaning of "run out of sync". And as for build, I use the same img file to run bochs. As for configuration, I use "--enable-smp" to compile "bochs", and use "--enable-smp --enable-debugger --enable-disasm" to compile "bochsdbg". I think the configuration should have no influence on output result.
With SMP enabled it is not quite right. The debugger enabled Bochs version doesn't schedule the emulated cores the same as the version without debugger - especially if you run debugger enabled code with 'step N' command and not 'continue'. Also for example trace chaining optimization currently is not supported with debugger and it affects order of execution in SMP.
Post Reply