Development Index

Debugging

If the program needs arguments you can set it;

        (gdb)set args -parameter1 -parameter2
        

To start gdb in TUI mode press;

Ctrl-x A
Enter or leave TUI.
Ctrl-x 0
TUI with only one window.
Ctrl-x 2
TUI with more than two windows.
Ctrl-x o
Change active window.
Ctrl-x s
TUI single key mode.
Ctrl-L s
Refresh screen.
Up
Scroll
Down
Scroll
Left
Scroll
Right
Scroll
        (gdb) info win
        (gdb) fs next
        (gdb) fs SRC
        
        b - backtrace
        info locals
        display
        print
        x
        catch syscall open
        

When new thread is created you receive a notification. To get information about threads;

        info threads
        

To select thread;

        thread 1
        
        break linespec thread threadno
        
        strace -c ./program
        

C program with autotools GDB Quick Start, Learning C with GDB and Memory Layout and the Stack are great sources of introductory information. Stopping and Starting multi-thread programs

Development Index

This is part of the c9-doc Manual. Copyright (C) 2018 c9 team. See the file Gnu Free Documentation License for copying conditions.