This is an automated email from Gerrit.

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

-- gerrit

commit 75c79449a6b52b553aba4aace74eb8a2803aba33
Author: Paul Fertser <[email protected]>
Date:   Mon Apr 7 12:33:53 2014 +0400

    target/cortex_a: check gdb_service before dereferencing in update_halt_gdb
    
    If gdb was disconnected by the moment the target entered halted state,
    update_halt_gdb would segfault.
    
    Change-Id: I67477e9199c1df097be83a49e38602f975c083f5
    Reported-by: Younes REGAIEG <[email protected]>
    Signed-off-by: Paul Fertser <[email protected]>

diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c
index e95297c..50eb9d4 100644
--- a/src/target/cortex_a.c
+++ b/src/target/cortex_a.c
@@ -766,7 +766,7 @@ static int cortex_a8_halt_smp(struct target *target)
 static int update_halt_gdb(struct target *target)
 {
        int retval = 0;
-       if (target->gdb_service->core[0] == -1) {
+       if (target->gdb_service && target->gdb_service->core[0] == -1) {
                target->gdb_service->target = target;
                target->gdb_service->core[0] = target->coreid;
                retval += cortex_a8_halt_smp(target);

-- 

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees_APR
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to