[Top][All Lists]
[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: |
Paul Brook |
Subject: |
Re: [Qemu-devel] how to get registers value in event of systemcall |
Date: |
Tue, 27 May 2008 14:35:30 +0100 |
User-agent: |
KMail/1.9.9 |
> > 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