llvm icon indicating copy to clipboard operation
llvm copied to clipboard

[SYCL][GDB] Display local_accessor elements using a decorated pointer.

Open bwyma opened this issue 1 year ago • 0 comments

Modify the local_accessor printer to display data as a linear index from a decorated pointer. This is necessary to retain the address space qualifier.

A simple array printer was added to print local memory like a vector. The array printer limits the elements displayed based on GDB's print options to avoid displaying large data sets. This can be adjusted in GDB:

(gdb) p -elements 4 -- local_accessor_1d
$1 = sycl::local_accessor range 10 = {0, 1, 2, 3...}

(gdb) show print elements
Limit on string chars or array elements to print is 200.

bwyma avatar Oct 14 '24 18:10 bwyma