So I wanted to print all the network dump I log as readable data. I have successfully mapped the logged dump into their respective structures (using memcpy) and now wish for the same class values to be printed (without defining a print() function per se).
Using the Qt debugger (which uses gdb if i remember correctly), I can use breakpoints to see and even copy the values into a file. Considering the application can take some time to process and convert the dump into readable data, is it possible for me to automate the system of copying the debug info into a file?
I have gone through the gdb documentation and couldn't locate any function for the same. Most of the solutions online include creating a print() function for each class.
How the question is different from How to get all properties/variables of a class at runtime/dynamically in C++: The question asks how to get variable data type @ runtime. I am on the other hand defining the data type during compilation (in a *.h header file containing all the structure info and even mapping all the values to the variable). The problem is largely revolving around the fact that the data can be viewed for printing via a debugger; I wish to automate the display and copying of the same onto a file / console.