From ce729f90082a32d46e7a216e0f1d4ca8e339f417 Mon Sep 17 00:00:00 2001 From: Byron Lathi Date: Mon, 10 Nov 2025 02:33:47 +0000 Subject: [PATCH] Print out bytes after we read them --- sw/test/pcie_dma_test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sw/test/pcie_dma_test.c b/sw/test/pcie_dma_test.c index 6ef359a..f99902c 100644 --- a/sw/test/pcie_dma_test.c +++ b/sw/test/pcie_dma_test.c @@ -89,7 +89,7 @@ int main(void) printf("Allocating 1024 bytes as destination\n"); - uint32_t* dst = (uint32_t*)malloc(1024); + char* dst = (char*)malloc(1024); printf("Virtual address: %p\n", dst); uintptr_t dst_phys; virt_to_phys_user(&dst_phys, (uintptr_t)dst); @@ -136,6 +136,7 @@ int main(void) printf("%d\n", pcie_base[12]); printf("\n\n"); - printf("%x\n", dst[0]); + printf("strlen(dst)=%d\n", strlen(dst)); + printf("%s\n", dst); }