aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2007-08-13 22:25:14 +0000
committerMichael Snyder <msnyder@vmware.com>2007-08-13 22:25:14 +0000
commitbe8ca11b9e5779d8fb1aeb847da106f36febc851 (patch)
tree5fe893dfa740a8410534341bfa4f7d99bd551972
parent8275b357ad5522cee5ae2bf31b6b762053d84f40 (diff)
downloadgdb-be8ca11b9e5779d8fb1aeb847da106f36febc851.zip
gdb-be8ca11b9e5779d8fb1aeb847da106f36febc851.tar.gz
gdb-be8ca11b9e5779d8fb1aeb847da106f36febc851.tar.bz2
2007-08-13 Michael Snyder <msnyder@access-company.com>
* source.c (find_source_lines): Require symtab 's'.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/source.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 71ffcb6..0a19b2f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2007-08-13 Michael Snyder <msnyder@access-company.com>
+
+ * source.c (find_source_lines): Require symtab 's'.
+
2007-08-11 Michael Snyder <msnyder@access-company.com>
* completer.c: Spelling fix in comments.
diff --git a/gdb/source.c b/gdb/source.c
index 1067e62..3f6d781 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1122,11 +1122,12 @@ find_source_lines (struct symtab *s, int desc)
long mtime = 0;
int size;
+ gdb_assert (s);
line_charpos = (int *) xmalloc (lines_allocated * sizeof (int));
if (fstat (desc, &st) < 0)
perror_with_name (s->filename);
- if (s && s->objfile && s->objfile->obfd)
+ if (s->objfile && s->objfile->obfd)
mtime = bfd_get_mtime (s->objfile->obfd);
else if (exec_bfd)
mtime = bfd_get_mtime (exec_bfd);