0

To be more concrete, I have a C executable and I want to know in my bash script the execution time of a function from that C. I also want to know if I can find out what is the value of a certain variable from that file .

PS: I don't want to output on the console the things I need from the C file and then to read that output in the script

1 Answer 1

1

Short answer is no.

Longer answer is no, but have a look at profilers to measure the execution time of a program (e.g. gprof) and debuggers to inspect value of variables during runtime (e.g. gdb).

Sign up to request clarification or add additional context in comments.

1 Comment

Is there any way to find out when a function starts executing and when it stops? I want to find that timestamp obeying the restriction of not modifying the c source and only using the info I can get from the executable. I tried looking for this in gdb and gprof related articles, but i didn't found anything specific.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.