i am working on existing application that uses and open source project but it does not have any documentation. i want to know the control flow of this project so, i can understand it's internal logic & make changes without breaking anything.
Please provide some tips/approaches.
Hmmmm.....
Really depends on the library/project but some things I would try:
1) Use the application that utilizes the library and hook up a debugger to it.... Place breakpoints on the code which calls into the library and then step thru the functionality to learn how it is used and pay close attention to the arguments and return values of the functions/methods. This will give you the most comprehensive description of the control flow.
2) Use Google and find out who else uses this library and what they use it for... Look for other GitHub projects which use this library. Build and run those projects, debug those projects as well.
3) Read thru the source code of the library and make sense of the modules, classes, structs, functions, and methods. Pay close attention to the externally exposed interfaces and work backwards from there.
4) Does the library have a parser or open any type of files or other input? If so, examine those files, study the file formats and headers so that you can learn about how the library handles these and what it expects.
That should be a great start in terms of "understanding the control flow."
Todd
Software Security TechLead
Bridget Sarah
Full Stack Mobile App Developer
I can understand what you mean I'm just the same! I brought the book Node.JS the right way by Jim r Wilson and he demonstrates the workflow concept behind Node JS.
Only one i've found so far actually showing the workflow of being able to understand the internal and external logic.