This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Annotations
- From: Nick Roberts <nick at nick dot uklinux dot net>
- To: Andrew Cagney <cagney at gnu dot org>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 29 Jan 2004 00:11:40 +0000
- Subject: Annotations
- References: <16176.3560.65649.7079@nick.uklinux.net><4016A245.6030001@gnu.org>
> 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
...