23 lines
511 B
Bash
23 lines
511 B
Bash
#!/bin/bash
|
|
|
|
if [ -z "$1" ]; then
|
|
echo "Provide the program to debug as first argument"
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -x "$1" ]; then
|
|
echo "$1 is not an executable file"
|
|
exit 1
|
|
fi
|
|
|
|
echo "I will launch gdbtui soon. Use \"break *<entry-address>\" to debug the program."
|
|
echo "Use \"layout asm\" to use a more assembly friendly layout"
|
|
echo "Use \"si\" to single step each instruction"
|
|
echo ""
|
|
|
|
echo "$(readelf -h $1 | egrep "Entry point")"
|
|
read -p "Copy the above address and press any key to continue..."
|
|
|
|
gdbtui -q $1
|
|
|