vim - gdb communication problem

113 views
Skip to first unread message

Caesarmv

unread,
Dec 24, 2011, 9:41:06 AM12/24/11
to vim...@googlegroups.com
Hi All.

I am using vim with gdb through expect script.
I have key mapped to sh script which call expect script which call gdb which call my console application.
vim -> sh -> expect -> gdb -> myApplication

So when I pressing ;d in vim I got GDB with my application started and breakpoint set to string where vim cursor pointed.

I am using the folowing code in my expect script.  
trap interact {SIGQUIT}
This allow me to stop expect script manually by pressing Control-\ which sends SIGQUIT to expect and give control to me.

I am migrating from fedora core 4 to ubuntu 11.10.

And all works except one issue:

When I press Control-\ in ubuntu I got not gdb or application on the screen but I got messed screen with vim and gdb and my application.
And it messed while I not send SIGKILL to vim.

Here is terminal settings for both OS:
Ubuntu 11.10:
c@cwd:~$ stty -a
speed 38400 baud; rows 55; columns 167; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -ixon -ixoff -iuclc -ixany -imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke

Fedora Core 4:
c:~% stty -a
speed 38400 baud; rows 55; columns 167; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;
flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke


I can't understand what is wrong. Could you please help me to resolve the issue?


Thanks

Caesarmv

unread,
Dec 24, 2011, 10:26:47 AM12/24/11
to vim...@googlegroups.com
I've checked the following schema:


sh -> expect -> gdb -> myApplication
vim -> sh -> expect ->  myApplication

Both works well with SIGQUIT. 

But this
vim -> sh -> expect -> gdb -> myApplication
returns to vim while gdb process still exists.
And it allow to move vim cursor and run gdb commands in time.  

It seems like the bug in Vim 7.3.154. Any ideas?

It tried to compile Vim 7.1 in ubuntu 11.10. It compiled well but I can't run it cause it crashed with buffer overflow.


2011/12/24 Caesarmv <caes...@gmail.com>

Caesarmv

unread,
Dec 25, 2011, 6:56:40 AM12/25/11
to vim...@googlegroups.com
Hi All.

The issue was resolved by changing #!/bin/sh to #!/bin/bash in sh script.
It seems like the bug in dash, which is /bin/sh pointed to (ubuntu).

Thanks

2011/12/24 Caesarmv <caes...@gmail.com>
Reply all
Reply to author
Forward
0 new messages