Gdbinit
Gdbinit copied to clipboard
assemble command doesn't work when using a shell other than bash
The assemble command calls shell which executes in the current shell which could be sh or in my case fish.
I second that. Doesn't work with zsh either. A fix would be appreciated :(
The shell is provided by gdb itself. @ gdb/cli/cli-cmds.c if ((user_shell = (char *) getenv ("SHELL")) == NULL) user_shell = "/bin/sh";
Are fish or zsh setting that environment variable?
Yes it is set automatically in zsh:
$ echo $SHELL
/opt/local/bin/zsh
My current work-around is alias gdb='SHELL=/bin/bash gdb' in .zshrc.