bug-cflow
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-cflow] clow - surpressing function references from graph


From: Minev, Risto
Subject: [bug-cflow] clow - surpressing function references from graph
Date: Fri, 8 Feb 2013 09:03:39 +0000

Hi there,

I just put my hands on clow trying a very simple C example to generate a 
call-graph.

What surprises me is that clow is displaying references to functions as 
function calls?!

See my example below:

/* 
 * file: main.c
 */
void set_phw(void);
void hw(void);
extern void(*phw)(void);

int main(void)
{
    set_phw();
    (*phw)();
    hw();

    return 0;
}

/*
 * file hw.c
 */
#include <stdio.h>

void (*phw)(void);

void hw(void)
{
    printf ("Hello World!\n");
}

void set_phw(void)
{
    phw = hw;
}

[bash] address@hidden:/home/swamc1/test> cflow main.c hw.c
main() <int main (void) at main.c:8>:
    set_phw() <void set_phw (void) at hw.c:13>:
        hw() <void hw (void) at hw.c:8>:             <---- this function call 
does not occur
            printf()
    hw() <void hw (void) at hw.c:8>:
        printf()

Can you please help?

Thanks,
Risto



reply via email to

[Prev in Thread] Current Thread [Next in Thread]