Subject: Re: bug#44151: trmap: remote gdb with ssh doesn't work

From: Michael Albinus <[email-masked]>
Date: Fri, 23 Oct 2020 16:52:27 +0200

William Xu <[email-masked]> writes:

> Hi,

Hi,

> However, after the program to debug is read, it looks like there is some
> error setting up gdb's inferior tty?
>
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from /home/wx/tmp/a.out...
>
> Debugger entered--Lisp error: (wrong-type-argument "consp nil")
>   signal(wrong-type-argument ("consp nil"))

Confirmed. Does the appended patch fixes the problem?

Best regards, Michael.

*** /tmp/ediffsLfY1u	2020-10-23 16:51:34.788931136 +0200
--- /home/albinus/src/tramp/lisp/tramp-sh.el	2020-10-23 16:46:48.832033338 +0200
***************
*** 2809,2815 ****
  	    (signal 'wrong-type-argument (list #'stringp name)))
  	  (unless (or (null buffer) (bufferp buffer) (stringp buffer))
  	    (signal 'wrong-type-argument (list #'stringp buffer)))
! 	  (unless (consp command)
  	    (signal 'wrong-type-argument (list #'consp command)))
  	  (unless (or (null coding)
  		      (and (symbolp coding) (memq coding coding-system-list))
--- 2809,2815 ----
  	    (signal 'wrong-type-argument (list #'stringp name)))
  	  (unless (or (null buffer) (bufferp buffer) (stringp buffer))
  	    (signal 'wrong-type-argument (list #'stringp buffer)))
! 	  (unless (or (null command) (consp command))
  	    (signal 'wrong-type-argument (list #'consp command)))
  	  (unless (or (null coding)
  		      (and (symbolp coding) (memq coding coding-system-list))