sublimegdb.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:SublimeRemoteGDB 作者: summerwinter 项目源码 文件源码
def cleanup():
    global gdb_global_clean_count
    with gdb_global_lock:
        if gdb_global_clean_count == 1:
            gdb_global_clean_count = 0
        else:
            gdb_global_clean_count = 1

            currentLayout = gdb_bkp_window.get_layout()
            s = sublime.load_settings("SublimeRemoteGDB.sublime-settings")
            s.set("layout",currentLayout)

            log_debug(str(gdb_bkp_window.num_groups()))
            log_debug("\n")
            gdb_allview = gdb_bkp_window.views()
            for v in gdb_allview:
                if v.name().find("Callstack") != -1:
                    s.set("callstack_group",gdb_bkp_window.get_view_index(v)[0])

                if v.name().find("Console") != -1:
                    s.set("console_group",gdb_bkp_window.get_view_index(v)[0])

                if v.name().find("Session") != -1:
                    s.set("session_group",gdb_bkp_window.get_view_index(v)[0])

                if v.name().find("Variables") != -1:
                    s.set("variables_group",gdb_bkp_window.get_view_index(v)[0])

                if v.name().find("Threads") != -1:
                    s.set("threads_group",gdb_bkp_window.get_view_index(v)[0])

                if v.name().find("Breakpoints") != -1:
                    s.set("breakpoints_group",gdb_bkp_window.get_view_index(v)[0])

            sublime.save_settings("SublimeRemoteGDB.sublime-settings")

    global __debug_file_handle
    if get_setting("close_views", True):
        for view in gdb_views:
            view.close()
    if get_setting("push_pop_layout", True):
        gdb_bkp_window.set_layout(gdb_bkp_layout)
        gdb_bkp_window.focus_view(gdb_bkp_view)
    if __debug_file_handle is not None:
        if __debug_file_handle != sys.stdout:
            __debug_file_handle.close()
            __debug_file_handle = None

    global gdb_process
    gdb_process = GDBProcess()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号