Skip to content

Commit 27ea304

Browse files
Autorefresh Dev Documentation
1 parent 0423c52 commit 27ea304

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

dev/_sources/basic_features.rst.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,17 @@ The `next` command is similar to the `step` command, but when a ``call`` instruc
253253
Detach and GDB Migration
254254
====================================
255255

256-
If at any time during your script you want to take a more interactive approach to debugging, you can use the `gdb()` method. This will temporarily detach libdebug from the program and give you control over the program using GDB. Quitting GDB will return control to libdebug. The syntax is as follows:
256+
If at any time during your script you want to take a more interactive approach to debugging, you can use the ``gdb()`` method. This will temporarily detach libdebug from the program and give you control over the program using GDB. Quitting GDB will return control to libdebug.
257+
258+
By default, the behavior of this command is to open GDB in a new terminal window. For this to work, it is necessary to specify your terminal emulator in the libcontext parameters. The following example shows how to set the terminal to tmux:
259+
260+
.. code-block:: python
261+
262+
from libdebug import libcontext
263+
264+
libcontext.terminal = ['tmux', 'splitw', '-h']
265+
266+
Once the terminal is set, you can use the ``gdb()`` method.
257267

258268
.. code-block:: python
259269

dev/basic_features.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,14 @@ <h3>Next<a class="headerlink" href="#next" title="Link to this heading">#</a></h
628628
</section>
629629
<section id="detach-and-gdb-migration">
630630
<h1>Detach and GDB Migration<a class="headerlink" href="#detach-and-gdb-migration" title="Link to this heading">#</a></h1>
631-
<p>If at any time during your script you want to take a more interactive approach to debugging, you can use the <cite>gdb()</cite> method. This will temporarily detach libdebug from the program and give you control over the program using GDB. Quitting GDB will return control to libdebug. The syntax is as follows:</p>
631+
<p>If at any time during your script you want to take a more interactive approach to debugging, you can use the <code class="docutils literal notranslate"><span class="pre">gdb()</span></code> method. This will temporarily detach libdebug from the program and give you control over the program using GDB. Quitting GDB will return control to libdebug.</p>
632+
<p>By default, the behavior of this command is to open GDB in a new terminal window. For this to work, it is necessary to specify your terminal emulator in the libcontext parameters. The following example shows how to set the terminal to tmux:</p>
633+
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">libdebug</span> <span class="kn">import</span> <span class="n">libcontext</span>
634+
635+
<span class="n">libcontext</span><span class="o">.</span><span class="n">terminal</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;tmux&#39;</span><span class="p">,</span> <span class="s1">&#39;splitw&#39;</span><span class="p">,</span> <span class="s1">&#39;-h&#39;</span><span class="p">]</span>
636+
</pre></div>
637+
</div>
638+
<p>Once the terminal is set, you can use the <code class="docutils literal notranslate"><span class="pre">gdb()</span></code> method.</p>
632639
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">d</span><span class="o">.</span><span class="n">gdb</span><span class="p">()</span>
633640
</pre></div>
634641
</div>

dev/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)