3.5. Device State Inspection

Classes

struct 
Warp state in the CBU (Convergence Barrier Unit).
struct 
CUDA Log Message.
struct 
Device-level information. This is the first element in the deviceInfoBuffer, and is always present. getDeviceInfo() takes a deviceId as input, so no need to explicitly pass it back here. Only "valid & updated" SMs/Warps/Lanes are included in the buffer, which allows us to determine indexes without having to encode an explicit ID field in the following buffer datastructures.
struct 
Sizes of the various structs returned by the batched device update APIs. No explicit version field - implied by debugAPI major.minor.revision.
struct 
Lane state (state of a single thread).
struct 
Information about a lazily loaded function.
struct 
Memory information.
struct 
SM-level information.
struct 
Warp-level information.
struct 
Warp resources. These resources can change at runtime between suspends.
struct 
Warp state information.
struct 
Warp state for API version 12.0.
struct 
Warp state for API version 12.7.
struct 
Warp state for API version 6.0.

Enumerations

enum CUDBGBarrierScope
CUDA barrier scope.
enum CUDBGCbuThreadState
Thread state in the CBU (Convergence Barrier Unit).
enum CUDBGCoredumpGenerationFlags
Coredump generation flags.
enum CUDBGCudaLogLevel
CUDA Log severity level.
enum CUDBGDeviceInfoAttribute_t
Device-level attributes.
enum CUDBGDeviceInfoQueryType_t
Device info query type.
enum CUDBGLaneInfoAttribute_t
Lane-level (thread-level) attributes.
enum CUDBGSMInfoAttribute_t
SM-level attributes.
enum CUDBGWarpInfoAttribute_t
Warp-level attributes.
enum ptxStorageKind
Memory segments for DWARF.

Variables

