aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/gdbserver.md11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/tools/gdbserver.md b/src/tools/gdbserver.md
index 5f85e0a..203846d 100644
--- a/src/tools/gdbserver.md
+++ b/src/tools/gdbserver.md
@@ -7,13 +7,14 @@
opts:
--disable-randomization
--no-disable-randomization
+ --wrapper W --
comm:
host:port
tty
```
-# Example
+## Example
```markdown
# Start gdbserver.
@@ -22,3 +23,11 @@ gdbserver localhost:1234 /bin/ls
# Attach gdb.
gdb -ex 'target remote localhost:1234'
```
+
+## Wrapper example: Set environment variables just for the debugee
+Set `env` as execution wrapper with some variables.
+The wrapper will be executed before the debugee.
+
+```markdown
+gdbserver --wrapper env FOO=123 BAR=321 -- :12345 /bin/ls
+```