Debugger API (PDF) - CUDA Toolkit v5.5 (older) - Last updated May 11, 2013 - Send Feedback

2.5. Device State Inspection

Variables

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 )
Reads the bitmask of active lanes on a valid warp.
CUDBGResult  ( *CUDBGAPI_st::readBlockIdx )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim3* blockIdx )
Reads the CUDA block index running on a valid warp.
CUDBGResult  ( *CUDBGAPI_st::readBlockIdx32 )( uint32_t dev, uint32_t sm, uint32_t wp, CuDim2* blockIdx )
Reads the two-dimensional CUDA block index running on a valid warp.
CUDBGResult  ( *CUDBGAPI_st::readBrokenWarps )( uint32_t dev, uint32_t sm, uint64_t* brokenWarpsMask )
Reads the bitmask of warps that are at a breakpoint on a given SM.
CUDBGResult  ( *CUDBGAPI_st::readCallDepth )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t* depth )
Reads the call depth (number of calls) for a given lane.
CUDBGResult  ( *CUDBGAPI_st::readCallDepth32 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t* depth )
Reads the call depth (number of calls) for a given warp.
CUDBGResult  ( *CUDBGAPI_st::readCodeMemory )( uint32_t dev, uint64_t addr, void* buf, uint32_t sz )
Reads content at address in the code memory segment.
CUDBGResult  ( *CUDBGAPI_st::readConstMemory )( uint32_t dev, uint64_t addr, void* buf, uint32_t sz )
Reads content at address in the constant memory segment.
CUDBGResult  ( *CUDBGAPI_st::readGlobalMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t addr, void* buf, uint32_t sz )
Reads content at address in the global memory segment (entire 40-bit VA on Fermi+).
CUDBGResult  ( *CUDBGAPI_st::readGlobalMemory31 )( uint32_t dev, uint64_t addr, void* buf, uint32_t sz )
Reads content at address in the global memory segment.
CUDBGResult  ( *CUDBGAPI_st::readGridId )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t* gridId64 )
Reads 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 )
Reads 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 )
Reads the exception type for a given lane.
CUDBGResult  ( *CUDBGAPI_st::readLaneStatus )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, bool* error )
Reads the status of the given lane. For specific error values, use readLaneException.
CUDBGResult  ( *CUDBGAPI_st::readLocalMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t addr, void* buf, uint32_t sz )
Reads 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 )
Reads the PC on the given active lane.
CUDBGResult  ( *CUDBGAPI_st::readParamMemory )( uint32_t dev, uint32_t sm, uint32_t wp, uint64_t addr, void* buf, uint32_t sz )
Reads content at address in the param memory segment.
CUDBGResult  ( *CUDBGAPI_st::readPinnedMemory )( uint64_t addr, void* buf, uint32_t sz )
Reads content at pinned address in system memory.
CUDBGResult  ( *CUDBGAPI_st::readRegister )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t regno, uint32_t* val )
Reads content of a hardware register.
CUDBGResult  ( *CUDBGAPI_st::readReturnAddress )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t level, uint64_t* ra )
Reads the physical return address for a call level.
CUDBGResult  ( *CUDBGAPI_st::readReturnAddress32 )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t level, uint64_t* ra )
Reads the physical return address 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 )
Reads content at address in the shared memory segment.
CUDBGResult  ( *CUDBGAPI_st::readSyscallCallDepth )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t* depth )
Reads the call depth of syscalls for a given lane.
CUDBGResult  ( *CUDBGAPI_st::readTextureMemory )( uint32_t devId, uint32_t vsm, uint32_t wp, uint32_t id, uint32_t dim, uint32_t* coords, void* buf, uint32_t sz )
Read the content of texture memory with given id and coords on sm_20 and lower.
CUDBGResult  ( *CUDBGAPI_st::readTextureMemoryBindless )( uint32_t devId, uint32_t vsm, uint32_t wp, uint32_t texSymtabIndex, uint32_t dim, uint32_t* coords, void* buf, uint32_t sz )
Read the content of texture memory with given symtab index and coords on sm_30 and higher.
CUDBGResult  ( *CUDBGAPI_st::readThreadIdx )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, CuDim3* threadIdx )
Reads the CUDA thread index running on valid lane.
CUDBGResult  ( *CUDBGAPI_st::readValidLanes )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t* validLanesMask )
Reads the bitmask of valid lanes on a given warp.
CUDBGResult  ( *CUDBGAPI_st::readValidWarps )( uint32_t dev, uint32_t sm, uint64_t* validWarpsMask )
Reads 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 )
Reads the virtual PC on the given active lane.
CUDBGResult  ( *CUDBGAPI_st::readVirtualReturnAddress )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t level, uint64_t* ra )
Reads 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 )
Reads the virtual return address for a call level.
CUDBGResult  ( *CUDBGAPI_st::writePinnedMemory )( uint64_t addr, const void* buf, uint32_t sz )
Writes content to pinned address in system memory.

