test/support/run-ppc-elf
raw| 1 | #!/bin/sh |
| 2 | |
| 3 | if [ $# -ne 1 ]; then |
| 4 | echo "Usage: $0 obj" |
| 5 | exit 2 |
| 6 | fi |
| 7 | |
| 8 | obj=$1 |
| 9 | |
| 10 | # Generate the simple script |
| 11 | cat > gdb.run << EOF |
| 12 | # Load binary |
| 13 | target sim -e bug -r 0x400000 |
| 14 | load $obj |
| 15 | set confirm off |
| 16 | run |
| 17 | quit |
| 18 | EOF |
| 19 | |
| 20 | # Run gdb on it |
| 21 | powerpc-elf-gdb -n --batch --command=gdb.run $obj |
| 22 | rm -f gdb.run |
| 23 |