aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-aarch64-low.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2017-10-12 16:49:27 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2017-10-12 16:49:27 -0400
commit04ec7890fccfa5ddd9cc92961a4df58957ca181b (patch)
tree5175f2957d311493133797a271d4e171465cef03 /gdb/gdbserver/linux-aarch64-low.c
parent466eeceef409597388dd2b4e8b907cf080bedcf1 (diff)
downloadgdb-04ec7890fccfa5ddd9cc92961a4df58957ca181b.zip
gdb-04ec7890fccfa5ddd9cc92961a4df58957ca181b.tar.gz
gdb-04ec7890fccfa5ddd9cc92961a4df58957ca181b.tar.bz2
linux low: Make the arch code free arch_process_info
For the same reason as the previous patch, we need to make the arch-specific code free the arch_process_info structure it allocates. gdb/gdbserver/ChangeLog: * linux-low.h (struct linux_target_ops) <delete_process>: New field. * linux-low.c (linux_mourn): Call the_low_target.delete_process. * linux-aarch64-low.c (aarch64_linux_delete_process): New. (struct linux_target_ops): Add delete_process callback. * linux-arm-low.c (arm_delete_process): New. (struct linux_target_ops): Add delete_process callback. * linux-bfin-low.c (struct linux_target_ops): Likewise. * linux-crisv32-low.c (struct linux_target_ops): Likewise. * linux-m32r-low.c (struct linux_target_ops): Likewise. * linux-mips-low.c (mips_linux_delete_process): New. (struct linux_target_ops): Add delete_process callback. * linux-ppc-low.c (struct linux_target_ops): Likewise. * linux-s390-low.c (struct linux_target_ops): Likewise. * linux-sh-low.c (struct linux_target_ops): Likewise. * linux-tic6x-low.c (struct linux_target_ops): Likewise. * linux-tile-low.c (struct linux_target_ops): Likewise. * linux-x86-low.c (x86_linux_delete_process): New. (struct linux_target_ops): Add delete_process callback. * linux-xtensa-low.c (struct linux_target_ops): Likewise.
Diffstat (limited to 'gdb/gdbserver/linux-aarch64-low.c')
-rw-r--r--gdb/gdbserver/linux-aarch64-low.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c
index ed6a993..6d5c4e5 100644
--- a/gdb/gdbserver/linux-aarch64-low.c
+++ b/gdb/gdbserver/linux-aarch64-low.c
@@ -429,7 +429,7 @@ aarch64_linux_siginfo_fixup (siginfo_t *native, gdb_byte *inf, int direction)
return 0;
}
-/* Implementation of linux_target_ops method "linux_new_process". */
+/* Implementation of linux_target_ops method "new_process". */
static struct arch_process_info *
aarch64_linux_new_process (void)
@@ -441,6 +441,14 @@ aarch64_linux_new_process (void)
return info;
}
+/* Implementation of linux_target_ops method "delete_process". */
+
+static void
+aarch64_linux_delete_process (struct arch_process_info *info)
+{
+ xfree (info);
+}
+
/* Implementation of linux_target_ops method "linux_new_fork". */
static void
@@ -2990,6 +2998,7 @@ struct linux_target_ops the_low_target =
NULL, /* supply_ptrace_register */
aarch64_linux_siginfo_fixup,
aarch64_linux_new_process,
+ aarch64_linux_delete_process,
aarch64_linux_new_thread,
aarch64_linux_delete_thread,
aarch64_linux_new_fork,