From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K0pgR-000794-OX for qemu-devel@nongnu.org; Mon, 26 May 2008 23:17:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K0pgP-000785-GH for qemu-devel@nongnu.org; Mon, 26 May 2008 23:17:07 -0400 Received: from [199.232.76.173] (port=50500 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K0pgP-000782-Ef for qemu-devel@nongnu.org; Mon, 26 May 2008 23:17:05 -0400 Received: from ti-out-0910.google.com ([209.85.142.187]:1554) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K0pgP-0003I0-B1 for qemu-devel@nongnu.org; Mon, 26 May 2008 23:17:05 -0400 Received: by ti-out-0910.google.com with SMTP id y6so1816367tia.18 for ; Mon, 26 May 2008 20:17:00 -0700 (PDT) Message-ID: Date: Tue, 27 May 2008 10:17:00 +0700 From: "Mulyadi Santosa" Subject: Re: [Qemu-devel] how to get registers value in event of systemcall In-Reply-To: <483AF801.2020806@slacky.it> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <483AF801.2020806@slacky.it> 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 Answering simply from my simple understanding of qemu... On Tue, May 27, 2008 at 12:48 AM, Antonio Ricci wrote: > Hi all, > i'd want to understand how to get registers value (eax, ebx, etc.) in the > guest operating system at the moment of a system call. In my opinion i've to > work on file target-i386/translate.c in the case of 0x80 in the function > disas_insn(DisasContext *s, target_ulong pc_start). I can't understand how > to get registers value. I've just read documentation about translation but > I'm not able to get these informations. I think you should go to target-i386/translate.c: gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb, int search_pc) specifically, in "env" there is "regs" which hold the CPU registers. target-i386/cpu.h contains the constants that show you the array structure of that "regs". Good luck.. regards, Mulyadi.