This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
RFA: bfd corefiles
- To: <gdb-patches at sourceware dot cygnus dot com>, <ian at zembu dot com>
- Subject: RFA: bfd corefiles
- From: "Michael Snyder" <msnyder at cygnus dot com>
- Date: Thu, 6 Apr 2000 17:26:45 -0700
I want bfd to provide GDB with the machine type from a corefile
(in arch_info). Is the following change reasonable?
2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
* elfcore.h (elf_core_file_p): call backend_object_p which
thereby gets an opportunity to update the arch/machine type.
Index: elfcore.h
===================================================================
RCS file: /cvs/src/src/bfd/elfcore.h,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 elfcore.h
*** elfcore.h 1999/05/03 07:28:57 1.1.1.1
--- elfcore.h 2000/04/07 00:25:29
***************
*** 222,226 ****
--- 222,234 ----
/* Save the entry point from the ELF header. */
bfd_get_start_address (abfd) = i_ehdrp->e_entry;
+ /* Let the backend double check the format and override global
+ information. */
+ if (ebd->elf_backend_object_p)
+ {
+ if ((*ebd->elf_backend_object_p) (abfd) == false)
+ goto wrong;
+ }
+
return abfd->xvec;
}