CUDBGResult  ( *CUDBGAPI_st::consumeCudaLogs )( CUDBGCudaLogMessage* logMessages, uint32_t numMessages, uint32_t* numConsumed )
Get CUDA error log entries.
CUDBGResult  ( *CUDBGAPI_st::generateCoredump )( const char* filename, CUDBGCoredumpGenerationFlags flags )
Generate a coredump for the current GPU state.
CUDBGResult  ( *CUDBGAPI_st::getCbuWarpState )( uint32_t dev, uint32_t sm, uint64_t warpMask, CUDBGCbuWarpState* warpStates, uint32_t numWarpStates )
Get the CBU state of a given warp.
CUDBGResult  ( *CUDBGAPI_st::getClusterExceptionTargetBlock )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim3* blockIdx, bool* blockIdxValid )
Get the target block index and validity status for cluster exceptions.
CUDBGResult  ( *CUDBGAPI_st::getConstBankAddress )( uint32_t dev, uint64_t gridId64, uint32_t bank, uint64_t* address, uint32_t* size )
Get constant bank GPU VA and size.
CUDBGResult  ( *CUDBGAPI_st::getConstBankAddress123 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t bank, uint32_t offset, uint64_t* address )
Convert constant bank number and offset into GPU VA.
CUDBGResult  ( *CUDBGAPI_st::getCudaExceptionString )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, char* buf, uint32_t bufSz, uint32_t* msgSz )
Get the error string for CUDA Exceptions.
CUDBGResult  ( *CUDBGAPI_st::getDeviceInfo )( uint32_t dev, CUDBGDeviceInfoQueryType_t type, void* buffer, uint32_t length, uint32_t* dataLength )
Read full device info for the device.
CUDBGResult  ( *CUDBGAPI_st::getDeviceInfoSizes )( uint32_t dev, CUDBGDeviceInfoSizes* sizes )
Return sizes for device info structs and defined attributes.
CUDBGResult  ( *CUDBGAPI_st::getDevicePCIBusInfo )( uint32_t dev, uint32_t* pciBusId, uint32_t* pciDevId )
Get PCI bus and device ids associated with device index.
CUDBGResult  ( *CUDBGAPI_st::getHardwareBarrierInfo )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, CUDBGBarrierScope* scope, char* buf, uint32_t bufSz, uint32_t* msgSz )
Get hardware barrier information.
CUDBGResult  ( *CUDBGAPI_st::getLoadedFunctionInfo )( uint32_t dev, uint64_t handle, CUDBGLoadedFunctionInfo* info, uint32_t startIndex, uint32_t numEntries )
Get the section number and address of loaded functions for a given module.
CUDBGResult  ( *CUDBGAPI_st::getLoadedFunctionInfo118 )( uint32_t dev, uint64_t handle, CUDBGLoadedFunctionInfo* info, uint32_t numEntries )
Get the section number and address of loaded functions for a given module.
CUDBGResult  ( *CUDBGAPI_st::getManagedMemoryRegionInfo )( uint64_t startAddress, CUDBGMemoryInfo* memoryInfo, uint32_t memoryInfo_size, uint32_t* numEntries )
Get a sorted list of managed memory regions.
CUDBGResult  ( *CUDBGAPI_st::memcheckReadErrorAddress )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t* address, ptxStorageKind* storage )
Get the address that memcheck detected an error on.
CUDBGResult  ( *CUDBGAPI_st::readActiveLanes )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t* activeLanesMask )
Read the lane bitmask of active threads on a valid warp.
CUDBGResult  ( *CUDBGAPI_st::readAllVirtualReturnAddresses )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t* addrs, uint32_t numAddrs, uint32_t* callDepth, uint32_t* syscallCallDepth )
Read all the virtual return addresses for a thread (the full backtrace).
CUDBGResult  ( *CUDBGAPI_st::readBlockIdx )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim3* blockIdx )
Read the CUDA block index running on a valid warp.
CUDBGResult  ( *CUDBGAPI_st::readBlockIdx32 )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim2* blockIdx )
Read the two-dimensional CUDA block index running on a valid warp.
CUDBGResult  ( *CUDBGAPI_st::readBrokenWarps )( uint32_t dev, uint32_t sm, uint64_t* brokenWarpsMask )
Read the bitmask of warps that are at a breakpoint on a given SM.
CUDBGResult  ( *CUDBGAPI_st::readCCRegister )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t* val )
Read the hardware CC register.
CUDBGResult  ( *CUDBGAPI_st::readCPUCallStack )( uint32_t dev, uint64_t gridId64, uint64_t* addrs, uint32_t numAddrs, uint32_t* totalNumAddrs )
Read the CPU call stack captured at the time of kernel launch.
CUDBGResult  ( *CUDBGAPI_st::readCallDepth )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t* depth )
Read the call depth (number of calls) for a given thread.
CUDBGResult  ( *CUDBGAPI_st::readCallDepth32 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t* depth )
Read the call depth (number of calls) for a given warp.
CUDBGResult  ( *CUDBGAPI_st::readClusterIdx )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim3* clusterIdx )
Read the CUDA cluster index running on a valid warp.
CUDBGResult  ( *CUDBGAPI_st::readCodeMemory )( uint32_t dev, uint64_t addr, void* buf, uint32_t sz )
Read content at address in the code memory segment.
CUDBGResult  ( *CUDBGAPI_st::readConstMemory129 )( uint32_t dev, uint64_t addr, void* buf, uint32_t sz )
Read content at address in the constant memory segment.
CUDBGResult  ( *CUDBGAPI_st::readDeviceExceptionState )( uint32_t dev, uint64_t* mask, uint32_t numWords )
Get the exception state of the SMs on the device.
CUDBGResult  ( *CUDBGAPI_st::readDeviceExceptionState80 )( uint32_t dev, uint64_t* exceptionSMMask )
Get the exception state of the SMs on the device.
CUDBGResult  ( *CUDBGAPI_st::readErrorPC )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t* errorPC, bool* errorPCValid )
Get the hardware reported error PC if it exists.
CUDBGResult  ( *CUDBGAPI_st::readGenericMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t addr, void* buf, uint32_t sz )
Read content at an address in any memory segment.
CUDBGResult  ( *CUDBGAPI_st::readGlobalMemory )( uint64_t addr, void* buf, uint32_t sz )
Read content at an address in the global address space.
CUDBGResult  ( *CUDBGAPI_st::readGlobalMemory31 )( uint32_t dev, uint64_t addr, void* buf, uint32_t sz )
Read content at address in the global memory segment.
CUDBGResult  ( *CUDBGAPI_st::readGlobalMemory55 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t addr, void* buf, uint32_t sz )
Read content at address in the global memory segment.
CUDBGResult  ( *CUDBGAPI_st::readGridId )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t* gridId64 )
Read the 64-bit CUDA grid index running on a valid warp.
CUDBGResult  ( *CUDBGAPI_st::readGridId50 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t* gridId )
Read the CUDA grid index running on a valid warp.
CUDBGResult  ( *CUDBGAPI_st::readLaneException )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, CUDBGException_t* exception )
Read the exception type for a given thread.
CUDBGResult  ( *CUDBGAPI_st::readLaneStatus )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, bool* error )
Read the status of the given thread.
CUDBGResult  ( *CUDBGAPI_st::readLocalMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t addr, void* buf, uint32_t sz )
Read content at address in the local memory segment.
CUDBGResult  ( *CUDBGAPI_st::readPC )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t* pc )
Read the PC offset on the given active thread.
CUDBGResult  ( *CUDBGAPI_st::readParamMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t addr, void* buf, uint32_t sz )
Read content at address in the param memory segment.
CUDBGResult  ( *CUDBGAPI_st::readPinnedMemory )( uint64_t addr, void* buf, uint32_t sz )
Read content at pinned address in system memory.
CUDBGResult  ( *CUDBGAPI_st::readPredicates )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t predicates_size, uint32_t* predicates )
Read content of hardware predicate registers.
CUDBGResult  ( *CUDBGAPI_st::readRegister )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t regno, uint32_t* val )
Read content of a hardware register.
CUDBGResult  ( *CUDBGAPI_st::readRegisterRange )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t index, uint32_t numRegisters, uint32_t* registers, uint32_t* numRegistersRead )
Read content of a hardware range of hardware registers.
CUDBGResult  ( *CUDBGAPI_st::readRegisterRange60 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t index, uint32_t registers_size, uint32_t* registers )
Read content of a range of hardware registers.
CUDBGResult  ( *CUDBGAPI_st::readReturnAddress )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t level, uint64_t* ra )
Read the return address (offset) for a call level.
CUDBGResult  ( *CUDBGAPI_st::readReturnAddress32 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t level, uint64_t* ra )
Read the return address (offset) for a call level.
CUDBGResult  ( *CUDBGAPI_st::readSharedMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t addr, void* buf, uint32_t sz )
Read content at address in the shared memory segment.
CUDBGResult  ( *CUDBGAPI_st::readSmException )( uint32_t dev, uint32_t sm, CUDBGException_t* exception, uint64_t* errorPC, bool* errorPCValid )
Get the SM exception status if it exists.
CUDBGResult  ( *CUDBGAPI_st::readSyscallCallDepth )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t* depth )
Read the call depth of syscalls for a given thread.
CUDBGResult  ( *CUDBGAPI_st::readTextureMemory )( uint32_t dev, uint32_t vsm, uint32_t wp, uint32_t id, uint32_t dim, uint32_t* coords, void* buf, uint32_t sz )
This method is no longer supported since CUDA 12.0.
CUDBGResult  ( *CUDBGAPI_st::readTextureMemoryBindless )( uint32_t dev, uint32_t vsm, uint32_t wp, uint32_t texSymtabIndex, uint32_t dim, uint32_t* coords, void* buf, uint32_t sz )
This method is no longer supported since CUDA 12.0.
CUDBGResult  ( *CUDBGAPI_st::readThreadIdx )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, CuDim3* threadIdx )
Read the CUDA thread index running on valid thread.
CUDBGResult  ( *CUDBGAPI_st::readUniformPredicates )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t predicates_size, uint32_t* predicates )
Read contents of uniform predicate registers.
CUDBGResult  ( *CUDBGAPI_st::readUniformRegisterRange )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t regno, uint32_t registers_size, uint32_t* registers )
Read a range of uniform registers.
CUDBGResult  ( *CUDBGAPI_st::readValidLanes )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t* validLanesMask )
Read the lane bitmask of valid threads on a given warp.
CUDBGResult  ( *CUDBGAPI_st::readValidWarps )( uint32_t dev, uint32_t sm, uint64_t* validWarpsMask )
Read the bitmask of valid warps on a given SM.
CUDBGResult  ( *CUDBGAPI_st::readVirtualPC )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t* pc )
Read the PC (virtual address) on the given active thread.
CUDBGResult  ( *CUDBGAPI_st::readVirtualReturnAddress )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t level, uint64_t* ra )
Read the virtual return address for a call level.
CUDBGResult  ( *CUDBGAPI_st::readVirtualReturnAddress32 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t level, uint64_t* ra )
Read the virtual return address for a call level.
CUDBGResult  ( *CUDBGAPI_st::readWarpResources )( uint32_t dev, uint32_t sm, uint32_t wp, CUDBGWarpResources* resources )
Get the resources assigned to a given warp.
CUDBGResult  ( *CUDBGAPI_st::readWarpState )( uint32_t dev, uint32_t sm, uint32_t wp, CUDBGWarpState* state )
Read the state of a given warp.
CUDBGResult  ( *CUDBGAPI_st::readWarpState120 )( uint32_t dev, uint32_t sm, uint32_t wp, CUDBGWarpState120* state )
Read the state of a given warp.
CUDBGResult  ( *CUDBGAPI_st::readWarpState127 )( uint32_t dev, uint32_t sm, uint32_t wp, CUDBGWarpState127* state )
Read the state of a given warp.
CUDBGResult  ( *CUDBGAPI_st::readWarpState60 )( uint32_t dev, uint32_t sm, uint32_t wp, CUDBGWarpState60* state )
Read the state of a given warp.

