diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gdb.html | 8 | ||||
-rw-r--r-- | tools/gdbserver.html | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/tools/gdb.html b/tools/gdb.html index 8dbdb74..72e3f2e 100644 --- a/tools/gdb.html +++ b/tools/gdb.html @@ -519,10 +519,16 @@ which its expression is valid. main () at test.c:10 10 set(&s, 2); +# Define the watchpoint on the location of the object to watch. + +(gdb) watch -l s->v + +# This is equivalent to the following. + (gdb) p &s->v $1 = (int *) 0x7fffffffe594 -# Define a watchpoint o the address of the member variable of the s instance. +# Define a watchpoint to the address of the member variable of the s instance. # This of course only makes sense as long as the s instance is not moved in memory. (gdb) watch *0x7fffffffe594 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> |