summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-03-04 21:39:44 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-03-04 21:39:44 +0100
commit519c65f1e206ad18987219df8a98902235ffa484 (patch)
tree382d9ecac353be3a7bfdafd10c37b7e9f598d7b6
parent14167171aff17b9bc4b5531fffd3f729e12f8a59 (diff)
ci: fix gdbscript
-rw-r--r--.github/gdbscript.py16
-rw-r--r--.github/workflows/cmake.yml2
-rw-r--r--.github/workflows/gdbscript10
3 files changed, 17 insertions, 11 deletions
diff --git a/.github/gdbscript.py b/.github/gdbscript.py
new file mode 100644
index 00000000..198843e1
--- /dev/null
+++ b/.github/gdbscript.py
@@ -0,0 +1,16 @@
+def my_signal_handler (event):
+ if (isinstance(event, gdb.SignalEvent)):
+ gdb.execute("thread apply all bt")
+ gdb.execute("q 2")
+def my_exit_handler (event):
+ if isinstance(event, gdb.ExitedEvent):
+ if hasattr(event, 'exit_code'):
+ gdb.execute("q " + str(int(event.exit_code)))
+
+gdb.events.stop.connect(my_signal_handler)
+gdb.events.exited.connect(my_exit_handler)
+gdb.execute("set confirm off")
+gdb.execute("set pagination off")
+gdb.execute("set disable-randomization off")
+gdb.execute("r")
+gdb.execute("q 1")
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml
index 3dc84652..aa839763 100644
--- a/.github/workflows/cmake.yml
+++ b/.github/workflows/cmake.yml
@@ -59,7 +59,7 @@ jobs:
run: |
cd ${{github.workspace}}/build/install
export LD_LIBRARY_PATH="$PWD/lib" ASAN_OPTIONS="detect_leaks=0:abort_on_error=1"
- xvfb-run gdb -batch -x ../../.github/workflows/gdbscript bin/floormat-test </dev/null
+ xvfb-run gdb -q -batch -x ../../.github/gdbscript.py --args bin/floormat-test </dev/null
if: matrix.os == 'ubuntu-22.04'
# - name: Upload build
diff --git a/.github/workflows/gdbscript b/.github/workflows/gdbscript
deleted file mode 100644
index b5d161f6..00000000
--- a/.github/workflows/gdbscript
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env false
-
-set disable-randomization off
-catch throw
-run
-if $_isvoid ($_exitsignal)
- quit $_exitcode
-end
-bt -entry-values if-needed -full -frame-arguments all
-quit 1