You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SYCL][GDB] Enable pretty-printing of reference objects (#9197)
This commit modifies the output of sycl pretty-printers such that a
reference can be distinguished from a non-reference object. Printing of
references is now in line with GDB's common way to print C++ references.
A sycl::id reference is now printed as:
'(sycl::_V1::id<3> &) @0x7fffffffd350: sycl::_V1::id<3> = {11, 22, 33}'
Before it was exactly the same output as for a non-reference object:
'sycl::_V1::id<3> = {11, 22, 33}'
Similar changes apply for sycl::range.
Printing sycl::buffer objects resulted in an exception 'Python Exception
<class 'TypeError'>: expected string or bytes-like object' before this
patch due to the 'None' type returned by GDB in case the type is a
reference. This is is also fixed by this commit.
Now the output looks like:
'(sycl::_V1::buffer<int, 3> &) @0x7fffffffd1d0: sycl::_V1::buffer<int,
3> = {impl=0x7fffffffd1d0}'
Non-reference objects are still printed as:
'sycl::_V1::buffer<int, 3> = {impl=0x7fffffffd070}'
Signed-off-by: Christina Schimpe <[email protected]>
Signed-off-by: Christina Schimpe <[email protected]>
0 commit comments