diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-05-01 15:27:02 +0200 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-05-01 15:27:02 +0200 |
commit | 6f5b0cb0cfac62fc0e1876726d05e1d30587ccf9 (patch) | |
tree | b7400041a02d534d95c95fec359bc7cd0f863894 /src/debug/gdbserver.md | |
parent | b737cc8ca5bb8ca5e07cd0151d678a7b4b10d5cb (diff) | |
download | notes-6f5b0cb0cfac62fc0e1876726d05e1d30587ccf9.tar.gz notes-6f5b0cb0cfac62fc0e1876726d05e1d30587ccf9.zip |
debug: move gdb, gdbserver to own group
Diffstat (limited to 'src/debug/gdbserver.md')
-rw-r--r-- | src/debug/gdbserver.md | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/debug/gdbserver.md b/src/debug/gdbserver.md new file mode 100644 index 0000000..203846d --- /dev/null +++ b/src/debug/gdbserver.md @@ -0,0 +1,33 @@ +# gdbserver(1) + +# CLI + +```markdown + gdbserver [opts] comm prog [args] + opts: + --disable-randomization + --no-disable-randomization + --wrapper W -- + + comm: + host:port + tty +``` + +## Example + +```markdown +# Start gdbserver. +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 +``` |