[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] ksymoops-cris (was Re: system hang + kernel oops becauseof high usb load? (seems to be reproducable) (followup))



johan.adolfsson@xxxxxxx.2003 22:05 MET:
>Friedrich Lobenstock wrote:
>
>>The script tools/build/bin/ksymoops-cris seems to have a bug[...] 
> 
> ksymoops-cris is a rather fast hack that I found useful enough to add
> to the tools directory, the disassembly thing has worked for me though.
> 
> Doesn't make any difference for me, but try changing:
> STOPADDR=`perl -e ' printf("0x%08X\n", $ENV{PC}-1);'`
> STARTADDR2=`perl -e ' printf("0x%08X\n", $ENV{PC}+0);'`
> STOPADDR2=`perl -e ' printf("0x%08X\n", $ENV{PC}+16);'`
> to
> STOPADDR=`perl -e ' printf("0x%08X\n", hex($ENV{PC})-1);'`
> STARTADDR2=`perl -e ' printf("0x%08X\n", hex($ENV{PC})+0);'`
> STOPADDR2=`perl -e ' printf("0x%08X\n", hex($ENV{PC})+16);'`
> 
> note the added hex().

Ok, here's a small patch with the changes above and another
small change. Please apply to your CVS version so it's in the
next release.

It can also be found at ftp://ftp.fl.priv.at/pub/axis/devboard_82/patches/R1_91/

-- 
MfG / Regards
Friedrich Lobenstock
--- axis/devboard_82/tools/build/scripts/ksymoops-cris.org	2003-09-19 14:57:29.000000000 +0200
+++ axis/devboard_82/tools/build/scripts/ksymoops-cris	2003-12-17 17:41:41.000000000 +0100
@@ -24,11 +24,11 @@
 export PC
 echo "$PCRAW oops--PC--" >oopspc.tmp
 STARTADDR=`cat oopspc.tmp os/linux/System.map | sort | grep -B1 'oops--PC--' | head -1`
-echo "Ooops in function $STARTADDR"
+echo "Ooops in function $STARTADDR" | tee -a oops.out
 STARTADDR=`echo "$STARTADDR" | sed -e 's/\(........\) .*$/0x\1/'`
-STOPADDR=`perl -e ' printf("0x%08X\n", $ENV{PC}-1);'`
-STARTADDR2=`perl -e ' printf("0x%08X\n", $ENV{PC}+0);'`
-STOPADDR2=`perl -e ' printf("0x%08X\n", $ENV{PC}+16);'`
+STOPADDR=`perl -e ' printf("0x%08X\n", hex($ENV{PC})-1);'`
+STARTADDR2=`perl -e ' printf("0x%08X\n", hex($ENV{PC})+0);'`
+STOPADDR2=`perl -e ' printf("0x%08X\n", hex($ENV{PC})+16);'`
 discris -d -S -l --start-address=$STARTADDR --stop-address=$STOPADDR $VMLINUX | grep -v '.text.init' | tee -a oops.out
 echo "#### OOPS ####"  | tee -a oops.out
 discris -d -S -l --start-address=$STARTADDR2 --stop-address=$STOPADDR2 $VMLINUX | grep '      '  | tee -a oops.out