diff options
author | Per Bothner <per@bothner.com> | 1997-04-18 02:22:18 +0000 |
---|---|---|
committer | Per Bothner <per@bothner.com> | 1997-04-18 02:22:18 +0000 |
commit | 7a9eb4c45a79ff6ffc3d74f0db24ae0a6e255550 (patch) | |
tree | 04ea28c7e19e9a95ea48b989b9cfb201da5e4aae /gdb/objfiles.c | |
parent | 6e236775b594a8a68afd706744974ace3bda689c (diff) | |
download | gdb-7a9eb4c45a79ff6ffc3d74f0db24ae0a6e255550.zip gdb-7a9eb4c45a79ff6ffc3d74f0db24ae0a6e255550.tar.gz gdb-7a9eb4c45a79ff6ffc3d74f0db24ae0a6e255550.tar.bz2 |
* defs.h (enum language): Add language_java.
* java-exp.y, java-lang.c, java-lang.h, java-valprint.c: New files.
* Makefile.in: Upadte for new files.
* objfiles.c (allocate_objfile): Allow NULL bfd argument.
* symfile.c (deduce_language_from_filename): Recognize .java.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r-- | gdb/objfiles.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 6573293..2a05eac 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -130,6 +130,7 @@ allocate_objfile (abfd, mapped) mapped |= mapped_symbol_files; #if !defined(NO_MMALLOC) && defined(HAVE_MMAP) + if (abfd != NULL) { /* If we can support mapped symbol files, try to open/reopen the @@ -254,15 +255,18 @@ allocate_objfile (abfd, mapped) { mfree (objfile -> md, objfile -> name); } - objfile -> name = mstrsave (objfile -> md, bfd_get_filename (abfd)); - objfile -> mtime = bfd_get_mtime (abfd); + if (abfd != NULL) + { + objfile -> name = mstrsave (objfile -> md, bfd_get_filename (abfd)); + objfile -> mtime = bfd_get_mtime (abfd); - /* Build section table. */ + /* Build section table. */ - if (build_objfile_section_table (objfile)) - { - error ("Can't find the file sections in `%s': %s", - objfile -> name, bfd_errmsg (bfd_get_error ())); + if (build_objfile_section_table (objfile)) + { + error ("Can't find the file sections in `%s': %s", + objfile -> name, bfd_errmsg (bfd_get_error ())); + } } /* Add this file onto the tail of the linked list of other such files. */ |