For targets that are gdbarch_software_single_step_p (like MIPS), we need to use software single stepping when stepping over a watchpoint. The existing code that sets up software single step was in resume(). This patch factors the software single step code into a new function, set_for_singlestep(), and then calls it from handle_inferior_event() when we need to step over a watchpoint. This is a prerequisite for the following patch that adds MIPS hardware watchpoint support. Tested on x86_64-unknown-linux-gnu (Fedora 10) with no regressions found. OK to commit?