blob: 203846d9dc1382c134e28e871e4562c27d97275d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
```
|