eeabrt.in 579B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/bash
  2. # Take a core dump and try to analyze it with ABRT
  3. . <(ffoom init)
  4. ffoo import core
  5. usage() {
  6. usage_is "exename"
  7. }
  8. while true;
  9. do
  10. case $1 in
  11. -d) FFOO_DEBUG=true ;;
  12. "") break ;;
  13. *) cmd=$1; shift; ;;
  14. esac
  15. done
  16. test -n "$cmd" || usage
  17. exe=$(which $cmd)
  18. cmp=$(rpm --queryformat "%{NAME}" -qf $exe)
  19. dirname=crash-$cmd
  20. debug -v exe cmp
  21. mkdir $dirname
  22. cp core.* $dirname/coredump
  23. cd $dirname
  24. # make ABRT feel like home
  25. date +%s > time
  26. echo CCpp > type
  27. echo $cmp > component
  28. echo $exe > executable
  29. abrt-action-analyze-ccpp-local