def generate_debug_scripts(cmake_builder, deploy_dir, project_name, url, port=22):
    host = url.host
    remote_directory = url.remote_directory

    solib_search_path = _generate_solib_search_path(cmake_builder, project_name)
    sysroot = None
    gdb = None
    message = None
    toolchain = cmake_builder.toolchain
    if toolchain:
        sysroot = toolchain.get_sysroot()
    if sysroot:
        # assume cross-toolchain
        gdb = toolchain.get_cross_gdb()
        if gdb:
            message = "Cross-build. Using the cross-debugger provided by the toolchain."
        else:
            message = "Remote debugging not available: No cross-debugger found in the cross-toolchain"
    else:
        # assume native toolchain
        sysroot = "\"\""
        gdb = qisys.command.find_program("gdb")
        if gdb:
            message = "Native build. Using the debugger provided by the system."
        else:
            message = "Debugging not available: No debugger found in the system."
    if not gdb:
        ui.warning(message)
        return None
    if toolchain:
        sysroot=toolchain.get_sysroot()

    to_deploy = list()
    setup_gdb = _generate_setup_gdb(deploy_dir, sysroot=sysroot,
                                    solib_search_path=solib_search_path,
                                    remote_gdb_address="%s:2159" % host)
    gdb_script = _generate_run_gdbserver_binary(deploy_dir, gdb=gdb, gdb_listen=":2159",
                                                host=host, port=port,
                                                remote_dir=remote_directory)

    ui.info(message)
    to_deploy = setup_gdb + gdb_script
    return to_deploy
Generates services
dataset/ETHPy150Open aldebaran/qibuild/python/qibuild/deploy.py/generate_debug_scripts--crossover with--dataset/ETHPy150Open ooici/pyon/pyon/core/interfaces/service_object_generator.py/ServiceObjectGenerator.generate