From b96df80069ffa532cec306dfe197513ecb03ddc1 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 11 Jun 2019 13:47:37 -0700 Subject: panfrost/decode: Print line number of bad memory access Signed-off-by: Alyssa Rosenzweig --- src/gallium/drivers/panfrost/pandecode/decode.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gallium/drivers') diff --git a/src/gallium/drivers/panfrost/pandecode/decode.h b/src/gallium/drivers/panfrost/pandecode/decode.h index 2a78fee1d40..9c788bbabcc 100644 --- a/src/gallium/drivers/panfrost/pandecode/decode.h +++ b/src/gallium/drivers/panfrost/pandecode/decode.h @@ -59,6 +59,12 @@ __pandecode_fetch_gpu_mem(const struct pandecode_mapped_memory *mem, if (!mem) mem = pandecode_find_mapped_gpu_mem_containing(gpu_va); + if (!mem) { + fprintf(stderr, "Access to unknown memory %" PRIx64 " in %s:%d", + gpu_va, filename, line); + assert(0); + } + assert(mem); assert(size + (gpu_va - mem->gpu_va) <= mem->length); -- cgit v1.2.3