小编gra*_*cha的帖子

如何提供多个c文件作为GNU Cflow的输入?

我能够使用gnu-cflow生成一个文件的调用图,但我无法找到如何使用cflow为多个文件生成调用图.

我试过跟随

  • cflow test.c,hello.c

    它为test.c生成调用图,而不是为hello.c创建调用图

  • cflow test.c hello.c

    它为hello.c生成调用图,而不是为test.c创建调用图

我不知道如何将多个文件传递给cflow.

对此有何想法?

你好ç

int
 who_am_i (void)
 {
     struct passwd *pw;
     char *user = NULL;

     pw = getpwuid (geteuid ());
     if (pw)
     user = pw->pw_name;
     else if ((user = getenv ("USER")) == NULL)
     {
         fprintf (stderr, "I don't know!\n");
         return 1;
     }
     printf ("%s\n", user);
     unused_function();
     return 0;
 }

 int
 main (int argc, char **argv)
 {
     if (argc > 1)
     {
         fprintf (stderr, "usage: whoami\n");
         return 1;
     }
     return who_am_i ();
 } …
Run Code Online (Sandbox Code Playgroud)

c linux gnu call-graph cflow

6
推荐指数
1
解决办法
2815
查看次数

标签 统计

c ×1

call-graph ×1

cflow ×1

gnu ×1

linux ×1