/* List of target connections for GDB.
- Copyright (C) 2017-2021 Free Software Foundation, Inc.
+ Copyright (C) 2017-2022 Free Software Foundation, Inc.
This file is part of GDB.
#include "inferior.h"
#include "target.h"
+#include "observable.h"
/* A map between connection number and representative process_stratum
target. */
void
connection_list_remove (process_stratum_target *t)
{
+ /* Notify about the connection being removed before we reset the
+ connection number to zero. */
+ gdb::observers::connection_removed.notify (t);
process_targets.erase (t->connection_number);
t->connection_number = 0;
}
uiout->field_signed ("number", t->connection_number);
- uiout->field_string ("what", make_target_connection_string (t).c_str ());
+ uiout->field_string ("what", make_target_connection_string (t));
uiout->field_string ("description", t->longname ());