From patchwork Sun Apr 15 19:45:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 26749 Received: (qmail 98908 invoked by alias); 15 Apr 2018 19:45:52 -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 98891 invoked by uid 89); 15 Apr 2018 19:45:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy=H*Ad:D*ca X-HELO: barracuda.ebox.ca Received: from barracuda.ebox.ca (HELO barracuda.ebox.ca) (96.127.255.19) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 15 Apr 2018 19:45:50 +0000 X-ASG-Debug-ID: 1523821537-0c856e618aa03800001-fS2M51 Received: from smtp.ebox.ca (smtp.electronicbox.net [96.127.255.82]) by barracuda.ebox.ca with ESMTP id MXy4IO90g1TqsKdw (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 15 Apr 2018 15:45:37 -0400 (EDT) X-Barracuda-Envelope-From: simon.marchi@polymtl.ca X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from simark.lan (unknown [192.222.164.54]) by smtp.ebox.ca (Postfix) with ESMTP id 4E039441D69; Sun, 15 Apr 2018 15:45:37 -0400 (EDT) From: Simon Marchi X-Barracuda-Effective-Source-IP: 192-222-164-54.qc.cable.ebox.net[192.222.164.54] X-Barracuda-Apparent-Source-IP: 192.222.164.54 X-Barracuda-RBL-IP: 192.222.164.54 To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [pushed] Add x86-tdep.o to i386/amd64 target build Date: Sun, 15 Apr 2018 15:45:36 -0400 X-ASG-Orig-Subj: [pushed] Add x86-tdep.o to i386/amd64 target build Message-Id: <20180415194536.11618-1-simon.marchi@polymtl.ca> X-Barracuda-Connect: smtp.electronicbox.net[96.127.255.82] X-Barracuda-Start-Time: 1523821537 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 2079 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.49923 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-IsSubscribed: yes We get this error when doing a build with a single amd64 target (the default when doing just ./configure on x86-64 GNU/Linux): /home/simark/src/binutils-gdb/gdb/i386-tdep.c:4431: error: undefined reference to 'x86_in_indirect_branch_thunk(unsigned long, char const**, int, int)' /home/simark/src/binutils-gdb/gdb/amd64-tdep.c:3045: error: undefined reference to 'x86_in_indirect_branch_thunk(unsigned long, char const**, int, int)' The problem is that commit 1d509aa625f8 ("infrun: step through indirect branch thunks") missed adding x86-tdep.o to the list of object file included in an amd64 or i386 build. The problem is not seen with --enable-targets=all because that file is included in ALL_TARGET_OBS. Built-tested using: * --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu * --host=armv7-rpi2-linux-gnueabihf --target=x86_64-pc-linux-gnu gdb/ChangeLog: * configure.tgt (x86_tobjs): New variable. (amd64_tobjs, i386_tobjs): Use it. --- gdb/ChangeLog | 5 +++++ gdb/configure.tgt | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 82b803d737bf..b6720524b665 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-04-15 Simon Marchi + + * configure.tgt (x86_tobjs): New variable. + (amd64_tobjs, i386_tobjs): Use it. + 2018-04-13 Andreas Arnez * symtab.c (print_symbol_info): Precede the symbol definition by diff --git a/gdb/configure.tgt b/gdb/configure.tgt index ba904117828a..b252809b2227 100644 --- a/gdb/configure.tgt +++ b/gdb/configure.tgt @@ -37,8 +37,9 @@ case $targ in ;; esac -i386_tobjs="i386-tdep.o arch/i386.o i387-tdep.o" -amd64_tobjs="amd64-tdep.o arch/amd64.o" +x86_tobjs="x86-tdep.o" +i386_tobjs="i386-tdep.o arch/i386.o i387-tdep.o ${x86_tobjs}" +amd64_tobjs="amd64-tdep.o arch/amd64.o ${x86_tobjs}" # Here are three sections to get a list of target specific object # files according to target triplet $TARG.