When we use BAS_METHOD it gives is a unique pointer for the “this” pointer of the object we are tracing into. See the trace out from the tracing sandbox:
Code Block | ||
---|---|---|
| ||
T 17:58:05.844701 0x1107d25c0 APPfoo . >APPfoo::APPfoo Line:10 this=0x7ffee9b9d7d0
T 17:58:05.844756 0x1107d25c0 APPfoo . <APPfoo::APPfoo
T 17:58:05.844798 0x1107d25c0 main . About to call run on Foo
T 17:58:05.844832 0x1107d25c0 APPfoo . >APPfoo::run Line:17 this=0x7ffee9b9d7d0
T 17:58:05.844889 0x1107d25c0 APPfoo . . Value = Rabbit, Count = 5
T 17:58:05.844924 0x1107d25c0 APPfoo . . i = 0
T 17:58:05.844960 0x1107d25c0 APPfoo . . i = 1
T 17:58:05.844995 0x1107d25c0 APPfoo . . i = 2
T 17:58:05.845029 0x1107d25c0 APPfoo . . i = 3
T 17:58:05.845064 0x1107d25c0 APPfoo . . i = 4
T 17:58:05.845104 0x1107d25c0 APPfoo . . Dump= (size=35)
52 61 62 62 69 74 0A 52 Rabb it.R
61 62 62 69 74 0A 52 61 abbi t.Ra
62 62 69 74 0A 52 61 62 bbit .Rab
62 69 74 0A 52 61 62 62 bit. Rabb
69 74 0A it.
T 17:58:05.845140 0x1107d25c0 APPfoo . <APPfoo::run
T 17:58:05.845182 0x1107d25c0 main . All done!
T 17:58:05.845217 0x1107d25c0 APPfoo . >APPfoo::~APPfoo Line:13 this=0x7ffee9b9d7d0
T 17:58:05.845271 0x1107d25c0 APPfoo . <APPfoo::~APPfoo
T 17:58:05.845326 0x1107d25c0 main <main |
This is super helpful when debugging for the lifetime of C++ objects in an application.