From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8307 invoked by alias); 9 Jul 2014 11:55:12 -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 8293 invoked by uid 89); 9 Jul 2014 11:55:11 -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; Wed, 09 Jul 2014 11:55:09 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1X4qSo-0002yU-Cy from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Wed, 09 Jul 2014 04:55:06 -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); Wed, 9 Jul 2014 04:55:06 -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; Wed, 9 Jul 2014 04:55:05 -0700 Message-ID: <53BD2CCD.8000700@codesourcery.com> Date: Wed, 09 Jul 2014 11:55: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: Subject: Re: [PATCH] Tweak gdb.trace/tfile.c for thumb mode References: <1404100222-2312-1-git-send-email-yao@codesourcery.com> In-Reply-To: <1404100222-2312-1-git-send-email-yao@codesourcery.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg00177.txt.bz2 On 06/30/2014 11:50 AM, Yao Qi wrote: > We see the fail below happens on thumb related multi-libs > (-mthumb -march={armv4t,armv7-a}), > > target tfile tfile-basic.tf ^M > warning: Uploaded tracepoint 1 has no source location, using raw address^M > warning: Breakpoint address adjusted from 0x00008959 to 0x00008958.^M > Tracepoint 3 at 0x8958: file /scratch/yqi/arm-none-linux-gnueabi/src/gdb-trunk/gdb/testsuite/gdb.trace/tfile.c, line 91.^M > Created tracepoint 3 for target's tracepoint 1 at 0x8959.^M > warning: Breakpoint address adjusted from 0x00008959 to 0x00008958.^M > warning: Breakpoint address adjusted from 0x00008959 to 0x00008958.^M > warning: Breakpoint address adjusted from 0x00008959 to 0x00008958.^M > (gdb) FAIL: gdb.trace/tfile.exp: complete-command 'target tfile' > > The address of write_basic_trace_file is two-bytes aligned, > > (gdb) p write_basic_trace_file > $1 = {void (void)} 0x8958 > > but the ld sets the LSB of every reference to the function address > (indicating the address is in thumb mode), so "&write_basic_trace_file" > in the program becomes 0x8959, which is saved in the trace file. That > is why the warnings are emitted. > > This patch is to clear the LSB of the function address written to trace > file in thumb and thumb2 mode. This patch fixes the fail above. > > gdb/testsuite: > > 2014-06-30 Yao Qi > > * gdb.trace/tfile.c (write_basic_trace_file): Clear the lsb of > the function address written to trace file. Ping? Update the changelog entry a little, 2014-07-09 Yao Qi * gdb.trace/tfile.c (write_basic_trace_file) [__thumb__||__thumb2__]: Clear the lsb of the function address written to trace file. -- Yao (齐尧)