I came upon a struct called ngx_http_variable_value_t
in my gdb session and I would like to print what fields it has in the console. Is that possible?
views:
177answers:
4
+4
A:
If you have debugging symbols built in, you should just be able to print the value: print variable
or print *variable
if it's a pointer to a struct.
LnxPrgr3
2009-11-20 06:10:33
Yes, print *variable... of course.
kaleidomedallion
2009-11-20 08:04:42
A:
I've only done this through graphic front ends for gdb. Found this entry in gdb online docs. Hope it helps. I believe this will require that the code was created with debugging info included.
ptype [arg] ptype accepts the same arguments as whatis, but prints a detailed description of the type, instead of just the name of the type.
Dave L Delaney
2009-11-20 07:58:02
+3
A:
You can use the gdb command "ptype" to print out the definition of a struct or class.
Nathan
2009-11-20 13:28:49