From: "Hanson, Jonathan M" <jonathan.m.hanson@intel.com>
To: <gdb@sources.redhat.com>
Subject: Accessing x86 general-purpose registers
Date: Mon, 18 Oct 2004 23:41:00 -0000 [thread overview]
Message-ID: <C863B68032DED14E8EBA9F71EB8FE4C20508B471@azsmsx406> (raw)
My question really isn't about GDB per se but I was hoping some
of the developers on this list would be able to help with what I'm
trying to do.
I have written a kernel module that, when triggered by an event,
dumps out the contents of memory and the architectural state of the
system to two files. The problem I'm running into is that the general
purpose registers (EAX, EBX, EIP, etc.) I'm storing are incorrect. To
investigate this problem I've downloaded the source to GDB and I've been
looking at how GDB accomplishes this.
In include/asm-i386/user.h is a structure called struct user
with a member struct user_pt_regs, which is where GDB gets the general
purpose register information for a program being debugged. I can see
nowhere else in the kernel where this structure is written to. How is
this information populated? Is there a way I can access this structure
from the kernel itself?
next reply other threads:[~2004-10-18 20:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-18 23:41 Hanson, Jonathan M [this message]
2004-10-19 2:23 ` Daniel Jacobowitz
2004-10-19 13:28 ` Michael Chastain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C863B68032DED14E8EBA9F71EB8FE4C20508B471@azsmsx406 \
--to=jonathan.m.hanson@intel.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox