forked from ballaswag/guppyscreen
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdebug.sh
More file actions
executable file
·38 lines (30 loc) · 829 Bytes
/
debug.sh
File metadata and controls
executable file
·38 lines (30 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd -P)"
if [ "$TARGET" = "rpi" ]; then
export CROSS_COMPILE=armv8-rpi3-linux-gnueabihf-
else
export CROSS_COMPILE=mipsel-buildroot-linux-musl-
fi
cd $CURRENT_DIR
found=true
if [ ! -f debug/guppyscreen ]; then
echo "ERROR: Missing guppyscreen"
found=false
fi
if [ ! -f debug/guppyscreen.debug ]; then
echo "ERROR: Missing guppyscreen.debug"
found=false
fi
if [ ! -f debug/guppyscreen.core ]; then
echo "ERROR: Missing guppyscreen.core"
found=false
fi
if [ "$found" != "true" ]; then
exit 1
else
readelf -wk debug/guppyscreen > /dev/null
if [ $? -ne 0 ]; then
exit 1
fi
fi
docker run -ti -v $PWD:$PWD pellcorp/guppydev /bin/bash -c "cd $PWD && ${CROSS_COMPILE}gdb debug/guppyscreen -c debug/guppyscreen.core"