|
From: | Andre Pech |
Subject: | Re: Re: [Qemu-devel] [PATCH] Fix to gdb - wrong translation block invalidated when setting gdb breakpoints |
Date: | Tue, 3 Jan 2006 12:12:22 -0800 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |