Q:

How to open a source file in GDB TUI

When I'm GDB TUI can I load arbitrary source file for browsing without jumping into it using breakpoint?
Thanks.

A:

You can't list any arbitrary file, but if it's part of your program, you can try something like
list sourcefile.c:1

That :1 at the end says to list from line number 1, and lets gdb know that it's file, not a function.

