unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to make gdb debug mode work with tramp?
@ 2017-09-03 14:10 Zhongwei Yao
  2017-09-05  6:39 ` Zhongwei Yao
  2017-09-05 14:36 ` Michael Albinus
  0 siblings, 2 replies; 10+ messages in thread
From: Zhongwei Yao @ 2017-09-03 14:10 UTC (permalink / raw)
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-09-07 12:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2017-09-07 10:23         ` Michael Albinus
2017-09-07 12:30           ` Zhongwei Yao

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).