This is an automated email from Gerrit.

Alamy Liu ([email protected]) just uploaded a new patch set to Gerrit, which 
you can find at http://openocd.zylin.com/3321

-- gerrit

commit d785eac0e58c4c99691e79ef0e921a6c1ab9340b
Author: Alamy Liu <[email protected]>
Date:   Wed Nov 18 11:12:14 2015 -0800

    aarch64: add deinit_target handler to free memory
    
      Ported from Paul Fertser <[email protected]>'s patch
      Change-Id: I51bba044974ecfc4d418998816d44a8563264123
    
    Change-Id: I10808b7d8f27ff78bb2db68eeb5001b84ad653c3
    Signed-off-by: Alamy Liu <[email protected]>

diff --git a/src/target/aarch64.c b/src/target/aarch64.c
index 9d45fe0..21d37ec 100644
--- a/src/target/aarch64.c
+++ b/src/target/aarch64.c
@@ -2539,6 +2539,17 @@ static int aarch64_target_create(struct target *target, 
Jim_Interp *interp)
        return aarch64_init_arch_info(target, aarch64, target->tap);
 }
 
+static void aarch64_deinit_target(struct target *target)
+{
+       struct aarch64_common *aarch64 = target_to_aarch64(target);
+       struct arm_dpm *dpm = &aarch64->armv8_common.dpm;
+
+       free(aarch64->brp_list);
+       free(dpm->dbp);
+       free(dpm->dwp);
+       free(aarch64);
+}
+
 static int aarch64_mmu(struct target *target, int *enabled)
 {
        if (target->state != TARGET_HALTED) {
@@ -2745,6 +2756,7 @@ struct target_type_64 aarch64_target = {
        .commands = aarch64_command_handlers,
        .target_create = aarch64_target_create,
        .init_target = aarch64_init_target,
+       .deinit_target = aarch64_deinit_target,
        .examine = aarch64_examine,
 
        .read_phys_memory = aarch64_read_phys_memory,

-- 

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to