From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17414 invoked by alias); 21 Feb 2003 20:30:03 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 17387 invoked from network); 21 Feb 2003 20:30:02 -0000 Received: from unknown (HELO nick.uklinux.net) (194.247.49.61) by 172.16.49.205 with SMTP; 21 Feb 2003 20:30:02 -0000 Received: by nick.uklinux.net (Postfix, from userid 501) id D6CC576037; Fri, 21 Feb 2003 20:26:14 +0000 (GMT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15958.35685.52390.938619@nick.uklinux.net> Date: Fri, 21 Feb 2003 20:30:00 -0000 To: Andrew Cagney Cc: gdb@sources.redhat.com Subject: Re: GDB/MI In-Reply-To: <3E5585BA.6050409@redhat.com> References: <15957.32294.506214.978988@nick.uklinux.net> <3E5585BA.6050409@redhat.com> X-SW-Source: 2003-02/txt/msg00484.txt.bz2 > The prompt: > > "(gdb)\n" > > indicates that GDB is ready for input. That prompt terminates every > transaction. It is independant of the console GDB prompt: It looks very like the console GDB prompt and could cause confusion so perhaps it could be replaced with something like "(mi)\n". If "(gdb)\n" is an invariant (the user can't change it) then that would be fine except that, debugging a program with output I get: ... (gdb) -exec-run ^running (gdb) Enter no. of iterations: and "(gdb)\n" is output but GDB *not* ready for input, the inferior is. This is the extra "(gdb)\n" that I talked about earlier with Elena as in: -exec-run ^running (gdb) *stopped,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x0804856c",func="main",args=[{name="argc",value="1"},{name="argv",value="0xbffff7f4"}],file="mytest.c",line="36"} (gdb) According to the current documentation for the GDB/MI Output Syntax --------------------, the first "(gdb)\n" should not be output. > (gdb) > -interpreter-exec console set prompt foo > &"Argument required (expression to compute).\n" > ^error,msg="Argument required (expression to compute)." > (gdb) > -interpreter-exec console "set prompt foo" > ^done > (gdb) > -interpreter-exec console "show prompt" > ~"Gdb's prompt is \"foo\".\n" > ^done > (gdb) > > There is a `bug' here - GDB should generate a `=prompt-changed' event. I can't find any reference to such an event but if MI has its own prompt then maybe its not needed. Nick