From 960bc2bd1402bb5e8312e731d6a7f6fe2b6a9863 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Thu, 12 May 2022 18:58:38 +0100 Subject: Move add_location(sal) to base_breakpoint After the previous patches, only base_breakpoint subclasses use add_location(sal), so we can move it to base_breakpoint (a.k.a. base class for code breakpoints). This requires a few casts here and there, but always at spots where you can see from context what the breakpoint's type actually is. I inlined new_single_step_breakpoint into its only caller exactly for this reason. I did try to propagate more use of base_breakpoint to avoid casts, but that turned out unwieldy for this patch. Change-Id: I49d959322b0fdce5a88a216bb44730fc5dd7c6f8 --- gdb/symtab.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gdb/symtab.h') diff --git a/gdb/symtab.h b/gdb/symtab.h index b1cf84f..5218be5 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -55,6 +55,7 @@ struct obj_section; struct cmd_list_element; class probe; struct lookup_name_info; +struct base_breakpoint; /* How to match a lookup name against a symbol search name. */ enum class symbol_name_match_type @@ -2227,10 +2228,10 @@ struct gnu_ifunc_fns CORE_ADDR *function_address_p); /* See elf_gnu_ifunc_resolver_stop for its real implementation. */ - void (*gnu_ifunc_resolver_stop) (struct breakpoint *b); + void (*gnu_ifunc_resolver_stop) (base_breakpoint *b); /* See elf_gnu_ifunc_resolver_return_stop for its real implementation. */ - void (*gnu_ifunc_resolver_return_stop) (struct breakpoint *b); + void (*gnu_ifunc_resolver_return_stop) (base_breakpoint *b); }; #define gnu_ifunc_resolve_addr gnu_ifunc_fns_p->gnu_ifunc_resolve_addr -- cgit v1.1