2013-04-24 Muhammad Bilal <mbilal@codesourcery.com>
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / gcore-buffer-overflow.exp
index 7736bb8b578f0510187caae7092ba5792603b578..7bb3ba82efde070f827b3aa81099ba9ee78b84f0 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2007-2012 Free Software Foundation, Inc.
+# Copyright 2007-2013 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@ gdb_test_multiple "help gcore" "help gcore" {
     -re "Undefined command: .gcore.*$gdb_prompt $" {
        # gcore command not supported -- nothing to test here.
        unsupported "gdb does not support gcore on this target"
-       return -1;
+       return -1
     }
     -re "Save a core file .*$gdb_prompt $" {
        pass "help gcore"
@@ -55,17 +55,4 @@ if { ! [ runto_main ] } then {
     return -1
 }
 
-set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore-buffer-overflow.test]
-
-set test "save a corefile"
-gdb_test_multiple "gcore ${objdir}/${subdir}/gcore-buffer-overflow.test" $test {
-    -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
-       pass $test
-    }
-    -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
-       unsupported $test
-    }
-    eof {
-       fail $test
-    }
-}
+gdb_gcore_cmd "${objdir}/${subdir}/gcore-buffer-overflow.test" "save a corefile"
This page took 0.038223 seconds and 4 git commands to generate.