aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2023-09-08 22:56:02 +0200
committerJohannes Stoelp <johannes.stoelp@gmail.com>2023-09-08 22:56:02 +0200
commit1d4828b87da9837fc3df81e81da1763d337fc420 (patch)
tree17bc80224abbd8e9ee080829af7ca0f01c342510 /src
parent09c22a5f544c87bffcb5c68f0965201ae1d29044 (diff)
downloadnotes-1d4828b87da9837fc3df81e81da1763d337fc420.tar.gz
notes-1d4828b87da9837fc3df81e81da1763d337fc420.zip
gdbserver: add exec wrapper example
Diffstat (limited to 'src')
-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
+```