summaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2013-08-26 18:38:36 +0000
committerDoug Evans <dje@google.com>2013-08-26 18:38:36 +0000
commit0cf29e3b390ef454beab3d5534a5b1a671631eb4 (patch)
tree3e86f4974c7a769863f1c2ef1008f00e22ea98c4 /gdb/dwarf2read.c
parentcf5f8fe476e99de7fcaa6215e85ddb986c2d0cec (diff)
downloadgdb-0cf29e3b390ef454beab3d5534a5b1a671631eb4.tar.gz
* dwarf2read.c (write_psymtabs_to_index): Move error checks ahead of
missing debug info checks.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 7891e32d753..d1ce9460bac 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -21263,15 +21263,15 @@ 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 || !objfile->psymtabs_addrmap)
- return;
-
if (dwarf2_per_objfile->using_index)
error (_("Cannot use an index to create the index"));
if (VEC_length (dwarf2_section_info_def, dwarf2_per_objfile->types) > 1)
error (_("Cannot make an index when the file has multiple .debug_types sections"));
+ if (!objfile->psymtabs || !objfile->psymtabs_addrmap)
+ return;
+
if (stat (objfile->name, &st) < 0)
perror_with_name (objfile->name);