Re: finding the full path of the program which ran.



Hi All,
Thanks a lot for giving reply.

Let me tell u why I need it...
We have an application on LINUX (developed by us), now we want to
generate the call graphs of it, the call graphs should be dynamic.

So, what I did is, used BFD library to open the executable and used
instrument-functions (functions called automatically whenever any
function is called). To these instrument functions a pointer to
function which will be called is passed). Using this pointer and bfd
library I could map the pointer to it's name. Along with it I am also
loging some other information like current time etc.

Now, BFD library need full path of the executable to open it. So, I
need that full path in my library. This library will just be used for
generating call graphs along with to log more information like time
taken by each funtion etc. So, this library will not be shipped to
customer.

Hence, I need to find the full path of the program to which my library
is linked.

Thanks and regards,
Prasad.

ellis@xxxxxxx wrote:
In article <1166719239.949245.70760@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Prasad <prasadjoshi124@xxxxxxxxx> wrote:

I m building a library which requires the full path of the program to
which it is linked. How could I do it?

If you really need that information, you're probably doing something
very wrong.

.



Relevant Pages

  • Re: finding the full path of the program which ran.
    ... We have an application on LINUX, ... generate the call graphs of it, the call graphs should be dynamic. ... To these instrument functions a pointer to ... err (1, "readlink failed"); ...
    (comp.unix.programmer)
  • Re: Calling a fast external *.EXE many times
    ... "HELP SYSx" knew the pointer to the solution. ... time setting up the required files. ... fast way to create those required files, it no longer is quick using ... the matching thumbnails for all large graphs, ...
    (comp.os.os2.programmer.misc)
  • Re: Graphing Tool
    ... > I'm looking for a command-line utility to run on a Linux platform that can ... > graphs based on daily totals instead of constant gauge readings. ... > Security Linux, the comprehensive security solution that combines six ...
    (Security-Basics)
  • Re: OK, where is she?
    ... It is best for charts and graphs I find as it doesn't fuzz up the sharp ... I might just take this opportunity to plug linux again. ... that comes with ubuntu (the linux distribution I have chosen to ...
    (uk.local.cumbria)
  • Re: OK, where is she?
    ... It is best for charts and graphs I find as it doesn't fuzz up the sharp ... I might just take this opportunity to plug linux again. ... How much do people pay for Photoshop? ...
    (uk.local.cumbria)