3.4. 断点
变量
- CUDBGResult ( *CUDBGAPI_st::getAdjustedCodeAddress )( uint32_t devId, uint64_t address, uint64_t* adjustedAddress, CUDBGAdjAddrAction adjAction )
- The client must call this function before inserting a breakpoint, or when the previous or next code address is needed. Returns the adjusted code address for a given code address for a given device.
- CUDBGResult ( *CUDBGAPI_st::setBreakpoint )( uint32_t dev, uint64_t addr )
- Sets a breakpoint at the given instruction address for the given device. Before setting a breakpoint, CUDBGAPI_st::getAdjustedCodeAddress should be called to get the adjusted breakpoint address.
- CUDBGResult ( *CUDBGAPI_st::setBreakpoint31 )( uint64_t addr )
- Sets a breakpoint at the given instruction address.
- CUDBGResult ( *CUDBGAPI_st::unsetBreakpoint )( uint32_t dev, uint64_t addr )
- Unsets a breakpoint at the given instruction address for the given device.
- CUDBGResult ( *CUDBGAPI_st::unsetBreakpoint31 )( uint64_t addr )
- Unsets a breakpoint at the given instruction address.
变量
- CUDBGResult ( *CUDBGAPI_st::getAdjustedCodeAddress )( uint32_t devId, uint64_t address, uint64_t* adjustedAddress, CUDBGAdjAddrAction adjAction )
-
参数
- devId
- - the device index
- address
- adjustedAddress
- - adjusted address
- adjAction
- - whether the adjusted next, previous or current address is needed
返回
CUDBG_SUCCESS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_ADDRESS, CUDBG_ERROR_INVALID_DEVICE
- CUDBGResult ( *CUDBGAPI_st::setBreakpoint )( uint32_t dev, uint64_t addr )
-
在指定设备的给定指令地址处设置断点。在设置断点前,应先调用CUDBGAPI_st::getAdjustedCodeAddress获取调整后的断点地址。自CUDA 3.2版本起支持此功能。
另请参阅:
参数
- dev
- - the device index
- addr
- - instruction address
返回
CUDBG_SUCCESS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_ADDRESS, CUDBG_ERROR_INVALID_DEVICE
- CUDBGResult ( *CUDBGAPI_st::setBreakpoint31 )( uint64_t addr )
-
参数
- addr
- - instruction address
返回
CUDBG_SUCCESS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_ADDRESS
- CUDBGResult ( *CUDBGAPI_st::unsetBreakpoint )( uint32_t dev, uint64_t addr )
-
参数
- dev
- - the device index
- addr
- - instruction address
返回
CUDBG_SUCCESS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_ADDRESS, CUDBG_ERROR_INVALID_DEVICE
- CUDBGResult ( *CUDBGAPI_st::unsetBreakpoint31 )( uint64_t addr )
-
参数
- addr
- - instruction address
返回
CUDBG_SUCCESS, CUDBG_ERROR_UNINITIALIZED