Ben gnu'su kullanarak tek dosya callgraph oluşturmak başardı - cflow ama cflow kullanarak birden fazla dosya için çağrı grafik oluşturmak için öğrenmek mümkün değildi. GNU Cflow'a giriş olarak birden fazla c dosyası nasıl verilir?
Icflow test.c merhaba.c
Bu hello.c
cflow testi için oluşturma test.c için callgraph oluşturur ve aşağıdaki çalıştı. c hello.c
Bu, hello.c için callgraph'ı üretir ve test.c için oluşturmaz.
Ben cflow birden fazla dosya aktarmak nasıl bilmiyorum.
bu konuda herhangi bir fikir?
merhaba.c
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;}
hello.c ve test.c'nin içeriğini kaydeder misiniz? –
@AndreasGrapentin kodunu ekledim. Sadece birden çok dosya adını cflow'a nasıl geçireceğimi bilmiyorum. – Ganeshkumar
ikinci çağrınız doğru. 'test()', aramanızın içinde görünmez, çünkü asla çağrılmaz. –