c++ - Dump class/struct member variables in g++ -


To dump member variables , g ++ or Is there a flag in the device? > Of a structure / class? For example, consider the source code like this

  struct A {virtual void m () {}; }; Structure B: Public A {int b; Virtual zero n () = 0; }; Structure C: Public B {int c1, c2; Zero o (); }; Struct D: Public C {Virtual Zero (n) (}} Eddy; };  

I have to do something like (Vptr ) 4 = b 8 = c1 12 = c2d: 0 = (vptr) 4 = b 8 = c1 12 = c2 16 = d

( -fdump-class-hierarchy does not work. It only prints member functions.)

(Suppose I get classes from A to D Or there are so many classes that I do not want to list them out myself.)

(Specifically, I want to dump member variables).

Use the right tool for the right thing G ++ Most of the tool to see a hierarchy is.

You can always use an external device, which can dump the image.

There is power-solution for you, which can dump you the whole program into a XML file that you can parse on.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -