- if ((md = map_to_file (fd)) == NULL)
- {
- close (fd);
- }
- else if ((objfile = (struct objfile *) mmalloc_getkey (md, 0)) != NULL)
- {
- /* Update memory corruption handler function addresses. */
- init_malloc (md);
- objfile -> md = md;
- objfile -> mmfd = fd;
- /* Update pointers to functions to *our* copies */
- obstack_chunkfun (&objfile -> psymbol_cache.cache, xmmalloc);
- obstack_freefun (&objfile -> psymbol_cache.cache, mfree);
- obstack_chunkfun (&objfile -> psymbol_obstack, xmmalloc);
- obstack_freefun (&objfile -> psymbol_obstack, mfree);
- obstack_chunkfun (&objfile -> symbol_obstack, xmmalloc);
- obstack_freefun (&objfile -> symbol_obstack, mfree);
- obstack_chunkfun (&objfile -> type_obstack, xmmalloc);
- obstack_freefun (&objfile -> type_obstack, mfree);
- /* If already in objfile list, unlink it. */
- unlink_objfile (objfile);
- /* Forget things specific to a particular gdb, may have changed. */
- objfile -> sf = NULL;
- }
- else
- {
+ if ((md = map_to_file (fd)) == NULL)
+ {
+ close (fd);
+ }
+ else if ((objfile = (struct objfile *) mmalloc_getkey (md, 0)) != NULL)
+ {
+ /* Update memory corruption handler function addresses. */
+ init_malloc (md);
+ objfile->md = md;
+ objfile->mmfd = fd;
+ /* Update pointers to functions to *our* copies */
+ obstack_chunkfun (&objfile->psymbol_cache.cache, xmmalloc);
+ obstack_freefun (&objfile->psymbol_cache.cache, mfree);
+ obstack_chunkfun (&objfile->psymbol_obstack, xmmalloc);
+ obstack_freefun (&objfile->psymbol_obstack, mfree);
+ obstack_chunkfun (&objfile->symbol_obstack, xmmalloc);
+ obstack_freefun (&objfile->symbol_obstack, mfree);
+ obstack_chunkfun (&objfile->type_obstack, xmmalloc);
+ obstack_freefun (&objfile->type_obstack, mfree);
+ /* If already in objfile list, unlink it. */
+ unlink_objfile (objfile);
+ /* Forget things specific to a particular gdb, may have changed. */
+ objfile->sf = NULL;
+ }
+ else
+ {