From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: William Xu Newsgroups: gmane.emacs.help Subject: Re: gdb mode with gdb command from the docker Date: Thu, 22 Oct 2020 20:41:52 +0200 Organization: the Church of Emacs Message-ID: References: <83sgabr0h6.fsf@gnu.org> <83a6wjqt58.fsf@gnu.org> <83imb3muem.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23456"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) To: help-gnu-emacs@gnu.org Cancel-Lock: sha1:bqkVfKr/1EmMtH7OBzoprbO9N0s= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 22 20:42:43 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kVfXu-00060c-EA for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 22 Oct 2020 20:42:42 +0200 Original-Received: from localhost ([::1]:59712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVfXt-0002Cs-Et for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 22 Oct 2020 14:42:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVfXG-0002Bu-3g for help-gnu-emacs@gnu.org; Thu, 22 Oct 2020 14:42:02 -0400 Original-Received: from static.214.254.202.116.clients.your-server.de ([116.202.254.214]:57522 helo=ciao.gmane.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVfXE-0005ei-JM for help-gnu-emacs@gnu.org; Thu, 22 Oct 2020 14:42:01 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1kVfXB-0005AD-CU for help-gnu-emacs@gnu.org; Thu, 22 Oct 2020 20:41:57 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geh-help-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/22 12:34:22 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:124641 Archived-At: Eli Zaretskii writes: > No, this setting is needed to separate the I/O device of the process > being debugged from that of GDB, so that we could redirect I/O of the > debuggee to a dedicated buffer used by "M-x gdb" to show interaction > with the program. Can we at least add an option to disable the I/O separation, like gdb-disable-io-redirection? So that one can still have a working gdb, even if the I/O are mixed with gdb commands. So that I would still have the nice features of gdb modes, with which I can set breakpoints, follow line by line in the source buffer. That is already a huge improvement on the plain terminal gdb. In addition, I just noticed that tramp seems supporting such kind of remote debugging, from [[info:tramp#Remote processes][info:tramp#Remote processes]]: ,---- | 5.5.5 Running a debugger on a remote host | ----------------------------------------- | | ‘gud.el’ provides a unified interface to symbolic debuggers (*note | (emacs)Debuggers::). TRAMP can run debug on remote hosts by calling | ‘gdb’ with a remote file name: | | M-x gdb | Run gdb (like this): gdb -i=mi /ssh:host:~/myprog `---- Only that when trying it out with ssh method, I got an error after the file is loaded. Should I report a bug for it? ---------------------------------8<------------------------------------- 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")) tramp-signal-hook-function(wrong-type-argument (consp nil)) signal(wrong-type-argument (consp nil)) tramp-sh-handle-make-process(:name "gdb-inferior" :buffer #> :command nil :stderr nil :noquery nil :file-handler t) apply(tramp-sh-handle-make-process (:name "gdb-inferior" :buffer #> :command nil :stderr nil :noquery nil :file-handler t)) tramp-sh-file-name-handler(make-process :name "gdb-inferior" :buffer #> :command nil :stderr nil :noquery nil :file-handler t) apply(tramp-sh-file-name-handler make-process (:name "gdb-inferior" :buffer #> :command nil :stderr nil :noquery nil :file-handler t)) tramp-file-name-handler(make-process :name "gdb-inferior" :buffer #> :command nil :stderr nil :noquery nil :file-handler t) tramp-handle-start-file-process("gdb-inferior" #> nil) apply(tramp-handle-start-file-process ("gdb-inferior" #> nil)) tramp-sh-file-name-handler(start-file-process "gdb-inferior" #> nil) apply(tramp-sh-file-name-handler start-file-process ("gdb-inferior" #> nil)) tramp-file-name-handler(start-file-process "gdb-inferior" #> nil) apply(tramp-file-name-handler start-file-process "gdb-inferior" #> nil nil) start-file-process("gdb-inferior" #> nil) apply(start-file-process "gdb-inferior" #> nil nil) comint-exec-1("gdb-inferior" #> nil nil) comint-exec(#> "gdb-inferior" nil nil nil) make-comint-in-buffer("gdb-inferior" #> nil) gdb-inferior-io-mode() gdb-get-buffer-create(gdb-inferior-io) gdb-init-1() gdb-update() gdb("gdb -i=mi /ssh:wx@SERVER:/home/wx/tmp...") funcall-interactively(gdb "gdb -i=mi /ssh:wx@SERVER:/home/wx/tmp...") call-interactively(gdb record nil) command-execute(gdb record) execute-extended-command(nil "gdb" nil) funcall-interactively(execute-extended-command nil "gdb" nil) call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command) ---------------------------------8<------------------------------------- -- William