summaryrefslogtreecommitdiff
path: root/bin/extra/gdbs
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-11-29 19:17:54 +0100
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-11-29 19:17:54 +0100
commit0a8efa37e85ad3fc0b633d5e92198b09cd7fd555 (patch)
tree30001a3c2a2444f204b7f80e36fd93cc0b9c7ff8 /bin/extra/gdbs
parent3d6ee0856e4477378e8237f11f6f74eec9754488 (diff)
parent1c632029d7a02742b0cc740b6984ce139429b88b (diff)
Merge branch 'main' of db:dotfiles
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"
+