GlobalObject
exit()
调试代码:
(gdb) l
20 {
21 printf("GlobalObject:~GlobalObject() \n");
22 MutexLockGuard lock(mutex_);
23 printf("GlobalObject:~GlobalObject() cleanning\n");
24 }
25
26 private:
27 MutexLock mutex_;
28 };
29
(gdb) l
30 GlobalObject g_obj;
31
32 int main()
33 {
34 g_obj.doit();
35 }(gdb)
Line number 36 out of range; exit.cpp has 35 lines.
(gdb) b main
Breakpoint 1 at 0x98c: file exit.cpp, line 34.
(gdb) r
Starting program: /root/study/chapter-4/exit
Breakpoint 1, main () at exit.cpp:34
34 g_obj.doit();
(gdb) b 21
Breakpoint 2 at 0x555555554bb3