In article <11********************@g14g2000cwa.googlegroups.c om>,
SSG <ss****@gmail.com> wrote:
can anyone tell me how to profile the c program using Gprof by line
by line. I am not using a function.
Profiling and tools such as Gprof are not part of Standard C.
We would recommend that you ask in a newsgroup more specific to
your OS and tools. There are gnu newsgroups.
If i declare any function, it work , but without function it couldnt
work
If you are using Gprof, the implication is that you are using
a "hosted" implementation rather than an "embedded" implementation.
When you are using a "hosted" environment, the entry point of the
program is -defined- to be the function named 'main'. If you have
not declared any functions, then you have not declared 'main' and
so the OS is not going to have the defined entry point to call,
so there is no certainty that *any* of your code would be executed.
There really isn't much you can do without main() -- initializers
of static (or extern) structures are restricted to be essentially
constants, and you wouldn't be able to call any I/O routines to
examine the initialized memory.
--
Ceci, ce n'est pas une idée.