From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I9TXX-0001t9-Ji for qemu-devel@nongnu.org; Fri, 13 Jul 2007 18:23:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I9TXV-0001ms-Sj for qemu-devel@nongnu.org; Fri, 13 Jul 2007 18:23:07 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I9TXV-0001me-Mu for qemu-devel@nongnu.org; Fri, 13 Jul 2007 18:23:05 -0400 Received: from ug-out-1314.google.com ([66.249.92.171]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I9TXV-0008EF-65 for qemu-devel@nongnu.org; Fri, 13 Jul 2007 18:23:05 -0400 Received: by ug-out-1314.google.com with SMTP id m2so662849uge for ; Fri, 13 Jul 2007 15:23:04 -0700 (PDT) Message-ID: Date: Sat, 14 Jul 2007 00:23:03 +0200 From: "andrzej zaborowski" Subject: Re: [Qemu-devel] address translation In-Reply-To: <12835c8f0707131517t72febf40h27326ab67d5b32f3@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <12835c8f0707121729y29d1a678qf27d29b0ca572f08@mail.gmail.com> <12835c8f0707131517t72febf40h27326ab67d5b32f3@mail.gmail.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On 14/07/07, Shashidhar Mysore wrote: > Thanks for the reply, Andrzej! > > Some clarifications below ... > > On 7/13/07, andrzej zaborowski wrote: > > > > > > ************************************************ > > > /* convert one instruction. s->is_jmp is set if the translation must > > > be stopped. Return the next pc value */ > > > static target_ulong disas_insn(DisasContext *s, target_ulong pc_start) > > > { > > > int b, prefixes, aflag, dflag; > > > int shift, ot; > > > int modrm, reg, rm, mod, reg_addr, op, opreg, offset_addr, val; > > > target_ulong next_eip, tval; > > > int rex_w, rex_r; > > > > > > s->pc = pc_start; // This s->pc is what I am using to extract all > > > executed PC values > > > > This s->pc doesn't correspond to executed PC values, qemu is a translator. > > Can you tell me what s->pc is, in this context? Is the the start PC of a It is the PC of the disassembled instruction (hence disasm_insn). > basic block that is about to be executed? Is there any way in which I could > extract the trace of executed PCs in QEMU? Yes, there was a thread about this about two months ago. Regards