Enumerations

enum CUDBGBarrierScope

Values
CUDBG_BARRIER_SCOPE_INVALID = 0xFFFFFFFFU
Invalid barrier scope.
CUDBG_BARRIER_SCOPE_NONE = 0
No barrier.
CUDBG_BARRIER_SCOPE_WARP = 1
Warp-wide barrier.
CUDBG_BARRIER_SCOPE_WARP_GROUP = 2
Warp group-wide barrier.
CUDBG_BARRIER_SCOPE_BLOCK = 3
Block-wide barrier.
CUDBG_BARRIER_SCOPE_CLUSTER = 4
Cluster-wide barrier.
CUDBG_BARRIER_SCOPE_KERNEL = 5
Kernel-wide barrier.
enum CUDBGCbuThreadState

Values
CUDBG_CBU_THREAD_STATE_INVALID = 0xFFFFFFFFU
CUDBG_CBU_THREAD_STATE_EXITED = 0
CUDBG_CBU_THREAD_STATE_READY
CUDBG_CBU_THREAD_STATE_YIELDED
CUDBG_CBU_THREAD_STATE_SLEEP
CUDBG_CBU_THREAD_STATE_SLEEPYIELD
CUDBG_CBU_THREAD_STATE_READYATNEXT
CUDBG_CBU_THREAD_STATE_BLOCKEDPLUS
CUDBG_CBU_THREAD_STATE_BLOCKEDALL
CUDBG_CBU_THREAD_STATE_BLOCKEDCOLLECTIVE
CUDBG_CBU_THREAD_STATE_BLOCKEDB0
CUDBG_CBU_THREAD_STATE_BLOCKEDB1
CUDBG_CBU_THREAD_STATE_BLOCKEDB2
CUDBG_CBU_THREAD_STATE_BLOCKEDB3
CUDBG_CBU_THREAD_STATE_BLOCKEDB4
CUDBG_CBU_THREAD_STATE_BLOCKEDB5
CUDBG_CBU_THREAD_STATE_BLOCKEDB6
CUDBG_CBU_THREAD_STATE_BLOCKEDB7
CUDBG_CBU_THREAD_STATE_BLOCKEDB8
CUDBG_CBU_THREAD_STATE_BLOCKEDB9
CUDBG_CBU_THREAD_STATE_BLOCKEDB10
CUDBG_CBU_THREAD_STATE_BLOCKEDB11
CUDBG_CBU_THREAD_STATE_BLOCKEDB12
CUDBG_CBU_THREAD_STATE_BLOCKEDB13
CUDBG_CBU_THREAD_STATE_BLOCKEDB14
CUDBG_CBU_THREAD_STATE_BLOCKEDB15
enum CUDBGCoredumpGenerationFlags

Values
CUDBG_COREDUMP_DEFAULT_FLAGS = 0
Default flags.
CUDBG_COREDUMP_SKIP_NONRELOCATED_ELF_IMAGES = (1<<0)
Skip dumping non-relocated ELF images.
CUDBG_COREDUMP_SKIP_GLOBAL_MEMORY = (1<<1)
Skip dumping global memory.
CUDBG_COREDUMP_SKIP_SHARED_MEMORY = (1<<2)
Skip dumping shared memory.
CUDBG_COREDUMP_SKIP_LOCAL_MEMORY = (1<<3)
Skip dumping local memory.
CUDBG_COREDUMP_SKIP_CONSTBANK_MEMORY = (1<<5)
Skip dumping constant bank memory.
CUDBG_COREDUMP_GZIP_COMPRESS = (1<<6)
Compress the coredump with gzip.
CUDBG_COREDUMP_LIGHTWEIGHT_FLAGS = CUDBG_COREDUMP_SKIP_NONRELOCATED_ELF_IMAGES |CUDBG_COREDUMP_SKIP_GLOBAL_MEMORY |CUDBG_COREDUMP_SKIP_SHARED_MEMORY |CUDBG_COREDUMP_SKIP_LOCAL_MEMORY |CUDBG_COREDUMP_SKIP_CONSTBANK_MEMORY
Lightweight flags.
enum CUDBGCudaLogLevel

Values
CUDBG_CUDA_LOG_LEVEL_INVALID = 0xFFFFFFFFU
Invalid log level.
CUDBG_CUDA_LOG_LEVEL_ERROR = 0
Error log level, matches CU_LOG_LEVEL_ERROR.
CUDBG_CUDA_LOG_LEVEL_WARNING = 1
Warning log level, matches CU_LOG_LEVEL_WARNING.
enum CUDBGDeviceInfoAttribute_t

Values
CUDBG_DEVICE_ATTRIBUTE_SM_UPDATE_MASK = 0
Mask of updated SMs reported by this response. Optional: Yes, assume all 1's if absent. Size: Number of SMs-sized bitmask, rounded up to be divisible by 8.
CUDBG_DEVICE_ATTRIBUTE_SM_ACTIVE_MASK = 1
Mask of SMs with any valid warp. Optional: No, always returned by the API. Size: Number of SMs-sized bitmask, rounded up to be divisible by 8.
CUDBG_DEVICE_ATTRIBUTE_SM_EXCEPTION_MASK = 2
Mask of SMs with any warps with exceptions. Optional: Yes, assume all 0's if absent. Size: Number of SMs-sized bitmask, rounded up to be divisible by 8.
CUDBG_DEVICE_ATTRIBUTE_COUNT
Device attributes count.
enum CUDBGDeviceInfoQueryType_t

Values
CUDBG_RESPONSE_TYPE_FULL
Request state information for all valid SMs/Warps/Lanes.
CUDBG_RESPONSE_TYPE_UPDATE
Request state information for all changed SMs/Warps/Lanes since the last call. It's safe to always use this type, the API will respond with the full information when necessary.
CUDBG_RESPONSE_TYPE_UNKNOWN = 0xFFFFFFFFU
Unknown device info query type.
enum CUDBGLaneInfoAttribute_t

Values
CUDBG_LANE_ATTRIBUTE_COUNT
Lane (thread) attributes count.
enum CUDBGSMInfoAttribute_t

Values
CUDBG_SM_ATTRIBUTE_WARP_UPDATE_MASK = 0
Mask of updated warps reported by this response. Optional: Yes, assume all 1's if absent. Size: uint64_t.
CUDBG_SM_ATTRIBUTE_COUNT
SM attributes count.
enum CUDBGWarpInfoAttribute_t

