From 21a13652df728c9571f899caf4949d5d46f49db7 Mon Sep 17 00:00:00 2001 From: johannst Date: Wed, 1 May 2024 17:39:45 +0000 Subject: deploy: 7ca41565c4e70b212cb88a4d18c18fa35768df6d --- debug/gdbserver.html | 254 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 254 insertions(+) create mode 100644 debug/gdbserver.html (limited to 'debug/gdbserver.html') diff --git a/debug/gdbserver.html b/debug/gdbserver.html new file mode 100644 index 0000000..8e213be --- /dev/null +++ b/debug/gdbserver.html @@ -0,0 +1,254 @@ + + + + + + gdbserver - Notes + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+
+

gdbserver(1)

+

CLI

+
  gdbserver [opts] comm prog [args]
+    opts:
+      --disable-randomization
+      --no-disable-randomization
+      --wrapper W --
+
+    comm:
+      host:port
+      tty
+
+

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