*) skip_ "can't run gdb";;
esac
+break_src="$abs_top_builddir/src/tail.c"
+break_line=$(grep -n ^tail_forever_inotify "$break_src") || framework_failure_
+break_line=$(echo "$break_line" | cut -d: -f1) || framework_failure_
+
# See if gdb works and
-# tail_forever_inotify is compiled and not inlined
+# tail_forever_inotify is compiled and run
timeout 10s gdb -nx --batch-silent \
- --eval-command='break tail_forever_inotify' \
+ --eval-command="break $break_line" \
--eval-command='run -f file' \
--eval-command='quit' \
- tail < /dev/null > gdb.out 2>&1
+ tail < /dev/null > gdb.out 2>&1 || skip_ 'breakpoint not hit'
# FIXME: The above is seen to _intermittently_ fail with:
# warning: .dynamic section for "/lib/libc.so.6" is not at the expected address
# inotify initialization, and then continue. Before the fix,
# that just-appended line would never be output.
timeout 10s gdb -nx --batch-silent \
- --eval-command='break tail_forever_inotify' \
+ --eval-command="break $break_line" \
--eval-command='run -f file >> tail.out' \
- --eval-command="shell echo never-seen-with-tail-7.5 >> file" \
+ --eval-command='shell echo never-seen-with-tail-7.5 >> file' \
--eval-command='continue' \
--eval-command='quit' \
tail < /dev/null > /dev/null 2>&1 &