Values
CUDBG_WARP_ATTRIBUTE_LANE_UPDATE_MASK = 0
Mask of updated lanes reported by this response. Optional: Yes, assume all 1's if absent. Size: uint32_t.
CUDBG_WARP_ATTRIBUTE_LANE_ATTRIBUTES = 1
Signals whether the attribute flags field is present on the lane level for this warp. Optional: Yes, assume no lane attributes for this warp if absent. Size: 0 (doesn't have an associated warp-level field).
CUDBG_WARP_ATTRIBUTE_EXCEPTION = 2
CUDBGException_t for this warp. Optional: Yes, assume CUDBG_EXCEPTION_NONE if absent. Size: uint32_t.
CUDBG_WARP_ATTRIBUTE_ERRORPC = 3
Error PC for this warp. Optional: Yes, assume no error PC is available if absent. Size: uint64_t.
CUDBG_WARP_ATTRIBUTE_CLUSTERIDX = 4
Cluster index for this warp. Optional: Yes if warp is not in a cluster. Size: CuDim3.
CUDBG_WARP_ATTRIBUTE_CLUSTERDIM = 5
Cluster dimensions for this warp. Optional: Yes if warp is not in a cluster. Size: CuDim3.
CUDBG_WARP_ATTRIBUTE_CLUSTER_EXCEPTION_TARGET_BLOCK_IDX = 6
For cluster exceptions, this represents the target block index handling cluster requests. Optional: Yes, assume no block index is available if absent. Size: CuDim3.
CUDBG_WARP_ATTRIBUTE_IN_SYSCALL_LANES = 7
Lane mask showing threads that are in a syscall. Optional: Yes, use readSyscallCallDepth() if this attribute is not present. Size: uint32_t.
CUDBG_WARP_ATTRIBUTE_HIT_BREAKPOINT_HANDLE = 8
Breakpoint handle of a broken warp (of type CUDBGBreakpointHandle) Optional: Yes, only present for broken warps Size: CUDBGBreakpointHandle.
CUDBG_WARP_ATTRIBUTE_COUNT
Warp attributes count.
enum ptxStorageKind

Note:

DEPRECATED: This enum is no longer used since the API methods that use it have been deprecated.

Values
ptxUNSPECIFIEDStorage
ptxCodeStorage
ptxRegStorage
ptxSregStorage
ptxConstStorage
ptxGlobalStorage
ptxLocalStorage
ptxParamStorage
ptxSharedStorage
ptxSurfStorage
ptxTexStorage
ptxTexSamplerStorage
ptxGenericStorage
ptxIParamStorage
ptxOParamStorage
ptxFrameStorage
ptxURegStorage
ptxMAXStorage

Variables

CUDBGResult ( *CUDBGAPI_st::consumeCudaLogs )( CUDBGCudaLogMessage* logMessages, uint32_t numMessages, uint32_t* numConsumed )

Get CUDA error log entries. This consumes the log entries, so they will not be available in subsequent calls. This functionality is only available if the CUDBG_DEBUGGER_CAPABILITY_ENABLE_CUDA_LOGS capability is enabled.

Since CUDA 12.9.

Parameters
logMessages
- client-allocated array to store log entries
numMessages
- capacity of the logMessages array, in number of elements
numConsumed
- returned number of entries written to logMessages
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_NO_EVENT_AVAILABLE, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::generateCoredump )( const char* filename, CUDBGCoredumpGenerationFlags flags )

Generate a coredump for the current GPU state. Since CUDA 12.3.

Parameters
filename
- target coredump file name
flags
- coredump generation flags/options
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::getCbuWarpState )( uint32_t dev, uint32_t sm, uint64_t warpMask, CUDBGCbuWarpState* warpStates, uint32_t numWarpStates )

Get the CBU state of a given warp. Since CUDA 12.9.

Parameters
dev
- device index
sm
- SM index
warpMask
- bitmask of the warps which states should be returned in warpStates
warpStates
- pointer to the array of CUDBGCbuWarpState structures
numWarpStates
- number of elements in warpStates array
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::getClusterExceptionTargetBlock )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim3* blockIdx, bool* blockIdxValid )

Get the target block index and validity status for cluster exceptions. Since CUDA 12.7.

Parameters
dev
- device index
sm
- SM index
wp
- warp index
blockIdx
- pointer to a `CuDim3` structure that will be populated with the target block index
blockIdxValid
- pointer to a boolean variable that will be set to `true` if the target block index is valid, and `false` otherwise. Value will be set to false if the warp is not stopped on a cluster exception
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL, CUDBG_ERROR_NOT_SUPPORTED

CUDBGResult ( *CUDBGAPI_st::getConstBankAddress )( uint32_t dev, uint64_t gridId64, uint32_t bank, uint64_t* address, uint32_t* size )

Get constant bank GPU VA and size. Since CUDA 12.4.

Parameters
dev
- device index
gridId64
- grid ID of the grid containing the constant bank
bank
- constant bank number
address
- GPU VA of the bank memory
size
- bank size
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_RECURSIVE_API_CALL, CUDBG_ERROR_MISSING_DATA

CUDBGResult ( *CUDBGAPI_st::getConstBankAddress123 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t bank, uint32_t offset, uint64_t* address )

Convert constant bank number and offset into GPU VA. It's more convenient to get the constbank address and then calculate the VA for any const address using that.

Since CUDA 12.3.

Note:

DEPRECATED in CUDA 12.4: Use getConstBankAddress instead.

See also:

getConstBankAddress

Parameters
dev
- device index
sm
- SM index
wp
- warp index
bank
- constant bank number
offset
- offset within the bank
address
- GPU VA
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_MEMORY_ACCESS, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_RECURSIVE_API_CALL, CUDBG_ERROR_MISSING_DATA

CUDBGResult ( *CUDBGAPI_st::getCudaExceptionString )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, char* buf, uint32_t bufSz, uint32_t* msgSz )

Get the error string for CUDA Exceptions. Since CUDA 13.0.

Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
buf
- buffer for the error string
bufSz
- buffer size
msgSz
- error message size with null character, can be null
Returns

CUDBG_SUCCESS, CUDBG_ERROR_BUFFER_TOO_SMALL, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::getDeviceInfo )( uint32_t dev, CUDBGDeviceInfoQueryType_t type, void* buffer, uint32_t length, uint32_t* dataLength )

Read full device info for the device. Information returned by this method is cheap to calculate, so it can be used after every suspend to quickly get the updated device state. For convenience, the caller can always request partial updates, the API will return a full response when returning a partial one is not possible. If the CUDBG_DEBUGGER_CAPABILITY_REPORT_EXCEPTIONS_IN_EXITED_WARPS capability is enabled, exceptions in exited warps will be reported.

Since CUDA 12.4.

See also:

getDeviceInfoSizes

Parameters
dev
- device index
type
- query type (full or delta)
buffer
- output buffer
length
- output buffer length
dataLength
- number of bytes written to the buffer
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::getDeviceInfoSizes )( uint32_t dev, CUDBGDeviceInfoSizes* sizes )

