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: Re: How to make gdb debug mode work with tramp? Date: Tue, 5 Sep 2017 14:39:08 +0800 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1504593609 4522 195.159.176.226 (5 Sep 2017 06:40:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 5 Sep 2017 06:40:09 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 05 08:39:55 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 1dp7WO-0008DW-UD for geh-help-gnu-emacs@m.gmane.org; Tue, 05 Sep 2017 08:39:41 +0200 Original-Received: from localhost ([::1]:57113 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dp7WU-0007Yu-Fl for geh-help-gnu-emacs@m.gmane.org; Tue, 05 Sep 2017 02:39:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dp7W0-0007Yi-Sh for help-gnu-emacs@gnu.org; Tue, 05 Sep 2017 02:39:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dp7Vv-0003wO-VE for help-gnu-emacs@gnu.org; Tue, 05 Sep 2017 02:39:16 -0400 Original-Received: from mail-lf0-x230.google.com ([2a00:1450:4010:c07::230]:33398) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dp7Vv-0003vq-Jo for help-gnu-emacs@gnu.org; Tue, 05 Sep 2017 02:39:11 -0400 Original-Received: by mail-lf0-x230.google.com with SMTP id s11so7769029lfe.0 for ; Mon, 04 Sep 2017 23:39:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=uOClQaIayQ4Er+FEuzJ+zi22k3Tm6Rl9HCv0+MehbJU=; b=QaJM1sZJOpaf27D/JoneISzwOsfBAbVYGOXW/9DX7C7C5b10xGUGd3HVC925TWYThy GpJ2oRyzdIKQ/K4pK7+nW7bbbhbIuhoLVFUgx0XzkSCR8Hza7qvAqQyRmxnrkxalxV7N m10zn/0wiZrEvKzzhVWEmHZE2o7eHVcT6efWK/gCWMtsGi0J4yQgfXafpm7Z8AvyJpBa kh/tAkASEJTLeSOEj95eUNsg1nhAsfQ1PJBLSJiWg3vOoTujJ85o3SiOD3YpO7mX3EN8 XtBsmMKIgV2L/rlix7bZ5WxtNm/9KhBcHJpr8G/YaXFsvG6wJTF5oumcUgSZNnlu2e0X 66nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=uOClQaIayQ4Er+FEuzJ+zi22k3Tm6Rl9HCv0+MehbJU=; b=DeDGdCubsmRgITVgD903SMcxvRq6j4QxObJ5bt5ik7ISEySNbocVnLKdr8XdhIX3Li gRz/9HKJmBSDtE9U8xxawJdHPHTjSB+rhUWgrY81ECn5GVHTiGGWpDuCI1mCB5LO7tGW zVC7OKq8Enq4PEmJHHlkBYZldnhCbuCINsmjssny77FmtHEfrZ+xCC/f0qoXEu82Bl9v AM4xFzM3WChSK1NncPAhGnTM8V56DoDxL1Wr1tZgZnF+0Qrc4ArgnCSDRpGzKKkxpTwm J12iJ9S+JiMv+m7e9e2ZntAoTZZRRIY8e3plfGf5Sip8zFimnnx9YGfl3XP2q0X/b6Rj Yo9Q== X-Gm-Message-State: AHPjjUjS84QQSsSZp8QXS1/Qb9JMQBrAVCZeYnQrG+yxsR0j7ZlSGq4k OLl7b7gx0qD28uyqeFyeXpy8RVLF6h8Q X-Google-Smtp-Source: ADKCNb4Gpdmd1U7wYE9hMLQGJoingPPcvG7cLiHXm2Er2oWfqN0YdMM3dASZkGVqXV2YUrO53KY6x8erS1/0waWBtVI= X-Received: by 10.46.81.26 with SMTP id f26mr985442ljb.185.1504593548756; Mon, 04 Sep 2017 23:39:08 -0700 (PDT) Original-Received: by 10.25.147.24 with HTTP; Mon, 4 Sep 2017 23:39:08 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::230 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:114176 Archived-At: I fall back to gud-gdb and it can work. However, many features of gdb-mi are gone. On Sun, Sep 3, 2017 at 10:10 PM, Zhongwei Yao wrote: > 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 > >