diff --git a/gdb/testsuite/gdb.trace/trace-break.c b/gdb/testsuite/gdb.trace/trace-break.c
index 6aa9d09214..3349066dcc 100644
--- a/gdb/testsuite/gdb.trace/trace-break.c
+++ b/gdb/testsuite/gdb.trace/trace-break.c
@@ -31,13 +31,13 @@ marker (void)
 }
 
 static void
-end (void)
+my_end (void)
 {}
 
 int
 main ()
 {
   marker ();
-  end ();
+  my_end ();
   return 0;
 }
diff --git a/gdb/testsuite/gdb.trace/trace-break.exp b/gdb/testsuite/gdb.trace/trace-break.exp
index 539fcb5218..602b2e23ec 100644
--- a/gdb/testsuite/gdb.trace/trace-break.exp
+++ b/gdb/testsuite/gdb.trace/trace-break.exp
@@ -53,7 +53,7 @@ proc break_trace_same_addr_1 { trace_type option } \
 
     gdb_test_no_output "set breakpoint always-inserted ${option}"
 
-    gdb_test "break end" "Breakpoint \[0-9\] at $hex: file.*"
+    gdb_test "break my_end" "Breakpoint \[0-9\] at $hex: file.*"
 
     gdb_test "break set_point" "Breakpoint \[0-9\] at $hex: file.*"
     gdb_test "${trace_type} set_point" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*"
@@ -88,7 +88,7 @@ proc break_trace_same_addr_2 { trace_type1 trace_type2 option } \
 
     gdb_test_no_output "set breakpoint always-inserted ${option}"
 
-    gdb_test "break end" "Breakpoint \[0-9\] at $hex: file.*"
+    gdb_test "break my_end" "Breakpoint \[0-9\] at $hex: file.*"
 
     gdb_test "${trace_type1} set_point" \
 	"\(Fast t|T\)racepoint \[0-9\] at $hex: file.*" \
@@ -127,7 +127,7 @@ proc break_trace_same_addr_3 { trace_type option } \
 
     gdb_test_no_output "set breakpoint always-inserted ${option}"
     gdb_test "break marker" "Breakpoint \[0-9\] at $hex: file.*"
-    gdb_test "break end" "Breakpoint \[0-9\] at $hex: file.*"
+    gdb_test "break my_end" "Breakpoint \[0-9\] at $hex: file.*"
 
     gdb_test "break set_point" "Breakpoint \[0-9\] at $hex: file.*"
     gdb_test "${trace_type} set_point" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*"
@@ -165,7 +165,7 @@ proc break_trace_same_addr_4 { trace_type option } \
 
     gdb_test_no_output "set breakpoint always-inserted ${option}"
     gdb_test "break marker" "Breakpoint \[0-9\] at $hex: file.*"
-    gdb_test "break end" "Breakpoint \[0-9\] at $hex: file.*"
+    gdb_test "break my_end" "Breakpoint \[0-9\] at $hex: file.*"
 
     gdb_test "break set_point" "Breakpoint \[0-9\] at $hex: file.*"
     gdb_test "${trace_type} set_point" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*"
@@ -208,7 +208,7 @@ proc break_trace_same_addr_5 { trace1 trace2 trace3 trace3_at_first_loc } \
     }
 
     gdb_test "break marker" "Breakpoint \[0-9\] at $hex: file.*"
-    gdb_test "break end" "Breakpoint \[0-9\] at $hex: file.*"
+    gdb_test "break my_end" "Breakpoint \[0-9\] at $hex: file.*"
 
     gdb_test "${trace1} set_point" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*" \
 	"${trace1} set_point 1"
@@ -282,7 +282,7 @@ proc break_trace_same_addr_6 { trace1 enable1 trace2 enable2 } \
     }
 
     gdb_test "break marker" "Breakpoint \[0-9\] at $hex: file.*"
-    gdb_test "break end" "Breakpoint \[0-9\] at $hex: file.*"
+    gdb_test "break my_end" "Breakpoint \[0-9\] at $hex: file.*"
 
     gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
 	"continue to marker"
diff --git a/gdb/testsuite/gdb.trace/trace-mt.c b/gdb/testsuite/gdb.trace/trace-mt.c
index 6f04ba7775..37d1ee0ea5 100644
--- a/gdb/testsuite/gdb.trace/trace-mt.c
+++ b/gdb/testsuite/gdb.trace/trace-mt.c
@@ -25,7 +25,7 @@ thread_function(void *arg)
 }
 
 static void
-end (void)
+my_end (void)
 {}
 
 int
@@ -40,7 +40,7 @@ main (int argc, char *argv[], char *envp[])
   for (i = 0; i < 2; i++)
     pthread_join (threads[i], NULL);
 
-  end ();
+  my_end ();
 
   return 0;
 }
