07-27-2023, 11:44 AM
I am working on embedded code and for now totally reliant on prints from within functions to figure out the flow of execution (there is no stack trace functionality available).
It often happens that I put a bunch of print statements, build my code and run it only to realize I should've put prints in a dozen other places too. And then start the hour long process again.
Is there an easy way to take my 5 or 6 c files that I want to analyze and run some tool that will go in and add a print statement in each function? (this will obviously have to be after the variable declarations as this is in C)
Even better would be to have a print each time there is an if/ else or switch/ case ..basically any conditional statements.
It often happens that I put a bunch of print statements, build my code and run it only to realize I should've put prints in a dozen other places too. And then start the hour long process again.
Is there an easy way to take my 5 or 6 c files that I want to analyze and run some tool that will go in and add a print statement in each function? (this will obviously have to be after the variable declarations as this is in C)
Even better would be to have a print each time there is an if/ else or switch/ case ..basically any conditional statements.