Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Jim Paradis <paradis@linux01.hlo.dec.com>
To: axp-list@redhat.com
Subject: Re: Tracking *kernel* unaligned access
Date: Wed, 5 Aug 1998 11:32:44 -0400 (EDT)	[thread overview]
Message-ID: <199808051532.LAA14214@linux01.hlo.dec.com> (raw)
In-Reply-To: <Pine.LNX.3.96.980805000311.9942C-100000@earth.terran.org> from "B. James Phillippe" at Aug 5, 98 00:06:45 am

> 	Needless to say, the kernel is a bit different.  Can anyone point
> out a safe way to track these in a running kernel?

The old-fashioned way 8-)

Start by building a kernel.  

Generate a symbol listing for the kernel by issuing the command:

	% nm --numeric-sort vmlinux > vmlinux.map

in your top-level build tree.

Now boot your kernel.  When you get unaligned accesses, you will get
an "unaligned-access" message containing the PC of the offending
instruction.

The "vmlinux.map" file contains, among other things, the starting
addresses of every routine in the kernel.  It's thus a simple matter
to establish the routine where the offending instruction resides, and
the offset into that routine.

You can then go and disassemble the ".o" file containing that
routine to figure out exactly what in the routine is causing the
problem.

Working back from that to source code is an exercise left to the
reader 8-)

--
Jim Paradis (paradis@linux01.hlo.dec.com)     "The early bird gets the worm.
Compaq Computer Corporation		       If you want something else for
(508)841-3243				       breakfast, get up later."
http://www.tiac.net/users/jrp/index.html


  reply	other threads:[~1998-08-05 15:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-08-05  7:06 Tracking *kernel* unaligned access B. James Phillippe
1998-08-05 15:32 ` Jim Paradis [this message]
1998-08-08 20:25 ` Richard Henderson
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox