Hi, The attached patch fixes a bug which causes a crash clearing the symbol tables. The problem occurs as follows: (gdb) add-symbol-file ~/hello add symbol table from file "/home/afra/users/stubbsa/hello" at (y or n) y Reading symbols from /home/afra/users/stubbsa/hello...done. Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) symbol-file Segmentation fault The problem does not occur when the commands are executed from a script. The cause is symbol-file asking permission to clear the symbol tables using the name of the object file without first checking there is an object file. If symbol-file was used to load the symbols then all is well. If add-symbol-file was used (which seems to work equally well in all other ways) then there is no main object file and it all goes horribly wrong. Note that this is the second problem mentioned in bug #858 and also in bug #878, which appears to be a duplicate. I have fixed this by testing the pointer before dereferencing it and using '' if there is no object file name. Perhaps there is something more intelligent that could be done here, but this fixes the problem at hand. I have also added a missing _() to the query string. Andrew Stubbs