From 3839b5e390c53b74f58003cf082030df02391f9a Mon Sep 17 00:00:00 2001 From: johannst Date: Sat, 9 Sep 2023 08:32:23 +0000 Subject: deploy: 30bc89f36a0310eb5c9c710f0544577b3688fd77 --- tools/gdbserver.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tools/gdbserver.html') diff --git a/tools/gdbserver.html b/tools/gdbserver.html index 1f70c8c..ea14ba9 100644 --- a/tools/gdbserver.html +++ b/tools/gdbserver.html @@ -175,17 +175,23 @@ opts: --disable-randomization --no-disable-randomization + --wrapper W -- comm: host:port tty -

Example

+

Example

# 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.

+
gdbserver --wrapper env FOO=123 BAR=321 -- :12345 /bin/ls
 
-- cgit v1.2.3