From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12390 invoked by alias); 29 Jan 2004 00:20:11 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 12379 invoked from network); 29 Jan 2004 00:20:09 -0000 Received: from unknown (HELO nick.uklinux.net) (194.247.49.125) by sources.redhat.com with SMTP; 29 Jan 2004 00:20:09 -0000 Received: by nick.uklinux.net (Postfix, from userid 501) id 3F8FD75FDE; Thu, 29 Jan 2004 00:11:41 +0000 (GMT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16408.20412.285816.8816@nick.uklinux.net> Date: Thu, 29 Jan 2004 00:20:00 -0000 To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Annotations In-Reply-To: <4016A245.6030001@gnu.org> References: <16176.3560.65649.7079@nick.uklinux.net> <4016A245.6030001@gnu.org> X-SW-Source: 2004-01/txt/msg00728.txt.bz2 > Can you post a log with/with-out this patch to illustrate what's > happening. You're right - emacs should see "stopped" first but there > might be a better long-term way to do this. > > I suspect this will mean playing with the print-stop-reason code. Please ignore the patch (I should have said it was inelegant and did not work). The bug is real, however. See below. Similar (stream separation) problems occur with GDB output running multi-threaded programs. However, I don't know how much effort you are prepared to spend on annotations. If you guide me I can look at annotate.c. Jim Blandy has suggested using the tty command for stream separation but presumably this wouldn't work on Windows. Nick example.c: myproc() { int j; j = 1; } main() { int i; i = 1; myproc(); i = 2; } Start like: gdb -ann=2 example Type: set height 0 b myproc run finish Output: (Frame details are given before the stopped annotation and so appear to be program output) ... ^Z^Zstarting ^Z^Zframes-invalid ^Z^Zframes-invalid ^Z^Zframe-begin 0 0x8048336 ^Z^Zframe-function-name main ^Z^Zframe-args () ^Z^Zframe-source-begin at ^Z^Zframe-source-file example.c ^Z^Zframe-source-file-end : ^Z^Zframe-source-line 12 ^Z^Zframe-source-end ^Z^Zsource /home/nick/example.c:12:71:beg:0x8048336 ^Z^Zframe-end ^Z^Zstopped ...