Saving register values

Pranav Sawargaonkar pranav.sawargaonkar at gmail.com
Thu Feb 23 10:30:27 PST 2006


Thanks for reply.
Actually i want to save cpu registers values just before the time of
shutdown that is why i am asking question.So is it possible for me to do
that?and if possible how should approach for it?
Thanks in advance.



On 2/23/06, bachi at te-clan.ch <bachi at te-clan.ch> wrote:
>
> > I want to access cpu registers
> I don't know if this helps.
>
> [...]
> #include <ucontext.h>
> [...]
> ucontext_t ctx;
> getcontext(&ctx);
> printf("%#010x\n", ctx.uc_mcontext.mc_eax);
> [...]
>
> Look at /usr/include/ucontext.h
>
> greets
>
> Andreas
>
>
>
>


More information about the freebsd-hackers mailing list