Return sizes for device info structs and defined attributes. Since CUDA 12.4.

See also:

getDeviceInfo

Parameters
dev
- device index
sizes
- device info sizes
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::getDevicePCIBusInfo )( uint32_t dev, uint32_t* pciBusId, uint32_t* pciDevId )

Get PCI bus and device ids associated with device index. Since CUDA 5.5.

Parameters
dev
- device index
pciBusId
- pointer where corresponding PCI BUS ID would be stored
pciDevId
- pointer where corresponding PCI DEVICE ID would be stored
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::getHardwareBarrierInfo )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, CUDBGBarrierScope* scope, char* buf, uint32_t bufSz, uint32_t* msgSz )

Get hardware barrier information. Since CUDA 13.1.

Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
scope
- barrier scope
buf
- buffer for the barrier information
bufSz
- buffer size
msgSz
- error message size with null character, can be null
Returns

CUDBG_SUCCESS, CUDBG_ERROR_BUFFER_TOO_SMALL, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::getLoadedFunctionInfo )( uint32_t dev, uint64_t handle, CUDBGLoadedFunctionInfo* info, uint32_t startIndex, uint32_t numEntries )

Get the section number and address of loaded functions for a given module. If the CUDBG_DEBUGGER_CAPABILITY_LAZY_FUNCTION_LOADING capability is enabled, CUDA loads functions lazily after the module has been reported. This method could be used to get the lazily loaded functions.

Since CUDA 12.3.

Parameters
dev
- device index
handle
- ELF/cubin image handle
info
- information about loaded functions
startIndex
- start index of the entries to get
numEntries
- number of function load entries to read
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::getLoadedFunctionInfo118 )( uint32_t dev, uint64_t handle, CUDBGLoadedFunctionInfo* info, uint32_t numEntries )

Get the section number and address of loaded functions for a given module. Behaves like getLoadedFunctionInfo but doesn't allow querying a subset of all lazily loaded functions.

Since CUDA 11.8.

Note:

DEPRECATED in CUDA 12.3: Use getLoadedFunctionInfo instead.

See also:

getLoadedFunctionInfo

Parameters
dev
- device index
handle
- ELF/cubin image handle
info
- information about loaded functions
numEntries
- number of function load entries to read
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::getManagedMemoryRegionInfo )( uint64_t startAddress, CUDBGMemoryInfo* memoryInfo, uint32_t memoryInfo_size, uint32_t* numEntries )

Get a sorted list of managed memory regions. The sorted list of memory regions starts from a region containing the specified starting address. If the starting address is set to 0, a sorted list of managed memory regions is returned which starts from the managed memory region with the lowest start address.

Since CUDA 6.0.

Parameters
startAddress
- the address that the first region in the list must contain
memoryInfo
- client-allocated array of memory region records of type CUDBGMemoryInfo
memoryInfo_size
- number of records of type CUDBGMemoryInfo that memoryInfo can hold
numEntries
- pointer to a client-allocated variable holding the number of valid entries returned in memoryInfo
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::memcheckReadErrorAddress )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t* address, ptxStorageKind* storage )

Get the address that memcheck detected an error on. Will always return CUDBG_ERROR_NOT_SUPPORTED.

Since CUDA 5.0.

Note:

DEPRECATED in CUDA 12.0: Do not use.

Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
address
- returned address detected by memcheck
storage
- returned address class of address
Returns

CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_RECURSIVE_API_CALL, CUDBG_ERROR_NOT_SUPPORTED

CUDBGResult ( *CUDBGAPI_st::readActiveLanes )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t* activeLanesMask )

Read the lane bitmask of active threads on a valid warp. Since CUDA 3.0.

See also:

readBlockIdx

readBrokenWarps

readGridId

readThreadIdx

readValidLanes

readValidWarps

Parameters
dev
- device index
sm
- SM index
wp
- warp index
activeLanesMask
- the returned bitmask of active threads
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readAllVirtualReturnAddresses )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t* addrs, uint32_t numAddrs, uint32_t* callDepth, uint32_t* syscallCallDepth )

Read all the virtual return addresses for a thread (the full backtrace). Note that syscallCallDepth is always set to 0.

Since CUDA 12.5.

See also:

readCallDepth

readReturnAddress

Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
addrs
- the returned addresses array
numAddrs
- number of elements in addrs array
callDepth
- the returned call depth
syscallCallDepth
- the returned syscall call depth
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readBlockIdx )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim3* blockIdx )

Read the CUDA block index running on a valid warp. Since CUDA 4.0.

See also:

readActiveLanes

readBrokenWarps

readGridId

readThreadIdx

readValidLanes

readValidWarps

Parameters
dev
- device index
sm
- SM index
wp
- warp index
blockIdx
- the returned CUDA block index
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readBlockIdx32 )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim2* blockIdx )

Read the two-dimensional CUDA block index running on a valid warp. Behaves like readBlockIdx but doesn't return the z dimension.

Since CUDA 3.0.

Note:

DEPRECATED in CUDA 4.0: Use readBlockIdx instead.

See also:

readBlockIdx

Parameters
dev
- device index
sm
- SM index
wp
- warp index
blockIdx
- the returned CUDA block index
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readBrokenWarps )( uint32_t dev, uint32_t sm, uint64_t* brokenWarpsMask )

Read the bitmask of warps that are at a breakpoint on a given SM. Since CUDA 3.0.

See also:

readActiveLanes

readBlockIdx

readGridId

readThreadIdx

readValidLanes

readValidWarps

Parameters
dev
- device index
sm
- SM index
brokenWarpsMask
- the returned bitmask of broken warps
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readCCRegister )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t* val )

Read the hardware CC register. The CC register is no longer available in the supported hardware.

Since CUDA 6.5.

Note:

DEPRECATED in CUDA 13.1: Do not use.

Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
val
- the returned value of the CC register
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readCPUCallStack )( uint32_t dev, uint64_t gridId64, uint64_t* addrs, uint32_t numAddrs, uint32_t* totalNumAddrs )

Read the CPU call stack captured at the time of kernel launch. This method only works if the CUDBG_DEBUGGER_CAPABILITY_COLLECT_CPU_CALL_STACK_FOR_KERNEL_LAUNCHES capability is enabled.

Since CUDA 12.9.

Parameters
dev
- device index
gridId64
- 64-bit grid ID
addrs
- the returned addresses array, can be NULL
numAddrs
- capacity of addrs (possibly 0)
totalNumAddrs
- the actual size of the stack (number of frames) is written here; the value written can be greater than numAddrs
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readCallDepth )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t* depth )

Read the call depth (number of calls) for a given thread. Since CUDA 4.0.

See also:

readReturnAddress

readVirtualReturnAddress

Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
depth
- the returned call depth
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readCallDepth32 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t* depth )

Read the call depth (number of calls) for a given warp. Behaves like readCallDepth() for the active thread group.

