Example #1
0
void if_print(const char *buf)
{
    /* Print it to the scroller */
    scr_add(gdb_win, buf);

    if (get_gdb_height() > 0) {
        scr_refresh(gdb_win, focus == GDB);

        /* Make sure cursor reappears in source window if focus is there */
        if (focus == CGDB)
            wrefresh(src_win->win);
    }
}
Example #2
0
void if_tty_print(const char *buf)
{
    /* If the tty I/O window is not open send output to gdb window */
    if (!tty_win_on)
        if_print(buf);

    /* Print it to the scroller */
    scr_add(tty_win, buf);

    /* Only need to redraw if tty_win is being displayed */
    if (tty_win_on && get_gdb_height() > 0) {
        scr_refresh(tty_win, focus == TTY);

        /* Make sure cursor reappears in source window if focus is there */
        if (focus == CGDB)
            wrefresh(src_win->win);
    }
}
Example #3
0
static void if_print_internal(const char *buf, enum ScrInputKind kind)
{
    if (!gdb_scroller) {
        clog_error(CLOG_CGDB, "%s", buf);
        return;
    }

    /* Print it to the scroller */
    scr_add(gdb_scroller, buf, kind);

    if (get_gdb_height() > 0) {
        scr_refresh(gdb_scroller, focus == GDB, WIN_NO_REFRESH);

        /* Make sure cursor reappears in source window if focus is there */
        if (focus == CGDB)
            swin_wnoutrefresh(src_viewer->win);

        swin_doupdate();
    }

}