Skip to content

Commit e3e0873

Browse files
committed
Don't go though a shell in gdb.debug
gdbserver starts a shell and runs the target process through it. This behavior was added in gdbserver 8.0 together with the commandline flag --no-startup-with-shell to disable it.
1 parent f046fdd commit e3e0873

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pwnlib/gdb.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,9 @@ def _gdbserver_args(pid=None, path=None, args=None, which=None, env=None):
287287

288288
orig_args = args
289289

290-
gdbserver_args = [gdbserver, '--multi']
290+
# --no-startup-with-shell is required for forking shells like SHELL=/bin/fish
291+
# https://github.com/Gallopsled/pwntools/issues/2377
292+
gdbserver_args = [gdbserver, '--multi', '--no-startup-with-shell']
291293
if context.aslr:
292294
gdbserver_args += ['--no-disable-randomization']
293295
else:

0 commit comments

Comments
 (0)