Since CUDA 3.1.

Note:

DEPRECATED in CUDA 4.0: Use readCallDepth instead.

See also:

readCallDepth

Parameters
dev
- device index
sm
- SM index
wp
- warp index
depth
- the returned call depth
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readClusterIdx )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim3* clusterIdx )

Read the CUDA cluster index running on a valid warp. Since CUDA 12.0.

See also:

readActiveLanes

readBlockIdx

readBrokenWarps

readGridId

readThreadIdx

readValidLanes

readValidWarps

Parameters
dev
- device index
sm
- SM index
wp
- warp index
clusterIdx
- the returned CUDA cluster index
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readCodeMemory )( uint32_t dev, uint64_t addr, void* buf, uint32_t sz )

Read content at address in the code memory segment. It is generally not necessary to call this function - instead, the same memory could be read from the ELF module images received from the API.

Since CUDA 3.0.

See also:

readGenericMemory

readLocalMemory

readPC

readParamMemory

readRegister

readSharedMemory

readTextureMemory

Parameters
dev
- device index
addr
- memory address
buf
- buffer
sz
- buffer size in bytes
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_ADDRESS, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readConstMemory129 )( uint32_t dev, uint64_t addr, void* buf, uint32_t sz )

Read content at address in the constant memory segment. Behaves exactly like readGlobalMemory.

Since CUDA 3.0.

Note:

DEPRECATED in CUDA 13.0: Use readGlobalMemory instead.

See also:

readGlobalMemory

Parameters
dev
- device index
addr
- memory address
buf
- buffer
sz
- buffer size in bytes
Returns

CUDBG_SUCCESS, CUDBG_ERROR_UNKNOWN, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_MEMORY_ACCESS, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_ADDRESS_NOT_IN_DEVICE_MEM, CUDBG_ERROR_AMBIGUOUS_MEMORY_ADDRESS, CUDBG_ERROR_RECURSIVE_API_CALL, CUDBG_ERROR_NOT_SUPPORTED

CUDBGResult ( *CUDBGAPI_st::readDeviceExceptionState )( uint32_t dev, uint64_t* mask, uint32_t numWords )

Get the exception state of the SMs on the device. If the CUDBG_DEBUGGER_CAPABILITY_REPORT_EXCEPTIONS_IN_EXITED_WARPS capability is enabled, exceptions in exited warps will be reported.

Since CUDA 9.0.

See also:

getNumSMs

Parameters
dev
- device index
mask
- Arbitrarily sized bit field containing a 1 at (1 << i) if SM i hit an exception
numWords
- Number of uint64_t elements in mask (must be large enough to hold a bit for each sm on the device)
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readDeviceExceptionState80 )( uint32_t dev, uint64_t* exceptionSMMask )

Get the exception state of the SMs on the device. Behaves like readDeviceExceptionState but only supports up to 64 SMs.

Since CUDA 5.5.

Note:

DEPRECATED in CUDA 9.0: Use readDeviceExceptionState instead.

See also:

readDeviceExceptionState

Parameters
dev
- device index
exceptionSMMask
- Bit field containing a 1 at (1 << i) if SM i hit an exception
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readErrorPC )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t* errorPC, bool* errorPCValid )

Get the hardware reported error PC if it exists. The error PC, if available, shows the PC where an error happened (the thread can progress past that so its PC could be beyond that).

Since CUDA 6.0.

Parameters
dev
- device index
sm
- SM index
wp
errorPC
- PC ofthe exception
errorPCValid
- boolean to indicate that the returned error PC is valid
Returns

CUDBG_SUCCESS, CUDBG_ERROR_UNKNOWN_FUNCTION, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readGenericMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t addr, void* buf, uint32_t sz )

Read content at an address in any memory segment. The address will be used to determine whether the read is to local, shared or global memory. The target address range should entirely reside within a single memory segment. Coordinate arguments are only used when relevant. They should be provided for the following segments:

  • Shared memory: SM and Warp

  • Local memory: SM, Warp and Lane

Since CUDA 6.0.

See also:

readCodeMemory

readLocalMemory

readPC

readParamMemory

readRegister

readSharedMemory

readTextureMemory

Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
addr
- memory address
buf
- buffer
sz
Returns

CUDBG_SUCCESS, CUDBG_ERROR_UNKNOWN, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_MEMORY_ACCESS, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_ADDRESS_NOT_IN_DEVICE_MEM, CUDBG_ERROR_AMBIGUOUS_MEMORY_ADDRESS, CUDBG_ERROR_RECURSIVE_API_CALL, CUDBG_ERROR_NOT_SUPPORTED

CUDBGResult ( *CUDBGAPI_st::readGlobalMemory )( uint64_t addr, void* buf, uint32_t sz )

Read content at an address in the global address space. If the address is valid on more than one device and one of those devices does not support UVA, an error is returned.

Since CUDA 6.0.

See also:

readCodeMemory

readLocalMemory

readPC

readParamMemory

readRegister

readSharedMemory

readTextureMemory

Parameters
addr
- memory address
buf
- buffer
sz
Returns

CUDBG_SUCCESS, CUDBG_ERROR_UNKNOWN, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_MEMORY_ACCESS, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_ADDRESS_NOT_IN_DEVICE_MEM, CUDBG_ERROR_AMBIGUOUS_MEMORY_ADDRESS, CUDBG_ERROR_RECURSIVE_API_CALL, CUDBG_ERROR_NOT_SUPPORTED

CUDBGResult ( *CUDBGAPI_st::readGlobalMemory31 )( uint32_t dev, uint64_t addr, void* buf, uint32_t sz )

Read content at address in the global memory segment. Behaves like readGenericMemory() with sm, wp, ln == 0. This makes this method not at all useful.

Since CUDA 3.0.

Note:

DEPRECATED in CUDA 3.2: Use readGlobalMemory instead.

See also:

readGlobalMemory

Parameters
dev
- device index
addr
- memory address
buf
- buffer
sz
- buffer size in bytes
Returns

CUDBG_SUCCESS, CUDBG_ERROR_UNKNOWN, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_MEMORY_ACCESS, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_ADDRESS_NOT_IN_DEVICE_MEM, CUDBG_ERROR_AMBIGUOUS_MEMORY_ADDRESS, CUDBG_ERROR_RECURSIVE_API_CALL, CUDBG_ERROR_NOT_SUPPORTED

CUDBGResult ( *CUDBGAPI_st::readGlobalMemory55 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t addr, void* buf, uint32_t sz )

Read content at address in the global memory segment. Behaves exactly like readGenericMemory().

Since CUDA 3.2.

Note:

DEPRECATED in CUDA 6.0: Use readGlobalMemory instead.

See also:

readGlobalMemory

Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
addr
- memory address
buf
- buffer
sz
- buffer size in bytes
Returns

