diff options
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 +``` |