RFA: bfd corefiles
Michael Snyder
msnyder@cygnus.com
Thu Apr 6 17:28:00 GMT 2000
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;
}
More information about the Gdb-patches
mailing list