开发者

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

开发者 https://www.devze.com 2023-01-18 14:14 出处:网络
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 hav

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

精彩评论

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