diff --git a/gdb/testsuite/gdb.trace/trace-mt.exp b/gdb/testsuite/gdb.trace/trace-mt.exp
index f327406a13..bd89c9bec2 100644
--- a/gdb/testsuite/gdb.trace/trace-mt.exp
+++ b/gdb/testsuite/gdb.trace/trace-mt.exp
@@ -81,7 +81,7 @@ proc break_trace_same_addr { trace_type option } \
 
     gdb_test_no_output "set breakpoint always-inserted ${option}"
 
-    gdb_test "break end" "Breakpoint \[0-9\] at $hex: file.*"
+    gdb_test "break my_end" "Breakpoint \[0-9\] at $hex: file.*"
 
     gdb_test "break set_point1" "Breakpoint \[0-9\] at $hex: file.*"
     gdb_test "${trace_type} set_point1" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*"
diff --git a/gdb/testsuite/gdb.trace/unavailable.cc b/gdb/testsuite/gdb.trace/unavailable.cc
index 56e5541259..aa4aeef65f 100644
--- a/gdb/testsuite/gdb.trace/unavailable.cc
+++ b/gdb/testsuite/gdb.trace/unavailable.cc
@@ -174,12 +174,12 @@ Virtual *virtualp = &virtual_partial;
 /* Test functions.  */
 
 static void
-begin ()	/* called before anything else */
+my_begin ()	/* called before anything else */
 {
 }
 
 static void
-end ()		/* called after everything else */
+my_end ()		/* called after everything else */
 {
 }
 
@@ -325,7 +325,7 @@ main (int argc, char **argv, char **envp)
   test_struct mystruct;
   int         myarray[4];
 
-  begin ();
+  my_begin ();
   /* Assign collectable values to global variables.  */
   globalc = 71;
   globali = 72;
@@ -395,6 +395,6 @@ main (int argc, char **argv, char **envp)
   g_structref.clear ();
   g_structref_p = NULL;
 
-  end ();
+  my_end ();
   return 0;
 }
diff --git a/gdb/testsuite/gdb.trace/unavailable.exp b/gdb/testsuite/gdb.trace/unavailable.exp
index 79aa8ef1b0..7e8fc8b303 100644
--- a/gdb/testsuite/gdb.trace/unavailable.exp
+++ b/gdb/testsuite/gdb.trace/unavailable.exp
@@ -61,21 +61,21 @@ proc prepare_for_trace_test {} {
 
     runto_main
 
-    gdb_test "break begin" ".*" ""
-    gdb_test "break end" ".*" ""
+    gdb_test "break my_begin" ".*" ""
+    gdb_test "break my_end" ".*" ""
 }
 
 proc run_trace_experiment { test_func } {
     global gdb_prompt
 
     gdb_test "continue" \
-	".*Breakpoint \[0-9\]+, begin .*" \
-	"advance to begin"
+	".*Breakpoint \[0-9\]+, my_begin .*" \
+	"advance to my_begin"
 
     gdb_test_no_output "tstart" "start trace experiment"
 
     gdb_test "continue" \
-	    "Continuing.*Breakpoint \[0-9\]+, end.*" \
+	    "Continuing.*Breakpoint \[0-9\]+, my_end.*" \
 	    "run trace experiment"
     gdb_test "tstop" \
 	    "\[\r\n\]+" \
@@ -189,7 +189,7 @@ proc gdb_collect_args_test {} {
 	gdb_collect_args_test_1
 
 	gdb_test "tfind none" \
-	    "#0  end .*" \
+	    "#0  my_end .*" \
 	    "cease trace debugging"
 
 	set tracefile [standard_output_file ${testfile}]
@@ -273,7 +273,7 @@ proc gdb_collect_locals_test { func msg } {
 	gdb_collect_locals_test_1 $func
 
 	gdb_test "tfind none" \
-	    "#0  end .*" \
+	    "#0  my_end .*" \
 	    "cease trace debugging"
 
 	set tracefile [standard_output_file ${testfile}]
@@ -357,7 +357,7 @@ proc gdb_unavailable_registers_test { } {
 
 	gdb_unavailable_registers_test_1
 
-	gdb_test "tfind none" "#0  end .*" "cease trace debugging"
+	gdb_test "tfind none" "#0  my_end .*" "cease trace debugging"
 
 	set tracefile [standard_output_file ${testfile}]
 	gdb_test "tsave ${tracefile}.registers.tfile" \
@@ -421,7 +421,7 @@ proc gdb_unavailable_floats { } {
 
 	gdb_unavailable_floats_1
 
-	gdb_test "tfind none" "#0  end .*" "cease trace debugging"
+	gdb_test "tfind none" "#0  my_end .*" "cease trace debugging"
 
 	set tracefile [standard_output_file ${testfile}]
 	gdb_test "tsave ${tracefile}.floats.tfile" \
@@ -688,7 +688,7 @@ proc gdb_collect_globals_test { } {
 	gdb_collect_globals_test_1
 
 	gdb_test "tfind none" \
-	    "#0  end .*" \
+	    "#0  my_end .*" \
 	    "cease trace debugging"
 
 	set tracefile [standard_output_file ${testfile}]
