Subject: bug#5404: 23.1.91; Nextstep port: M-x gdb hangs in tab completion of symbols

From: [email-masked] (Nick Roberts)
Date: Tue, 19 Jan 2010 22:52:18 +1300

> Value: 
 > ((recv . "^M\npre-prompt^M\n(gdb) ^M\nprompt^M\n")
 >  (recv . "No breakpoints or watchpoints.^M\n")
 >  (recv . "^M\npost-prompt^M\n")
 >  (send-item "server info breakpoints\n" gdb-info-breakpoints-handler)
 >  (recv . "^M\npre-prompt^M\n(gdb) ^M\nprompt^M\n")
 >  (recv . "&\"\\n\\032\\032error-begin\\n\"^M\n~\"\\n\\032\\032error\\n\"^M\n^error,msg=\"No registers.\"^M\n(gdb) ^M\n")
 >  (recv . "^M\npost-prompt^M\n")
 >  (send-item "server interpreter mi -stack-info-frame\n" gdb-frame-handler-1)
 >  (recv . "^M\npre-prompt^M\n(gdb) ^M\nprompt^M\n")
 >  (recv . "b add_one^M\nb add_profil^M\n")
 >  (recv . "b add_fdes^M\n")
 >  (recv . "^M\npost-prompt^M\n")
 >  (send-item .
 > 	    #("complete b add_\n" 9 15
 > 	      (fontified t))))

I think the terminal settings in the GUD buffer must be different for recent
Macs.

Try:

(gdb) shell stty -onlcr

(assuming "shell stty -a" gives onlcr).

Emacs doesn't expect the extra ^M characters and so it fails to parse the
output correctly.  If modifying the terminal doesn't work (but I think it
should), you could try changing gud-gdb-marker-regexp and
gud-gdb-marker-filter to look for ^M\n instead of just \n.

-- 
Nick                                           http://users.snap.net.nz/~nickrob