Fix crash of gdb save-index on a STABS file.
	* dwarf2read.c (write_psymtabs_to_index): Return also on no
	PSYMTABS_ADDRMAP.
This commit is contained in:
Jan Kratochvil 2011-04-09 15:20:38 +00:00
parent 2351cae052
commit b4f2f049b1
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2011-04-09 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix crash of gdb save-index on a STABS file.
* dwarf2read.c (write_psymtabs_to_index): Return also on no
PSYMTABS_ADDRMAP.
2011-04-09 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix DW_AT_accessibility compatibility with gcc-4.6+.

View File

@ -15843,8 +15843,9 @@ write_psymtabs_to_index (struct objfile *objfile, const char *dir)
htab_t cu_index_htab;
struct psymtab_cu_index_map *psymtab_cu_index_map;
if (!objfile->psymtabs)
if (!objfile->psymtabs || !objfile->psymtabs_addrmap)
return;
if (dwarf2_per_objfile->using_index)
error (_("Cannot use an index to create the index"));