aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gdbserver.html
diff options
context:
space:
mode:
authorjohannst <johannst@users.noreply.github.com>2023-09-09 08:32:23 +0000
committerjohannst <johannst@users.noreply.github.com>2023-09-09 08:32:23 +0000
commit3839b5e390c53b74f58003cf082030df02391f9a (patch)
treefeb4c3e7c3e6674200e49594b49bd4be7bd1bd89 /tools/gdbserver.html
parentf0cf514eb3ca30c5170e534c3861ad73996c7726 (diff)
downloadnotes-3839b5e390c53b74f58003cf082030df02391f9a.tar.gz
notes-3839b5e390c53b74f58003cf082030df02391f9a.zip
deploy: 30bc89f36a0310eb5c9c710f0544577b3688fd77
Diffstat (limited to 'tools/gdbserver.html')
-rw-r--r--tools/gdbserver.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/gdbserver.html b/tools/gdbserver.html
index 1f70c8c..ea14ba9 100644
--- a/tools/gdbserver.html
+++ b/tools/gdbserver.html
@@ -175,18 +175,24 @@
opts:
--disable-randomization
--no-disable-randomization
+ --wrapper W --
comm:
host:port
tty
</code></pre>
-<h1 id="example"><a class="header" href="#example">Example</a></h1>
+<h2 id="example"><a class="header" href="#example">Example</a></h2>
<pre><code class="language-markdown"># Start gdbserver.
gdbserver localhost:1234 /bin/ls
# Attach gdb.
gdb -ex 'target remote localhost:1234'
</code></pre>
+<h2 id="wrapper-example-set-environment-variables-just-for-the-debugee"><a class="header" href="#wrapper-example-set-environment-variables-just-for-the-debugee">Wrapper example: Set environment variables just for the debugee</a></h2>
+<p>Set <code>env</code> as execution wrapper with some variables.
+The wrapper will be executed before the debugee.</p>
+<pre><code class="language-markdown">gdbserver --wrapper env FOO=123 BAR=321 -- :12345 /bin/ls
+</code></pre>
</main>