From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 46351 invoked by alias); 12 Aug 2017 04:19:40 -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 46301 invoked by uid 89); 12 Aug 2017 04:19:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=coincidence X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 12 Aug 2017 04:19:37 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6DC6EC29B5FA; Sat, 12 Aug 2017 04:19:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6DC6EC29B5FA Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=sergiodj@redhat.com Received: from localhost (unused-10-15-17-193.yyz.redhat.com [10.15.17.193]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2A39960C24; Sat, 12 Aug 2017 04:19:36 +0000 (UTC) From: Sergio Durigan Junior To: Simon Marchi Cc: GDB Patches , Pedro Alves , Eli Zaretskii Subject: Re: [PATCH v2] Implement the ability to set/unset environment variables to GDBserver when starting the inferior References: <20170629194106.23070-1-sergiodj@redhat.com> <20170727033531.23066-1-sergiodj@redhat.com> <256083325d9f9c4cc4f5518fe6e5292d@polymtl.ca> Date: Sat, 12 Aug 2017 04:19:00 -0000 In-Reply-To: <256083325d9f9c4cc4f5518fe6e5292d@polymtl.ca> (Simon Marchi's message of "Mon, 07 Aug 2017 11:29:54 +0200") Message-ID: <87a83576zs.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00261.txt.bz2 On Monday, August 07 2017, Simon Marchi wrote: > On 2017-07-27 05:35, Sergio Durigan Junior wrote: >> +# Helper function to re-run to main and breaking at the "break-here" >> +# label. >> + >> +proc rerun_to_main { } { >> + global decimal hex >> + >> + if { ![runto_main] } { >> + return -1 >> + } >> + >> + gdb_breakpoint [gdb_get_line_number "break-here"] >> + >> + gdb_test "continue" "Breakpoint $decimal, main \\\(argc=1, >> argv=$hex\\\) at.*" \ >> + "continue until breakpoint" >> +} > > Hi Sergio, Hey Simon, I'm back from vacation, sorry about the delay in replying these messages. > I just noticed something out of pure coincidence. I noticed some TCL > backtraces when running the testsuite that I hadn't seen before, such > as: > > ERROR: tcl error sourcing > /home/emaisin/src/binutils-gdb/gdb/testsuite/gdb.base/sigbpt.exp. > ERROR: undefined tag "break-here" > while executing > "error "undefined tag \"$text\""" > (procedure "gdb_get_line_number" line 36) > invoked from within > "gdb_get_line_number "break-here"" > (procedure "rerun_to_main" line 8) > invoked from within > "rerun_to_main" > (procedure "stepi_out" line 10) > invoked from within > "stepi_out "stepi"" > (file > "/home/emaisin/src/binutils-gdb/gdb/testsuite/gdb.base/sigbpt.exp" > line 256) > invoked from within > "source > /home/emaisin/src/binutils-gdb/gdb/testsuite/gdb.base/sigbpt.exp" > ("uplevel" body line 1) > invoked from within > "uplevel #0 source > /home/emaisin/src/binutils-gdb/gdb/testsuite/gdb.base/sigbpt.exp" > invoked from within > "catch "uplevel #0 source $test_file_name"" > > It turns out I had your test file (share-env-with-gdbserver.exp) still > lying around in my repo. The procedure defined above (rerun_to_main) > overrides one with the same name defined in lib/gdb.exp, breaking the > tests executed after, that use this proc. Ops. I'll redefine the proc and use another name. Thanks for catching that. Cheers, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/