Variables

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. Since CUDA 5.0.

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_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMCHECK_NOT_ENABLED, CUDBG_SUCCESS

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

Reads the bitmask of active lanes on a valid warp. Since CUDA 3.0.

See also:

readGridId

readBlockIdx

readThreadIdx

readBrokenWarps

readValidWarps

readValidLanes

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

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED

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

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

See also:

readGridId

readThreadIdx

readBrokenWarps

readValidWarps

readValidLanes

readActiveLanes

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_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED

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

Reads the two-dimensional CUDA block index running on a valid warp. Since CUDA 3.0.

Deprecatedin CUDA 4.0.

See also:

readGridId

readThreadIdx

readBrokenWarps

readValidWarps

readValidLanes

readActiveLanes

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_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED

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

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

See also:

readGridId

readBlockIdx

readThreadIdx

readValidWarps

readValidLanes

readActiveLanes

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

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_UNINITIALIZED

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

Reads the call depth (number of calls) for a given lane. 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_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_UNINITIALIZED

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

Reads the call depth (number of calls) for a given warp. Since CUDA 3.1.

Deprecatedin CUDA 4.0.

See also:

readReturnAddress32

readVirtualReturnAddress32

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

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED

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

Reads content at address in the code memory segment. Since CUDA 3.0.

See also:

readConstMemory

readGlobalMemory

readParamMemory

readSharedMemory

readTextureMemory

readLocalMemory

readRegister

readPC

Parameters
dev
- device index
addr
- memory address
buf
- buffer
sz
- size of the buffer
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED

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

Reads content at address in the constant memory segment. Since CUDA 3.0.

See also:

readCodeMemory

readGlobalMemory

readParamMemory

readSharedMemory

readTextureMemory

readLocalMemory

readRegister

readPC

Parameters
dev
- device index
addr
- memory address
buf
- buffer
sz
- size of the buffer
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED

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

Reads content at address in the global memory segment (entire 40-bit VA on Fermi+). Since CUDA 3.2.

See also:

readCodeMemory

readConstMemory

readParamMemory

readSharedMemory

readTextureMemory

readLocalMemory

readRegister

readPC

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

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED, CUDBG_ERROR_ADDRESS_NOT_IN_DEVICE_MEM

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

Reads content at address in the global memory segment. Since CUDA 3.0.

Deprecatedin CUDA 3.2.

See also:

readCodeMemory

readConstMemory

readParamMemory

readSharedMemory

readTextureMemory

readLocalMemory

readRegister

readPC

Parameters
dev
- device index
addr
- memory address
buf
- buffer
sz
- size of the buffer
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED

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

Reads the 64-bit CUDA grid index running on a valid warp. Since CUDA 5.5.

See also:

readBlockIdx

readThreadIdx

readBrokenWarps

readValidWarps

readValidLanes

readActiveLanes

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

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED

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

Reads the CUDA grid index running on a valid warp. Since CUDA 3.0.

Deprecatedin CUDA 5.5.

See also:

readBlockIdx

readThreadIdx

readBrokenWarps

readValidWarps

readValidLanes

readActiveLanes

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_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED

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

Reads the exception type for a given lane. 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_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED

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

Reads the status of the given lane. 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_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED

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

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

See also:

readCodeMemory

readConstMemory

readGlobalMemory

readParamMemory

readSharedMemory

readTextureMemory

readRegister

readPC

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

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED

CUDBGResult ( *CUDBGAPI_st::readPC )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint64_t* pc )
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_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNKNOWN_FUNCTION, CUDBG_ERROR_UNINITIALIZED

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

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

See also:

readCodeMemory

readConstMemory

readGlobalMemory

readSharedMemory

readTextureMemory

readLocalMemory

readRegister

readPC

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

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED

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

Reads content at pinned address in system memory. Since CUDA 3.2.

See also:

readCodeMemory

readConstMemory

readGlobalMemory

readParamMemory

readSharedMemory

readTextureMemory

readLocalMemory

readRegister

readPC

