Convert init_ada_exception_catchpoint to a ctor

Currently, init_ada_exception_catchpoint is defined in breakpoint.c, I
presume so it can call the static describe_other_breakpoints function.
I think this is a dependency inversion.
init_ada_exception_catchpoint, being code specific to Ada catchpoints,
should be in ada-lang.c, and describe_other_breakpoints, a core
function, should be exported.

And then, we can convert init_ada_exception_catchpoint to an
ada_catchpoint ctor.

Change-Id: I07695572dabc5a75d3d3740fd9b95db1529406a1
This commit is contained in:
Pedro Alves
2022-05-07 00:23:08 +01:00
parent 8cd0bf5e7e
commit bd21b6c9cf
3 changed files with 49 additions and 59 deletions

View File

@@ -1460,17 +1460,6 @@ extern void
void *user_data_catch,
void *user_data_tcatch);
/* Initialize a breakpoint struct for Ada exception catchpoints. */
extern void
init_ada_exception_breakpoint (struct breakpoint *b,
struct gdbarch *gdbarch,
struct symtab_and_line sal,
const char *addr_string,
int tempflag,
int enabled,
int from_tty);
/* Add breakpoint B on the breakpoint list, and notify the user, the
target and breakpoint_created observers of its existence. If
INTERNAL is non-zero, the breakpoint number will be allocated from
@@ -1905,4 +1894,12 @@ extern void catch_exception_event (enum exception_event_kind ex_event,
extern void print_solib_event (bool is_catchpoint);
/* Print a message describing any user-breakpoints set at PC. This
concerns with logical breakpoints, so we match program spaces, not
address spaces. */
extern void describe_other_breakpoints (struct gdbarch *,
struct program_space *, CORE_ADDR,
struct obj_section *, int);
#endif /* !defined (BREAKPOINT_H) */