In readline, C-j functions like "enter" key. However, I defined C-j as menu-complete in my ~/.inputrc. So, in gdbtui and when using gdb in emacs, enter key don't function as usual, instead it performs menu-complete. As a consequence, i can't use gdbtui and gdb in emacs. I solved the problem myself. I just thought that this problem should has something to do with readline library. Maybe my readline is too new? This is my first suspicion. Then I suddenly remembered that I had redefined some key-binding in my ~/.inputrc. Thus, the problem solved. reference: http://tiswww.tis.case.edu/~chet/readline/rltop.html