lwp_info: Make the arch code free arch_lwp_info
[deliverable/binutils-gdb.git] / gdb / gdbserver / linux-arm-low.c
index fc2b34870a14b00fb201103521e6204bf01e7815..b27c47e84c4ffe15a4ebba517f78688baca2e4ec 100644 (file)
@@ -655,6 +655,14 @@ arm_new_thread (struct lwp_info *lwp)
   lwp->arch_private = info;
 }
 
+/* Function to call when a thread is being deleted.  */
+
+static void
+arm_delete_thread (struct arch_lwp_info *arch_lwp)
+{
+  xfree (arch_lwp);
+}
+
 static void
 arm_new_fork (struct process_info *parent, struct process_info *child)
 {
@@ -925,11 +933,10 @@ arm_arch_setup (void)
 
 /* Fetch the next possible PCs after the current instruction executes.  */
 
-static VEC (CORE_ADDR) *
+static std::vector<CORE_ADDR>
 arm_gdbserver_get_next_pcs (struct regcache *regcache)
 {
   struct arm_get_next_pcs next_pcs_ctx;
-  VEC (CORE_ADDR) *next_pcs = NULL;
 
   arm_get_next_pcs_ctor (&next_pcs_ctx,
                         &get_next_pcs_ops,
@@ -939,9 +946,7 @@ arm_gdbserver_get_next_pcs (struct regcache *regcache)
                         1,
                         regcache);
 
-  next_pcs = arm_get_next_pcs (&next_pcs_ctx);
-
-  return next_pcs;
+  return arm_get_next_pcs (&next_pcs_ctx);
 }
 
 /* Support for hardware single step.  */
@@ -1056,6 +1061,7 @@ struct linux_target_ops the_low_target = {
   NULL, /* siginfo_fixup */
   arm_new_process,
   arm_new_thread,
+  arm_delete_thread,
   arm_new_fork,
   arm_prepare_to_resume,
   NULL, /* process_qsupported */
This page took 0.02429 seconds and 4 git commands to generate.