Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 7th, 2005, 1:02 PM   #1
anandt4u
Newbie
 
Join Date: Feb 2005
Posts: 22
Rep Power: 0 anandt4u is on a distinguished road
Help - Execution Sequence

Hi,
I have an exe file and the source code for the file (too big). Now i want to know the exact sequence of function calls that occur when i do some processing. Do you have some program for that.

I have both the windows and unix version of the source code and executable file..plz do help me out
anandt4u is offline   Reply With Quote
Old Apr 7th, 2005, 1:11 PM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Write up a trace table - it's not hard.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Apr 7th, 2005, 1:17 PM   #3
anandt4u
Newbie
 
Join Date: Feb 2005
Posts: 22
Rep Power: 0 anandt4u is on a distinguished road
oops i am really new to this stuff...can you tell me how to write that trace table..do mean i should put some "printf statements" in the code???
anandt4u is offline   Reply With Quote
Old Apr 7th, 2005, 1:35 PM   #4
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Get a pen and paper, and every time it changes function, write it down in a table, along with the values of any variables that might be important. For example:
 Current Function   |  x   |  y   |  z
                    |      |      |
--------------------+------+------+------
  main              |  0   |  1   | 134
  funcA             |  0   |  2   |  45
  funcB             |  0   |  3   |  98
  main              |  1   |  4   |  31
  funcA             |  1   |  5   | 924
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Apr 7th, 2005, 1:42 PM   #5
codetaino
Programmer
 
codetaino's Avatar
 
Join Date: Jan 2005
Location: Bayamon, Puerto Rico
Posts: 71
Rep Power: 4 codetaino is on a distinguished road
Do that execution sequence, depends on a user interaction?
__________________
"God bless u all" :)
codetaino is offline   Reply With Quote
Old Apr 7th, 2005, 1:54 PM   #6
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
There's a point. If it does, you can write a debug(int x, char *y, bool z) function which you call every step of the way, that prints the trace table.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Apr 7th, 2005, 2:03 PM   #7
anandt4u
Newbie
 
Join Date: Feb 2005
Posts: 22
Rep Power: 0 anandt4u is on a distinguished road
Quote:
Originally Posted by codetaino
Do that execution sequence, depends on a user interaction?

yes..

its a big open source software and i am trying to understand the execution of the code.. there is no proper documentation as well

just consider..suppose you want to change the linux code..tell me how to understand the code??
anandt4u is offline   Reply With Quote
Old Apr 7th, 2005, 2:05 PM   #8
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
With a great deal of experience, and a quick mind.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Apr 7th, 2005, 2:12 PM   #9
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
Quote:
just consider..suppose you want to change the linux code..tell me how to understand the code??
You're serious? You want to hack the kernel? Well I don't know... take a few weeks off work, buy yourself a few weeks worth of consumable goods (preferably those high in sugar), start from the entry point (int main) and get reading.
Cerulean is offline   Reply With Quote
Old Apr 7th, 2005, 3:09 PM   #10
Benoit
Expert Programmer
 
Benoit's Avatar
 
Join Date: Sep 2004
Location: Ontario, Canada
Posts: 550
Rep Power: 4 Benoit is on a distinguished road
I'm sure the kernel is well documented
__________________
Johnny was a chemist's son but Johnny is no more, for what Johnny thought was H2O was H2SO4
Benoit is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:31 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC