From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29063 invoked by alias); 17 Dec 2003 19:54:40 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 29053 invoked from network); 17 Dec 2003 19:54:39 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 17 Dec 2003 19:54:39 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id hBHJscA17762 for ; Wed, 17 Dec 2003 14:54:39 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id hBHJsbM25191; Wed, 17 Dec 2003 14:54:37 -0500 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id hBHJsaO24589; Wed, 17 Dec 2003 11:54:36 -0800 Message-ID: <3FE0B47C.2090701@redhat.com> Date: Wed, 17 Dec 2003 19:54:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 MIME-Version: 1.0 To: "Dhananjay R. Deshpande" CC: gdb-patches@sources.redhat.com Subject: [PATCH] Fix problem with sim_load (h8300) References: <69595093233BB547BB70CF5E492B63F2034027F3@sohm.kpit.com> <3FE0AF2C.8020407@redhat.com> In-Reply-To: <3FE0AF2C.8020407@redhat.com> Content-Type: multipart/mixed; boundary="------------060202020500070508020606" X-SW-Source: 2003-12/txt/msg00415.txt.bz2 This is a multi-part message in MIME format. --------------060202020500070508020606 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 252 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 --------------060202020500070508020606 Content-Type: text/plain; name="openr" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="openr" Content-length: 984 2003-12-17 Michael Snyder * 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 --------------060202020500070508020606--