File: attach_gdb.sh

package info (click to toggle)
readsb 3.16-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,144 kB
  • sloc: ansic: 33,749; sh: 261; makefile: 203; python: 9
file content (15 lines) | stat: -rwxr-xr-x 402 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
if [[ -d /opt/rh/devtoolset-9 ]]; then
    source scl_source enable devtoolset-9
fi
while true; do
    date -u
    date
    sleep 5 &
    gdb --pid "$(pgrep -f readsb)" \
        -ex 'handle SIGTERM nostop print pass' \
        -ex 'handle SIGINT nostop print pass' \
        -ex 'handle SIGCONT nostop print pass' \
        -batch -ex continue -ex 'bt full'
    wait
done  >> gdb.log 2>&1