From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15557 invoked by alias); 19 May 2014 07:42:02 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 15539 invoked by uid 89); 19 May 2014 07:42:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 May 2014 07:41:59 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1WmICp-0002VE-Fw from Yao_Qi@mentor.com ; Mon, 19 May 2014 00:41:55 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 19 May 2014 00:41:52 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.2.247.3; Mon, 19 May 2014 00:41:51 -0700 Message-ID: <5379B528.5040607@codesourcery.com> Date: Mon, 19 May 2014 07:42:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Jan Kratochvil CC: Tom Tromey , Subject: Re: [PATCH 07/14] add infcall_mmap and gcc_target_options gdbarch methods References: <1400253995-12333-1-git-send-email-tromey@redhat.com> <1400253995-12333-8-git-send-email-tromey@redhat.com> <5379A051.9040209@codesourcery.com> <20140519064019.GA19564@host2.jankratochvil.net> In-Reply-To: <20140519064019.GA19564@host2.jankratochvil.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00329.txt.bz2 On 05/19/2014 02:40 PM, Jan Kratochvil wrote: >> I doubt the interface like this is sufficient for other archs, like >> > arm and mips, which have multiple multilibs, such as -marm/thumb, >> > -mfloat-abi={hard,softfp}, etc. This hook in GDB has to take something >> > into account, such as gdbarch, current frame, the related bfd, etc, in >> > order to return a correct or compatible options for gcc to compile >> > source. > It already already takes 'gdbarch' as its parameter. If it is not enough some > more parameters can be added. But IMO those should be added only when this > method gets implemented for arch which needs such parameter. We can add these parameters when we really need them. That is fine. However, I still doubt whether GDB is able to return the correct gcc options by means of analysing executable only. Supposing the executable is compiled with "-march=armv7-a -mthumb -mfloat-abi=hard -mfpu=neon", GDB should know the code is thumb and float-abi is hard. How can GDB tell "-march=armv7-a -mfpu=neon" is used too? If GDB doesn't know, what options this hook should return? and is the object code compiled "on the fly" still compatible to the inferior code and target runtime? -- Yao (齐尧)