![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Feb 2005
Posts: 22
Rep Power: 0
![]() |
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 |
|
|
|
|
|
#2 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Write up a trace table - it's not hard.
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Feb 2005
Posts: 22
Rep Power: 0
![]() |
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???
|
|
|
|
|
|
#4 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
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 |
|
|
|
|
|
#5 |
|
Programmer
Join Date: Jan 2005
Location: Bayamon, Puerto Rico
Posts: 71
Rep Power: 4
![]() |
Do that execution sequence, depends on a user interaction?
__________________
"God bless u all" :) |
|
|
|
|
|
#6 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
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.
|
|
|
|
|
|
#7 | |
|
Newbie
Join Date: Feb 2005
Posts: 22
Rep Power: 0
![]() |
Quote:
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?? ![]() |
|
|
|
|
|
|
#8 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
With a great deal of experience, and a quick mind.
|
|
|
|
|
|
#9 | |
|
Professional Programmer
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4
![]() |
Quote:
|
|
|
|
|
|
|
#10 |
|
Expert Programmer
Join Date: Sep 2004
Location: Ontario, Canada
Posts: 555
Rep Power: 5
![]() |
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 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|