This is the mail archive of the gdb-patches@sources.redhat.com 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]

Annotations


 > 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

...


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