如何提供多个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 ();
 }
 void unused_function()
 {
     printf();
     error1();
     printf();
 }
 void error1()
 {
     error2();
 }
 void error2()
 {

 }

test.c的

int tests()
{ return 0;}
最佳答案
> cflow test.c hello.c

实际上上面的语句是正确的,并且tests()没有出现在callgraph中,因为它从未被调用过.

@AndreasGrapentin给出了答案

相关文章

linux常用进程通信方式包括管道(pipe)、有名管道(FIFO)、...
Linux性能观测工具按类别可分为系统级别和进程级别,系统级别...
本文详细介绍了curl命令基础和高级用法,包括跳过https的证书...
本文包含作者工作中常用到的一些命令,用于诊断网络、磁盘占满...
linux的平均负载表示运行态和就绪态及不可中断状态(正在io)的...
CPU上下文频繁切换会导致系统性能下降,切换分为进程切换、线...