@@ -9009,14 +9008,13 @@ program_breakpoint_here_p (struct gdbarch
*gdbarch, CORE_ADDR address)
/* Enable the automatic memory restoration from breakpoints while
we read the memory. Otherwise we could say about our temporary
breakpoints they are permanent. */
- cleanup = make_show_memory_breakpoints_cleanup (0);
+ scoped_restore restore_memory
+ = make_scoped_restore_show_memory_breakpoints (0);
if (target_read_memory (address, target_mem, len) == 0
&& memcmp (target_mem, bpoint, len) == 0)
retval = 1;
- do_cleanups (cleanup);
-
return retval;
}