How do I show what fields a struct has in GDB?

前端 未结 7 1480
不知归路
不知归路 2020-12-22 23:31

I came upon a struct (called ngx_http_variable_value_t) in my GDB (debugger) session and I would like to print what fields it has in the console.

Is tha

7条回答
  •  礼貌的吻别
    2020-12-23 00:12

    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.

提交回复
热议问题