This is an automated email from Gerrit.

Matthias Welwarsky (matth...@welwarsky.de) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/3826

-- gerrit

commit ca002f194132fd7afb797b032f3202a59121aee8
Author: Matthias Welwarsky <matthias.welwar...@sysgo.com>
Date:   Thu Oct 20 16:59:21 2016 +0200

    aarch64: improve debug output
    
    Make debug and error messages more informative, fix spelling and
    formatting errors
    
    Change-Id: I7245f42c5153bcc95676270814d30e91c113aaed
    Signed-off-by: Matthias Welwarsky <matthias.welwar...@sysgo.com>

diff --git a/src/target/aarch64.c b/src/target/aarch64.c
index b716122..f0ac32c 100644
--- a/src/target/aarch64.c
+++ b/src/target/aarch64.c
@@ -389,7 +389,7 @@ static int aarch64_poll(struct target *target)
        if (DSCR_RUN_MODE(dscr) == 0x3) {
                if (prev_target_state != TARGET_HALTED) {
                        /* We have a halting debug event */
-                       LOG_DEBUG("Target halted");
+                       LOG_DEBUG("Target %s halted", target_name(target));
                        target->state = TARGET_HALTED;
                        if ((prev_target_state == TARGET_RUNNING)
                                || (prev_target_state == TARGET_UNKNOWN)
@@ -839,13 +839,12 @@ static int aarch64_restore_context(struct target *target, 
bool bpwp)
 {
        struct armv8_common *armv8 = target_to_armv8(target);
 
-       LOG_DEBUG(" ");
+       LOG_DEBUG("%s", target_name(target));
 
        if (armv8->pre_restore_context)
                armv8->pre_restore_context(target);
 
        return armv8_dpm_write_dirty_registers(&armv8->dpm, bpwp);
-
 }
 
 /*
@@ -1367,8 +1366,9 @@ static int aarch64_write_apb_ap_memory(struct target 
*target,
        uint32_t dscr;
        uint8_t *tmp_buff = NULL;
 
-       LOG_DEBUG("Writing APB-AP memory address 0x%" PRIx64 " size %"  PRIu32 
" count%"  PRIu32,
+       LOG_DEBUG("Writing APB-AP memory address 0x%" PRIx64 " size %"  PRIu32 
" count %"  PRIu32,
                          address, size, count);
+
        if (target->state != TARGET_HALTED) {
                LOG_WARNING("target not halted");
                return ERROR_TARGET_NOT_HALTED;
@@ -1517,8 +1517,9 @@ static int aarch64_read_apb_ap_memory(struct target 
*target,
        uint8_t *u8buf_ptr;
        uint32_t value;
 
-       LOG_DEBUG("Reading APB-AP memory address 0x%" TARGET_PRIxADDR " size %" 
PRIu32 " count%"  PRIu32,
+       LOG_DEBUG("Reading APB-AP memory address 0x%" TARGET_PRIxADDR " size %" 
PRIu32 " count %"  PRIu32,
                          address, size, count);
+
        if (target->state != TARGET_HALTED) {
                LOG_WARNING("target not halted");
                return ERROR_TARGET_NOT_HALTED;
diff --git a/src/target/armv8_dpm.c b/src/target/armv8_dpm.c
index ef53452..0188753 100644
--- a/src/target/armv8_dpm.c
+++ b/src/target/armv8_dpm.c
@@ -79,8 +79,7 @@ static int dpmv8_write_dcc(struct armv8_common *armv8, 
uint32_t data)
 static int dpmv8_write_dcc_64(struct armv8_common *armv8, uint64_t data)
 {
        int ret;
-       LOG_DEBUG("write DCC Low word 0x%08" PRIx32, (unsigned)data);
-       LOG_DEBUG("write DCC High word 0x%08" PRIx32, (unsigned)(data >> 32));
+       LOG_DEBUG("write DCC 0x%016" PRIx64, data);
        ret = mem_ap_write_u32(armv8->debug_ap,
                               armv8->debug_base + CPUV8_DBG_DTRRX, data);
        ret += mem_ap_write_u32(armv8->debug_ap,
@@ -143,7 +142,7 @@ static int dpmv8_read_dcc_64(struct armv8_common *armv8, 
uint64_t *data,
                if (retval != ERROR_OK)
                        return retval;
                if (timeval_ms() > then + 1000) {
-                       LOG_ERROR("Timeout waiting for read dcc");
+                       LOG_ERROR("Timeout waiting for DTR_TX_FULL, dscr = 
0x%08" PRIx32, dscr);
                        return ERROR_FAIL;
                }
        }
@@ -1305,7 +1304,7 @@ void armv8_dpm_report_wfar(struct arm_dpm *dpm, uint64_t 
addr)
                        /* ?? */
                        break;
                default:
-                       LOG_DEBUG("Unknow core_state");
+                       LOG_DEBUG("Unknown core_state");
                        break;
        }
        dpm->wp_pc = addr;

-- 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to