开发者

How to break with GDB at object destruction if there is no destructor?

How to break with GDB at object destruction if there is 开发者_Python百科no destructor?


If there's no destructor, you cannot break on the destructor, as there is no op-code for the destructor. You have two choices on where to break:

  • If the object is allocated on the stack, break on the closing brace of the scope defining the variable.
  • If the object is allocated on the heap, break on the delete statement.
  • If the object is statically allocated in a data segment, then you can't.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