From patchwork Sat Feb 6 01:28:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 10742 Received: (qmail 99445 invoked by alias); 6 Feb 2016 01:28:19 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 99433 invoked by uid 89); 6 Feb 2016 01:28:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1621 X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 06 Feb 2016 01:28:16 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id C0A98340B0C for ; Sat, 6 Feb 2016 01:28:14 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH] sim: mips: fix prog_bfd usage [committed] Date: Fri, 5 Feb 2016 20:28:14 -0500 Message-Id: <1454722094-16379-1-git-send-email-vapier@gentoo.org> X-IsSubscribed: yes We do not want to reference the "base" member directly. We have the STATE_PROG_BFD macro instead to look up the prog_bfd member. --- sim/mips/ChangeLog | 6 ++++++ sim/mips/configure | 2 +- sim/mips/configure.ac | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index 0370e2b..20ba0ff 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,3 +1,9 @@ +2016-02-05 Mike Frysinger + + * configure.ac (sim_engine_run): Change sd->base.prog_bfd to + STATE_PROG_BFD (sd). + * configure: Regenerate. + 2016-01-18 Andrew Bennett Maciej W. Rozycki diff --git a/sim/mips/configure b/sim/mips/configure index 1e61e9d..94e75a5 100755 --- a/sim/mips/configure +++ b/sim/mips/configure @@ -14063,7 +14063,7 @@ sim_engine_run (SIM_DESC sd, if (STATE_ARCHITECTURE (sd) == NULL) mach = bfd_mach_${sim_multi_default}; - else if (elf_elfheader (sd->base.prog_bfd)->e_flags + else if (elf_elfheader (STATE_PROG_BFD (sd))->e_flags & EF_MIPS_ARCH_ASE_MICROMIPS) mach = bfd_mach_mips_micromips; else diff --git a/sim/mips/configure.ac b/sim/mips/configure.ac index 476fc35..823a00c 100644 --- a/sim/mips/configure.ac +++ b/sim/mips/configure.ac @@ -259,7 +259,7 @@ sim_engine_run (SIM_DESC sd, if (STATE_ARCHITECTURE (sd) == NULL) mach = bfd_mach_${sim_multi_default}; - else if (elf_elfheader (sd->base.prog_bfd)->e_flags + else if (elf_elfheader (STATE_PROG_BFD (sd))->e_flags & EF_MIPS_ARCH_ASE_MICROMIPS) mach = bfd_mach_mips_micromips; else