summaryrefslogtreecommitdiff
path: root/bin/extra/gdbs
diff options
context:
space:
mode:
Diffstat (limited to 'bin/extra/gdbs')
-rwxr-xr-xbin/extra/gdbs14
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/extra/gdbs b/bin/extra/gdbs
new file mode 100755
index 0000000..e0fa371
--- /dev/null
+++ b/bin/extra/gdbs
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+gdbs="$HOME/.cache/gdbs"
+
+command="$@"
+if [ -z "$command" ]; then
+ [ -f ] && command="$(cat "$gdbs" 2>/dev/null)"
+ [ "$command" ] || exit 1
+fi
+
+gdbserver :4200 $command
+
+echo "$command" > "$gdbs"
+