MI testsuite improvements

Bob Rossi bob@brasko.net
Sat Feb 12 10:59:00 GMT 2005


On Fri, Feb 11, 2005 at 02:34:52PM -0500, Andrew Cagney wrote:
> Bob Rossi wrote:
> >On Thu, Feb 10, 2005 at 03:52:08PM -0500, Andrew Cagney wrote:
> >
> >>>OO, I see, are you saying the mi-* tests will become the new ones, and
> >>>the mi2-* are frozen for the mi2-* development cycle?
> >>>
> >>>In order to do this for only the new tests, I'll have to add a new
> >>>parameter to mi_gdb_start to tell it to either open or not open a pty 
> >>>for the inferior. Hope this will be OK.
> >>
> >>M'kay.
> 
> I've thought hard about this one.  I'm ok with the theory in that we 
> should have a test of GDB against a "pipe" (i.e., something that doesn't 
> echo).  I've reservations about applying it across all tests though.
> 
> At present you can look at the log and see the exact interaction as 
> you'll get when you run that same GDB in a normal terminal.  This change 
> alters that.
> 
> Can you post an example log so that we can see what it looks like.

Andrew, sorry if you recieved the last Email from me directly.
Sourceware bounced the Email from the GDB list, because it was to large.
For your info, I attached mi-console.exp and mi-syn-frame.exp log
information, because those 2 have the most inferior I/O.

I've attached new_gdb.log and original_gdb.log. I actually modified 
new_gdb.log so that the PATH is the same in both. Let me know if this 
isn't OK. It does make looking at the diff much simpler.

It's obviously your call on if it's OK to use the new PTY on all the
tests. I kind of prefer it, since at this point, there is no way to
write a reliable front end to GDB without using the PTY. For example,
there's no way to reliably parse the output of GDB when the inferior is
mixing it's output in the same stream. Especially if you are debugging
your own front end to GDB!

Also, there's several other advanatage which I mentioned, including,
   - anchoring all the output of the GDB
   - anchoring all the output of the Inferior
   - parsing the output of GDB to get a syntax check
   - later advantages of parsing the output of GDB to use semantically

Let me know what you think. If you want the dbg.log files, I can provide
them.

Thanks,
Bob Rossi
-------------- next part --------------
Test Run By bob on Fri Feb 11 21:13:45 2005
Native configuration is i686-pc-linux-gnu

		=== gdb tests ===

