开发者

Setting a breakpoint on a member function called on a specific object

开发者 https://www.devze.com 2022-12-19 11:01 出处:网络
In gdb, is it possible to set a breakpoint on a member function called on a specific obj开发者_如何学编程ect? To be more specific, imagine class A has a member function Foo(). I\'d like the program to

In gdb, is it possible to set a breakpoint on a member function called on a specific obj开发者_如何学编程ect? To be more specific, imagine class A has a member function Foo(). I'd like the program to stop when Foo is called on a specific object of type A (0xFF11DEADBEAF for example).

Is this at all possible?


Use: b <Classname>::<functionname> if this==0xDEADBEEF (btw: all instances share member function addresses.)

0

精彩评论

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