valgrind --db-attach doesn't work
Make sure that valgrind command with all its arguments does not redirect the output to a file. It might be also related to the --log-file option in valgrind, try to switch it off too.
Still, gdb prompt might be hidden. However, entering gdb commands will work.