Schedule of variations:
    unix

Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using ../../../src/gdb/testsuite/config/unix.exp as tool-and-target-specific interface file.
Running ../../../src/gdb/testsuite/gdb.mi/mi-console.exp ...
~"GNU gdb 6.3.50.20050210-cvs\n"
~"Copyright 2004 Free Software Foundation, Inc.\n"
~"GDB is free software, covered by the GNU General Public License, and you are\n"
~"welcome to change it and/or distribute copies of it under certain conditions.\n"
~"Type \"show copying\" to see the conditions.\n"
~"There is absolutely no warranty for GDB.  Type \"show warranty\" for details.\n"
~"This GDB was configured as \"i686-pc-linux-gnu\"."
~"\n"
(gdb) 
100-gdb-set height 0
100^done
(gdb) 
101-gdb-set width 0
101^done
(gdb) 
102-interpreter-exec console "tty /dev/pts/1"
102^done
(gdb) 
Executing on host: gcc ../../../src/gdb/testsuite/gdb.mi/mi-console.c  -DFAKEARGV -g  -lm   -o /home/bob/cvs/gdb/original/builddir/gdb/testsuite/gdb.mi/mi-console    (timeout = 300)
102-break-delete
102^done
(gdb) 
103-break-list
103^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}
(gdb) 
104-environment-directory -r
105-environment-directory ../../../src/gdb/testsuite/gdb.mi
104^done,source-path="$cdir:$cwd"
(gdb) 
105^done,source-path="/home/bob/cvs/gdb/original/builddir/gdb/testsuite/../../../src/gdb/testsuite/gdb.mi:$cdir:$cwd"
(gdb) 
105-file-exec-and-symbols /home/bob/cvs/gdb/original/builddir/gdb/testsuite/gdb.mi/mi-console
~"Using host libthread_db library \"/lib/libthread_db.so.1\".\n"
105^done
(gdb) 
102-break-delete
102^done
(gdb) 
103-break-list
103^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}
(gdb) 
104-environment-directory -r
105-environment-directory ../../../src/gdb/testsuite/gdb.mi
104^done,source-path="$cdir:$cwd"
(gdb) 
105^done,source-path="/home/bob/cvs/gdb/original/builddir/gdb/testsuite/../../../src/gdb/testsuite/gdb.mi:$cdir:$cwd"
(gdb) 
105-file-exec-and-symbols /home/bob/cvs/gdb/original/builddir/gdb/testsuite/gdb.mi/mi-console
105^done
(gdb) 
200-break-insert main
200^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x080483ec",func="main",file="../../../src/gdb/testsuite/gdb.mi/mi-console.c",line="13",times="0"}
(gdb) 
PASS: gdb.mi/mi-console.exp: breakpoint at main
000-exec-run 
000^running
(gdb) 
000*stopped,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x080483ec",func="main",args=[],file="../../../src/gdb/testsuite/gdb.mi/mi-console.c",line="13"}
(gdb) 
PASS: gdb.mi/mi-console.exp: mi runto main
47-exec-next
47^running
(gdb) 
PASS: gdb.mi/mi-console.exp: Testing console output
Hello \"!
PASS: gdb.mi/mi-console.exp: inferior_output:Testing console output
47*stopped,reason="end-stepping-range",thread-id="0",frame={addr="0x080483f1",func="main",args=[],file="../../../src/gdb/testsuite/gdb.mi/mi-console.c",line="14"}
(gdb) 
PASS: gdb.mi/mi-console.exp: Finished step over hello
testcase ../../../src/gdb/testsuite/gdb.mi/mi-console.exp completed in 1 seconds
Running ../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.exp ...
Executing on host: gcc ../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c  -DFAKEARGV -g  -lm   -o /home/bob/cvs/gdb/original/builddir/gdb/testsuite/gdb.mi/mi-syn-frame    (timeout = 300)
~"GNU gdb 6.3.50.20050210-cvs\n"
~"Copyright 2004 Free Software Foundation, Inc.\n"
~"GDB is free software, covered by the GNU General Public License, and you are\n"
~"welcome to change it and/or distribute copies of it under certain conditions.\n"
~"Type \"show copying\" to see the conditions.\n"
~"There is absolutely no warranty for GDB.  Type \"show warranty\" for details.\n"
~"This GDB was configured as \"i686-pc-linux-gnu\"."
~"\n"
(gdb) 
100-gdb-set height 0
100^done
(gdb) 
101-gdb-set width 0
101^done
(gdb) 
102-interpreter-exec console "tty /dev/pts/2"
102^done
(gdb) 
102-break-delete
102^done
(gdb) 
103-break-list
103^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}
(gdb) 
104-environment-directory -r
105-environment-directory ../../../src/gdb/testsuite/gdb.mi
104^done,source-path="$cdir:$cwd"
(gdb) 
105^done,source-path="/home/bob/cvs/gdb/original/builddir/gdb/testsuite/../../../src/gdb/testsuite/gdb.mi:$cdir:$cwd"
(gdb) 
105-file-exec-and-symbols /home/bob/cvs/gdb/original/builddir/gdb/testsuite/gdb.mi/mi-syn-frame
~"Using host libthread_db library \"/lib/libthread_db.so.1\".\n"
105^done
(gdb) 
102-break-delete
102^done
(gdb) 
103-break-list
103^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}
(gdb) 
104-environment-directory -r
104^done,source-path="$cdir:$cwd"
(gdb) 
105-environment-directory ../../../src/gdb/testsuite/gdb.mi
105^done,source-path="/home/bob/cvs/gdb/original/builddir/gdb/testsuite/../../../src/gdb/testsuite/gdb.mi:$cdir:$cwd"
(gdb) 
105-file-exec-and-symbols /home/bob/cvs/gdb/original/builddir/gdb/testsuite/gdb.mi/mi-syn-frame
105^done
(gdb) 
200-break-insert main
200^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x08048444",func="main",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="14",times="0"}
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: breakpoint at main
000-exec-run 
000^running
(gdb) 
000*stopped,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x08048444",func="main",args=[],file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="14"}
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: mi runto main
400-break-insert foo
400^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x0804846e",func="foo",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="27",times="0"}
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: 400-break-insert foo
401-data-evaluate-expression foo()
&"The program being debugged stopped while in a function called from GDB.\n"
&"When the function (foo) is done executing, GDB will silently\n"
&"stop (instead of continuing to evaluate the expression containing\n"
&"the function call).\n"
401^error,msg="The program being debugged stopped while in a function called from GDB.\nWhen the function (foo) is done executing, GDB will silently\nstop (instead of continuing to evaluate the expression containing\nthe function call)."
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: call inferior's function with a breakpoint set in it
402-stack-list-frames
402^done,reason="breakpoint-hit",bkptno="2",thread-id="0",frame={addr="0x0804846e",func="foo",args=[],file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="27"},stack=[frame={level="0",addr="0x0804846e",func="foo",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="27"},frame={level="1",addr="0x08048370",func="<function called from gdb>"},frame={level="2",addr="0x08048444",func="main",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="14"}]
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: backtrace from inferior function stopped at bp, showing gdb dummy frame
403-exec-continue
403^running
(gdb) 
403*stopped
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: testing exec continue
hi in foo
PASS: gdb.mi/mi-syn-frame.exp: inferior_output:testing exec continue
404-stack-list-frames 0 0
404^done,stack=[frame={level="0",addr="0x08048444",func="main",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="14"}]
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: 404-stack-list-frames 0 0
405-break-insert subroutine
405^done,bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="0x080484b6",func="subroutine",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="53",times="0"}
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: 405-break-insert subroutine
406-data-evaluate-expression have_a_very_merry_interrupt()
&"The program being debugged stopped while in a function called from GDB.\n"
&"When the function (have_a_very_merry_interrupt) is done executing, GDB will silently\n"
&"stop (instead of continuing to evaluate the expression containing\n"
&"the function call).\n"
406^error,msg="The program being debugged stopped while in a function called from GDB.\nWhen the function (have_a_very_merry_interrupt) is done executing, GDB will silently\nstop (instead of continuing to evaluate the expression containing\nthe function call)."
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: data evaluate expression
Waiting to get a signal
PASS: gdb.mi/mi-syn-frame.exp: inferior_output:data evaluate expression
407-stack-list-frames
407^done,reason="breakpoint-hit",bkptno="3",thread-id="0",frame={addr="0x080484b6",func="subroutine",args=[{name="in",value="14"}],file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="53"},stack=[frame={level="0",addr="0x080484b6",func="subroutine",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="53"},frame={level="1",addr="0x080484ae",func="handler",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="43"},frame={level="2",addr="0x4006f678",func="<signal handler called>"},frame={level="3",addr="0x400edca5",func="nanosleep",from="/lib/libc.so.6"},frame={level="4",addr="0x400edb0f",func="sleep",from="/lib/libc.so.6"},frame={level="5",addr="0x0804850b",func="have_a_very_merry_interrupt",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="64"},frame={level="6",addr="0x08048370",func="<function called from gdb>"},frame={level="7",addr="0x08048444",func="main",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="14"}]
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: 407-stack-list-frames
408-exec-continue
408^running
(gdb) 
408*stopped
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: 408-exec-continue
409-stack-list-frames 0 0
409^done,stack=[frame={level="0",addr="0x08048444",func="main",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="14"}]
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: 409-stack-list-frames 0 0
410-data-evaluate-expression bar()
&"The program being debugged was signaled while in a function called from GDB.\n"
&"GDB remains in the frame where the signal was received.\n"
&"To change this behavior use \"set unwindonsignal on\"\n"
&"Evaluation of the expression containing the function (bar) will be abandoned.\n"
410^error,msg="The program being debugged was signaled while in a function called from GDB.\nGDB remains in the frame where the signal was received.\nTo change this behavior use \"set unwindonsignal on\"\nEvaluation of the expression containing the function (bar) will be abandoned."
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: call inferior function which raises exception
hi in bar
PASS: gdb.mi/mi-syn-frame.exp: inferior_output:call inferior function which raises exception
411-stack-list-frames
411^done,reason="signal-received",signal-name="SIGSEGV",signal-meaning="Segmentation fault",thread-id="0",frame={addr="0x08048498",func="bar",args=[],file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="37"},stack=[frame={level="0",addr="0x08048498",func="bar",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="37"},frame={level="1",addr="0x08048370",func="<function called from gdb>"},frame={level="2",addr="0x08048444",func="main",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="14"}]
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: backtrace from inferior function at exception
testcase ../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.exp completed in 1 seconds

		=== gdb Summary ===

