diff mbox series

[1/2] libpdbg: Improve diagnostic traces for PIB access

Message ID 20200327013016.31197-1-alistair@popple.id.au
State Accepted
Headers show
Series [1/2] libpdbg: Improve diagnostic traces for PIB access | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (8b4611b5d8e7e2279fe4aa80c892fcfe10aa398d)
snowpatch_ozlabs/build-multiarch success Test build-multiarch on branch master

Commit Message

Alistair Popple March 27, 2020, 1:30 a.m. UTC
Signed-off-by: Alistair Popple <alistair@popple.id.au>
---
 libpdbg/target.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libpdbg/target.c b/libpdbg/target.c
index 164d571..8cc6f7f 100644
--- a/libpdbg/target.c
+++ b/libpdbg/target.c
@@ -138,8 +138,10 @@  int pib_read(struct pdbg_target *pib_dt, uint64_t addr, uint64_t *data)
 		rc = pib_indirect_read(pib, target_addr, data);
 	else
 		rc = pib->read(pib, target_addr, data);
-	PR_DEBUG("addr:0x%08" PRIx64 " data:0x%016" PRIx64 "\n",
-		 target_addr, *data);
+
+	PR_DEBUG("rc = %d, addr = 0x%016" PRIx64 ", data = 0x%016" PRIx64 ", target = %s\n",
+		 rc, target_addr, *data, pdbg_target_path(&pib->target));
+
 	return rc;
 }
 
@@ -157,6 +159,10 @@  int pib_write(struct pdbg_target *pib_dt, uint64_t addr, uint64_t data)
 		rc = pib_indirect_write(pib, target_addr, data);
 	else
 		rc = pib->write(pib, target_addr, data);
+
+	PR_DEBUG("rc = %d, addr = 0x%016" PRIx64 ", data = 0x%016" PRIx64 ", target = %s\n",
+		 rc, target_addr, data, pdbg_target_path(&pib->target));
+
 	return rc;
 }