Date: Fri, 24 Feb 2006 00:00:25 +0530 From: "Pranav Sawargaonkar" <pranav.sawargaonkar@gmail.com> To: "bachi@te-clan.ch" <bachi@te-clan.ch> Cc: freebsd-hackers@freebsd.org Subject: Re: Saving register values Message-ID: <5007e1a40602231030k7e3f74f4u72657dba4da5975c@mail.gmail.com> In-Reply-To: <41209.193.134.254.115.1140701869.squirrel@webmail.te-clan.ch> References: <5007e1a40602230148g6b8e05ack781e9a70125dba8a@mail.gmail.com> <41209.193.134.254.115.1140701869.squirrel@webmail.te-clan.ch>
next in thread | previous in thread | raw e-mail | index | archive | help
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@te-clan.ch <bachi@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 > > > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5007e1a40602231030k7e3f74f4u72657dba4da5975c>