aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2015-08-03 18:55:12 +0100
committerPedro Alves <palves@redhat.com>2015-08-03 18:55:12 +0100
commit666fcf91c0117da8294207f631df5a97fdc4157c (patch)
tree8651d3744cf8cd12136372184e5a194f38a1b34a
parentc8bd4544607d4f41b89b78630fc233f53f90b6a2 (diff)
downloadgdb-666fcf91c0117da8294207f631df5a97fdc4157c.zip
gdb-666fcf91c0117da8294207f631df5a97fdc4157c.tar.gz
gdb-666fcf91c0117da8294207f631df5a97fdc4157c.tar.bz2
dwarf2read.c: fix latent buglet
cust->includes is: struct compunit_symtab { ... struct compunit_symtab **includes; gdb/ChangeLog: 2015-08-03 Pedro Alves <palves@redhat.com> * dwarf2read.c (compute_compunit_symtab_includes): Use size of struct compunit_symtab pointer.
-rw-r--r--gdb/dwarf2read.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 24a4022..b5ffd04 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -7983,7 +7983,7 @@ compute_compunit_symtab_includes (struct dwarf2_per_cu_data *per_cu)
len = VEC_length (compunit_symtab_ptr, result_symtabs);
cust->includes
= obstack_alloc (&dwarf2_per_objfile->objfile->objfile_obstack,
- (len + 1) * sizeof (struct symtab *));
+ (len + 1) * sizeof (struct compunit_symtab *));
for (ix = 0;
VEC_iterate (compunit_symtab_ptr, result_symtabs, ix,
compunit_symtab_iter);