gdb: add interp::on_breakpoint_created method

Same idea as previous patches, but for breakpoint_created.

Change-Id: I614113c924edc243590018b8fb3bf69cb62215ef
This commit is contained in:
Simon Marchi
2023-04-21 09:45:30 -04:00
parent c27ec5c09f
commit e7692320db
5 changed files with 33 additions and 22 deletions

View File

@@ -7979,6 +7979,15 @@ catchpoint::catchpoint (struct gdbarch *gdbarch, bool temp,
pspace = current_program_space;
}
/* Notify interpreters and observers that breakpoint B was created. */
static void
notify_breakpoint_created (breakpoint *b)
{
interps_notify_breakpoint_created (b);
gdb::observers::breakpoint_created.notify (b);
}
breakpoint *
install_breakpoint (int internal, std::unique_ptr<breakpoint> &&arg, int update_gll)
{
@@ -7988,7 +7997,8 @@ install_breakpoint (int internal, std::unique_ptr<breakpoint> &&arg, int update_
set_tracepoint_count (breakpoint_count);
if (!internal)
mention (b);
gdb::observers::breakpoint_created.notify (b);
notify_breakpoint_created (b);
if (update_gll)
update_global_location_list (UGLL_MAY_INSERT);