gdb/python: Fix segfault when iterating over empty linetable

symtab-> linetable () is set to null in
buildsym_compunit::end_compunit_symtab_with_blockvector () if the symtab
has no linetable. Attempting to iterate over this linetable using the
Python API caused GDB to segfault.

Approved-By: Tom Tromey <tom@tromey.com>
3 files changed