Skip to content

Commit e5bc22c

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 75cc3c3 commit e5bc22c

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
@@ -323,7 +323,9 @@ def _gdbserver_args(pid=None, path=None, args=None, which=None, env=None, python
323323

324324
orig_args = args
325325

326-
gdbserver_args = [gdbserver, '--multi']
326+
# --no-startup-with-shell is required for forking shells like SHELL=/bin/fish
327+
# https://github.com/Gallopsled/pwntools/issues/2377
328+
gdbserver_args = [gdbserver, '--multi', '--no-startup-with-shell']
327329
if context.aslr:
328330
gdbserver_args += ['--no-disable-randomization']
329331
else:

0 commit comments

Comments
 (0)