Remove make_show_memory_breakpoints_cleanup
[deliverable/binutils-gdb.git] / gdb / target.c
index 2f7f317f40f0937139a5cee145901b60f907108c..3e2b4d08fc2f56362f9c8cc3f23d016334e8b56d 100644 (file)
@@ -1302,20 +1302,10 @@ memory_xfer_partial (struct target_ops *ops, enum target_object object,
   return res;
 }
 
-static void
-restore_show_memory_breakpoints (void *arg)
-{
-  show_memory_breakpoints = (uintptr_t) arg;
-}
-
-struct cleanup *
-make_show_memory_breakpoints_cleanup (int show)
+scoped_restore_tmpl<int>
+make_scoped_restore_show_memory_breakpoints (int show)
 {
-  int current = show_memory_breakpoints;
-
-  show_memory_breakpoints = show;
-  return make_cleanup (restore_show_memory_breakpoints,
-                      (void *) (uintptr_t) current);
+  return make_scoped_restore (&show_memory_breakpoints, show);
 }
 
 /* For docs see target.h, to_xfer_partial.  */
This page took 0.040251 seconds and 4 git commands to generate.