https://github.com/torvalds/linux
Revision f1a745710f001e8c2eec6d525396083e1f4c389a authored by Linus Torvalds on 04 July 2009, 16:46:13 UTC, committed by Linus Torvalds on 04 July 2009, 16:46:13 UTC
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  sound: do not set DEVNAME for OSS devices
  ALSA: hda - Add sanity check in PCM open callback
  ALSA: hda - Call snd_pcm_lib_hw_rates() again after codec open callback
  ALSA: hda - Avoid invalid formats and rates with shared SPDIF
  ALSA: hda - Improve ASUS eeePC 1000 mixer
  ALSA: hda - Add GPIO1 control at muting with HP laptops
  ALSA: usx2y - reparent sound device
  ALSA: snd_usb_caiaq: reparent sound device
  sound: virtuoso: fix Xonar D1/DX silence after resume
  ASoC: Only disable pxa2xx-i2s clocks if we enabled them
  ALSA: hda - Add quirk for HP 6930p
  ALSA: hda - Add missing static to patch_ca0110()
  ASoC: OMAP: fix OMAP1510 broken PCM pointer callback
  ASoC: remove BROKEN from Efika and pcm030 fabric drivers
  ASoC: Fix typo in MPC5200 PSC AC97 driver Kconfig
2 parent s 29f3177 + 7ce1695
Raw File
Tip revision: f1a745710f001e8c2eec6d525396083e1f4c389a authored by Linus Torvalds on 04 July 2009, 16:46:13 UTC
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Tip revision: f1a7457
decodecode
#!/bin/sh
# Disassemble the Code: line in Linux oopses
# usage: decodecode < oops.file
#
# options: set env. variable AFLAGS=options to pass options to "as";
# e.g., to decode an i386 oops on an x86_64 system, use:
# AFLAGS=--32 decodecode < 386.oops

cleanup() {
	rm -f $T $T.s $T.o $T.oo $T.aa  $T.aaa
	exit 1
}

die() {
	echo "$@"
	exit 1
}

trap cleanup EXIT

T=`mktemp` || die "cannot create temp file"
code=

while read i ; do

case "$i" in
*Code:*)
	code=$i
	;;
esac

done

if [ -z "$code" ]; then
	rm $T
	exit
fi

echo $code
code=`echo $code | sed -e 's/.*Code: //'`

marker=`expr index "$code" "\<"`
if [ $marker -eq 0 ]; then
	marker=`expr index "$code" "\("`
fi

touch $T.oo
if [ $marker -ne 0 ]; then
	echo All code >> $T.oo
	echo ======== >> $T.oo
	beforemark=`echo "$code"`
	echo -n "	.byte 0x" > $T.s
	echo $beforemark | sed -e 's/ /,0x/g' | sed -e 's/<//g' | sed -e 's/>//g' >> $T.s
	as $AFLAGS -o $T.o $T.s &> /dev/null
	objdump -S $T.o | grep -v "/tmp" | grep -v "Disassembly" | grep -v "\.text" | grep -v "^$" &> $T.ooo
	cat $T.ooo >> $T.oo
	rm -f $T.o $T.s  $T.ooo

# and fix code at-and-after marker
	code=`echo "$code" | cut -c$((${marker} + 1))-`
fi
echo Code starting with the faulting instruction  > $T.aa
echo =========================================== >> $T.aa
code=`echo $code | sed -e 's/ [<(]/ /;s/[>)] / /;s/ /,0x/g'`
echo -n "	.byte 0x" > $T.s
echo $code >> $T.s
as $AFLAGS -o $T.o $T.s &> /dev/null
objdump -S $T.o | grep -v "Disassembly" | grep -v "/tmp" | grep -v "\.text" | grep -v "^$" &> $T.aaa
cat $T.aaa >> $T.aa

faultline=`cat $T.aaa | head -1 | cut -d":" -f2`

cat $T.oo | sed -e "s/\($faultline\)/\*\1     <-- trapping instruction/g"
echo
cat $T.aa
cleanup
back to top