I'm receiving this gdb error on any code I try to debug any program with gdb. Here's the simplest process that reproduces the error
- Create a
main.cpp
file with this content:
int main(){
return 0;
}
- Run
g++ -g main.cpp
- Run
gdb a.out
- Inside gdb set a break point at line 2 with
break 2
- In gdb run the program with
run
Output:
Starting program: /tmp/test/a.out
During startup program exited normally.
This is all done with gdb on the command line. I've tried using g++ and gcc with the same result. I'm not really sure where to go from here.
- gdb version = 9.2
- g++ version = 9.3.0
EDIT: I figured out what is causing the issue, but not how to fix it. The issue seems to be something related to my SHELL
variable. I'm currently using xonsh as my shell but when I set my SHELL
environment variable back to /bin/bash
everything works as expected. Is there anything I can do to fix this while using xonsh? Should I report this to xonsh, gdb, both or neither?