mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-06 15:38:45 +08:00
Remove prepare_re_set_context
prepare_re_set_context returns a null cleanup and doesn't seem generally useful. This patch removes it plus a few more cleanups; and changes breakpoint_re_set to use scoped_restore rather than its own manual mechanism. 2017-10-11 Tom Tromey <tom@tromey.com> * breakpoint.c (prepare_re_set_context): Remove. (breakpoint_re_set_one): Update. Don't use cleanups. (breakpoint_re_set): Use scoped_restore, std::string, and scoped_restore_current_language.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2017-10-11 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
* breakpoint.c (prepare_re_set_context): Remove.
|
||||||
|
(breakpoint_re_set_one): Update. Don't use cleanups.
|
||||||
|
(breakpoint_re_set): Use scoped_restore, std::string, and
|
||||||
|
scoped_restore_current_language.
|
||||||
|
|
||||||
2017-10-11 Tom Tromey <tom@tromey.com>
|
2017-10-11 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* breakpoint.c (commands_command_1): Use std::string.
|
* breakpoint.c (commands_command_1): Use std::string.
|
||||||
|
@ -14024,27 +14024,15 @@ decode_location_default (struct breakpoint *b,
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Prepare the global context for a re-set of breakpoint B. */
|
|
||||||
|
|
||||||
static struct cleanup *
|
|
||||||
prepare_re_set_context (struct breakpoint *b)
|
|
||||||
{
|
|
||||||
input_radix = b->input_radix;
|
|
||||||
set_language (b->language);
|
|
||||||
|
|
||||||
return make_cleanup (null_cleanup, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Reset a breakpoint. */
|
/* Reset a breakpoint. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
breakpoint_re_set_one (breakpoint *b)
|
breakpoint_re_set_one (breakpoint *b)
|
||||||
{
|
{
|
||||||
struct cleanup *cleanups;
|
input_radix = b->input_radix;
|
||||||
|
set_language (b->language);
|
||||||
|
|
||||||
cleanups = prepare_re_set_context (b);
|
|
||||||
b->ops->re_set (b);
|
b->ops->re_set (b);
|
||||||
do_cleanups (cleanups);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Re-set breakpoint locations for the current program space.
|
/* Re-set breakpoint locations for the current program space.
|
||||||
@ -14054,13 +14042,10 @@ void
|
|||||||
breakpoint_re_set (void)
|
breakpoint_re_set (void)
|
||||||
{
|
{
|
||||||
struct breakpoint *b, *b_tmp;
|
struct breakpoint *b, *b_tmp;
|
||||||
enum language save_language;
|
|
||||||
int save_input_radix;
|
|
||||||
|
|
||||||
save_language = current_language->la_language;
|
|
||||||
save_input_radix = input_radix;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
scoped_restore_current_language save_language;
|
||||||
|
scoped_restore save_input_radix = make_scoped_restore (&input_radix);
|
||||||
scoped_restore_current_pspace_and_thread restore_pspace_thread;
|
scoped_restore_current_pspace_and_thread restore_pspace_thread;
|
||||||
|
|
||||||
/* Note: we must not try to insert locations until after all
|
/* Note: we must not try to insert locations until after all
|
||||||
@ -14082,8 +14067,6 @@ breakpoint_re_set (void)
|
|||||||
}
|
}
|
||||||
END_CATCH
|
END_CATCH
|
||||||
}
|
}
|
||||||
set_language (save_language);
|
|
||||||
input_radix = save_input_radix;
|
|
||||||
|
|
||||||
jit_breakpoint_re_set ();
|
jit_breakpoint_re_set ();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user