Hi Mulyadi, The problem that you are running into here is that sys_uname has been replaced by sys_newuname in kernel/sys.c. When I put a breakpoint in this function, everything works correctly when I run uname in the virtual machine. I'm not sure I exactly understand your concern that breakpoints could be missed. When you set the breakpoint, tb_invalidate_phys_page_range is called, invalidating the translation block block for the address where you are placing the breakpoint. At this point, the next time that the address is hit, translate.c:gen_intermediate_code will have to be called, and the breakpoint will be hit. Let me know if I've missed something here. Thanks, Andre On 1/1/06, Mulyadi Santosa wrote: > > Hello Andre... > > > Not a problem. I only started using qemu a month ago, so it took me a > > while to get oriented in the code and understand what was going on. I > > must say that I've been really impressed with qemu so far. > > There was an interesting case I had found recently. In Linux kernel for > i386 arch, you will see that sys_uname is placed to return kernel > version/name. Funny thing is, even if I use your patch (against qemu > 0.7.1) and I put a breakpoint at sys_uname and issue "uname" at bash > prompt, the Qemu VM doesn't stop. Can you kindly check it? > > NB: Please see target-i386/translate.c, there you will see lines like > these (around line 6306): > if (env->nb_breakpoints > 0) { > for(j = 0; j < env->nb_breakpoints; j++) { > if (env->breakpoints[j] == pc_ptr) { > gen_debug(dc, pc_ptr - dc->cs_base); > break; > } > } > } > What I understand from this code is, VM is stop if breakpoint address > matches with pc_ptr, which tb->pc and AFAIK that is the start address > of the translation block. So in other word, in some cases Qemu might > still miss the breakpoint (does it explain the sys_uname case?) Please > CMIIW > > regards > > Mulyadi > >