diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2023-09-08 22:56:02 +0200 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2023-09-08 22:56:02 +0200 |
commit | 1d4828b87da9837fc3df81e81da1763d337fc420 (patch) | |
tree | 17bc80224abbd8e9ee080829af7ca0f01c342510 /src | |
parent | 09c22a5f544c87bffcb5c68f0965201ae1d29044 (diff) | |
download | notes-1d4828b87da9837fc3df81e81da1763d337fc420.tar.gz notes-1d4828b87da9837fc3df81e81da1763d337fc420.zip |
gdbserver: add exec wrapper example
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/gdbserver.md | 11 |
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 +``` |