Skip to content

Commit 41832ec

Browse files
authored
[SYCL] Install gdb printers for preview library (#20510)
When GDB loads a shared library it looks for a python file of the same base name + "-gdb.py" by default. See: https://sourceware.org/gdb/current/onlinedocs/gdb.html/objfile_002dgdbdotext-file.html So, we have to install printers not only for regular sycl library, but also for sycl-preview library.
1 parent 9db885d commit 41832ec

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sycl/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,13 @@ if (NOT WIN32)
363363
RENAME "libsycl.so.${SYCL_VERSION_STRING}-gdb.py"
364364
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/"
365365
COMPONENT sycl-headers-extras)
366+
if (SYCL_ENABLE_MAJOR_RELEASE_PREVIEW_LIB)
367+
install(FILES
368+
"${CMAKE_CURRENT_SOURCE_DIR}/gdb/libsycl.so-gdb.py"
369+
RENAME "libsycl-preview.so.${SYCL_VERSION_STRING}-gdb.py"
370+
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/"
371+
COMPONENT sycl-headers-extras)
372+
endif()
366373
endif()
367374

368375
if(SYCL_ENABLE_XPTI_TRACING AND

0 commit comments

Comments
 (0)