# HG changeset patch # User Masatake YAMATO # Date 1113113971 0 # Node ID 6dfecf2a19abddc456ea93f2ca866645ea098128 # Parent ad05d91d35984744802f7b32fd89c646863ea17b * compilation.txt (symbol): Added gcov-file gcov-bb-file gcov-never-called-line gcov-called-line . * progmodes/compile.el (compilation-error-regexp-alist-alist): Add regexp for gcov. diff -r ad05d91d3598 -r 6dfecf2a19ab etc/ChangeLog --- a/etc/ChangeLog Sun Apr 10 04:20:14 2005 +0000 +++ b/etc/ChangeLog Sun Apr 10 06:19:31 2005 +0000 @@ -1,3 +1,8 @@ +2005-04-10 Masatake YAMATO + + * compilation.txt (symbol): Added gcov-file + gcov-bb-file gcov-never-called-line gcov-called-line . + 2005-04-08 Kenichi Handa * TUTORIAL.ja: Updated header, contents synchronized with diff -r ad05d91d3598 -r 6dfecf2a19ab etc/compilation.txt --- a/etc/compilation.txt Sun Apr 10 04:20:14 2005 +0000 +++ b/etc/compilation.txt Sun Apr 10 06:19:31 2005 +0000 @@ -341,6 +341,32 @@ bloofle defined( /users/wolfgang/foo.c(4) ), but never used +* GCOV (test coverage program) + +symbol: gcov-file gcov-bb-file gcov-never-called-line gcov-called-line + + -: 0:Source:foo.c + -: 0:Object:foo.bb + -: 1:/* $ gcc -fprofile-arcs -ftest-coverage foo.c + -: 2: $ ./a.out + -: 3: $ gcov foo.c + -: 4: LANG=C gcov foo.c + -: 5: 62.50% of 8 lines executed in file foo.c + -: 6: Creating foo.c.gcov.*/ + -: 7:int + -: 8:main(int argc, char ** argv) + 1: 9:{ + 1: 10: int r; + 1: 11: if (argc == 1) + 1: 12: r = 1; + #####: 13: else if (argc == 2) + #####: 14: r = 2; + -: 15: else + #####: 16: r = 0; + 1: 17: return r; + -: 18:} + + * Directory tracking Directories are matched via `compilation-directory-matcher'. Files which are diff -r ad05d91d3598 -r 6dfecf2a19ab lisp/ChangeLog --- a/lisp/ChangeLog Sun Apr 10 04:20:14 2005 +0000 +++ b/lisp/ChangeLog Sun Apr 10 06:19:31 2005 +0000 @@ -1,3 +1,8 @@ +2005-04-10 Masatake YAMATO + + * progmodes/compile.el (compilation-error-regexp-alist-alist): Add + regexp for gcov. + 2005-04-06 Katsumi Yamaoka * calendar/time-date.el (time-to-seconds): Don't use the #xhhhh diff -r ad05d91d3598 -r 6dfecf2a19ab lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Sun Apr 10 04:20:14 2005 +0000 +++ b/lisp/progmodes/compile.el Sun Apr 10 06:19:31 2005 +0000 @@ -280,7 +280,18 @@ (4bsd "\\(?:^\\|:: \\|\\S ( \\)\\(/[^ \n\t()]+\\)(\\([0-9]+\\))\ -\\(?:: \\(warning:\\)?\\|$\\| ),\\)" 1 2 nil (3))) +\\(?:: \\(warning:\\)?\\|$\\| ),\\)" 1 2 nil (3)) + + (gcov-file + "^ +-: \\(0\\):Source:\\(.+\\)$" 2 1 nil 0) + (gcov-bb-file + "^ +-: \\(0\\):Object:\\(?:.+\\)$" nil 1 nil 0) + (gcov-never-called-line + "^ +\\(#####\\): +\\([0-9]+\\):.+$" nil 2 nil 2 nil + (1 compilation-error-face)) + (gcov-called-line + "^ +[-0-9]+: +\\([1-9]\\|[0-9]\\{2,\\}\\):.*$" nil 1 nil 0) +) "Alist of values for `compilation-error-regexp-alist'.") (defcustom compilation-error-regexp-alist @@ -1846,6 +1857,9 @@ ;; don't use a marker. --Stef (if (> pos (point-min)) (copy-marker (1- pos)) pos)))) +;;;###autoload +(add-to-list 'auto-mode-alist '("\\.gcov\\'" . compilation-mode)) + (provide 'compile) ;; arch-tag: 12465727-7382-4f72-b234-79855a00dd8c