diff options
-rwxr-xr-x | fglrx-gen-breakpoint-shader.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fglrx-gen-breakpoint-shader.sh b/fglrx-gen-breakpoint-shader.sh new file mode 100755 index 0000000..8c525ab --- /dev/null +++ b/fglrx-gen-breakpoint-shader.sh @@ -0,0 +1,18 @@ +#!/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 ;)) +shaddr=$(($addr + 0xf83668)) +printf "break *0x%x\n" $shaddr > .tmp2 +echo "commands" >> .tmp2 +echo " set \$idx = 0" >> .tmp2 +echo " while \$idx < \$edx" >> .tmp2 +echo " set \$off = \$idx / 4" >> .tmp2 +echo ' printf "shader[%5d] 0x%08x\n", $off, ((unsigned*)$rsi)[$off]' >> .tmp2 +echo " set \$idx = \$idx + 4" >> .tmp2 +echo " end" >> .tmp2 +echo " continue" >> .tmp2 +echo "end" >> .tmp2 |