Esempio n. 1
0
int a2_shutdown(struct annotate_two *a2)
{
    int i;

    cgdb_close(a2->debugger_stdin);
    a2->debugger_stdin = -1;

    state_machine_shutdown(a2->sm);
    commands_shutdown(a2->c);

    a2_delete_responses(a2);
    sbfree(a2->responses);
    a2->responses = NULL;

    for (i = 0; i < sbcount(a2->client_commands); i++)
    {
        struct tgdb_command *tc = a2->client_commands[i];

        free(tc->gdb_command);
        free(tc);
    }
    sbfree(a2->client_commands);
    a2->client_commands = NULL;

    return 0;
}
Esempio n. 2
0
File: a2-tgdb.c Progetto: rsenn/cgdb
/* TODO: Implement shutdown properly */
int a2_shutdown ( void *ctx ) {
    struct annotate_two *a2 = (struct annotate_two *)ctx;
    cgdb_close(a2->debugger_stdin);

    data_shutdown ( a2->data );
    state_machine_shutdown ( a2->sm );
    commands_shutdown ( a2->c );
    globals_shutdown ( a2->g );
    return 0;
}
Esempio n. 3
0
/* TODO: Implement shutdown properly */
int a2_shutdown(struct annotate_two *a2)
{
    cgdb_close(a2->debugger_stdin);

    data_shutdown(a2->data);
    state_machine_shutdown(a2->sm);
    commands_shutdown(a2->c);

    tgdb_list_free(a2->client_command_list, tgdb_command_destroy_list_item);
    tgdb_list_destroy(a2->client_command_list);

    tgdb_list_free(a2->cur_response_list, tgdb_types_free_command);
    tgdb_list_destroy(a2->cur_response_list);

    globals_shutdown(a2->g);
    return 0;
}
Esempio n. 4
0
int tgdb_shutdown(struct tgdb *tgdb)
{
    tgdb_request_ptr_list::iterator iter = tgdb->command_requests->begin();
    for (; iter != tgdb->command_requests->end(); ++iter) {
        tgdb_request_destroy(*iter);
    }

    delete tgdb->command_requests;
    tgdb->command_requests = 0;

    annotations_parser_shutdown(tgdb->parser);

    cgdb_close(tgdb->debugger_stdin);
    tgdb->debugger_stdin = -1;

    commands_shutdown(tgdb->c);

    return 0;
}