use gdb trace and add some comments