Article View: gnu.gdb.bug
Article #721gdb hangs forever when a remote system is not responding
From: Glenn Engel
Date: Thu, 16 Mar 1989 17:58
Date: Thu, 16 Mar 1989 17:58
52 lines
1557 bytes
1557 bytes
When using gdb3.1.2 to attach to a remote system, it can hang forever waiting
for a response from the remote system. Control-C does not interrupt.
The patch below fixes this problem. These patches were applied on top
of previous patches I sent in for remote.c. The changes are in the
getpkt() function.
--
| Glenn R. Engel
| Hewlett-Packard
| (206) 335-2066
| glenne%hplsla@hplabs.hp.com
*** remote.c.orig Thu Mar 16 08:03:47 1989
--- remote.c Thu Mar 16 08:30:09 1989
***************
*** 498,503
int c;
unsigned char c1, c2;
extern kiodebug;
while (1)
{
--- 498,505 -----
int c;
unsigned char c1, c2;
extern kiodebug;
+ /* allow immediate quit while reading from device, it could be hung */
+ immediate_quit++;
while (1)
{
***************
*** 527,532
write (remote_desc, "-", 1);
}
write (remote_desc, "+", 1);
if (kiodebug)
--- 529,536 -----
write (remote_desc, "-", 1);
}
+ immediate_quit--;
+
write (remote_desc, "+", 1);
if (kiodebug)
Technical Details
Message-ID:
<8903161758.AA17886@labgre.HP.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!HP-SDE.SDE.HP.COM!glenne%hplslaShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!HP-SDE.SDE.HP.COM!glenne%hplsla From: glenne%hplsla@HP-SDE.SDE.HP.COM (Glenn Engel) Newsgroups: gnu.gdb.bug Subject: gdb hangs forever when a remote system is not responding Message-ID: <8903161758.AA17886@labgre.HP.COM> Date: 16 Mar 89 17:58:31 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 52