From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K3aes-0004rh-A6 for qemu-devel@nongnu.org; Tue, 03 Jun 2008 13:50:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K3aeq-0004pQ-Db for qemu-devel@nongnu.org; Tue, 03 Jun 2008 13:50:53 -0400 Received: from [199.232.76.173] (port=40942 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K3aeq-0004p7-5I for qemu-devel@nongnu.org; Tue, 03 Jun 2008 13:50:52 -0400 Received: from aa012msr.fastwebnet.it ([85.18.95.72]:38063) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K3aep-0004av-Eq for qemu-devel@nongnu.org; Tue, 03 Jun 2008 13:50:51 -0400 Received: from [1.115.13.66] (1.115.13.66) by aa012msr.fastwebnet.it (8.0.013.5) id 483219C101CE2D2F for qemu-devel@nongnu.org; Tue, 3 Jun 2008 19:50:50 +0200 Message-ID: <48458448.5010908@slacky.it> Date: Tue, 03 Jun 2008 19:50:00 +0200 From: Antonio Ricci MIME-Version: 1.0 Subject: Re: [Qemu-devel] how to get registers value in event of systemcall References: <483AF801.2020806@slacky.it> <200805271435.30937.paul@codesourcery.com> In-Reply-To: <200805271435.30937.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 Hi Paul, thanks for your answer. I've tried to have registers value from do interrupt and it seems to work. I've some questions for you: 1) Where these values are initialized? I can't find it. 2) Have I to work on each type of do_interrupt (that is do_interrupt, do_interrupt_user, etc.) to get register's value in all kind of syscalls? 3) If i want to avoid the execution of some type of syscall based on parameters is it possible in this way? Thanks for your help -- Antonio My Mobile Phone: +393286739562 My Public Key: http://tonyr.altervista.org/chiave_pubblica MSN: ricciantonio@hotmail.it Skype: tonyr81fg Linux Member #374272 ********************************************************************* What is the difference between Jurassic Park and Microsoft? One is an over-rated high tech theme park based on prehistoric information and populated mostly by dinosaurs, the other is a Steven Spielberg movie. ********************************************************************* There are only 10 types of people in this world: those who understand binary, and those who don't. ********************************************************************* Paul Brook wrote: >>> 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. > > No, that won't work. Only a very limited subset of the CPU state is valid > during translation. The same block may be executed many times with different > inputs. If you want register values you have to do it at execution time, > e.g. in do_interrupt. > > Paul > > > >