9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@coraid.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] 9pcf debugging
Date: Mon,  4 Feb 2008 14:45:41 -0500	[thread overview]
Message-ID: <0a2b6d495fb105e382687ea83c531041@coraid.com> (raw)
In-Reply-To: <45219fb00802040818v440cfee9q71e6ac585f07fb8e@mail.gmail.com>

> I've seen there is rdbfs for debugging the 9pc kernel through a serial port...
>
> The computer the driver fails on doesn't have a serial port. I'd like
> to the debug the ethernet driver, so I don't have ethernet. :)
>
> Any ideas, over the common lot-of-print() ?
>
> Thanks in advance.

yes.  we have a small embedded kernel with no user space. since
it's hard to find serial these days, serial didn't seem like the best
solution.  so we export the segments, stack and memory as aoe
targets.  this won't help in the very early phases of boot, and
requires a working ethernet driver.  but our example is about
250 lines of code.  with aoedbfs (/n/sources/contrib/quanstro/src/aoedbfs)
acid or db can be used to debug the target with acid or db.

with the plan 9 kernel, i think the right solution would be to
put the aoe debugger in 9load.  this would require the plan 9
kernel leaving  9load in core (wasting 8 mb or so) and having
a mechanism for passing control back to 9load. this mechanism
could replace doublefault() and be inserted into debugbpt
and (on the 386) fault386.

- erik

p.s. there's also a program called aoesnap in
/n/sources/contrib/quanstro/src that will take a snapshot
of a process exporting debugging via aoe.  there may be some
assumptions that are unique to our situation and the code is
somewhat convoluted due to the fact that we typically snapshot
processes using gigabytes of memory, so the image needs to be
streamed out rather than processed in a serial manner like
snap.  it also contains compatability goo so it compiles on
linux.


  parent reply	other threads:[~2008-02-04 19:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-04 16:18 Lluís Batlle
2008-02-04 16:43 ` ron minnich
2008-02-04 21:24   ` Martin Harriss
2008-02-04 19:45 ` erik quanstrom [this message]
2008-02-04 20:11   ` Lluís Batlle
2008-02-06 11:54     ` Kernel Panic

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=0a2b6d495fb105e382687ea83c531041@coraid.com \
    --to=quanstro@coraid.com \
    --cc=9fans@cse.psu.edu \
    /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;
as well as URLs for NNTP newsgroup(s).