public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Dan Noé" <dpn@isomerica.net>
To: Adrian Sud <pigsflew2008@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Parsing Structures postmortem from memory dump
Date: Tue, 06 May 2008 18:37:20 -0400	[thread overview]
Message-ID: <4820DDA0.1030100@isomerica.net> (raw)
In-Reply-To: <4820ABA5.3020705@gmail.com>

Adrian Sud wrote:
> I've looked at /include/linux/sched.h and tried to understand the 
> task_struct structure, but it appears to be variable-length, determined 
> at compile time, and I can't tell exactly how these are stored 
> throughout memory--In a list? a tree?

The task_struct structures are stored on one or more lists.  Note the 
list_head types within the structure - each of this is a list that the 
structure is (potentially) a member of.

This is a good explanation of how the kernel's lists work:

http://kernelnewbies.org/FAQ/LinkedLists

I don't know if a generalized printer/parser exists for the kernel 
linked list, but this might be a good way to start exploring your 
project.  There are macros to traverse the lists easily, so it shouldn't 
be too difficult.

Hope that helps.

Cheers,
Dan

-- 
                     /--------------- - -  -  -   -   -
                     |  Dan Noé
                     |  http://isomerica.net/~dpn/

      reply	other threads:[~2008-05-06 22:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-06 19:04 Parsing Structures postmortem from memory dump Adrian Sud
2008-05-06 22:37 ` Dan Noé [this message]

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=4820DDA0.1030100@isomerica.net \
    --to=dpn@isomerica.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pigsflew2008@gmail.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