aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2007-09-05 00:01:41 +0000
committerMichael Snyder <msnyder@vmware.com>2007-09-05 00:01:41 +0000
commit8fb822e099bd9e67a9bac094852e9bce15ceb175 (patch)
tree27ecb5de3b88aa44e316fc0d0ed43834c75e8bdc /gdb
parent570b4ee2f781445f1d27e2024fa69a093fa179ad (diff)
downloadgdb-8fb822e099bd9e67a9bac094852e9bce15ceb175.zip
gdb-8fb822e099bd9e67a9bac094852e9bce15ceb175.tar.gz
gdb-8fb822e099bd9e67a9bac094852e9bce15ceb175.tar.bz2
2007-09-04 Michael Snyder <msnyder@access-company.com>
* stabsread.c (patch_block_status): Guard against null. * Makefile.in (stabsread.o): Depend on gdb_assert.h.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/Makefile.in3
-rw-r--r--gdb/stabsread.c2
3 files changed, 9 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index af3cf2f..1b52ca0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2007-09-04 Michael Snyder <msnyder@access-company.com>
+
+ * stabsread.c (patch_block_status): Guard against null.
+ * Makefile.in (stabsread.o): Depend on gdb_assert.h.
+
2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
* printcmd.c (printf_command): Handle ptr_arg. Correct typo
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index a3a350b..7ddf098 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -2718,7 +2718,8 @@ stabsread.o: stabsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(gdb_obstack_h) \
$(symtab_h) $(gdbtypes_h) $(expression_h) $(symfile_h) $(objfiles_h) \
$(aout_stab_gnu_h) $(libaout_h) $(aout_aout64_h) $(gdb_stabs_h) \
$(buildsym_h) $(complaints_h) $(demangle_h) $(language_h) \
- $(doublest_h) $(cp_abi_h) $(cp_support_h) $(stabsread_h)
+ $(doublest_h) $(cp_abi_h) $(cp_support_h) $(stabsread_h) \
+ $(gdb_assert_h)
stack.o: stack.c $(defs_h) $(value_h) $(symtab_h) $(gdbtypes_h) \
$(expression_h) $(language_h) $(frame_h) $(gdbcmd_h) $(gdbcore_h) \
$(target_h) $(source_h) $(breakpoint_h) $(demangle_h) $(inferior_h) \
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 410abec..0e09368 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -45,6 +45,7 @@
#include "doublest.h"
#include "cp-abi.h"
#include "cp-support.h"
+#include "gdb_assert.h"
#include <ctype.h>
@@ -359,6 +360,7 @@ patch_block_stabs (struct pending *symbols, struct pending_stabs *stabs,
{
name = stabs->stab[ii];
pp = (char *) strchr (name, ':');
+ gdb_assert (pp); /* Must find a ':' or game's over. */
while (pp[1] == ':')
{
pp += 2;