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

前端 未结 7 1482
不知归路
不知归路 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:25
      p *((struct my_struct*) variable)
    

    This will help you to print the details of struct in gdb

    0 讨论(0)
提交回复
热议问题