From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Zhongwei Yao Newsgroups: gmane.emacs.help Subject: How to make gdb debug mode work with tramp? Date: Sun, 3 Sep 2017 22:10:45 +0800 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1504451137 6617 195.159.176.226 (3 Sep 2017 15:05:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 3 Sep 2017 15:05:37 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Sep 03 17:05:23 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1doWSa-0000iq-1i for geh-help-gnu-emacs@m.gmane.org; Sun, 03 Sep 2017 17:05:16 +0200 Original-Received: from localhost ([::1]:51282 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doWSg-0003Q1-W0 for geh-help-gnu-emacs@m.gmane.org; Sun, 03 Sep 2017 11:05:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doVby-0002Xr-Te for help-gnu-emacs@gnu.org; Sun, 03 Sep 2017 10:10:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1doVbu-0007yW-0o for help-gnu-emacs@gnu.org; Sun, 03 Sep 2017 10:10:54 -0400 Original-Received: from mail-lf0-x22a.google.com ([2a00:1450:4010:c07::22a]:37030) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1doVbt-0007vZ-PS for help-gnu-emacs@gnu.org; Sun, 03 Sep 2017 10:10:49 -0400 Original-Received: by mail-lf0-x22a.google.com with SMTP id y128so12684499lfd.4 for ; Sun, 03 Sep 2017 07:10:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Hl5tRneMFwYpXwE3HYtu1p1arcjaYrRQtYJu2a1PDnI=; b=arwdthzDOzcv5rJG4/2D/F1ixRpfdjv6LQwkooFCMm8FWN6kpEfIVfU9n4g80mB/0s PSLuWGbM8fTVt3eogxQ95b2haRJoSQalpduoF301ChN/X+4E7h7U2rUNx0koenl0vqho +yuU1XxOR3rdlc+DsFcCJaqyayqjD/erUXfjnrdcIQVgFGIfFrVfkbXlD2S9hixMKhnP y63Ay7PBq9Jy1DWIPDUSD7STwc2q8TDSGxc/c2k5X6HYqknREN8P2OXsUFm4Z6660GtA 066XDIxsf0EYrZ1mTi/gWAAC5H5oZ/DKh6MgZncJcXG0yOf290COmP5ZoicbQ5TyYE87 7dlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Hl5tRneMFwYpXwE3HYtu1p1arcjaYrRQtYJu2a1PDnI=; b=KoLZWYqpcNpM+mJ8enIJGFeX0Gup2hMgHKbq/ZeTbW9FPhJKWUJeaAPyL/ZFAp4Vv3 PuPEsJNoordsegoCMBvhG4vigApMmNGq+rRBuIq3AucxfOxUylm1LBWK8tkPM4biwXO6 ws/TQc53UeJ+uGVvZXopcHEsh/HRlVPyOCnDMCRz3rY5HzSYMRrBzIpK9k2arwBC3szK Xrd6/B0x5JQBZ5CHYApOWcLYYgMmGE/jhIpSEyXJC6fS2EWmxgcdSSWPzW3HpS+ZNhMB 1ENXrJ0mNIGbQRpg/THOTVnPMrFaT7SEbsqyVU8Zws2Q0pbUJhDPmT/TAO1m5n5sg7MU DMxQ== X-Gm-Message-State: AHPjjUjfJy9wBw7GEDqKjfBsqYkV1OLI3abiaAYnankXhRBj3ywDxwQK 2taI/lIKtWofbn+/nBqpnBjKyoNiGoSLGeU= X-Google-Smtp-Source: ADKCNb7T5cxAEBRNP1HmpCcuJPdeEkmecmT+OJvFpTwTv8vO+wIkYZFpGOXmGof9mHuYdAvnOVV8VHonbYlon+2yIDU= X-Received: by 10.46.75.9 with SMTP id y9mr2813884lja.116.1504447846732; Sun, 03 Sep 2017 07:10:46 -0700 (PDT) Original-Received: by 10.25.147.24 with HTTP; Sun, 3 Sep 2017 07:10:45 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::22a X-Mailman-Approved-At: Sun, 03 Sep 2017 11:04:47 -0400 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:114171 Archived-At: Hi, all, I try to use 'M-x gdb' on Mac with tramp. But it runs into varies errors. Here are some details: Environment: emacs 25.1.1 runs on Mac with tramp 2.2.13.25.1. And I have a test project on a raspberry pi directory: /home/xxx/project/test_gdb/. It has a simple file: test.c. test.c is compiled by gcc with -O0 -g to test_bin. test.c: 1 int foo(int a, int b) { 2 int c = a + b; 3 return c; 4 } 5 6 int main(void) { 7 return foo(3, 4); 8 } Steps: 1. Open test.c on raspberry pi in emacs 2. run 'M-x gdb' gdb -i=mi test_bin and open gdb-many-window mode. 3. In *gud-test* buffer, run: break 7 Then I get an error in emacs Message: File /scp:xxx@my-rasp-pi:/home/xxx/project/test_gdb/"/home/xxx/project/test_gdb/test.c" no longer exists! And in *gud-test* buffer, it prints following: === gud-test content start === 96 Breakpoint 1 at 0x103c4: file test.c, line 7. 97 (gdb) list test.c:1 98 1 int foo(int a, int b) { 99 2 int c = a + b; 100 3 return c; 101 4 } 102 5 103 6 int main(void) { 104 7 return foo(3, 4); 105 8 } === gud-test content end === line 96 is OK, but I don't know why it prints line 97 to 105. I have not typed any 'list' command. And it has set a break point on line 7. 4. I continue to run some debug command like: continue, but *gud-test* buffer stucks until I type "Ctrl+g". I don't know which part causes such error, gud-mode, tramp-mode or something else and how to fix it. Thanks for any suggestion! -- Regards, Zhongwei