# componentize sections # # Using the components API to sort symbols in different sections into folders def ___sortSymbolsBySectionName(): bv.begin_undo_actions() for func in bv.functions: sects = bv.get_sections_at(func.start) for sect in sects: comp = bv.get_component_by_path(sect.name) if comp is None: comp = bv.create_component(sect.name) comp.add_function(func) bv.commit_undo_actions() ___sortSymbolsBySectionName()