>>qemu-0.9.0 ...
>>emulating Debian 2.6.18-4-qemu mipsel ...
>>errs when gdb 6.4.90-debian (running on the emulated mipsel)
>>single-steps the user-mode instruction ...

> This looks like another instance of "Qemu/MIPS doesn't handle
> self-modifying code correctly" (the break instructions inserted
> by gdb are exactly this).

No, the usage by gdb does *not* qualify as "self-modifying code."
gdb uses the system call ptrace(PTRACE_POKETEXT, pid, addr, data)
to have the emulated operating system kernel itself modify the memory
of the child process.  Nobody has to guess or to "snoop" the memory
bus in order to discover that the instruction stream is being modified.
Instead, there is direct notification of what is happening.  If nothing
else, then under CONFIG_QEMU the implementation of sys_ptrace()
must notify the emulator to flush the appropriate translations.

-- 
John Reiser, [EMAIL PROTECTED]


Reply via email to