Parameters
addr
- system memory address
buf
- buffer
sz
- size of the buffer
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_MEMORY_MAPPING_FAILED, CUDBG_ERROR_UNINITIALIZED

CUDBGResult ( *CUDBGAPI_st::readRegister )( uint32_t dev, uint32_t sm, uint32_t wp, uint32_t ln, uint32_t regno, uint32_t* val )
Parameters
dev
- device index
sm
- SM index
wp
- warp index
ln
- lane index
regno
- register index
val
- buffer
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED

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

Reads the physical return address for a call level. 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_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_INVALID_CALL_LEVEL, CUDBG_ERROR_ZERO_CALL_DEPTH, CUDBG_ERROR_UNKNOWN_FUNCTION, CUDBG_ERROR_UNINITIALIZED

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

Reads the physical return address for a call level. Since CUDA 3.1.

Deprecatedin CUDA 4.0.

See also:

readCallDepth32

readVirtualReturnAddress32

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_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_INVALID_CALL_LEVEL, CUDBG_ERROR_ZERO_CALL_DEPTH, CUDBG_ERROR_UNKNOWN_FUNCTION, CUDBG_ERROR_UNINITIALIZED

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

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

See also:

readCodeMemory

readConstMemory

readGlobalMemory

readParamMemory

readLocalMemory

readTextureMemory

readRegister

readPC

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

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED

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

Reads the call depth of syscalls for a given lane. Since CUDA 4.1.

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_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_UNINITIALIZED

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

Read the content of texture memory with given id and coords on sm_20 and lower. Read the content of texture memory with given id and coords on sm_20 and lower.

On sm_30 and higher, use CUDBGAPI_st::readTextureMemoryBindless instead.

Since CUDA 4.0.

See also:

readCodeMemory

readConstMemory

readGlobalMemory

readParamMemory

readSharedMemory

readLocalMemory

readRegister

readPC

Parameters
devId
- device index
vsm
- SM index
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
- size of the buffer
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED

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

Read the content of texture memory with given symtab index and coords on sm_30 and higher. Read the content of texture memory with given symtab index and coords on sm_30 and higher.

For sm_20 and lower, use CUDBGAPI_st::readTextureMemory instead.

Since CUDA 4.2.

See also:

readCodeMemory

readConstMemory

readGlobalMemory

readParamMemory

readSharedMemory

readLocalMemory

readRegister

readPC

Parameters
devId
- device index
vsm
- SM index
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
- size of the buffer
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_MEMORY_MAPPING_FAILED

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

Reads the CUDA thread index running on valid lane. Since CUDA 3.0.

See also:

readGridId

readBlockIdx

readBrokenWarps

readValidWarps

readValidLanes

readActiveLanes

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_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED

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

Reads the bitmask of valid lanes on a given warp. Since CUDA 3.0.

See also:

readGridId

readBlockIdx

readThreadIdx

readBrokenWarps

readValidWarps

readActiveLanes

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

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED

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

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

See also:

readGridId

readBlockIdx

readThreadIdx

readBrokenWarps

readValidLanes

readActiveLanes

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

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_UNINITIALIZED

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

Reads the virtual PC on the given active lane. 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_INVALID_DEVICE, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_UNKNOWN_FUNCTION

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

Reads 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_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INVALID_LANE, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_INVALID_CALL_LEVEL, CUDBG_ERROR_ZERO_CALL_DEPTH, CUDBG_ERROR_UNKNOWN_FUNCTION, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL

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

Reads the virtual return address for a call level. Since CUDA 3.1.

Deprecatedin CUDA 4.0.

See also:

readCallDepth32

readReturnAddress32

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_INVALID_DEVICE, CUDBG_ERROR_INVALID_SM, CUDBG_ERROR_INVALID_WARP, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_INVALID_CALL_LEVEL, CUDBG_ERROR_ZERO_CALL_DEPTH, CUDBG_ERROR_UNKNOWN_FUNCTION, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INTERNAL

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

Writes content to pinned address in system memory. Since CUDA 3.2.

See also:

readCodeMemory

readConstMemory

readGlobalMemory

readParamMemory

readSharedMemory

readLocalMemory

readRegister

readPC

Parameters
addr
- system memory address
buf
- buffer
sz
- size of the buffer
Returns

CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_MEMORY_MAPPING_FAILED, CUDBG_ERROR_UNINITIALIZED


Debugger API (PDF) - CUDA Toolkit v5.5 (older) - Last updated May 11, 2013 - Send Feedback