From patchwork Wed Jun 17 16:09:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 7216 Received: (qmail 33860 invoked by alias); 17 Jun 2015 16:09:15 -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 30310 invoked by uid 89); 17 Jun 2015 16:09:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-pa0-f41.google.com Received: from mail-pa0-f41.google.com (HELO mail-pa0-f41.google.com) (209.85.220.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 17 Jun 2015 16:09:11 +0000 Received: by pacgb13 with SMTP id gb13so39210642pac.1; Wed, 17 Jun 2015 09:09:10 -0700 (PDT) X-Received: by 10.68.143.38 with SMTP id sb6mr12459741pbb.132.1434557350048; Wed, 17 Jun 2015 09:09:10 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id tj8sm5211093pab.30.2015.06.17.09.09.07 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 17 Jun 2015 09:09:09 -0700 (PDT) From: Yao Qi To: Jon Turney Cc: binutils@sourceware.org, gdb-patches@sourceware.org Subject: Re: [PATCH] Allow gdb to find debug symbols file by build-id for PE file format also References: <20150609193638.GM2855@adacore.com> <1433946324-7600-1-git-send-email-jon.turney@dronecode.org.uk> Date: Wed, 17 Jun 2015 17:09:03 +0100 In-Reply-To: <1433946324-7600-1-git-send-email-jon.turney@dronecode.org.uk> (Jon Turney's message of "Wed, 10 Jun 2015 15:25:24 +0100") Message-ID: <86k2v2s4f4.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes Jon Turney writes: > + return $data > } > - set fi [open $tmp] > - fconfigure $fi -translation binary > - # Skip the NOTE header. > - read $fi 16 > - set data [read $fi] > - close $fi > - file delete $tmp > - if ![string compare $data ""] then { > - return "" > + else > + { braces and "else" are put in the different lines. It causes the tcl error, Running ../../../binutils-gdb/gdb/testsuite/gdb.base/break-interp.exp ... ERROR: (DejaGnu) proc "else" does not exist. The error code is NONE The info on the error is: invalid command name "else" while executing "::tcl_unknown else" ("uplevel" body line 1) invoked from within "uplevel 1 ::tcl_unknown $args" Patch below fixes this error. I'll push it in. diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 21a4638..b5928c3 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -4549,9 +4549,7 @@ proc get_build_id { filename } { return "" } return $data - } - else - { + } else { set tmp [standard_output_file "${filename}-tmp"] set objcopy_program [gdb_find_objcopy] set result [catch "exec $objcopy_program -j .note.gnu.build-id -O binary $filename $tmp" output]