Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nick@nick.uklinux.net>
To: Andrew Cagney <cagney@gnu.org>
Cc: gdb-patches@sources.redhat.com
Subject: Annotations
Date: Thu, 29 Jan 2004 00:20:00 -0000	[thread overview]
Message-ID: <16408.20412.285816.8816@nick.uklinux.net> (raw)
In-Reply-To: <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

...


  reply	other threads:[~2004-01-29  0:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-05 20:10 RFA (?) Annotate Level 3 patch Nick Roberts
2004-01-27 20:28 ` Andrew Cagney
2004-01-29  0:20   ` Nick Roberts [this message]
2004-02-02 22:09   ` Nick Roberts
2004-02-10 23:40     ` Andrew Cagney
2004-02-12 21:53       ` Nick Roberts
2004-02-12 22:34         ` Bob Rossi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16408.20412.285816.8816@nick.uklinux.net \
    --to=nick@nick.uklinux.net \
    --cc=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox