Fix gdb segv when objfile can't be opened