sukhoi35
asked on
Reverse Engineer a C++ implementation
If you were given a large and complex multi-threaded C++ implementation and asked to come up with a detailed design document for the same, I would like to know how you would go about doing this.
I am in a somewhat similar situation and am not allowed to use any external tools other than Microsoft Visual Studio 2008. I am thinking of a strategy to start and finish with.
I am in a somewhat similar situation and am not allowed to use any external tools other than Microsoft Visual Studio 2008. I am thinking of a strategy to start and finish with.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Wait.. no source code makes VS not the best tool. I would suggest OllyDbg or IDA pro.
But watch out for legal issues, you may have not the permission to disassemble the code.
If the application belongs to your society and you have the right to disasm it, then open it up with a debugger and use breakpoints (software or hardware) to step in the right function. Threads should not be a problem since debuggers let you break in every routine you need.
But watch out for legal issues, you may have not the permission to disassemble the code.
If the application belongs to your society and you have the right to disasm it, then open it up with a debugger and use breakpoints (software or hardware) to step in the right function. Threads should not be a problem since debuggers let you break in every routine you need.
ASKER
Hello Experts,
Thanks for your responses. I am sorry if the details I provided does not clear whether the source code is avaialbe or not with me. Yes, I do have the full source code which is in C++. My only worry is it is a complex architecture. So, was wondering should I just start at the entry point and walk-through the code method by method or is there any other better approach to the task.
Regards.
Thanks for your responses. I am sorry if the details I provided does not clear whether the source code is avaialbe or not with me. Yes, I do have the full source code which is in C++. My only worry is it is a complex architecture. So, was wondering should I just start at the entry point and walk-through the code method by method or is there any other better approach to the task.
Regards.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If logging mechanism is not there then I would suggest you to add some log messages (which writes to a file and print the thread id also inside - to know which thread called which function) in each and every functions. This might be time consuming but it will get you understand the code/functionality very fast. My 2 cents :)
ASKER
Thank You Very Much!
Play with the application and see what it does, then make testable assumptions about the design. Then test them.
By "no external tools" does that mean you can't use programs similar to task manager to see the processes and threads that spawn?