help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make gdb debug mode work with tramp?


From: Zhongwei Yao
Subject: Re: How to make gdb debug mode work with tramp?
Date: Wed, 6 Sep 2017 23:13:07 +0800

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]