From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15500 invoked by alias); 4 Nov 2014 22:51:16 -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 15491 invoked by uid 89); 4 Nov 2014 22:51:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qc0-f202.google.com Received: from mail-qc0-f202.google.com (HELO mail-qc0-f202.google.com) (209.85.216.202) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 04 Nov 2014 22:51:15 +0000 Received: by mail-qc0-f202.google.com with SMTP id m20so1086938qcx.3 for ; Tue, 04 Nov 2014 14:51:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:content-type :content-transfer-encoding:message-id:date:to:cc:subject:in-reply-to :references; bh=xvl2s3EkRXBDifLeVVvu7Ka/Lb2aDf9dib7xSilzdYY=; b=goKN8Yyhr7c7T1Pfl66/9EvmTtDCWP5keSwPKSre/g9TDXIBb6HTS5nLCp8ow6bwfJ N828cu+kRKu7UNX0AO0RRPUtQUWrH9TUsmHOlQjCj4QGHrDC50uMGIt7C0nIwlcKeVym jM/Q9YOFSHjJlXIhoB4XJOZJM1HCS1bdJTKeeKDuR5vZfbeZbbHhJOuN5FVjHvqh5Wsj eCAqsY4TFn8/zpatLHAvcJwDmVYgizxtRVLhSsfPk50XHDkn1psld4ExRDMv11acYH+Y kySunaxgIC6zeHRd77+y10cQUvOnBgRLh/8qXh42k933/IL5b/Pd5PFdTZ+02QtrMrRN DxMg== X-Gm-Message-State: ALoCoQmVnHOmDBDHUl88bsZfmWEINwJ2jTDjaDrVu0dm6KaAPV88mKJflbOSR0shTZnU0TrlYBildp+yugjKGO8dMlTg1bFb1e7slrMOoPZ0g2NF6LIYjArZLZldaffEATXkGBPGshgmOAsKUv89bEkob4d5knhcwKUf0ND3Bort8wvyIbT5Olg= X-Received: by 10.236.17.233 with SMTP id j69mr33159268yhj.47.1415141473263; Tue, 04 Nov 2014 14:51:13 -0800 (PST) Received: from corpmail-nozzle1-2.hot.corp.google.com ([100.108.1.103]) by gmr-mx.google.com with ESMTPS id k66si33052yho.7.2014.11.04.14.51.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Nov 2014 14:51:13 -0800 (PST) Received: from ruffy2.mtv.corp.google.com ([172.17.128.107]) by corpmail-nozzle1-2.hot.corp.google.com with ESMTP id Co6S8Di0.1; Tue, 04 Nov 2014 14:51:13 -0800 From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <21593.22624.261133.136054@ruffy2.mtv.corp.google.com> Date: Tue, 04 Nov 2014 22:51:00 -0000 To: Yao Qi Cc: Subject: Re: [PATCH 3/6] Get start and end address of main in dwz.exp In-Reply-To: <1414195968-3333-4-git-send-email-yao@codesourcery.com> References: <1414195968-3333-1-git-send-email-yao@codesourcery.com> <1414195968-3333-4-git-send-email-yao@codesourcery.com> X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00083.txt.bz2 Yao Qi writes: > On arm-none-eabi target thumb mode, I see the following fail, > > p the_int^M > $2 = 99^M > (gdb) FAIL: gdb.dwarf2/dwz.exp: p the_int > > and on powerpc64 target, we even can't get function main from object > file, > > disassemble main^M > No function contains specified address.^M > (gdb) FAIL: gdb.dwarf2/dwz.exp: disassemble main > > This patch is to use MACRO_AT_func attribute to get the main's start > address and end address correctly, and also remove some code dwz.exp > getting main's length. This patch fixes fails on both thumb mode and > powerpc64 target. > > PASS: gdb.dwarf2/dwz.exp: p other_int > PASS: gdb.dwarf2/dwz.exp: p the_int > > gdb/testsuite: > > 2014-10-24 Yao Qi > > * gdb.dwarf2/dwz.exp: Remove the code to compile main.c to > object and get function length. > (Dwarf::assemble): Replace name, low_pc and high_pc attributes > with MACRO_AT_func. > (top-level): Replace gdb_compile and clean_restart with > prepare_for_testing. > * gdb.dwarf2/main.c (main): Add label main_label. LGTM