Page 1 of 1

Issue: The outputs of bochs and bochsdbg are different

Posted: Fri Aug 23, 2013 9:00 pm
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

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

Posted: Sat Aug 24, 2013 4:14 am
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.

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

Posted: Sat Aug 24, 2013 6:33 am
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.

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

Posted: Sat Aug 24, 2013 1:37 pm
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.