Print out bytes after we read them

This commit is contained in:
Byron Lathi
2025-11-10 02:33:47 +00:00
parent 32d18845e5
commit ce729f9008

View File

@@ -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);
}