diff options
author | johannst <johannst@users.noreply.github.com> | 2022-09-30 10:58:40 +0000 |
---|---|---|
committer | johannst <johannst@users.noreply.github.com> | 2022-09-30 10:58:40 +0000 |
commit | fa7eb205d5f18b72c1e04a4229d171a15040bdea (patch) | |
tree | 2b9965406fb65fdc44ec3eddd2924e5be3f06c8e /tools/gdb.html | |
parent | 0c31b8e434d634c81479bf396c752d1baaff7603 (diff) | |
download | notes-fa7eb205d5f18b72c1e04a4229d171a15040bdea.tar.gz notes-fa7eb205d5f18b72c1e04a4229d171a15040bdea.zip |
deploy: b6f25b16f1f23b0169e8f076e79ee4964b81db99
Diffstat (limited to 'tools/gdb.html')
-rw-r--r-- | tools/gdb.html | 20 |
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 @@ <bp_list>: Space separates list, eg 'command 2 5-8' to run command for breakpoints: 2,5,6,7,8. + + save break <file> + Save breakpoints to <file>. 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] <expr> [thread <tnum>] @@ -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 <child | parent> +<pre><code class="language-markdown"> set disassembly-flavor <intel | att> + Set the disassembly style "flavor". + + set follow-fork-mode <child | parent> 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 <pid> </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 |