<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta> <meta http-equiv="X-UA-Compatible" content="IE=edge"></meta> <meta name="copyright" content="(C) Copyright 2005"></meta> <meta name="DC.rights.owner" content="(C) Copyright 2005"></meta> <meta name="DC.Type" content="cppModule"></meta> <meta name="DC.Title" content="Breakpoints"></meta> <meta name="abstract" content=""></meta> <meta name="description" content=""></meta> <meta name="DC.Format" content="XHTML"></meta> <meta name="DC.Identifier" content="group__BP"></meta> <link rel="stylesheet" type="text/css" href="../common/formatting/commonltr.css"></link> <link rel="stylesheet" type="text/css" href="../common/formatting/site.css"></link> <title>Debugger API :: CUDA Toolkit Documentation</title> <!--[if lt IE 9]> <script src="../common/formatting/html5shiv-printshiv.min.js"></script> <![endif]--> <script type="text/javascript" charset="utf-8" src="//assets.adobedtm.com/b92787824f2e0e9b68dc2e993f9bd995339fe417/satelliteLib-7ba51e58dc61bcb0e9311aadd02a0108ab24cc6c.js"></script> <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.min.js"></script> <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.ba-hashchange.min.js"></script> <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.scrollintoview.min.js"></script> <script type="text/javascript" src="../search/htmlFileList.js"></script> <script type="text/javascript" src="../search/htmlFileInfoList.js"></script> <script type="text/javascript" src="../search/nwSearchFnt.min.js"></script> <script type="text/javascript" src="../search/stemmers/en_stemmer.min.js"></script> <script type="text/javascript" src="../search/index-1.js"></script> <script type="text/javascript" src="../search/index-2.js"></script> <script type="text/javascript" src="../search/index-3.js"></script> <link rel="canonical" href="http://docs.nvidia.com/cuda/debugger-api/index.html"></link> <link rel="stylesheet" type="text/css" href="../common/formatting/qwcode.highlight.css"></link> </head> <body> <header id="header"><span id="company">NVIDIA</span><span id="site-title">CUDA Toolkit Documentation</span><form id="search" method="get" action="search"> <input type="text" name="search-text"></input><fieldset id="search-location"> <legend>Search In:</legend> <label><input type="radio" name="search-type" value="site"></input>Entire Site</label> <label><input type="radio" name="search-type" value="document"></input>Just This Document</label></fieldset> <button type="reset">clear search</button> <button id="submit" type="submit">search</button></form> </header> <div id="site-content"> <nav id="site-nav"> <div class="category closed"><a href="../index.html" title="The root of the site.">CUDA Toolkit v10.1.168</a></div> <div class="category"><a href="index.html" title="Debugger API">Debugger API</a></div> <ul> <li> <div class="section-link"><a href="release-notes.html#release-notes">1. Release Notes</a></div> <ul> <li> <div class="section-link"><a href="release-notes.html#about-this-document">1.1. 7.0 Release</a></div> </li> <li> <div class="section-link"><a href="release-notes.html#unique_1088301352">1.2. 6.5 Release</a></div> </li> </ul> </li> <li> <div class="section-link"><a href="r_main.html#r_main">2. Introduction</a></div> <ul> <li> <div class="section-link"><a href="r_main.html#r_api">2.1. Debugger API</a></div> </li> <li> <div class="section-link"><a href="r_main.html#r_elf">2.2. ELF and DWARF</a></div> </li> <li> <div class="section-link"><a href="r_main.html#r_abi31">2.3. ABI Support</a></div> </li> <li> <div class="section-link"><a href="r_main.html#r_exceptions31">2.4. Exception Reporting</a></div> </li> <li> <div class="section-link"><a href="r_main.html#r_attach">2.5. Attaching and Detaching</a></div> </li> </ul> </li> <li> <div class="section-link"><a href="modules.html#modules">3. Modules</a></div> <ul> <li> <div class="section-link"><a href="group__GENERAL.html#group__GENERAL">3.1. General</a></div> </li> <li> <div class="section-link"><a href="group__INIT.html#group__INIT">3.2. Initialization</a></div> </li> <li> <div class="section-link"><a href="group__EXEC.html#group__EXEC">3.3. Device Execution Control</a></div> </li> <li> <div class="section-link"><a href="group__BP.html#group__BP">3.4. Breakpoints</a></div> </li> <li> <div class="section-link"><a href="group__READ.html#group__READ">3.5. Device State Inspection</a></div> </li> <li> <div class="section-link"><a href="group__WRITE.html#group__WRITE">3.6. Device State Alteration</a></div> </li> <li> <div class="section-link"><a href="group__GRID.html#group__GRID">3.7. Grid Properties</a></div> </li> <li> <div class="section-link"><a href="group__DEV.html#group__DEV">3.8. Device Properties</a></div> </li> <li> <div class="section-link"><a href="group__DWARF.html#group__DWARF">3.9. DWARF Utilities</a></div> </li> <li> <div class="section-link"><a href="group__EVENT.html#group__EVENT">3.10. Events</a></div> </li> </ul> </li> <li> <div class="section-link"><a href="annotated.html#annotated">4. Data Structures</a></div> <ul> <li> <div class="section-link"><a href="structCUDBGAPI__st.html#structCUDBGAPI__st">4.1. CUDBGAPI_st</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEvent.html#structCUDBGEvent">4.2. CUDBGEvent</a></div> </li> <li> <div class="section-link"><a href="unionCUDBGEvent_1_1cases__st.html#unionCUDBGEvent_1_1cases__st">4.3. CUDBGEvent::cases_st</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEvent_1_1cases__st_1_1contextCreate__st.html#structCUDBGEvent_1_1cases__st_1_1contextCreate__st">4.4. CUDBGEvent::cases_st::contextCreate_st</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEvent_1_1cases__st_1_1contextDestroy__st.html#structCUDBGEvent_1_1cases__st_1_1contextDestroy__st">4.5. CUDBGEvent::cases_st::contextDestroy_st</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEvent_1_1cases__st_1_1contextPop__st.html#structCUDBGEvent_1_1cases__st_1_1contextPop__st">4.6. CUDBGEvent::cases_st::contextPop_st</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEvent_1_1cases__st_1_1contextPush__st.html#structCUDBGEvent_1_1cases__st_1_1contextPush__st">4.7. CUDBGEvent::cases_st::contextPush_st</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEvent_1_1cases__st_1_1elfImageLoaded__st.html#structCUDBGEvent_1_1cases__st_1_1elfImageLoaded__st">4.8. CUDBGEvent::cases_st::elfImageLoaded_st</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEvent_1_1cases__st_1_1internalError__st.html#structCUDBGEvent_1_1cases__st_1_1internalError__st">4.9. CUDBGEvent::cases_st::internalError_st</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEvent_1_1cases__st_1_1kernelFinished__st.html#structCUDBGEvent_1_1cases__st_1_1kernelFinished__st">4.10. CUDBGEvent::cases_st::kernelFinished_st</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEvent_1_1cases__st_1_1kernelReady__st.html#structCUDBGEvent_1_1cases__st_1_1kernelReady__st">4.11. CUDBGEvent::cases_st::kernelReady_st</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEventCallbackData.html#structCUDBGEventCallbackData">4.12. CUDBGEventCallbackData</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEventCallbackData40.html#structCUDBGEventCallbackData40">4.13. CUDBGEventCallbackData40</a></div> </li> <li> <div class="section-link"><a href="structCUDBGGridInfo.html#structCUDBGGridInfo">4.14. CUDBGGridInfo</a></div> </li> </ul> </li> <li> <div class="section-link"><a href="functions.html#functions">5. Data Fields</a></div> </li> <li> <div class="section-link"><a href="deprecated.html#deprecated">6. Deprecated List</a></div> </li> <li> <div class="section-link"><a href="notices-header.html#notices-header">Notices</a></div> <ul></ul> </li> </ul> </nav> <div id="resize-nav"></div> <nav id="search-results"> <h2>Search Results</h2> <ol></ol> </nav> <div id="contents-container"> <div id="breadcrumbs-container"> <div id="breadcrumbs"><a href="group__EXEC.html" shape="rect">< Previous</a> | <a href="group__READ.html" shape="rect">Next ></a></div> <div id="release-info">Debugger API (<a href="../../pdf/CUDA_Debugger_API.pdf">PDF</a>) - v10.1.168 (<a href="https://developer.nvidia.com/cuda-toolkit-archive">older</a>) - Last updated April 24, 2019 - <a href="mailto:CUDAIssues@nvidia.com?subject=CUDA Toolkit Documentation Feedback: Debugger API">Send Feedback</a></div> </div> <article id="contents"> <div class="topic reference apiRef apiPackage cppModule" id="group__BP"><a name="group__BP" shape="rect"> <!-- --></a><h2 class="topictitle2 cppModule">3.4. Breakpoints</h2> <div class="section"> <p></p> </div> <h3 class="fake_sectiontitle member_header">Variables</h3> <dl class="members"> <dt><span class="member_type"><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> </span><span class="member_name">( *<a href="#group__BP_1g545ebebfb57559b68a3cc0c2c9556ec4" shape="rect">CUDBGAPI_st::getAdjustedCodeAddress</a> )( uint32_t<span> </span><span class="keyword keyword apiItemName">devId</span>, uint64_t<span> </span><span class="keyword keyword apiItemName">address</span>, uint64_t*<span> </span><span class="keyword keyword apiItemName">adjustedAddress</span>, CUDBGAdjAddrAction<span> </span><span class="keyword keyword apiItemName">adjAction</span> )</span></dt> <dd class="shortdesc"><span></span><span class="desc">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. </span></dd> <dt><span class="member_type"><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> </span><span class="member_name">( *<a href="#group__BP_1gf0ae0297c09bf288cad94d96fe00de2a" shape="rect">CUDBGAPI_st::setBreakpoint</a> )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint64_t<span> </span><span class="keyword keyword apiItemName">addr</span> )</span></dt> <dd class="shortdesc"><span></span><span class="desc">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. </span></dd> <dt><span class="member_type"><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> </span><span class="member_name">( *<a href="#group__BP_1g94c9212e06c0157654432640729d18b7" shape="rect">CUDBGAPI_st::setBreakpoint31</a> )( uint64_t<span> </span><span class="keyword keyword apiItemName">addr</span> )</span></dt> <dd class="shortdesc"><span></span><span class="desc">Sets a breakpoint at the given instruction address. </span></dd> <dt><span class="member_type"><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> </span><span class="member_name">( *<a href="#group__BP_1g46e0c34336c746dbad091f18c9ace26e" shape="rect">CUDBGAPI_st::unsetBreakpoint</a> )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint64_t<span> </span><span class="keyword keyword apiItemName">addr</span> )</span></dt> <dd class="shortdesc"><span></span><span class="desc">Unsets a breakpoint at the given instruction address for the given device. </span></dd> <dt><span class="member_type"><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> </span><span class="member_name">( *<a href="#group__BP_1g11ffb928b9e9caa61ebfc2d116d682af" shape="rect">CUDBGAPI_st::unsetBreakpoint31</a> )( uint64_t<span> </span><span class="keyword keyword apiItemName">addr</span> )</span></dt> <dd class="shortdesc"><span></span><span class="desc">Unsets a breakpoint at the given instruction address. </span></dd> </dl> <div class="description"> <h3 class="sectiontitle">Variables</h3> <dl class="description"> <dt class="description"><a name="group__BP_1g545ebebfb57559b68a3cc0c2c9556ec4" id="group__BP_1g545ebebfb57559b68a3cc0c2c9556ec4" shape="rect"> <!-- --></a><span><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> ( *CUDBGAPI_st::getAdjustedCodeAddress )( uint32_t<span> </span><span class="keyword keyword apiItemName">devId</span>, uint64_t<span> </span><span class="keyword keyword apiItemName">address</span>, uint64_t*<span> </span><span class="keyword keyword apiItemName">adjustedAddress</span>, CUDBGAdjAddrAction<span> </span><span class="keyword keyword apiItemName">adjAction</span> )</span></dt> <dd class="description"> <div class="section"> <p>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. Since CUDA 5.5. </p> <p class="p"></p> <p class="p"></p> <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p> <p class="p see_subsection"><a class="xref" href="group__BP.html#group__BP_1g46e0c34336c746dbad091f18c9ace26e" title="Unsets a breakpoint at the given instruction address for the given device." shape="rect">unsetBreakpoint</a></p> <p class="p"></p> </div> <div class="section"> <h6 class="parameter_header"> Parameters </h6> <dl class="table-display-params"> <dt><tt class="code"><span class="keyword keyword apiItemName">devId</span></tt></dt> <dd>- the device index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">address</span></tt></dt> <dd></dd> <dt><tt class="code"><span class="keyword keyword apiItemName">adjustedAddress</span></tt></dt> <dd>- adjusted address </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">adjAction</span></tt></dt> <dd>- whether the adjusted next, previous or current address is needed</dd> </dl> </div> <div class="section"> <h6 class="return_header">Returns</h6> <p class="return">CUDBG_SUCCESS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_ADDRESS, CUDBG_ERROR_INVALID_DEVICE</p> </div> </dd> <dt class="description"><a name="group__BP_1gf0ae0297c09bf288cad94d96fe00de2a" id="group__BP_1gf0ae0297c09bf288cad94d96fe00de2a" shape="rect"> <!-- --></a><span><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> ( *CUDBGAPI_st::setBreakpoint )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint64_t<span> </span><span class="keyword keyword apiItemName">addr</span> )</span></dt> <dd class="description"> <div class="section"> <p>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. Since CUDA 3.2. </p> <p class="p"></p> <p class="p"></p> <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p> <p class="p see_subsection"><a class="xref" href="group__BP.html#group__BP_1g46e0c34336c746dbad091f18c9ace26e" title="Unsets a breakpoint at the given instruction address for the given device." shape="rect">unsetBreakpoint</a></p> <p class="p"></p> </div> <div class="section"> <h6 class="parameter_header"> Parameters </h6> <dl class="table-display-params"> <dt><tt class="code"><span class="keyword keyword apiItemName">dev</span></tt></dt> <dd>- the device index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">addr</span></tt></dt> <dd>- instruction address</dd> </dl> </div> <div class="section"> <h6 class="return_header">Returns</h6> <p class="return">CUDBG_SUCCESS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_ADDRESS, CUDBG_ERROR_INVALID_DEVICE</p> </div> </dd> <dt class="description"><a name="group__BP_1g94c9212e06c0157654432640729d18b7" id="group__BP_1g94c9212e06c0157654432640729d18b7" shape="rect"> <!-- --></a><span><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> ( *CUDBGAPI_st::setBreakpoint31 )( uint64_t<span> </span><span class="keyword keyword apiItemName">addr</span> )</span></dt> <dd class="description"> <div class="section"> <p>Sets a breakpoint at the given instruction address. Since CUDA 3.0.</p> <p class="p"></p> <p class="p"></p> <p class="p"></p> <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p> <p class="p see_subsection"><a class="xref" href="group__BP.html#group__BP_1g11ffb928b9e9caa61ebfc2d116d682af" title="Unsets a breakpoint at the given instruction address." shape="rect">unsetBreakpoint31</a></p> <p class="p"></p> </div> <div class="section"> <h6 class="parameter_header"> Parameters </h6> <dl class="table-display-params"> <dt><tt class="code"><span class="keyword keyword apiItemName">addr</span></tt></dt> <dd>- instruction address</dd> </dl> </div> <div class="section"> <h6 class="return_header">Returns</h6> <p class="return">CUDBG_SUCCESS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_ADDRESS</p> </div> </dd> <dt class="description"><a name="group__BP_1g46e0c34336c746dbad091f18c9ace26e" id="group__BP_1g46e0c34336c746dbad091f18c9ace26e" shape="rect"> <!-- --></a><span><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> ( *CUDBGAPI_st::unsetBreakpoint )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint64_t<span> </span><span class="keyword keyword apiItemName">addr</span> )</span></dt> <dd class="description"> <div class="section"> <p>Unsets a breakpoint at the given instruction address for the given device. Since CUDA 3.2.</p> <p class="p"></p> <p class="p"></p> <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p> <p class="p see_subsection"><a class="xref" href="group__BP.html#group__BP_1gf0ae0297c09bf288cad94d96fe00de2a" title="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." shape="rect">setBreakpoint</a></p> <p class="p"></p> </div> <div class="section"> <h6 class="parameter_header"> Parameters </h6> <dl class="table-display-params"> <dt><tt class="code"><span class="keyword keyword apiItemName">dev</span></tt></dt> <dd>- the device index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">addr</span></tt></dt> <dd>- instruction address</dd> </dl> </div> <div class="section"> <h6 class="return_header">Returns</h6> <p class="return">CUDBG_SUCCESS, CUDBG_ERROR_UNINITIALIZED, CUDBG_ERROR_INVALID_ADDRESS, CUDBG_ERROR_INVALID_DEVICE</p> </div> </dd> <dt class="description"><a name="group__BP_1g11ffb928b9e9caa61ebfc2d116d682af" id="group__BP_1g11ffb928b9e9caa61ebfc2d116d682af" shape="rect"> <!-- --></a><span><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> ( *CUDBGAPI_st::unsetBreakpoint31 )( uint64_t<span> </span><span class="keyword keyword apiItemName">addr</span> )</span></dt> <dd class="description"> <div class="section"> <p>Unsets a breakpoint at the given instruction address. Since CUDA 3.0.</p> <p class="p"></p> <p class="p"></p> <p class="p"></p> <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p> <p class="p see_subsection"><a class="xref" href="group__BP.html#group__BP_1g94c9212e06c0157654432640729d18b7" title="Sets a breakpoint at the given instruction address." shape="rect">setBreakpoint31</a></p> <p class="p"></p> </div> <div class="section"> <h6 class="parameter_header"> Parameters </h6> <dl class="table-display-params"> <dt><tt class="code"><span class="keyword keyword apiItemName">addr</span></tt></dt> <dd>- instruction address</dd> </dl> </div> <div class="section"> <h6 class="return_header">Returns</h6> <p class="return">CUDBG_SUCCESS, CUDBG_ERROR_UNINITIALIZED</p> </div> </dd> </dl> </div> </div> <hr id="contents-end"></hr> </article> </div> </div> <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/formatting/common.min.js"></script> <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/google-analytics/google-analytics-write.js"></script> <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/google-analytics/google-analytics-tracker.js"></script> <script type="text/javascript">var switchTo5x=true;</script><script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">stLight.options({publisher: "998dc202-a267-4d8e-bce9-14debadb8d92", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script><script type="text/javascript">_satellite.pageBottom();</script></body> </html>