From: Zhongwei Yao <ashi08104@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: How to make gdb debug mode work with tramp?
Date: Wed, 6 Sep 2017 23:13:07 +0800 [thread overview]
Message-ID: <CAJnfWeHC9zDz0S9t_uArQu--iYUrjR7J2WMt_9VZjtVWbdEY+A@mail.gmail.com> (raw)
In-Reply-To: <877excp8p7.fsf@detlef>
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 #<buffer *threads of test*>) (apply
(quote gdb-thread-list-handler) args))
(with-current-buffer #<buffer *threads of test*> (apply (quote
gdb-thread-list-handler) args))
(lambda (&rest args) (with-current-buffer #<buffer *threads of test*>
(apply (quote gdb-thread-list-handler) args)))()
gdb-handle-reply(27)
gdb-done-or-error("27" done "threads=[{id=\"1\",target-id=\"process
25128\",name=\"test\",frame={level=\"0\",addr=\"0x00000000004004f4\",func=\"main\",args=[],file=\"test.c\",fullname=\"/home/xxx/projects/tests/test_gdb/test.c\",line=\"7\"},state=\"stopped\",core=\"24\"}],current-thread-id=\"1\""
t)
gdb-done("27" "threads=[{id=\"1\",target-id=\"process
25128\",name=\"test\",frame={level=\"0\",addr=\"0x00000000004004f4\",func=\"main\",args=[],file=\"test.c\",fullname=\"/home/xxx/projects/tests/test_gdb/test.c\",line=\"7\"},state=\"stopped\",core=\"24\"}],current-thread-id=\"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=[{id=\"1\",target-id=\"process
25128\",name=\"test\",frame={level=\"0\",addr=\"0x00000000004004f4\",func=\"main\",args=[],file=\"test.c\",fullname=\"/home/xxx/projects/tests/test_gdb/test.c\",line=\"7\"},state=\"stopped\",core=\"24\"}],current-thread-id=\"1\"\n(gdb)
\n28^done,BreakpointTable={nr_rows=\"1\",nr_cols=\"6\",hdr=[{width=\"7\",alignment=\"-1\",col_name=\"number\",colhdr=\"Num\"},{width=\"14\",alignment=\"-1\",col_name=\"type\",colhdr=\"Type\"},{width=\"4\",alignment=\"-1\",col_name=\"disp\",colhdr=\"Disp\"},{width=\"3\",alignment=\"-1\",col_name=\"enabled\",colhdr=\"Enb\"},{width=\"18\",alignment=\"-1\",col_name=\"addr\",colhdr=\"Address\"},{width=\"40\",alignment=\"2\",col_name=\"what\",colhdr=\"What\"}],body=[bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x00000000004004f4\",func=\"main\",file=\"test.c\",fullname=\"/home/xxx/projects/tests/test_gdb/test.c\",line=\"7\",thread-groups=[\"i1\"],times=\"1\",original-location=\"/home/xxx/projects/tests/test_gdb/test.c:7\"}]}\n(gdb)
\n29^done,locals=[]\n(gdb) \n30^done,stack=[frame={level=\"0\",addr=\"")
apply(gud-gdbmi-marker-filter
"27^done,threads=[{id=\"1\",target-id=\"process
25128\",name=\"test\",frame={level=\"0\",addr=\"0x00000000004004f4\",func=\"main\",args=[],file=\"test.c\",fullname=\"/home/xxx/projects/tests/test_gdb/test.c\",line=\"7\"},state=\"stopped\",core=\"24\"}],current-thread-id=\"1\"\n(gdb)
\n28^done,BreakpointTable={nr_rows=\"1\",nr_cols=\"6\",hdr=[{width=\"7\",alignment=\"-1\",col_name=\"number\",colhdr=\"Num\"},{width=\"14\",alignment=\"-1\",col_name=\"type\",colhdr=\"Type\"},{width=\"4\",alignment=\"-1\",col_name=\"disp\",colhdr=\"Disp\"},{width=\"3\",alignment=\"-1\",col_name=\"enabled\",colhdr=\"Enb\"},{width=\"18\",alignment=\"-1\",col_name=\"addr\",colhdr=\"Address\"},{width=\"40\",alignment=\"2\",col_name=\"what\",colhdr=\"What\"}],body=[bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x00000000004004f4\",func=\"main\",file=\"test.c\",fullname=\"/home/xxx/projects/tests/test_gdb/test.c\",line=\"7\",thread-groups=[\"i1\"],times=\"1\",original-location=\"/home/xxx/projects/tests/test_gdb/test.c:7\"}]}\n(gdb)
\n29^done,locals=[]\n(gdb) \n30^done,stack=[frame={level=\"0\",addr=\"")
gud-marker-filter("27^done,threads=[{id=\"1\",target-id=\"process
25128\",name=\"test\",frame={level=\"0\",addr=\"0x00000000004004f4\",func=\"main\",args=[],file=\"test.c\",fullname=\"/home/xxx/projects/tests/test_gdb/test.c\",line=\"7\"},state=\"stopped\",core=\"24\"}],current-thread-id=\"1\"\n(gdb)
\n28^done,BreakpointTable={nr_rows=\"1\",nr_cols=\"6\",hdr=[{width=\"7\",alignment=\"-1\",col_name=\"number\",colhdr=\"Num\"},{width=\"14\",alignment=\"-1\",col_name=\"type\",colhdr=\"Type\"},{width=\"4\",alignment=\"-1\",col_name=\"disp\",colhdr=\"Disp\"},{width=\"3\",alignment=\"-1\",col_name=\"enabled\",colhdr=\"Enb\"},{width=\"18\",alignment=\"-1\",col_name=\"addr\",colhdr=\"Address\"},{width=\"40\",alignment=\"2\",col_name=\"what\",colhdr=\"What\"}],body=[bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x00000000004004f4\",func=\"main\",file=\"test.c\",fullname=\"/home/xxx/projects/tests/test_gdb/test.c\",line=\"7\",thread-groups=[\"i1\"],times=\"1\",original-location=\"/home/xxx/projects/tests/test_gdb/test.c:7\"}]}\n(gdb)
\n29^done,locals=[]\n(gdb) \n30^done,stack=[frame={level=\"0\",addr=\"")
gud-filter(#<process gud-test>
"27^done,threads=[{id=\"1\",target-id=\"process
25128\",name=\"test\",frame={level=\"0\",addr=\"0x00000000004004f4\",func=\"main\",args=[],file=\"test.c\",fullname=\"/home/xxx/projects/tests/test_gdb/test.c\",line=\"7\"},state=\"stopped\",core=\"24\"}],current-thread-id=\"1\"\n(gdb)
\n28^done,BreakpointTable={nr_rows=\"1\",nr_cols=\"6\",hdr=[{width=\"7\",alignment=\"-1\",col_name=\"number\",colhdr=\"Num\"},{width=\"14\",alignment=\"-1\",col_name=\"type\",colhdr=\"Type\"},{width=\"4\",alignment=\"-1\",col_name=\"disp\",colhdr=\"Disp\"},{width=\"3\",alignment=\"-1\",col_name=\"enabled\",colhdr=\"Enb\"},{width=\"18\",alignment=\"-1\",col_name=\"addr\",colhdr=\"Address\"},{width=\"40\",alignment=\"2\",col_name=\"what\",colhdr=\"What\"}],body=[bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x00000000004004f4\",func=\"main\",file=\"test.c\",fullname=\"/home/xxx/projects/tests/test_gdb/test.c\",line=\"7\",thread-groups=[\"i1\"],times=\"1\",original-location=\"/home/xxx/projects/tests/test_gdb/test.c:7\"}]}\n(gdb)
\n29^done,locals=[]\n(gdb) \n30^done,stack=[frame={level=\"0\",addr=\"")
On Wed, Sep 6, 2017 at 3:50 PM, Michael Albinus <michael.albinus@gmx.de>
wrote:
> Glenn Morris <rgm@gnu.org> writes:
>
> >> This looks to me like the Emacs bug <https://debbugs.gnu.org/23608>. It
> >> 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
next prev parent reply other threads:[~2017-09-06 15:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-03 14:10 How to make gdb debug mode work with tramp? Zhongwei Yao
2017-09-05 6:39 ` Zhongwei Yao
2017-09-05 14:36 ` Michael Albinus
2017-09-05 15:43 ` Glenn Morris
2017-09-05 19:31 ` Mario Castelán Castro
2017-09-05 22:13 ` Glenn Morris
2017-09-06 7:50 ` Michael Albinus
2017-09-06 15:13 ` Zhongwei Yao [this message]
2017-09-07 10:23 ` Michael Albinus
2017-09-07 12:30 ` Zhongwei Yao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJnfWeHC9zDz0S9t_uArQu--iYUrjR7J2WMt_9VZjtVWbdEY+A@mail.gmail.com \
--to=ashi08104@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=michael.albinus@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).