summaryrefslogtreecommitdiff
path: root/gdb/source.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2007-08-13 22:25:14 +0000
committerMichael Snyder <msnyder@specifix.com>2007-08-13 22:25:14 +0000
commitf29b60d8dfdab79507656680c9160993035f3226 (patch)
tree2cdc631908d181b43b1d3d4268dd07d11398b22d /gdb/source.c
parent1b2613b7b52e1a871edd1907338664e9267216f7 (diff)
downloadgdb-f29b60d8dfdab79507656680c9160993035f3226.tar.gz
2007-08-13 Michael Snyder <msnyder@access-company.com>
* source.c (find_source_lines): Require symtab 's'.
Diffstat (limited to 'gdb/source.c')
-rw-r--r--gdb/source.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/source.c b/gdb/source.c
index 1067e62a8fd..3f6d78154b8 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);