aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2010-09-08 23:14:52 +0000
committerDaniel Jacobowitz <drow@false.org>2010-09-08 23:14:52 +0000
commitf1078f667a229ab206bcff9a33ab46f56277bf7f (patch)
treeae85d4ea3456189e7cc2f21d3a42222135e83eb7
parent41a8542a7f562835ba4f66c3faa14c68c0689a7d (diff)
downloadgdb-f1078f667a229ab206bcff9a33ab46f56277bf7f.zip
gdb-f1078f667a229ab206bcff9a33ab46f56277bf7f.tar.gz
gdb-f1078f667a229ab206bcff9a33ab46f56277bf7f.tar.bz2
* dwarf2read.c (read_func_scope, read_structure_type)
(read_common_block): Check for a NULL return from new_symbol.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/dwarf2read.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 71a63f0..63814fa 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2010-09-08 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * dwarf2read.c (read_func_scope, read_structure_type)
+ (read_common_block): Check for a NULL return from new_symbol.
+
2010-09-08 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf2read.c (dwarf2_read_index): Return on no SEC_HAS_CONTENTS.
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 1379f72..cfe42d6 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -5486,7 +5486,8 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
{
struct symbol *arg = new_symbol (child_die, NULL, cu);
- VEC_safe_push (symbolp, template_args, arg);
+ if (arg != NULL)
+ VEC_safe_push (symbolp, template_args, arg);
}
else
process_die (child_die, cu);
@@ -6825,7 +6826,8 @@ process_structure_scope (struct die_info *die, struct dwarf2_cu *cu)
{
struct symbol *arg = new_symbol (child_die, NULL, cu);
- VEC_safe_push (symbolp, template_args, arg);
+ if (arg != NULL)
+ VEC_safe_push (symbolp, template_args, arg);
}
child_die = sibling_die (child_die);
@@ -7306,7 +7308,7 @@ read_common_block (struct die_info *die, struct dwarf2_cu *cu)
{
sym = new_symbol (child_die, NULL, cu);
attr = dwarf2_attr (child_die, DW_AT_data_member_location, cu);
- if (attr)
+ if (sym != NULL && attr != NULL)
{
CORE_ADDR byte_offset = 0;