This is the mail archive of the 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]
Other format: [Raw text]

Re: [patch] Fix testsuite annotate-quit race (PR 544)


original post:

On Wed, 19 Mar 2008 00:17:38 +0100, Daniel Jacobowitz wrote:
> On Tue, Mar 18, 2008 at 11:54:36PM +0100, Jan Kratochvil wrote:
> > Hi,
> > 
> > PR 544 des gdb.cp/annota2.exp and gdb.cp/annota3.exp sometimes FAIL with:
> > 	FAIL: gdb.cp/annota3.exp: annotate-quit (pattern 1)
> Isn't this a bug in GDB, not a bug in the test?

You are right it is probably better to fix it in readline.
There are two excessive GDB prompts displayed as seen in strace:

write(1, "\n\32\32pre-prompt\n(gdb) \n\32\32prompt\n", 30) = 30
--- SIGINT (Interrupt) @ 0 (0) ---
write(1, "\n\32\32pre-prompt\n(gdb) \n\32\32prompt\n\n\32\32pre-prompt\n(gdb) \n\32\32prompt\n", 60) = 60

One can put `sleep (1)' at the end of _RL_OUTPUT_SOME_CHARS and type
	p 1<enter><ctrl-c>
to abort the prompt printing. Before the patch:
	(gdb) p 1
	$1 = 1
	Quit) (gdb) 
	(gdb) _
After the patch:
	[bash] ../gdb/gdb -nx -silent(gdb) p 1
	$1 = 1
	(gdb) Quit
	(gdb) _

There are no testsuite regressions on Fedora 8 x86_64.
The problem reproduced the same on readline-5.2.
There will be needed a GDB patch to close PR 544.


Attachment: readline-display-blockint.patch
Description: Text document

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