import gdb-1999-06-28 snapshot
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / constvars.exp
index 518e5ca9b0d2f4fcf46c6626c5935c1e03020247..312b524a3bb6a186be04d48dd46359bbdc0f1d74 100644 (file)
@@ -41,8 +41,14 @@ set testfile "constvars"
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+if [istarget "hppa*-*-*"] {
+    set lang "c++"
+} else {
+    set lang ""
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [concat debug $lang]] != "" } {
+    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
 }
 
 # Create and source the file that provides information about the compiler
@@ -94,7 +100,7 @@ send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
 if {$gcc_compiled} then { setup_xfail "*-*-*" }
 send_gdb "ptype qux1\n"
 gdb_expect {
-    -re "type = int \\(const char, const char &, const char *, char * const\\).*$gdb_prompt $" {
+    -re "type = int \\(const char, const char, const char \\*, char \\* const\\).*$gdb_prompt $" {
         pass "ptype qux1"
     }
     -re ".*$gdb_prompt $" { fail "ptype qux1" }
@@ -150,102 +156,100 @@ proc do_constvar_tests {} {
     gdb_test "ptype languid" "type = const double"
     gdb_test "print *legend" " = 66 'B'"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype legend" "type = const char *"
+    gdb_test "ptype legend" "type = const char \\*"
     gdb_test "print *legerdemain" " = 10 '\\\\n'"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype legerdemain" "type = const unsigned char *"
+    gdb_test "ptype legerdemain" "type = const unsigned char \\*"
     gdb_test "print *leniency" " = 20"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype leniency" "type = const short *"
+    gdb_test "ptype leniency" "type = const short \\*"
     gdb_test "print *leonine" " = 30"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype leonine" "type = const unsigned short *"
+    gdb_test "ptype leonine" "type = const unsigned short \\*"
     gdb_test "print *lesion" " = 40"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype lesion" "type = const long *"
+    gdb_test "ptype lesion" "type = const long \\*"
     gdb_test "print *lethal" " = 50"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype lethal" "type = const unsigned long *"
+    gdb_test "ptype lethal" "type = const unsigned long \\*"
     gdb_test "print *lethargic" " = 60"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype lethargic" "type = const float *"
+    gdb_test "ptype lethargic" "type = const float \\*"
     gdb_test "print *levity" " = 70"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype levity" "type = const double *"
+    gdb_test "ptype levity" "type = const double \\*"
     gdb_test "print *lewd" " = 65 'A'"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype lewd" "type = const char * const"
+    gdb_test "ptype lewd" "type = const char \\* const"
     gdb_test "print *lexicographer" " = 1 '.001'"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype lexicographer" "type = const unsigned char * const"
+    gdb_test "ptype lexicographer" "type = const unsigned char \\* const"
     gdb_test "print *lexicon" " = 2"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype lexicon" "type = const short * const"
+    gdb_test "ptype lexicon" "type = const short \\* const"
     gdb_test "print *liaison" " = 3"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype liaison" "type = const unsigned short * const"
+    gdb_test "ptype liaison" "type = const unsigned short \\* const"
     gdb_test "print *libation" " = 4"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype libation" "type = const long * const"
+    gdb_test "ptype libation" "type = const long \\* const"
     gdb_test "print *libelous" " = 5"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype libelous" "type = const unsigned long * const"
+    gdb_test "ptype libelous" "type = const unsigned long \\* const"
     gdb_test "print *libertine" " = 6"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype libertine" "type = const float * const"
+    gdb_test "ptype libertine" "type = const float \\* const"
     gdb_test "print *libidinous" " = 7"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype libidinous" "type = const double * const"
+    gdb_test "ptype libidinous" "type = const double \\* const"
     gdb_test "print *languish" " = 65 'A'"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype languish" "type = const char *"
+    gdb_test "ptype languish" "type = const char \\*"
     gdb_test "print *languor" " = 1 '.001'"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype languor" "type = const unsigned char *"
+    gdb_test "ptype languor" "type = const unsigned char \\*"
     gdb_test "print *lank" " = 2"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype lank" "type = const short *"
+    gdb_test "ptype lank" "type = const short \\*"
     gdb_test "print *lapidary" " = 3"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype lapidary" "type = const unsigned short *"
+    gdb_test "ptype lapidary" "type = const unsigned short \\*"
     gdb_test "print *larceny" " = 4"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype larceny" "type = const long *"
+    gdb_test "ptype larceny" "type = const long \\*"
     gdb_test "print *largess" " = 5"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype largess" "type = const unsigned long *"
+    gdb_test "ptype largess" "type = const unsigned long \\*"
     gdb_test "print *lascivious" " = 6"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype lascivious" "type = const float *"
+    gdb_test "ptype lascivious" "type = const float \\*"
     gdb_test "print *lassitude" " = 7"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype lassitude" "type = const double *"
+    gdb_test "ptype lassitude" "type = const double \\*"
     gdb_test "print *lamprey" " = 66 'B'"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype lamprey" "type = char * const"
+    gdb_test "ptype lamprey" "type = char \\* const"
     gdb_test "print *lariat" " = 10 '\\\\n'"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype lariat" "type = unsigned char * const"
+    gdb_test "ptype lariat" "type = unsigned char \\* const"
     gdb_test "print *laudanum" " = 20"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype laudanum" "type = short * const"
+    gdb_test "ptype laudanum" "type = short \\* const"
     gdb_test "print *lecithin" " = 30"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype lecithin" "type = unsigned short * const"
+    gdb_test "ptype lecithin" "type = unsigned short \\* const"
     gdb_test "print *leviathan" " = 40"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype leviathan" "type = long * const"
+    gdb_test "ptype leviathan" "type = long \\* const"
     gdb_test "print *libretto" " = 50"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype libretto" "type = unsigned long * const"
+    gdb_test "ptype libretto" "type = unsigned long \\* const"
     gdb_test "print *lissome" " = 60"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype lissome" "type = float * const"
+    gdb_test "ptype lissome" "type = float \\* const"
     gdb_test "print *locust" " = 70"
     if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype locust" "type = double * const"
-    if {$gcc_compiled} then { setup_xfail "*-*-*" }
-    gdb_test "ptype radiation" "type = const char &"
+    gdb_test "ptype locust" "type = double \\* const"
 }
 
 do_constvar_tests
This page took 0.054582 seconds and 4 git commands to generate.