This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA] [PATCH] handle timeout in read_frame


Michael Elizabeth Chastain wrote:
> 
> This patch fixes a timeout bug in remote.c.
> 
> If a timeout occurs while reading the packet checksum, read_frame
> treats the timeout as an ordinary input character with a value of "-2".
> gdb not only loses that frame: it throws an error out of fromhex.
> This causes a lot of random testsuite failures with the message "Reply
> contains invalid hex digit -2".
> 
> Testing: first, find a host, target, and testsuite that suffer from the
> "invalid hex digit -2" problem.  I used a Red Hat Linux 6.0 box for the
> host, i386-pc-aout for the target and call-ar-st.exp for the testsuite.
> Here's an excerpt from gdb.log before the patch:
> 
>     Reply contains invalid hex digit -2
>     FAIL: gdb.base/call-ar-st.exp: (timeout) print print_array_rep(*list1, *list2, *list3)
> 
> After the patch, these errors go away.

The patch is fine (one less unchecked readchar()!!!).  What was the
ChangeLog entry?

	Andrew

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]