aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gdb.html
diff options
context:
space:
mode:
authorjohannst <johannst@users.noreply.github.com>2022-09-30 10:58:40 +0000
committerjohannst <johannst@users.noreply.github.com>2022-09-30 10:58:40 +0000
commitfa7eb205d5f18b72c1e04a4229d171a15040bdea (patch)
tree2b9965406fb65fdc44ec3eddd2924e5be3f06c8e /tools/gdb.html
parent0c31b8e434d634c81479bf396c752d1baaff7603 (diff)
downloadnotes-fa7eb205d5f18b72c1e04a4229d171a15040bdea.tar.gz
notes-fa7eb205d5f18b72c1e04a4229d171a15040bdea.zip
deploy: b6f25b16f1f23b0169e8f076e79ee4964b81db99
Diffstat (limited to 'tools/gdb.html')
-rw-r--r--tools/gdb.html20
1 files changed, 19 insertions, 1 deletions
diff --git a/tools/gdb.html b/tools/gdb.html
index 7236619..4880602 100644
--- a/tools/gdb.html
+++ b/tools/gdb.html
@@ -203,6 +203,9 @@
&lt;bp_list&gt;: Space separates list, eg 'command 2 5-8' to run command
for breakpoints: 2,5,6,7,8.
+
+ save break &lt;file&gt;
+ Save breakpoints to &lt;file&gt;. Can be loaded with the `source` command.
</code></pre>
<h2 id="watchpoints"><a class="header" href="#watchpoints">Watchpoints</a></h2>
<pre><code class="language-markdown"> watch [-location|-l] &lt;expr&gt; [thread &lt;tnum&gt;]
@@ -253,7 +256,10 @@
Show current substitution rules.
</code></pre>
<h2 id="configuration"><a class="header" href="#configuration">Configuration</a></h2>
-<pre><code class="language-markdown"> set follow-fork-mode &lt;child | parent&gt;
+<pre><code class="language-markdown"> set disassembly-flavor &lt;intel | att&gt;
+ Set the disassembly style &quot;flavor&quot;.
+
+ set follow-fork-mode &lt;child | parent&gt;
Specify which process to follow when debuggee makes a fork(2)
syscall.
@@ -355,6 +361,18 @@ For example create <code>run.gdb</code>:</p>
<p>This script can be used as:</p>
<pre><code class="language-markdown"> gdb --batch -x ./run.gdb -p &lt;pid&gt;
</code></pre>
+<h2 id="hook-to-automatically-save-breakpoints-on-quit"><a class="header" href="#hook-to-automatically-save-breakpoints-on-quit">Hook to automatically save breakpoints on <code>quit</code></a></h2>
+<pre><code class="language-markdown">define break-save
+ save breakpoint $arg0.gdb.bp
+end
+define break-load
+ source $arg0.gdb.bp
+end
+
+define hook-quit
+ break-save quit
+end
+</code></pre>
<h1 id="know-bugs"><a class="header" href="#know-bugs">Know Bugs</a></h1>
<h2 id="workaround-command--finish-bug"><a class="header" href="#workaround-command--finish-bug">Workaround <code>command + finish</code> bug</a></h2>
<p>When using <code>finish</code> inside a <code>command</code> block, commands after <code>finish</code> are not