qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] how to get registers value in event of systemcall


From: Antonio Ricci
Subject: Re: [Qemu-devel] how to get registers value in event of systemcall
Date: Tue, 27 May 2008 20:33:19 +0200
User-agent: Thunderbird 2.0.0.4 (X11/20070604)

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: address@hidden
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








reply via email to

[Prev in Thread] Current Thread [Next in Thread]