# of expected passes		22
Executing on host: /home/bob/cvs/gdb/original/builddir/gdb/testsuite/../../gdb/gdb -nw --command gdb_cmd    (timeout = 300)
GNU gdb 6.3.50.20050210-cvs
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
/home/bob/cvs/gdb/original/builddir/gdb/testsuite/../../gdb/gdb version  6.3.50.20050210-cvs -nx

runtest completed at Fri Feb 11 21:13:47 2005
-------------- next part --------------
Test Run By bob on Fri Feb 11 21:14:19 2005
Native configuration is i686-pc-linux-gnu

		=== gdb tests ===

Schedule of variations:
    unix

Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using ../../../src/gdb/testsuite/config/unix.exp as tool-and-target-specific interface file.
Running ../../../src/gdb/testsuite/gdb.mi/mi-console.exp ...
~"GNU gdb 6.3.50.20050210-cvs\n"
~"Copyright 2004 Free Software Foundation, Inc.\n"
~"GDB is free software, covered by the GNU General Public License, and you are\n"
~"welcome to change it and/or distribute copies of it under certain conditions.\n"
~"Type \"show copying\" to see the conditions.\n"
~"There is absolutely no warranty for GDB.  Type \"show warranty\" for details.\n"
~"This GDB was configured as \"i686-pc-linux-gnu\"."
~"\n"
(gdb) 
100-gdb-set height 0
100^done
(gdb) 
101-gdb-set width 0
101^done
(gdb) 
Executing on host: gcc ../../../src/gdb/testsuite/gdb.mi/mi-console.c  -DFAKEARGV -g  -lm   -o /home/bob/cvs/gdb/original/builddir/gdb/testsuite/gdb.mi/mi-console    (timeout = 300)
102-break-delete
102^done
(gdb) 
103-break-list
103^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}
(gdb) 
104-environment-directory -r
105-environment-directory ../../../src/gdb/testsuite/gdb.mi
104^done,source-path="$cdir:$cwd"
(gdb) 
105^done,source-path="/home/bob/cvs/gdb/original/builddir/gdb/testsuite/../../../src/gdb/testsuite/gdb.mi:$cdir:$cwd"
(gdb) 
105-file-exec-and-symbols /home/bob/cvs/gdb/original/builddir/gdb/testsuite/gdb.mi/mi-console
~"Using host libthread_db library \"/lib/libthread_db.so.1\".\n"
105^done
(gdb) 
102-break-delete
102^done
(gdb) 
103-break-list
103^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}
(gdb) 
104-environment-directory -r
105-environment-directory ../../../src/gdb/testsuite/gdb.mi
104^done,source-path="$cdir:$cwd"
(gdb) 
105^done,source-path="/home/bob/cvs/gdb/original/builddir/gdb/testsuite/../../../src/gdb/testsuite/gdb.mi:$cdir:$cwd"
(gdb) 
105-file-exec-and-symbols /home/bob/cvs/gdb/original/builddir/gdb/testsuite/gdb.mi/mi-console
105^done
(gdb) 
200-break-insert main
200^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x080483ec",func="main",file="../../../src/gdb/testsuite/gdb.mi/mi-console.c",line="13",times="0"}
(gdb) 
PASS: gdb.mi/mi-console.exp: breakpoint at main
000-exec-run 
000^running
(gdb) 
000*stopped,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x080483ec",func="main",args=[],file="../../../src/gdb/testsuite/gdb.mi/mi-console.c",line="13"}
(gdb) 
PASS: gdb.mi/mi-console.exp: mi runto main
47-exec-next
47^running
(gdb) 
PASS: gdb.mi/mi-console.exp: Started step over hello
HelloKFAIL: gdb.mi/mi-console.exp: Hello message (PRMS: gdb/623)
 \"!

