Jump to content
  • Advertisement
Sign in to follow this  
miminawewe

looking for function calls in an executing program

This topic is 4014 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How can I see the functions that are being called by an executing program as the program is running? I have the source code of the program and the exe. I would like to run the exe and be able to see the functions that it's calling as it runs. THANKS.

Share this post


Link to post
Share on other sites
Advertisement
using a profiling tool would be the easiest option. try VTune

It's not practical to see them "as they are called" because they will be called millions of times faster than you can possibly read. But a profiling tool will show you which are called how often and such.

To see the order in which things are called, just look at the source code.

-me

Share this post


Link to post
Share on other sites
You may also be looking for information on how to debug this program. Page 3 (Execution Flow Tools) seems like it's what you want, but you should probably start from the beginning if you're new to the concept.

Share this post


Link to post
Share on other sites
Palidine: I'm checking out VTune.

jouley: I have visual studio. I would like to run the exe (without compiling the code) and be able to see the function calls in the call stack. Can something like "attach to process" help with that. I am not able to compile the code because I don't have some dependencies.

Share this post


Link to post
Share on other sites
The best option is debugging with Microsoft Visual Studios


There is step into commnd and a runto command that lets you step into a program
at the bottom, there should be values of variable and returned functions cool for beginners best i have seen which makes life well simpler for programmer

also just read up on ur post. by the way the newer version of studios have call graph which are all the call to and from a given function right click a function to get to it

Share this post


Link to post
Share on other sites
Quote:
Original post by miminawewe
jouley: I have visual studio. I would like to run the exe (without compiling the code) and be able to see the function calls in the call stack. Can something like "attach to process" help with that. I am not able to compile the code because I don't have some dependencies.


Yes. Debug -> Attach to Process.

when you pause it in the debugger you can pick the source code location.

I should point out that this will only work if you have a debug build or a release build that was built with symbols (i.e. this won't work if, say, you have half-life2 and the leaked half-life2 source code).

If you have a release build, the best you're going to be able to do is look at assembly code.

-me

Share this post


Link to post
Share on other sites
when deciphering code i always find winmain and start from there that way i can see how the program flows plus there not many programs whitout winmain or main

Share this post


Link to post
Share on other sites
Thanks.
I'm not working on leaked code or anything illegal. I have a program called VLC that plays media files. I'm interested in how it plays vorbis and theora files. The code is really messed up and that's why I needed to know the functions the exe calls (in sequence) as it executes then I refer to the code.
I only have the release version of the exe and dlls.

Share this post


Link to post
Share on other sites
Quote:
Original post by miminawewe
Thanks.
I'm not working on leaked code or anything illegal. I have a program called VLC that plays media files. I'm interested in how it plays vorbis and theora files. The code is really messed up and that's why I needed to know the functions the exe calls (in sequence) as it executes then I refer to the code.
I only have the release version of the exe and dlls.

If you can't get it to compile you'll have a lot of difficulty debugging it. In release mode, lots of functions will be inlined, reduced, reordered, etc., making it extremely difficult to follow the code flow. Work on getting a debuggable version built, and the rest will be much easier.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!