Example #1
0
void process_lines(struct ast_node_lines* lines)
{
    struct ast_node_line* current;
    struct dbg_sym* newsym;

    // First reverse the lines.
    reverse_lines(lines);

    // Now navigate the linked list (although it says prev / last
    // here, we are actually now navigating it forwards because
    // we reversed it).
    current = lines->last;

    list_init(&newsyms);
    while (current != NULL)
    {
        // Process each line.
        process_line(current);
        current = current->prev;
    }
    while (list_size(&newsyms) > 0)
    {
        // Get each trailing debug symbol and store it in the list anyway.
        newsym = list_extract_at(&newsyms, 0);
        printd(LEVEL_DEBUG, "Debugging trailing symbol.\n");
        list_append(assem_dbg_symbols, newsym);
    }
    list_destroy(&newsyms);
}
Example #2
0
void process_lines(struct ast_node_lines* lines)
{
	struct ast_node_line* current;

	// First reverse the lines.
	reverse_lines(lines);

	// Now navigate the linked list (although it says prev / last
	// here, we are actually now navigating it forwards because
	// we reversed it).
	current = lines->last;

	while (current != NULL)
	{
		// Process each line.
		process_line(current);
		current = current->prev;
	}
}