Skip to contentSkip to conversation

crash loadin bash after booting linux on a MPC860ADS

DISCUSSION Wolfgang Denk 1 participant 1 message May 17, 2000

lore
Share & tools
lore
#0 lore raw

In message <[email protected]>

Quoted 5 lines · Graham Stoney

By the way, do any other list members know of any references on the 'net that give some PowerPC-specific tips to decoding oops messages? If I can find something more applicable than Documentation/oops-tracing.txt, I'd like to include a link to it in the HOWTO.

Usually I'm using the little script attached below; it loads the kernel symbols from /LinuxPPC/usr/src/linux/System.map, or, if a file name argument is given, from that file.

Feed it the "Call backtrace" messages on stdin:

	-> /backtrace System.map
	Reading symbols from System.map
	C0745300 C003255C C002FDD4 C002FE78 C00361E8 C00AD924 C006BDC8
	C006C814 C006C95C C006C9E8 C006CF00 C00ADA8C C00AD41C C00AD7FC
	C00AC5A0 C00A87E0 C00A8878 C0002670 C00075F4

and you will get:

	0xc0745300 -- 0xc00aeae8 + 0x696818   skb_init
	0xc003255c -- 0xc00324e8 + 0x0074   wakeup_bdflush
	0xc002fdd4 -- 0xc002fdb8 + 0x001c   balance_dirty
	0xc002fe78 -- 0xc002fe58 + 0x0020   mark_buffer_dirty
	0xc00361e8 -- 0xc0035dc0 + 0x0428   block_write
	0xc00ad924 -- 0xc00ad8e0 + 0x0044   flush_window
	0xc006bdc8 -- 0xc006b930 + 0x0498   inflate_codes
	0xc006c814 -- 0xc006c184 + 0x0690   inflate_dynamic
	0xc006c95c -- 0xc006c84c + 0x0110   inflate_block
	0xc006c9e8 -- 0xc006c998 + 0x0050   inflate
	0xc006cf00 -- 0xc006cb3c + 0x03c4   gunzip
	0xc00ada8c -- 0xc00ad9e0 + 0x00ac   crd_load
	0xc00ad41c -- 0xc00ad2a8 + 0x0174   rd_load_image
	0xc00ad7fc -- 0xc00ad7dc + 0x0020   initrd_load
	0xc00ac5a0 -- 0xc00ac56c + 0x0034   partition_setup
	0xc00a87e0 -- 0xc00a87b0 + 0x0030   do_initcalls
	0xc00a8878 -- 0xc00a87fc + 0x007c   do_basic_setup
	0xc0002670 -- 0xc000265c + 0x0014   init
	0xc00075f4 -- 0xc00075c8 + 0x002c   kernel_thread

Not perfect, but better than nothing.

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] Life would be so much easier if we could just look at the source
code. -- Dave Olson

#!/usr/bin/perl -w

my $mapfile = shift || '/LinuxPPC/usr/src/linux/System.map';

print STDERR "Reading symbols from $mapfile\n";

#
# Read symbol table
#
open (MAP, $mapfile) or die "Can't open $mapfile: $!\n";

my $cnt = 0;

while (<MAP>) {
	chomp;
	my ($a,$t,$n) = split;
	$a = eval ('0x' . $a);
	if ($t =~ /^t$/i) {
		$addr[$cnt] = $a;
		$name[$cnt] = $n;
		++$cnt;
	}
}

close MAP;

my ($i, $n, $last);

#for ($i=0; $i<$cnt; ++$i) {
# printf "0x%08x %s\n", $addr[$i], $name[$i];
#}

#
# Now get backtrace info from stdin
#

while (<>) {
	chomp;
	my @a = split;
	my $aa;

	for ($i=0; $i<=$#a; ++$i) {
		$aa = eval ('0x' . $a[$i]);

		$last = -1;
		for ($n=0; $n<$cnt; ++$n) {
			if ($addr[$n] > $aa) {
				last;
			}
			$last = $n;
		}

		if ($last) {
			my $offset = $aa - $addr[$last];

			printf "0x%08x -- 0x%08x + 0x%04x   %s\n",
				$aa, $addr[$last], $offset, $name[$last];
		} else {
			printf "0x%08x -- unknown address\n", $i, $aa;
		}
	}
}