use weak_ptr for callback to fix bugs, ignore gtags output