CUDBG_SUCCESS, CUDBG_ERROR_UNKNOWN, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_MEMORY_ACCESS, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_ADDRESS_NOT_IN_DEVICE_MEM, CUDBG_ERROR_AMBIGUOUS_MEMORY_ADDRESS, CUDBG_ERROR_RECURSIVE_API_CALL, CUDBG_ERROR_NOT_SUPPORTED

CUDBGResult ( *CUDBGAPI_st::readGridId )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t* gridId64 )

Read the 64-bit CUDA grid index running on a valid warp. The grid ID is guaranteed to be unique within a device, but not globally.

Since CUDA 5.5.

See also:

readActiveLanes

readBlockIdx

readBrokenWarps

readThreadIdx

readValidLanes

readValidWarps

Parameters
dev
- device index
sm
- SM index
wp
- warp index
gridId64
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readGridId50 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t* gridId )

Read the CUDA grid index running on a valid warp. Behaves like readGridId but truncates the grid ID to 32bit. This is incompatible with some grid IDs like those used by the OptiX applications.

Since CUDA 3.0.

Note:

DEPRECATED in CUDA 5.5: Use readGridId instead.

See also:

readGridId

Parameters
dev
- device index
sm
- SM index
wp
- warp index
gridId
- the returned CUDA grid index
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readLaneException )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, CUDBGException_t* exception )

Read the exception type for a given thread. Since CUDA 3.1.

Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
exception
- the returned exception type
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readLaneStatus )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, bool* error )

Read the status of the given thread. For specific error values, use readLaneException.

Since CUDA 3.0.

Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
error
- true if there is an error
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readLocalMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t addr, void* buf, uint32_t sz )

Read content at address in the local memory segment. Since CUDA 3.0.

See also:

readCodeMemory

readGenericMemory

readPC

readParamMemory

readRegister

readSharedMemory

readTextureMemory

Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
addr
- memory address
buf
- buffer
sz
- buffer size in bytes
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INVALID_ADDRESS, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readPC )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t* pc )

Read the PC offset on the given active thread. The returned PC offset is from the start of the current function. If a function can't be found, the full virtual address is returned.

Since CUDA 3.0.

See also:

readCodeMemory

readGenericMemory

readLocalMemory

readParamMemory

readRegister

readSharedMemory

readTextureMemory

readVirtualPC

Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
pc
- the returned PC
Returns

CUDBG_SUCCESS, CUDBG_ERROR_UNKNOWN_FUNCTION, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readParamMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t addr, void* buf, uint32_t sz )

Read content at address in the param memory segment. Since CUDA 3.0.

See also:

readCodeMemory

readGenericMemory

readLocalMemory

readPC

readRegister

readSharedMemory

readTextureMemory

Parameters
dev
- device index
sm
- SM index
wp
- warp index
addr
- memory address
buf
- buffer
sz
- buffer size in bytes
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readPinnedMemory )( uint64_t addr, void* buf, uint32_t sz )

Read content at pinned address in system memory. Depending on the platform, this method may fail and a platform-specific CPU RAM way of reading memory from the debuggee must be used (e.g. ptrace).

Since CUDA 3.2.

See also:

readCodeMemory

readGenericMemory

readLocalMemory

readPC

readParamMemory

readRegister

readSharedMemory

readTextureMemory

Parameters
addr
- system memory address
buf
- buffer
sz
- buffer size in bytes
Returns

CUDBG_SUCCESS, CUDBG_ERROR_UNKNOWN, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_MEMORY_ACCESS, CUDBG_ERROR_MEMORY_MAPPING_FAILED, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_ADDRESS_NOT_IN_DEVICE_MEM, CUDBG_ERROR_AMBIGUOUS_MEMORY_ADDRESS, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readPredicates )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t predicates_size, uint32_t* predicates )
Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
predicates_size
- number of predicate registers to read
predicates
- buffer
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readRegister )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t regno, uint32_t* val )

Read content of a hardware register. Note that warps can dynamically change the number of used registers at runtime, readWarpResources() could be used to query that.

Since CUDA 3.0.

See also:

readCodeMemory

readGenericMemory

readLocalMemory

readPC

readParamMemory

readSharedMemory

readTextureMemory

Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
regno
- register index
val
- the returned value of the register
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readRegisterRange )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t index, uint32_t numRegisters, uint32_t* registers, uint32_t* numRegistersRead )

Read content of a hardware range of hardware registers. Since CUDA 13.2.

See also:

readCodeMemory

readGenericMemory

readLocalMemory

readPC

readParamMemory

readRegister

readSharedMemory

readTextureMemory

Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
index
- index of the first register to read
numRegisters
- number of registers to read
registers
- buffer
numRegistersRead
- number of registers actually read, ignored if null
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readRegisterRange60 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t index, uint32_t registers_size, uint32_t* registers )

Read content of a range of hardware registers. Since CUDA 6.0.

Note:

DEPRECATED in CUDA 13.2: Use readRegisterRange instead.

See also:

readRegisterRange

Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
index
- index of the first register to read
registers_size
- number of registers to read
registers
- buffer
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readReturnAddress )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t level, uint64_t* ra )

Read the return address (offset) for a call level. The returned return address is an offset from the start of the current function. If a function can't be found, the full virtual address is returned.

Since CUDA 4.0.

See also:

readCallDepth

readVirtualReturnAddress

Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
level
- the specified call level
ra
- the returned return address for level
Returns

CUDBG_SUCCESS, CUDBG_ERROR_UNKNOWN_FUNCTION, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CALL_LEVEL, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readReturnAddress32 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t level, uint64_t* ra )

Read the return address (offset) for a call level. Behaves like readReturnAddress() for the active thread group.

Since CUDA 3.1.

Note:

DEPRECATED in CUDA 4.0: Use readReturnAddress instead.

See also:

readReturnAddress

Parameters
dev
- device index
sm
- SM index
wp
- warp index
level
- the specified call level
ra
- the returned return address for level
Returns

CUDBG_SUCCESS, CUDBG_ERROR_UNKNOWN_FUNCTION, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CALL_LEVEL, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readSharedMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t addr, void* buf, uint32_t sz )

Read content at address in the shared memory segment. Since CUDA 3.0.

See also:

readCodeMemory

readGenericMemory

readLocalMemory

readPC

readParamMemory

readRegister

readTextureMemory

Parameters
dev
- device index
sm
- SM index
wp
- warp index
addr
- memory address
buf
- buffer
sz
- buffer size in bytes
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_MEMORY_ACCESS, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readSmException )( uint32_t dev, uint32_t sm, CUDBGException_t* exception, uint64_t* errorPC, bool* errorPCValid )

Get the SM exception status if it exists. If the CUDBG_DEBUGGER_CAPABILITY_REPORT_EXCEPTIONS_IN_EXITED_WARPS capability is enabled, exceptions in exited warps will be reported.

Since CUDA 12.5.

