This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix problem with sim_load (h8300)



Dhananjay, this seems to fix the problem. I discovered that in most cases people don't pass a specific bfd-target to bfd_openr. They just let bfd figure out which target to use.

I'll give you a chance to try this out before I check it in.

Michael

2003-12-17  Michael Snyder  <msnyder@redhat.com>

	* compile.c (sim_load): Don't specify "coff-h8300" when
	calling bfd_openr: we use elf now, and the norm is not to 
	specify a target but to let bfd figure it out.

Index: compile.c
===================================================================
RCS file: /cvs/src/src/sim/h8300/compile.c,v
retrieving revision 1.38
diff -p -r1.38 compile.c
*** compile.c	11 Dec 2003 06:21:12 -0000	1.38
--- compile.c	17 Dec 2003 19:49:33 -0000
*************** sim_load (SIM_DESC sd, char *prog, bfd *
*** 5052,5058 ****
    if (abfd != NULL)
      prog_bfd = abfd;
    else
!     prog_bfd = bfd_openr (prog, "coff-h8300");
    if (prog_bfd != NULL)
      {
        /* Set the cpu type.  We ignore failure from bfd_check_format
--- 5052,5058 ----
    if (abfd != NULL)
      prog_bfd = abfd;
    else
!     prog_bfd = bfd_openr (prog, NULL);
    if (prog_bfd != NULL)
      {
        /* Set the cpu type.  We ignore failure from bfd_check_format

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]