diff options
author | Fred Fish <fnf@specifix.com> | 1995-08-16 07:37:19 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1995-08-16 07:37:19 +0000 |
commit | ce102e96e626d98ff540720807e49abd9bec3d20 (patch) | |
tree | aea227e348975ab7e58e6118f84398b4e5b61241 /gdb/testsuite/gdb.base/opaque.exp | |
parent | 54b8ecb5f1b3bd0f0c1f42489df20c2d8dbe191c (diff) | |
download | ppe42-binutils-ce102e96e626d98ff540720807e49abd9bec3d20.tar.gz ppe42-binutils-ce102e96e626d98ff540720807e49abd9bec3d20.zip |
* gdb.base/Makefile.in: Add action to .c.o transformation
rule that generates a .ci file for each .o file and remove
explicit .c.o rules except for callfuncs.o.
* gdb.c++/Makefile.in: Add .cc.o transformation rule that
generates a .ci file for each .o file and remove explicit
.cc.o rules.
(clean): Remove *.tmp *.ci files.
(EXECUTABLES): Remove templ-info.exp.
* gdb.base/compiler.c: New file.
* gdb.c++/compiler.cc: New file
* gdb.base/scope.exp: Source gdb.base/scope.ci.
Change rs6000-*-* xfail for
"print 'scope0.c'::filelocal_ro" and
"print 'scope1.c'::filelocal" and
"print 'scope1.c'::filelocal_bss" and
"print 'scope1.c'::filelocal_ro" and
"print 'scope1.c'::foo::funclocal" and
"print 'scope1.c'::foo::funclocal_ro" and
"print 'scope1.c'::bar::funclocal" and
"print 'scope0.c'::filelocal_ro" and
"print 'scope1.c'::filelocal at foo" and
"print 'scope1.c'::filelocal_bss at foo" and
"print 'scope1.c'::filelocal_ro at foo" and
"print 'scope1.c'::foo::funclocal at foo" and
"print 'scope1.c'::foo::funclocal_bss at foo" and
"print 'scope1.c'::foo::funclocal_ro at foo" and
"print 'scope1.c'::bar::funclocal at foo" and
"print 'scope0.c'::filelocal_ro" and
"print 'scope1.c'::filelocal" and
"print 'scope1.c'::filelocal_bss" and
"print 'scope1.c'::filelocal_ro" and
"print 'scope1.c'::foo::funclocal" and
"print 'scope1.c'::foo::funclocal_bss" and
"print 'scope1.c'::foo::funclocal_ro" and
"print 'scope1.c'::bar::funclocal" and
"print 'scope1.c'::bar::funclocal_bss"
to only be xfail'd when not compiled with gcc.
Add rs6000-*-* xfail for
"print 'scope0.c'::filelocal_bss before run"
when compiled with gcc.
(test_at_main): Add rs6000-*-* xfail for
"print filelocal_ro in test_at_main"
when compiled with gcc.
* gdb.base/ptype.exp: Source gdb.base/ptype.ci.
Add rs6000-*-aix* xfail for
"whatis unnamed typedef'd enum (compiler bug in IBM's xlc)" and
"ptype t_char_array", not compiled with gcc.
* gdb.base/list.exp (test_list_function): Add rs6000-*-*
xfail for "list foo (in include file)" when gcc compiled.
* gdb.base/funcargs.exp: Source gdb.base/funcargs.ci
(integral_args): Add rs6000-*-* xfail for
"run to call0a" if not compiled with gcc.
(unsigned_integral_args): Add rs6000-*-* xfail for
"run to call1a" if not compiled with gcc.
(float_and_integral_args): Add rs6000-*-* xfail for
"run to call2a" if not compiled with gcc and for
"continue to call2b" for any compiler.
Add rs6000-*-* xfail to
"print f1 after run to call2a" for gcc compiled.
(discard_and_shuffle): Add rs6000-*-* xfail for
"run to call6a".
(shuffle_round_robin): Add rs6000-*-* xfail for
"backtrace from call7a" if not compiled with gcc.
Add rs6000-*-* xfail for
"backtrace from call7b" if compiled with gcc.
(call_after_alloca): Add rs6000-*-* xfail for
"print c in call_after_alloca" and
"print s in call_after_alloca" and
"backtrace from call_after_alloca_subr"
if not compiled with gcc.
(localvars_in_indirect_call): Add rs6000-*-* xfail for
"print c in localvars_in_indirect_call" and
"print c in localvars_in_indirect_call" and
"backtrace in indirectly called function" and
"stepping into indirectly called function"
if not compiled with gcc.
(localvars_after_alloca): Add rs6000-*-* xfail for
"print c after runto localvars_after_alloca" and
"print s after runto localvars_after_alloca" and
"print i after runto localvars_after_alloca" and
"print l after runto localvars_after_alloca"
for all compilers.
* gdb.base/whatis.exp: Source gdb.base/whatis.ci rather
than whatis-info.exp.
* gdb.base/opaque.exp: Source gdb.base/opaque0.ci rather
than opaque-info.exp.
Setup rs6000-*-* xfail for
"ptype on opaque struct pointer (statically)" and
"ptype on opaque struct pointer (dynamically)" when
not compiled with gcc.
* gdb.base/callfuncs.exp: Source gdb.base/callfuncs.ci
rather than callf-info.exp.
(do_function_calls): Add clear_xfail for rs6000-*-* for
"p t_float_values2(3.14159,float_val2)". Seems to work
fine there, both with xlc and gcc. Need to find out what
it is doing right and fix other platforms.
* gdb.base/callfuncs.exp: Add rs6000-*-* xfail for
"call inferior func with struct - returns int",
"call inferior func with struct - returns long",
"call inferior func with struct - returns float",
"call inferior func with struct - returns double",
"call inferior func with struct - returns char *",
but only if not gcc compiled (presumes xlc compiled).
Change rs6000-*-* xfails for
"call inferior func with struct - returns char" and
" call inferior func with struct - returns short" to only
xfail if not using gcc.
(clean mostlyclean): Remove *.ci and *.tmp files.
* gdb.c++/templates.exp: Source gdb.c++/templates.ci rather
than templ-info.exp.
* gdb.base/langs.exp: Source gdb.base/langs.ci.
Add rs6000-*-* xfail for "up to foo in langs.exp"
"up to cppsub_ in langs.exp" and "up to fsub in langs.exp"
when not gcc compiled.
Diffstat (limited to 'gdb/testsuite/gdb.base/opaque.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/opaque.exp | 217 |
1 files changed, 62 insertions, 155 deletions
diff --git a/gdb/testsuite/gdb.base/opaque.exp b/gdb/testsuite/gdb.base/opaque.exp index 5d03fafdb7..88dd1034bd 100644 --- a/gdb/testsuite/gdb.base/opaque.exp +++ b/gdb/testsuite/gdb.base/opaque.exp @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # Please email any bugs, comments, and/or additions to this file to: # bug-gdb@prep.ai.mit.edu @@ -41,7 +41,7 @@ gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load $objdir/$subdir/$binfile -source gdb.base/opaque-info.exp +source gdb.base/opaque0.ci # # Test basic opaque structure handling (statically). @@ -59,8 +59,8 @@ source gdb.base/opaque-info.exp # Define a procedure to set up an xfail for all targets that do not support # this sort of cross reference. # Any target gcc that has a DBX_NO_XREFS definition in its config file will -# not support it. -# XCOFF does not seem to support it either. See the very end of gcc/xcoffout.h. +# not support it (FIXME: Is this still true; I suspect maybe not). + # Native alpha ecoff doesn't support it either. # I don't think this type of cross reference works for any COFF target # either. @@ -68,80 +68,54 @@ source gdb.base/opaque-info.exp proc setup_xfail_on_opaque_pointer {} { global gcc_compiled - setup_xfail "rs6000-*-*" "a29k-*-udi" "vax-*-*" "i*86-sequent-bsd*" + setup_xfail "a29k-*-udi" "vax-*-*" "i*86-sequent-bsd*" if {!$gcc_compiled} then { setup_xfail "alpha-*-*" } } -setup_xfail_on_opaque_pointer -send "whatis foop\n" -expect { - -re "whatis foop\r -type = struct foo \[*\]+\r -$prompt $" { pass "whatis on opaque struct pointer (statically)"} - -re ".*$prompt $" { fail "whatis on opaque struct *" } - timeout { fail "(timeout) whatis on opaque struct *" } +# This seems easier than trying to track different versions of xlc; I'm +# not sure there is much rhyme or reason regarding which tests it fails +# and which ones it passes. +if {[istarget "rs6000-*-aix*"] && !$gcc_compiled} then { + warning "xfails in opaque.exp may not be set up correctly for xlc" } +setup_xfail_on_opaque_pointer +gdb_test "whatis foop" \ + "type = struct foo \[*\]+" \ + "whatis on opaque struct pointer (statically)" + # Ensure that we know the form of the structure that foop points to. setup_xfail_on_opaque_pointer -send "ptype foop\n" -expect { - -re "ptype foop\r -type = struct foo \{\r - int a;\r - int b;\r -\} \[*\]+\r -$prompt $" { pass "ptype on opaque struct pointer (statically)" } - -re ".*$prompt $" { fail "ptype on opaque struct *" } - timeout { fail "(timeout) ptype on opaque struct *" } -} +if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" } +gdb_test "ptype foop" \ + "type = struct foo \{\r\n int a;\r\n int b;\r\n\} \[*\]+" \ + "ptype on opaque struct pointer (statically)" # An instance of the opaque structure (afoo) is defined in a different file. # Ensure that we can locate afoo and the structure definition. -send "whatis afoo\n" -expect { - -re "whatis afoo\r -type = struct foo\r -$prompt $" { pass "whatis on opaque struct instance (statically)" } - -re ".*$prompt $" { fail "whatis on opaque struct" } - timeout { fail "(timeout) whatis on opaque struct" } -} +gdb_test "whatis afoo" \ + "type = struct foo" \ + "whatis on opaque struct instance (statically)" # Ensure that we know the form of "afoo". -send "ptype afoo\n" -expect { - -re "ptype afoo\r -type = struct foo \{\r - int a;\r - int b;\r -\}\r -$prompt $" { pass "ptype on opaque struct instance (statically)" } - -re ".*$prompt $" { fail "ptype on opaque struct instance" } - timeout { fail "(timeout) ptype on opaque struct" } -} +gdb_test "ptype afoo" \ + "type = struct foo \{\r\n int a;\r\n int b;\r\n\}" \ + "ptype on opaque struct instance (statically)" # Ensure that we know what a struct foo looks like. -send "ptype struct foo\n" -expect { - -re "ptype struct foo\r -type = struct foo \{\r - int a;\r - int b;\r -\}\r -$prompt $" { pass "ptype on opaque struct tagname (statically)" } - -re ".*$prompt $" { fail "ptype on opaque struct" } - timeout { fail "(timeout) ptype on opaque struct" } -} +gdb_test "ptype struct foo" \ + "type = struct foo \{\r\n int a;\r\n int b;\r\n\}" \ + "ptype on opaque struct tagname (statically)" # @@ -159,7 +133,7 @@ gdb_reinitialize_dir $srcdir/$subdir gdb_load $objdir/$subdir/$binfile # Run to main, where struct foo is incomplete. -if ![runto main] { +if ![runto_main] { perror "cannot run to breakpoint at main" } @@ -169,70 +143,37 @@ if ![runto main] { # the opaque structure in the current file. Ensure we know it's type. setup_xfail_on_opaque_pointer -send "whatis foop\n" -expect { - -re "whatis foop\r -type = struct foo \[*\]+\r -$prompt $" { pass "whatis on opaque struct pointer (dynamically)"} - -re ".*$prompt $" { fail "whatis on opaque struct pointer" } - timeout { fail "(timeout) whatis on opaque struct ptr" } -} +gdb_test "whatis foop" \ + "type = struct foo \[*\]+" \ + "whatis on opaque struct pointer (dynamically)" # Ensure that we know the form of the thing foop points to. setup_xfail_on_opaque_pointer -send "ptype foop\n" -expect { - -re "ptype foop\r -type = struct foo \{\r - int a;\r - int b;\r -\} \[*\]+\r -$prompt $" { pass "ptype on opaque struct pointer (dynamically)" } - -re ".*$prompt $" { fail "ptype on opaque struct *" } - timeout { fail "(timeout) ptype on opaque struct *" } -} +if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" } +gdb_test "ptype foop" \ + "type = struct foo \{\r\n int a;\r\n int b;\r\n\} \[*\]+" \ + "ptype on opaque struct pointer (dynamically) 1" - -send "whatis afoo\n" -expect { - -re "whatis afoo\r -type = struct foo\r -$prompt $" { pass "whatis on opaque struct instance (dynamically)" } - -re ".*$prompt $" { fail "whatis on opaque struct" } - timeout { fail "(timeout) whatis on opaque struct" } -} +gdb_test "whatis afoo" \ + "type = struct foo" \ + "whatis on opaque struct instance (dynamically) 1" # Ensure that we know the form of afoo, an instance of a struct foo. -send "ptype afoo\n" -expect { - -re "ptype afoo\r -type = struct foo \{\r - int a;\r - int b;\r -\}\r -$prompt $" { pass "ptype on opaque struct instance (dynamically)" } - -re ".*$prompt $" { fail "ptype on opaque struct instance" } - timeout { fail "(timeout) ptype on opaque struct" } -} +gdb_test "ptype afoo" \ + "type = struct foo \{\r\n int a;\r\n int b;\r\n\}" \ + "ptype on opaque struct instance (dynamically) 1" # Ensure that we know the form of an explicit struct foo. -send "ptype struct foo\n" -expect { - -re "ptype struct foo\r -type = struct foo \{\r - int a;\r - int b;\r -\}\r -$prompt $" { pass "ptype on opaque struct tagname (dynamically)" } - -re ".*$prompt $" { fail "ptype on opaque struct" } - timeout { fail "(timeout) ptype on opaque struct" } -} +if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" } +gdb_test "ptype struct foo" \ + "type = struct foo \{\r\n int a;\r\n int b;\r\n\}" \ + "ptype on opaque struct tagname (dynamically) 1" # Now reload the symbols again so we forget about anything we might @@ -255,67 +196,33 @@ if ![runto getfoo] { # Ensure that we know what foop is. setup_xfail_on_opaque_pointer -send "whatis foop\n" -expect { - -re "whatis foop\r -type = struct foo \[*\]+\r -$prompt $" { pass "whatis on opaque struct pointer (dynamically)"} - -re ".*$prompt $" { fail "whatis on opaque struct pointer" } - timeout { fail "(timeout) whatis on opaque struct ptr" } -} +gdb_test "whatis foop" \ + "type = struct foo \[*\]+" \ + "whatis on opaque struct pointer (dynamically)" # Ensure that we know the form of the thing foop points to. setup_xfail_on_opaque_pointer -send "ptype foop\n" -expect { - -re "ptype foop\r -type = struct foo \{\r - int a;\r - int b;\r -\} \[*\]+\r -$prompt $" { pass "ptype on opaque struct pointer (dynamically)" } - -re ".*$prompt $" { fail "ptype on opaque struct *" } - timeout { fail "(timeout) ptype on opaque struct *" } -} - +if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" } +gdb_test "ptype foop" \ + "type = struct foo \{\r\n int a;\r\n int b;\r\n\} \[*\]+" \ + "ptype on opaque struct pointer (dynamically) 2" -send "whatis afoo\n" -expect { - -re "whatis afoo\r -type = struct foo\r -$prompt $" { pass "whatis on opaque struct instance (dynamically)" } - -re ".*$prompt $" { fail "whatis on opaque struct" } - timeout { fail "(timeout) whatis on opaque struct" } -} +gdb_test "whatis afoo" \ + "type = struct foo" \ + "whatis on opaque struct instance (dynamically) 2" # Ensure that we know the form of afoo, an instance of a struct foo. -send "ptype afoo\n" -expect { - -re "ptype afoo\r -type = struct foo \{\r - int a;\r - int b;\r -\}\r -$prompt $" { pass "ptype on opaque struct instance (dynamically)" } - -re ".*$prompt $" { fail "ptype on opaque struct instance" } - timeout { fail "(timeout) ptype on opaque struct" } -} +gdb_test "ptype afoo" \ + "type = struct foo \{\r\n int a;\r\n int b;\r\n\}" \ + "ptype on opaque struct instance (dynamically) 2" # Ensure that we know the form of an explicit struct foo. -send "ptype struct foo\n" -expect { - -re "ptype struct foo\r -type = struct foo \{\r - int a;\r - int b;\r -\}\r -$prompt $" { pass "ptype on opaque struct tagname (dynamically)" } - -re ".*$prompt $" { fail "ptype on opaque struct" } - timeout { fail "(timeout) ptype on opaque struct" } -} +gdb_test "ptype struct foo" \ + "type = struct foo \{\r\n int a;\r\n int b;\r\n\}" \ + "ptype on opaque struct tagname (dynamically) 2" |