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: Wed, 6 Sep 2017 23:13:07 +0800 Message-ID: References: <8760cxi54z.fsf@detlef> <877excp8p7.fsf@detlef> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1504710860 11767 195.159.176.226 (6 Sep 2017 15:14:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 6 Sep 2017 15:14:20 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Michael Albinus Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 06 17:14:12 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 1dpc1q-0002ar-CL for geh-help-gnu-emacs@m.gmane.org; Wed, 06 Sep 2017 17:14:10 +0200 Original-Received: from localhost ([::1]:36651 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpc1x-0007bH-Cm for geh-help-gnu-emacs@m.gmane.org; Wed, 06 Sep 2017 11:14:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpc11-0007U1-02 for help-gnu-emacs@gnu.org; Wed, 06 Sep 2017 11:13:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dpc0u-0003sd-RM for help-gnu-emacs@gnu.org; Wed, 06 Sep 2017 11:13:18 -0400 Original-Received: from mail-lf0-x236.google.com ([2a00:1450:4010:c07::236]:36068) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dpc0u-0003rK-Cc for help-gnu-emacs@gnu.org; Wed, 06 Sep 2017 11:13:12 -0400 Original-Received: by mail-lf0-x236.google.com with SMTP id m199so18425640lfe.3 for ; Wed, 06 Sep 2017 08:13:09 -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 :cc; bh=o8gxN8kFBwPgQx1/86KBjHSMNyaB0JAnt40QtRfgens=; b=HPGvgiZUQpQHU/uGV24uapQqMKcK1WtnDKoVrh57/ygaGGxBHeImAsFTiVlT1Ry+CZ 9NQOEG4DR1T7N0qd/VwWTzsGl1UufhElPC7olRJXGyco0q2GbdPz6jtuuYut4Ksw3rcU wb/dSja53iORqak/J/NqwnEE9r8cEMtlcS56xLV3xqg6jreaz69+tm6sWXyUiF2hoIGW 5+xNzeLKUEAfvRKCQeNDKyeBLOhEAnsJxKGNugreOFSLahPHTJHnEfH55RniaF9iNjrs sXm7KwEzLewnlvN1pQ54I/KiP6yMLPfTbgH3dCuYnz9ch/oYJiGbMz6PvEh3RM12d9n1 g+/g== 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:cc; bh=o8gxN8kFBwPgQx1/86KBjHSMNyaB0JAnt40QtRfgens=; b=WgOuuwa6HX+gotHxBVRz3WANNnES4IbZGd9KA8OEykzA1t/5ISH5jo/Wg6CH2edqRU 1vkHw+xWrf8m46uGq2CrK2VMIKCYiANbUT6IIz26v3YxunHvEdCJldhKQO8UkNfFhHcB qfRA8J6cYLzuaTC1e3W89eoIaZBssqpz4izqmxFv+gRDlIVfQDDINO6pBZPVXceSydDM mYi79Jjqh2hIVxvIldAgoeobmgL2fVNETSvXuI8BTlJrYFDeJd+HRFRqIiSlsiFuEjw9 WM+lezixMg0JGIuX9PIkPMZmduAE9z3CUV2Z7bY54nbfgIB6d2e51cH7giQYi+xunzzj bhtA== X-Gm-Message-State: AHPjjUjwyjxj22pewWd2Puj/+FA1GATzopU6xRwnViYYF67RFUrrWVrX 9waUKkkdPus+Ywe0e1+r/9dGVOCDkQ== X-Google-Smtp-Source: ADKCNb4CGhfTW8yPzrZ72P44cVkrmyRrqmLAEsOGNWGq9gQbjs1gmt8GD7cS/LCJc4zi7wQVXCNtiq3pWcQAgUnLlPI= X-Received: by 10.46.66.145 with SMTP id h17mr1157535ljf.140.1504710787977; Wed, 06 Sep 2017 08:13:07 -0700 (PDT) Original-Received: by 10.25.147.24 with HTTP; Wed, 6 Sep 2017 08:13:07 -0700 (PDT) In-Reply-To: <877excp8p7.fsf@detlef> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::236 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:114187 Archived-At: Hi, Michael, Thanks for your suggestion. But it doesn't resolve all issues. After applied your mentioned patch, the "File /scp:xxx@my-rasp-pi:/home/xxx= / project/test_gdb/"/home/xxx/project/test_gdb/test.c" no longer exists!" error is gone. And I can see the red dot breakpoint at the fringe of the source buffer after setting a breakpoint (on line 7 of test.c). So far is OK. But when I run and stop at the breakpoint line 7 and then step into line 7, the cursor of source buffer will not move at all. And then emacs become irresponsive after running several step commands. I press Ctrl-G several times. Then it returns error: json-read-string: Bad string format: "doesn't start with `\"'!" Here is the backtrace for above error: Debugger entered--Lisp error: (json-string-format "doesn't start with `\"'!") signal(json-string-format ("doesn't start with `\"'!")) json-read-string() json-read-object() apply(json-read-object nil) json-read() gdb-json-read-buffer(nil nil) gdb-json-partial-output() gdb-thread-list-handler-custom() gdb-thread-list-handler() apply(gdb-thread-list-handler nil) (save-current-buffer (set-buffer #) (apply (quote gdb-thread-list-handler) args)) (with-current-buffer # (apply (quote gdb-thread-list-handler) args)) (lambda (&rest args) (with-current-buffer # (apply (quote gdb-thread-list-handler) args)))() gdb-handle-reply(27) gdb-done-or-error("27" done "threads=3D[{id=3D\"1\",target-id=3D\"process 25128\",name=3D\"test\",frame=3D{level=3D\"0\",addr=3D\"0x00000000004004f4\= ",func=3D\"main\",args=3D[],file=3D\"test.c\",fullname=3D\"/home/xxx/projec= ts/tests/test_gdb/test.c\",line=3D\"7\"},state=3D\"stopped\",core=3D\"24\"}= ],current-thread-id=3D\"1\"" t) gdb-done("27" "threads=3D[{id=3D\"1\",target-id=3D\"process 25128\",name=3D\"test\",frame=3D{level=3D\"0\",addr=3D\"0x00000000004004f4\= ",func=3D\"main\",args=3D[],file=3D\"test.c\",fullname=3D\"/home/xxx/projec= ts/tests/test_gdb/test.c\",line=3D\"7\"},state=3D\"stopped\",core=3D\"24\"}= ],current-thread-id=3D\"1\"" t) gdbmi-bnf-incomplete-record-result("27" (gdb-done . progressive)) #[0 "\302\300\301\242\"\207" ["27" ((gdb-done . progressive)) gdbmi-bnf-incomplete-record-result] 3]() gdbmi-bnf-result-and-async-record-impl() gdbmi-bnf-async-record() gdbmi-bnf-out-of-band-record() gdbmi-bnf-output() gud-gdbmi-marker-filter("27^done,threads=3D[{id=3D\"1\",target-id=3D\"pro= cess 25128\",name=3D\"test\",frame=3D{level=3D\"0\",addr=3D\"0x00000000004004f4\= ",func=3D\"main\",args=3D[],file=3D\"test.c\",fullname=3D\"/home/xxx/projec= ts/tests/test_gdb/test.c\",line=3D\"7\"},state=3D\"stopped\",core=3D\"24\"}= ],current-thread-id=3D\"1\"\n(gdb) \n28^done,BreakpointTable=3D{nr_rows=3D\"1\",nr_cols=3D\"6\",hdr=3D[{width= =3D\"7\",alignment=3D\"-1\",col_name=3D\"number\",colhdr=3D\"Num\"},{width= =3D\"14\",alignment=3D\"-1\",col_name=3D\"type\",colhdr=3D\"Type\"},{width= =3D\"4\",alignment=3D\"-1\",col_name=3D\"disp\",colhdr=3D\"Disp\"},{width= =3D\"3\",alignment=3D\"-1\",col_name=3D\"enabled\",colhdr=3D\"Enb\"},{width= =3D\"18\",alignment=3D\"-1\",col_name=3D\"addr\",colhdr=3D\"Address\"},{wid= th=3D\"40\",alignment=3D\"2\",col_name=3D\"what\",colhdr=3D\"What\"}],body= =3D[bkpt=3D{number=3D\"1\",type=3D\"breakpoint\",disp=3D\"keep\",enabled=3D= \"y\",addr=3D\"0x00000000004004f4\",func=3D\"main\",file=3D\"test.c\",fulln= ame=3D\"/home/xxx/projects/tests/test_gdb/test.c\",line=3D\"7\",thread-grou= ps=3D[\"i1\"],times=3D\"1\",original-location=3D\"/home/xxx/projects/tests/= test_gdb/test.c:7\"}]}\n(gdb) \n29^done,locals=3D[]\n(gdb) \n30^done,stack=3D[frame=3D{level=3D\"0\",addr= =3D\"") apply(gud-gdbmi-marker-filter "27^done,threads=3D[{id=3D\"1\",target-id=3D\"process 25128\",name=3D\"test\",frame=3D{level=3D\"0\",addr=3D\"0x00000000004004f4\= ",func=3D\"main\",args=3D[],file=3D\"test.c\",fullname=3D\"/home/xxx/projec= ts/tests/test_gdb/test.c\",line=3D\"7\"},state=3D\"stopped\",core=3D\"24\"}= ],current-thread-id=3D\"1\"\n(gdb) \n28^done,BreakpointTable=3D{nr_rows=3D\"1\",nr_cols=3D\"6\",hdr=3D[{width= =3D\"7\",alignment=3D\"-1\",col_name=3D\"number\",colhdr=3D\"Num\"},{width= =3D\"14\",alignment=3D\"-1\",col_name=3D\"type\",colhdr=3D\"Type\"},{width= =3D\"4\",alignment=3D\"-1\",col_name=3D\"disp\",colhdr=3D\"Disp\"},{width= =3D\"3\",alignment=3D\"-1\",col_name=3D\"enabled\",colhdr=3D\"Enb\"},{width= =3D\"18\",alignment=3D\"-1\",col_name=3D\"addr\",colhdr=3D\"Address\"},{wid= th=3D\"40\",alignment=3D\"2\",col_name=3D\"what\",colhdr=3D\"What\"}],body= =3D[bkpt=3D{number=3D\"1\",type=3D\"breakpoint\",disp=3D\"keep\",enabled=3D= \"y\",addr=3D\"0x00000000004004f4\",func=3D\"main\",file=3D\"test.c\",fulln= ame=3D\"/home/xxx/projects/tests/test_gdb/test.c\",line=3D\"7\",thread-grou= ps=3D[\"i1\"],times=3D\"1\",original-location=3D\"/home/xxx/projects/tests/= test_gdb/test.c:7\"}]}\n(gdb) \n29^done,locals=3D[]\n(gdb) \n30^done,stack=3D[frame=3D{level=3D\"0\",addr= =3D\"") gud-marker-filter("27^done,threads=3D[{id=3D\"1\",target-id=3D\"process 25128\",name=3D\"test\",frame=3D{level=3D\"0\",addr=3D\"0x00000000004004f4\= ",func=3D\"main\",args=3D[],file=3D\"test.c\",fullname=3D\"/home/xxx/projec= ts/tests/test_gdb/test.c\",line=3D\"7\"},state=3D\"stopped\",core=3D\"24\"}= ],current-thread-id=3D\"1\"\n(gdb) \n28^done,BreakpointTable=3D{nr_rows=3D\"1\",nr_cols=3D\"6\",hdr=3D[{width= =3D\"7\",alignment=3D\"-1\",col_name=3D\"number\",colhdr=3D\"Num\"},{width= =3D\"14\",alignment=3D\"-1\",col_name=3D\"type\",colhdr=3D\"Type\"},{width= =3D\"4\",alignment=3D\"-1\",col_name=3D\"disp\",colhdr=3D\"Disp\"},{width= =3D\"3\",alignment=3D\"-1\",col_name=3D\"enabled\",colhdr=3D\"Enb\"},{width= =3D\"18\",alignment=3D\"-1\",col_name=3D\"addr\",colhdr=3D\"Address\"},{wid= th=3D\"40\",alignment=3D\"2\",col_name=3D\"what\",colhdr=3D\"What\"}],body= =3D[bkpt=3D{number=3D\"1\",type=3D\"breakpoint\",disp=3D\"keep\",enabled=3D= \"y\",addr=3D\"0x00000000004004f4\",func=3D\"main\",file=3D\"test.c\",fulln= ame=3D\"/home/xxx/projects/tests/test_gdb/test.c\",line=3D\"7\",thread-grou= ps=3D[\"i1\"],times=3D\"1\",original-location=3D\"/home/xxx/projects/tests/= test_gdb/test.c:7\"}]}\n(gdb) \n29^done,locals=3D[]\n(gdb) \n30^done,stack=3D[frame=3D{level=3D\"0\",addr= =3D\"") gud-filter(# "27^done,threads=3D[{id=3D\"1\",target-id=3D\"process 25128\",name=3D\"test\",frame=3D{level=3D\"0\",addr=3D\"0x00000000004004f4\= ",func=3D\"main\",args=3D[],file=3D\"test.c\",fullname=3D\"/home/xxx/projec= ts/tests/test_gdb/test.c\",line=3D\"7\"},state=3D\"stopped\",core=3D\"24\"}= ],current-thread-id=3D\"1\"\n(gdb) \n28^done,BreakpointTable=3D{nr_rows=3D\"1\",nr_cols=3D\"6\",hdr=3D[{width= =3D\"7\",alignment=3D\"-1\",col_name=3D\"number\",colhdr=3D\"Num\"},{width= =3D\"14\",alignment=3D\"-1\",col_name=3D\"type\",colhdr=3D\"Type\"},{width= =3D\"4\",alignment=3D\"-1\",col_name=3D\"disp\",colhdr=3D\"Disp\"},{width= =3D\"3\",alignment=3D\"-1\",col_name=3D\"enabled\",colhdr=3D\"Enb\"},{width= =3D\"18\",alignment=3D\"-1\",col_name=3D\"addr\",colhdr=3D\"Address\"},{wid= th=3D\"40\",alignment=3D\"2\",col_name=3D\"what\",colhdr=3D\"What\"}],body= =3D[bkpt=3D{number=3D\"1\",type=3D\"breakpoint\",disp=3D\"keep\",enabled=3D= \"y\",addr=3D\"0x00000000004004f4\",func=3D\"main\",file=3D\"test.c\",fulln= ame=3D\"/home/xxx/projects/tests/test_gdb/test.c\",line=3D\"7\",thread-grou= ps=3D[\"i1\"],times=3D\"1\",original-location=3D\"/home/xxx/projects/tests/= test_gdb/test.c:7\"}]}\n(gdb) \n29^done,locals=3D[]\n(gdb) \n30^done,stack=3D[frame=3D{level=3D\"0\",addr= =3D\"") On Wed, Sep 6, 2017 at 3:50 PM, Michael Albinus wrote: > Glenn Morris writes: > > >> This looks to me like the Emacs bug . I= t > >> is reported as solved in Emacs 25.2. > > > > I believe that was before 25.2 was released, and before renumbering > > occurred. It is actually marked as fixed in 26.1, ie not yet fixed in > > any release. > > Indeed. > > The bug report contains the applied patch. Zhongwei, could you check > whether it works for you? > > Best regards, Michael. > Thanks, Zhongwei