Change-Id: Ia2ed9ff5a2aaae477d55f35b87407e19636a1c5b
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+if [ $# -lt 1 ]; then
+ echo "usage $0 host:port"
+ echo " example: $0 localhost:1234"
+ exit 1
+fi
+remote=$1
+(
+ cat <<-EOF
+ set arch i386:x86-64
+ file sys/src/9/k10/9k8cpu.32bit
+ target remote $remote
+ set \$off = 0
+ EOF
+ for i in `seq 1 400`; do
+ #echo 'p/a *(void(**)())((long*)$sp+$off)'
+ echo 'info line **(void(**)())((long*)$sp+$off++)'
+ done
+ echo 'quit'
+) | gdb