From 04ec7890fccfa5ddd9cc92961a4df58957ca181b Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 12 Oct 2017 16:49:27 -0400 Subject: 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) : 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. --- gdb/gdbserver/linux-mips-low.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gdb/gdbserver/linux-mips-low.c') diff --git a/gdb/gdbserver/linux-mips-low.c b/gdb/gdbserver/linux-mips-low.c index ec26c2a..b30fbba 100644 --- a/gdb/gdbserver/linux-mips-low.c +++ b/gdb/gdbserver/linux-mips-low.c @@ -327,6 +327,15 @@ mips_linux_new_process (void) return info; } +/* This is the implementation of linux_target_ops method + delete_process. */ + +static void +mips_linux_delete_process (struct arch_process_info *info) +{ + xfree (info); +} + /* This is the implementation of linux_target_ops method new_thread. Mark the watch registers as changed, so the threads' copies will be updated. */ @@ -900,6 +909,7 @@ struct linux_target_ops the_low_target = { NULL, NULL, /* siginfo_fixup */ mips_linux_new_process, + mips_linux_delete_process, mips_linux_new_thread, mips_linux_delete_thread, mips_linux_new_fork, -- cgit v1.1