#!/bin/sh addr=`cat .tmp1 | grep fglrx_dri | sed -e 's/^\(0x[0-9a-fA-F]\+\).*/\1/'` # 0x1983091 was found using valgrind by intercepting write to # what was identified to be indirect buffer mapped into userspace # this offset is heavily dependant on which fglrx version you # are using in this case amd-driver-installer-12-3-x86.x86_64.run or # amd-driver-installer-12-2-x86.x86_64.run (i dont remember ;)) addr=$(($addr + 0x1983091)) printf "break *0x%x\n" $addr > .tmp2 echo "commands" >> .tmp2 echo " set \$idx = 0" >> .tmp2 echo " while \$idx < \$ebx" >> .tmp2 echo " set \$off = \$idx / 4" >> .tmp2 echo ' printf "[%5d] [%5d] 0x%08x\n", $ibidx, $off, ((unsigned*)$rsi)[$off]' >> .tmp2 echo " set \$idx = \$idx + 4" >> .tmp2 echo " end" >> .tmp2 echo " set \$ibidx = \$ibidx + 1" >> .tmp2 echo " continue" >> .tmp2 echo "end" >> .tmp2