47*stopped,reason="end-stepping-range",thread-id="0",frame={addr="0x080483f1",func="main",args=[],file="../../../src/gdb/testsuite/gdb.mi/mi-console.c",line="14"}
(gdb) 
PASS: gdb.mi/mi-console.exp: Finished step over hello
testcase ../../../src/gdb/testsuite/gdb.mi/mi-console.exp completed in 0 seconds
Running ../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.exp ...
Executing on host: gcc ../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c  -DFAKEARGV -g  -lm   -o /home/bob/cvs/gdb/original/builddir/gdb/testsuite/gdb.mi/mi-syn-frame    (timeout = 300)
~"GNU gdb 6.3.50.20050210-cvs\n"
~"Copyright 2004 Free Software Foundation, Inc.\n"
~"GDB is free software, covered by the GNU General Public License, and you are\n"
~"welcome to change it and/or distribute copies of it under certain conditions.\n"
~"Type \"show copying\" to see the conditions.\n"
~"There is absolutely no warranty for GDB.  Type \"show warranty\" for details.\n"
~"This GDB was configured as \"i686-pc-linux-gnu\"."
~"\n"
(gdb) 
100-gdb-set height 0
100^done
(gdb) 
101-gdb-set width 0
101^done
(gdb) 
102-break-delete
102^done
(gdb) 
103-break-list
103^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}
(gdb) 
104-environment-directory -r
104^done,source-path="$cdir:$cwd"
(gdb) 
105-environment-directory ../../../src/gdb/testsuite/gdb.mi
105^done,source-path="/home/bob/cvs/gdb/original/builddir/gdb/testsuite/../../../src/gdb/testsuite/gdb.mi:$cdir:$cwd"
(gdb) 
105-file-exec-and-symbols /home/bob/cvs/gdb/original/builddir/gdb/testsuite/gdb.mi/mi-syn-frame
~"Using host libthread_db library \"/lib/libthread_db.so.1\".\n"
105^done
(gdb) 
102-break-delete
102^done
(gdb) 
103-break-list
103^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}
(gdb) 
104-environment-directory -r
104^done,source-path="$cdir:$cwd"
(gdb) 
105-environment-directory ../../../src/gdb/testsuite/gdb.mi
105^done,source-path="/home/bob/cvs/gdb/original/builddir/gdb/testsuite/../../../src/gdb/testsuite/gdb.mi:$cdir:$cwd"
(gdb) 
105-file-exec-and-symbols /home/bob/cvs/gdb/original/builddir/gdb/testsuite/gdb.mi/mi-syn-frame
105^done
(gdb) 
200-break-insert main
200^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x08048444",func="main",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="14",times="0"}
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: breakpoint at main
000-exec-run 
000^running
(gdb) 
000*stopped,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x08048444",func="main",args=[],file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="14"}
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: mi runto main
400-break-insert foo
400^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x0804846e",func="foo",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="27",times="0"}
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: 400-break-insert foo
401-data-evaluate-expression foo()
&"The program being debugged stopped while in a function called from GDB.\n"
&"When the function (foo) is done executing, GDB will silently\n"
&"stop (instead of continuing to evaluate the expression containing\n"
&"the function call).\n"
401^error,msg="The program being debugged stopped while in a function called from GDB.\nWhen the function (foo) is done executing, GDB will silently\nstop (instead of continuing to evaluate the expression containing\nthe function call)."
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: call inferior's function with a breakpoint set in it
402-stack-list-frames
402^done,reason="breakpoint-hit",bkptno="2",thread-id="0",frame={addr="0x0804846e",func="foo",args=[],file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="27"},stack=[frame={level="0",addr="0x0804846e",func="foo",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="27"},frame={level="1",addr="0x08048370",func="<function called from gdb>"},frame={level="2",addr="0x08048444",func="main",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="14"}]
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: backtrace from inferior function stopped at bp, showing gdb dummy frame
403-exec-continue
403^running
(gdb) 
hi in foo
403*stopped
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: 403-exec-continue
404-stack-list-frames 0 0
404^done,stack=[frame={level="0",addr="0x08048444",func="main",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="14"}]
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: 404-stack-list-frames 0 0
405-break-insert subroutine
405^done,bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="0x080484b6",func="subroutine",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="53",times="0"}
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: 405-break-insert subroutine
406-data-evaluate-expression have_a_very_merry_interrupt()
Waiting to get a signal
&"The program being debugged stopped while in a function called from GDB.\n"
&"When the function (have_a_very_merry_interrupt) is done executing, GDB will silently\n"
&"stop (instead of continuing to evaluate the expression containing\n"
&"the function call).\n"
406^error,msg="The program being debugged stopped while in a function called from GDB.\nWhen the function (have_a_very_merry_interrupt) is done executing, GDB will silently\nstop (instead of continuing to evaluate the expression containing\nthe function call)."
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: 406-data-evaluate-expression have_a_very_merry_interrupt()
407-stack-list-frames
407^done,reason="breakpoint-hit",bkptno="3",thread-id="0",frame={addr="0x080484b6",func="subroutine",args=[{name="in",value="14"}],file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="53"},stack=[frame={level="0",addr="0x080484b6",func="subroutine",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="53"},frame={level="1",addr="0x080484ae",func="handler",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="43"},frame={level="2",addr="0x4006f678",func="<signal handler called>"},frame={level="3",addr="0x400edca5",func="nanosleep",from="/lib/libc.so.6"},frame={level="4",addr="0x400edb0f",func="sleep",from="/lib/libc.so.6"},frame={level="5",addr="0x0804850b",func="have_a_very_merry_interrupt",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="64"},frame={level="6",addr="0x08048370",func="<function called from gdb>"},frame={level="7",addr="0x08048444",func="main",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="14"}]
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: 407-stack-list-frames
408-exec-continue
408^running
(gdb) 
408*stopped
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: 408-exec-continue
409-stack-list-frames 0 0
409^done,stack=[frame={level="0",addr="0x08048444",func="main",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="14"}]
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: 409-stack-list-frames 0 0
410-data-evaluate-expression bar()
hi in bar
&"The program being debugged was signaled while in a function called from GDB.\n"
&"GDB remains in the frame where the signal was received.\n"
&"To change this behavior use \"set unwindonsignal on\"\n"
&"Evaluation of the expression containing the function (bar) will be abandoned.\n"
410^error,msg="The program being debugged was signaled while in a function called from GDB.\nGDB remains in the frame where the signal was received.\nTo change this behavior use \"set unwindonsignal on\"\nEvaluation of the expression containing the function (bar) will be abandoned."
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: call inferior function which raises exception
411-stack-list-frames
411^done,reason="signal-received",signal-name="SIGSEGV",signal-meaning="Segmentation fault",thread-id="0",frame={addr="0x08048498",func="bar",args=[],file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="37"},stack=[frame={level="0",addr="0x08048498",func="bar",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="37"},frame={level="1",addr="0x08048370",func="<function called from gdb>"},frame={level="2",addr="0x08048444",func="main",file="../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.c",line="14"}]
(gdb) 
PASS: gdb.mi/mi-syn-frame.exp: backtrace from inferior function at exception
testcase ../../../src/gdb/testsuite/gdb.mi/mi-syn-frame.exp completed in 2 seconds

		=== gdb Summary ===

# of expected passes		18
# of known failures		1
Executing on host: /home/bob/cvs/gdb/original/builddir/gdb/testsuite/../../gdb/gdb -nw --command gdb_cmd    (timeout = 300)
GNU gdb 6.3.50.20050210-cvs
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
/home/bob/cvs/gdb/original/builddir/gdb/testsuite/../../gdb/gdb version  6.3.50.20050210-cvs -nx

runtest completed at Fri Feb 11 21:14:21 2005


More information about the Gdb-patches mailing list