Parameters
dev
- the device index
sm
- the SM index
exception
- returned exception
errorPC
- returned PC of the exception
errorPCValid
- boolean to indicate that the returned error PC is valid
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readSyscallCallDepth )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t* depth )

Read the call depth of syscalls for a given thread. Will always return 0.

Since CUDA 4.1.

Note:

DEPRECATED in CUDA 12.9: Do not use.

Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
depth
- the returned call depth
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readTextureMemory )( uint32_t dev, uint32_t vsm, uint32_t wp, uint32_t id, uint32_t dim, uint32_t* coords, void* buf, uint32_t sz )

This method is no longer supported since CUDA 12.0. Will always return CUDBG_ERROR_NOT_SUPPORTED.

Since CUDA 4.0.

Note:

DEPRECATED in CUDA 12.0: Do not use.

Parameters
dev
- device index
vsm
wp
- warp index
id
- texture id (the value of DW_AT_location attribute in the relocated ELF image)
dim
- texture dimension (1 to 4)
coords
- array of coordinates of size dim
buf
- result buffer
sz
- buffer size in bytes
Returns

CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_RECURSIVE_API_CALL, CUDBG_ERROR_NOT_SUPPORTED

CUDBGResult ( *CUDBGAPI_st::readTextureMemoryBindless )( uint32_t dev, uint32_t vsm, uint32_t wp, uint32_t texSymtabIndex, uint32_t dim, uint32_t* coords, void* buf, uint32_t sz )

This method is no longer supported since CUDA 12.0. Will always return CUDBG_ERROR_NOT_SUPPORTED.

Since CUDA 4.2.

Note:

DEPRECATED in CUDA 12.0: Do not use.

Parameters
dev
- device index
vsm
wp
- warp index
texSymtabIndex
- global symbol table index of the texture symbol
dim
- texture dimension (1 to 4)
coords
- array of coordinates of size dim
buf
- result buffer
sz
- buffer size in bytes
Returns

CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_RECURSIVE_API_CALL, CUDBG_ERROR_NOT_SUPPORTED

CUDBGResult ( *CUDBGAPI_st::readThreadIdx )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, CuDim3* threadIdx )

Read the CUDA thread index running on valid thread. Since CUDA 3.0.

See also:

readActiveLanes

readBlockIdx

readBrokenWarps

readGridId

readValidLanes

readValidWarps

Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
threadIdx
- the returned CUDA thread index
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readUniformPredicates )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t predicates_size, uint32_t* predicates )

Read contents of uniform predicate registers. Since CUDA 10.0.

See also:

readPredicates

Parameters
dev
- device index
sm
- SM index
wp
- warp index
predicates_size
- number of predicate registers to read
predicates
- buffer
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readUniformRegisterRange )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t regno, uint32_t registers_size, uint32_t* registers )

Read a range of uniform registers. Since CUDA 10.0.

See also:

readRegister

Parameters
dev
- device index
sm
- SM index
wp
- warp index
regno
- starting index into uniform register file
registers_size
- number of bytes to read
registers
- pointer to buffer
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readValidLanes )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t* validLanesMask )

Read the lane bitmask of valid threads on a given warp. Since CUDA 3.0.

See also:

readActiveLanes

readBlockIdx

readBrokenWarps

readGridId

readThreadIdx

readValidWarps

Parameters
dev
- device index
sm
- SM index
wp
- warp index
validLanesMask
- the returned bitmask of valid threads
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readValidWarps )( uint32_t dev, uint32_t sm, uint64_t* validWarpsMask )

Read the bitmask of valid warps on a given SM. Since CUDA 3.0.

See also:

readActiveLanes

readBlockIdx

readBrokenWarps

readGridId

readThreadIdx

readValidLanes

Parameters
dev
- device index
sm
- SM index
validWarpsMask
- the returned bitmask of valid warps
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readVirtualPC )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t* pc )

Read the PC (virtual address) on the given active thread. Since CUDA 3.0.

See also:

readPC

Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
pc
- the returned PC
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readVirtualReturnAddress )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t level, uint64_t* ra )

Read the virtual return address for a call level. Since CUDA 4.0.

See also:

readCallDepth

readReturnAddress

Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
level
- the specified call level
ra
- the returned virtual return address for level
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CALL_LEVEL, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readVirtualReturnAddress32 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t level, uint64_t* ra )

Read the virtual return address for a call level. Behaves like readVirtualReturnAddress for the active thread group.

Since CUDA 3.1.

Note:

DEPRECATED in CUDA 4.0: Use readVirtualReturnAddress instead.

See also:

readVirtualReturnAddress

Parameters
dev
- device index
sm
- SM index
wp
- warp index
level
- the specified call level
ra
- the returned virtual return address for level
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CALL_LEVEL, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readWarpResources )( uint32_t dev, uint32_t sm, uint32_t wp, CUDBGWarpResources* resources )

Get the resources assigned to a given warp. Note that these resources can change between suspends, which makes this method useful for avoiding warp data access errors.

Since CUDA 12.8.

Parameters
dev
- device index
sm
- SM index
wp
- warp index
resources
- pointer to structure that contains warp resources
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readWarpState )( uint32_t dev, uint32_t sm, uint32_t wp, CUDBGWarpState* state )

Read the state of a given warp. Since CUDA 12.9.

Parameters
dev
- device index
sm
- SM index
wp
- warp index
state
- pointer to structure that contains warp state
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readWarpState120 )( uint32_t dev, uint32_t sm, uint32_t wp, CUDBGWarpState120* state )

Read the state of a given warp. Behaves like readWarpState but returns fewer fields.

Since CUDA 12.0.

Note:

DEPRECATED in CUDA 12.7: Use readWarpState instead.

See also:

readWarpState

Parameters
dev
- device index
sm
- SM index
wp
- warp index
state
- pointer to structure that contains warp state
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readWarpState127 )( uint32_t dev, uint32_t sm, uint32_t wp, CUDBGWarpState127* state )

Read the state of a given warp. Behaves like readWarpState but returns fewer fields.

Since CUDA 12.7.

Note:

DEPRECATED in CUDA 12.9: Use readWarpState instead.

See also:

readWarpState

Parameters
dev
- device index
sm
- SM index
wp
- warp index
state
- pointer to structure that contains warp state
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL

CUDBGResult ( *CUDBGAPI_st::readWarpState60 )( uint32_t dev, uint32_t sm, uint32_t wp, CUDBGWarpState60* state )

Read the state of a given warp. Behaves like readWarpState but returns fewer fields.

Since CUDA 6.0.

Note:

DEPRECATED in CUDA 12.0: Use readWarpState instead.

See also:

readWarpState

Parameters
dev
- device index
sm
- SM index
wp
- warp index
state
- pointer to structure that contains warp state
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INITIALIZATION_FAILURE, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_INVALID_CONTEXT, CUDBG_ERROR_RECURSIVE_API_CALL