gdb: Use gdbtui instead of gdb. And fix error redirection.
Update .gitignore. Ignore gdb.txt.