From patchwork Thu Mar 2 22:03:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Frager, Neal via Binutils" X-Patchwork-Id: 63603 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp93305wrd; Thu, 2 Mar 2023 14:07:34 -0800 (PST) X-Google-Smtp-Source: AK7set8dh6WOnoKhJ9s9VRRnOx/BJa2BSnAle05UNAls3dI7zzr1lrZ+tZaCz/2DjNWkVceGGu9a X-Received: by 2002:a17:906:d88:b0:8af:1a8c:eaa0 with SMTP id m8-20020a1709060d8800b008af1a8ceaa0mr12544340eji.75.1677794854466; Thu, 02 Mar 2023 14:07:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677794854; cv=none; d=google.com; s=arc-20160816; b=E5mnexLnZV2agUvSO3vL/u0Rmz3OOdYj9Fl5OmS+bzMeTmQ+N4EfodrCkZF2lKoKnM syBlaIUmRpOLTkEEkXKokhost/IVz0eJ/9LlZK7D/cHUvtTnAp7Rs6+cNOCZNSr/L4fG +X7l666zPBOsfaLQTZpyLg1qLgisT6O0Jr1aOdfO6n+K2JOpio6phen0mAY1tnVjixmp /e7ZOwRqFYJoTFCrBHLsLKhQBBE7LbFjbIDIieOoXlc+zJkzB70z5HFgdGj3yBR2XB4D Kxmesy+NciLLuzLkFY/zbKO7O2XpkfcErhsb3QTKc9PHvs6TbpTcf8pZVJv6HOwQN71C Cmlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=hU9ctA0wsmN+i1sE5EdD0QsvA4tsT2riyT7oj0Rlc/g=; b=0OqdkudrKUxVelIhfvY8roTXAhCrTuRI6NoxBVxs/mAIvEzLYu8gkt4ph2+Z9ssTHH 3gUTunixuZV1C2kIWXiTjtbZjFwdkw6rVV7lKkdTHNr9Ut7LW98NJGv3B8Z/qzUOnlS+ Z0GSa2maKNJnuWXM/YK1jOjNcQf7wKq+ycEuej/qBcLZ9YFpGH7X4OB/aFzbP7TPRWOf 7ruYvde4PmzyL7u0B6GZNvhooQN4WEifxTeIgZxDsEKGa8z7wezd4PRZF2QKsWGHF1+6 sBIiatYhKLc3oZe0cWEiTObA79Oux0A49hRx9hyg3/uoLlmgTPCZih104yObkbDgYmGz Qlrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=PNcV7mLY; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org ([2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id hs26-20020a1709073e9a00b008d741e5e351si598679ejc.356.2023.03.02.14.07.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 14:07:34 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=PNcV7mLY; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 73D56385085E for ; Thu, 2 Mar 2023 22:05:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 73D56385085E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677794742; bh=hU9ctA0wsmN+i1sE5EdD0QsvA4tsT2riyT7oj0Rlc/g=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=PNcV7mLYr9PWn018N6rrZpf4D9bdkKafQtw4GSdt7tvnFar54PDMiJQ7uyWULBM6V cBB6nblLObay7IPbLimUlVOtCXz1GpfpdjLCo+pQp88OP/b10zuBfB5YnVLPJ6Prju UL6/dhW3N/vBatRDP+R0MGsch4hMaZWNP4hQaeiI= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from emagii.se (www.emagii.com [185.133.207.17]) by sourceware.org (Postfix) with ESMTPS id 056BE3857B8E for ; Thu, 2 Mar 2023 22:04:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 056BE3857B8E Received: from valinor.ownit.se (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id A520012018B; Thu, 2 Mar 2023 23:04:24 +0100 (CET) Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) To: binutils@sourceware.org Cc: nickc@redhat.com, Tom de Vries Subject: [PATCH v9 01/11] [gdb/testsuite] Fix gdb.rust/watch.exp on ppc64le Date: Thu, 2 Mar 2023 23:03:58 +0100 Message-Id: <20230302220408.1925678-2-binutils@emagii.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230302220408.1925678-1-binutils@emagii.com> References: <20230302220408.1925678-1-binutils@emagii.com> MIME-Version: 1.0 X-PPP-Message-ID: <167779466501.1167654.7180534854113285083@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_FAIL, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Ulf Samuelsson via Binutils From: "Frager, Neal via Binutils" Reply-To: binutils@emagii.com Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759295417469519675?= X-GMAIL-MSGID: =?utf-8?q?1759295417469519675?= From: Tom de Vries On x86_64-linux, I have: ... (gdb) watch -location y^M Hardware watchpoint 2: -location y^M (gdb) PASS: gdb.rust/watch.exp: watch -location y ... but on powerpc64le-linux, I run into: ... (gdb) watch -location y^M Watchpoint 2: -location y^M (gdb) FAIL: gdb.rust/watch.exp: watch -location y ... due to the regexp matching "Hardware watchpoint" but not "Watchpoint": ... gdb_test "watch -location y" ".*watchpoint .* -location .*" ... Fix this by making the regexp less restrictive. Tested on x86_64-linux and powerpc64le-linux. --- gdb/testsuite/gdb.rust/watch.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.rust/watch.exp b/gdb/testsuite/gdb.rust/watch.exp index 83cb41cc1eb..43c88f8a1fc 100644 --- a/gdb/testsuite/gdb.rust/watch.exp +++ b/gdb/testsuite/gdb.rust/watch.exp @@ -30,4 +30,4 @@ if {![runto ${srcfile}:$line]} { } # Just setting a watchpoint was enough to trigger the bug. -gdb_test "watch -location y" ".*watchpoint .* -location .*" +gdb_test "watch -location y" ".*\[wW\]atchpoint .* -location .*" From patchwork Thu Mar 2 22:03:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Frager, Neal via Binutils" X-Patchwork-Id: 63598 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp92186wrd; Thu, 2 Mar 2023 14:04:52 -0800 (PST) X-Google-Smtp-Source: AK7set9jYon4gmXFyRAPn5buAjMCRWp2b33c9RLkglr/Nx5XCrYRfrAM+krCHNlzZ+3gyJphC9QC X-Received: by 2002:a17:906:348f:b0:8a9:f870:d259 with SMTP id g15-20020a170906348f00b008a9f870d259mr12078153ejb.48.1677794692699; Thu, 02 Mar 2023 14:04:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677794692; cv=none; d=google.com; s=arc-20160816; b=vnz08HxAgCW2J3PEgUzcNAnRFRiyxhw0rNbmdnhOx8JkcNqu0e3AvXrW1hDARgvebx BM9bsICXInJ1pcTMMnjMmTdTcA/gdRGHEw0f3qldPyUkz1N+lkPEl4fI4ji64VcRsmXr 8Zauikho8Y3gnvBHOwU4Okado17G4Plva1kmSLizZgRg4q50GRywfkp4mmDXYo8lXJov lEiS9WilxcjSANd0BFrtWRCmNQf76DpE5FVq9uL23ZQ3ElvKCdVD21K/nU2cm5bVKd/D zZWAnFFtMq38JJN21D2xhNasWqRUs5LwKP/7l1wwnaJusxFA3HLonVXpxXQfIrrDv8rW djaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=JfbCZBLb48icnhGbPFicaIOCZfainLCpcLSDImnD7v8=; b=LaHSplittCybF02O2YzNSGDVq45nYsi6rqddl5cD3xc7UABPoFtR52vBVyCqda3yUI LoF0I9FQGp/UK+EODMzR0/gxMHjcF6FIiL5OoH0yI25cx1I0izVT4QUvDapLoeBpnxg0 USjDIEQ8nvG3AESXp0e+9+c2y0LpJk4xbd2NaB1TpgVX0bJKphMrxDNvxpMh9wn2aike ltrCCcV8ya+kQNzH5Myrzos5w9y6HMZdwT45+SFAZYtYmvVEowv78Y3Pb+l8BhiIbE5B vUodyHYChvvLJjvQT1t+310N/a1bEkupTDUmM9HD6t1VSXfAiK3TfMVDKaq5PVliBKqA cdeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=ll+zMfat; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id qn1-20020a170907210100b008d46bf1a665si333209ejb.891.2023.03.02.14.04.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 14:04:52 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=ll+zMfat; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7CE02385E839 for ; Thu, 2 Mar 2023 22:04:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7CE02385E839 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677794678; bh=JfbCZBLb48icnhGbPFicaIOCZfainLCpcLSDImnD7v8=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=ll+zMfatfGOIrUxMPAk30bqihtV/GRw7Or+CSQnrjPp18cf/q3gVYV9ze4lDZNuCU 45owu7e9M8SbNbtl93ZaeFeiuNf0lg0PotQdRPEBwsx3tdLd9ygHchGJjTZE+GgLOf l6moItokS+zXCKuQUcC7krWVbAbCRzCvq2f1ojGo= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from emagii.se (www.emagii.com [185.133.207.17]) by sourceware.org (Postfix) with ESMTPS id 0BF893857C4F for ; Thu, 2 Mar 2023 22:04:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0BF893857C4F Received: from valinor.ownit.se (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id 4B5631201F3; Thu, 2 Mar 2023 23:04:26 +0100 (CET) Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) To: binutils@sourceware.org Cc: nickc@redhat.com, Tom Tromey Subject: [PATCH v9 02/11] Remove value_in Date: Thu, 2 Mar 2023 23:03:59 +0100 Message-Id: <20230302220408.1925678-3-binutils@emagii.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230302220408.1925678-1-binutils@emagii.com> References: <20230302220408.1925678-1-binutils@emagii.com> MIME-Version: 1.0 X-PPP-Message-ID: <167779466686.1167673.1622141584737926033@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_FAIL, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Ulf Samuelsson via Binutils From: "Frager, Neal via Binutils" Reply-To: binutils@emagii.com Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759295247665030163?= X-GMAIL-MSGID: =?utf-8?q?1759295247665030163?= From: Tom Tromey value_in is unused. From git log, it seems to have been part of the Chill language, which was removed from gdb eons ago. This patch removes the function. Tested by rebuilding. --- gdb/valarith.c | 23 ----------------------- gdb/value.h | 2 -- 2 files changed, 25 deletions(-) diff --git a/gdb/valarith.c b/gdb/valarith.c index a6a5f5102a2..070ee63808e 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -2020,26 +2020,3 @@ value_bit_index (struct type *type, const gdb_byte *valaddr, int index) rel_index = TARGET_CHAR_BIT - 1 - rel_index; return (word >> rel_index) & 1; } - -int -value_in (struct value *element, struct value *set) -{ - int member; - struct type *settype = check_typedef (set->type ()); - struct type *eltype = check_typedef (element->type ()); - - if (eltype->code () == TYPE_CODE_RANGE) - eltype = eltype->target_type (); - if (settype->code () != TYPE_CODE_SET) - error (_("Second argument of 'IN' has wrong type")); - if (eltype->code () != TYPE_CODE_INT - && eltype->code () != TYPE_CODE_CHAR - && eltype->code () != TYPE_CODE_ENUM - && eltype->code () != TYPE_CODE_BOOL) - error (_("First argument of 'IN' has wrong type")); - member = value_bit_index (settype, set->contents ().data (), - value_as_long (element)); - if (member < 0) - error (_("First argument of 'IN' not in range")); - return member; -} diff --git a/gdb/value.h b/gdb/value.h index f2a4907ab81..c3eb96bf143 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -1270,8 +1270,6 @@ extern struct value *value_bitstring_subscript (struct type *type, extern struct value *register_value_being_returned (struct type *valtype, struct regcache *retbuf); -extern int value_in (struct value *element, struct value *set); - extern int value_bit_index (struct type *type, const gdb_byte *addr, int index); From patchwork Thu Mar 2 22:04:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Frager, Neal via Binutils" X-Patchwork-Id: 63607 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp94230wrd; Thu, 2 Mar 2023 14:09:58 -0800 (PST) X-Google-Smtp-Source: AK7set9xyFMiQ1qzXbCdHvwcidzRNMuDJFE3PsXosKIm9ph4dGRqD34OC4ZTfPSWAvHD4mq3Ha3e X-Received: by 2002:a17:906:4714:b0:8b1:293a:ef21 with SMTP id y20-20020a170906471400b008b1293aef21mr11799238ejq.64.1677794998509; Thu, 02 Mar 2023 14:09:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677794998; cv=none; d=google.com; s=arc-20160816; b=lsPr5rFpQwwqnwYYCS6f6Ncn26OgN5lCuvkAtpE8gp9nkSa4Sza2nJ3mcTTEPmOJEi IQ8RyPZQ3WR+mqtCtddh+reYPbu1P7SEQ5uGVBdMGxVJ79W1dlkcvX29+TiLf4XRDst4 miYIlngNP5jgajmeXKZBffjAcsEaFGqGQaXTOfDyh3R+8sei83J9GmfM8f9eFT+/4pk6 Z7iIx3SC4MMq30ukebuyOgIU3fltGT5N+EdWS58JwqDmw5MZi5rnVehB2wbefG1hhq2C mQAzZ8lQVbIAkmrwT/pjw9KMNM99FIMGkTEA3uxL8LDqbpZtP4yYhgrO2CWghLGwfosb RQKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=my+ayf51kqakTdXKHkd76lU6VCB6cMf7/SL7vPqd0B0=; b=001bqY0ZoM/7ETN3rbhLnfvp7nLn0WvrvJQWt25ETH8lslA+WEQcKapK7PjaIeRD6u MEjisR5SwygXXsUOsmXnNyF+uIro8gG2r4eWiuOib1CpX72cMA1/gkIxk8GW91Q1+38U Qo0epddZHiBaKbNJqoQ1hSyeUq1BrXtyV/XUV5zwH7ZmiPKZq13OhVzvRuRxRS26kkk3 xpHVGvwW6nTrWdNoG4DCo1zeRUyv/cdJrR3lA6xrDzlrnELoEg4y61wqDAhZDdwjq7u+ Zzod5kPNiAzk2f99nYuldNMqTEsCDbZm+1DcCs1SS7frnjsXIfTfXz54z6+JQ231O0Wl c7vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="PLB/njpW"; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org ([2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id t12-20020a1709067c0c00b008be9e34e3b7si402953ejo.967.2023.03.02.14.09.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 14:09:58 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="PLB/njpW"; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7209F388981C for ; Thu, 2 Mar 2023 22:06:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7209F388981C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677794802; bh=my+ayf51kqakTdXKHkd76lU6VCB6cMf7/SL7vPqd0B0=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=PLB/njpWvgnI5rcJZAOqaIshP7UdkFNfkTx86VfUo+eWR2KFcJGLUjn3SIRifXyp1 bKObsp4aDckV4tC+TFg3wpC2RXO2gDmd3nnoJT/YPCBK9cNJhBg7Scu5DHvQrgH1JF qedrEsgFknbBh/CpFmcqJk5IzYXG1wDoKqOVywoI= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from emagii.se (www.emagii.com [185.133.207.17]) by sourceware.org (Postfix) with ESMTPS id 5E8E8385782B for ; Thu, 2 Mar 2023 22:04:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5E8E8385782B Received: from valinor.ownit.se (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id 04F7C12018B; Thu, 2 Mar 2023 23:04:28 +0100 (CET) Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) To: binutils@sourceware.org Cc: nickc@redhat.com, Tom de Vries Subject: [PATCH v9 03/11] [gdb/testsuite] Fix gdb.python/py-breakpoint.exp timeouts Date: Thu, 2 Mar 2023 23:04:00 +0100 Message-Id: <20230302220408.1925678-4-binutils@emagii.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230302220408.1925678-1-binutils@emagii.com> References: <20230302220408.1925678-1-binutils@emagii.com> MIME-Version: 1.0 X-PPP-Message-ID: <167779466827.1167696.13500426852122104404@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_FAIL, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Ulf Samuelsson via Binutils From: "Frager, Neal via Binutils" Reply-To: binutils@emagii.com Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759295568597202430?= X-GMAIL-MSGID: =?utf-8?q?1759295568597202430?= From: Tom de Vries On powerpc64le-linux, I run into two timeouts: ... FAIL: gdb.python/py-breakpoint.exp: test_watchpoints: \ Test watchpoint write (timeout) FAIL: gdb.python/py-breakpoint.exp: test_bkpt_internal: \ Test watchpoint write (timeout) ... In this case, hw watchpoints are not supported, and using sw watchpoints is slow. Most of the time is spent in handling a try-catch, which triggers a malloc. I think this bit is more relevant for the "catch throw" part of the test-case, so fix the timeouts by setting the watchpoints after the try-catch. Tested on x86_64-linux and powerpc64le-linux. --- gdb/testsuite/gdb.python/py-breakpoint.c | 2 ++ gdb/testsuite/gdb.python/py-breakpoint.exp | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.python/py-breakpoint.c b/gdb/testsuite/gdb.python/py-breakpoint.c index 0f791da9c27..1fb341660e9 100644 --- a/gdb/testsuite/gdb.python/py-breakpoint.c +++ b/gdb/testsuite/gdb.python/py-breakpoint.c @@ -60,6 +60,8 @@ int main (int argc, char *argv[]) /* Nothing. */ } + i = -1; /* Past throw-catch. */ + for (i = 0; i < 10; i++) { result += multiply (foo); /* Break at multiply. */ diff --git a/gdb/testsuite/gdb.python/py-breakpoint.exp b/gdb/testsuite/gdb.python/py-breakpoint.exp index 9535040e3a2..ab81b7ade85 100644 --- a/gdb/testsuite/gdb.python/py-breakpoint.exp +++ b/gdb/testsuite/gdb.python/py-breakpoint.exp @@ -36,6 +36,8 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} ${options}] return -1 } +set past_throw_catch_line [gdb_get_line_number "Past throw-catch."] + proc_with_prefix test_bkpt_basic { } { global srcfile testfile hex decimal @@ -293,7 +295,7 @@ proc_with_prefix test_watchpoints { } { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } - if {![runto_main]} { + if {![runto $srcfile:$::past_throw_catch_line]} { return 0 } @@ -316,7 +318,7 @@ proc_with_prefix test_bkpt_internal { } { if {!$allow_hw_watchpoint_tests_p} { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } - if {![runto_main]} { + if {![runto $srcfile:$::past_throw_catch_line]} { return 0 } delete_breakpoints From patchwork Thu Mar 2 22:04:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Frager, Neal via Binutils" X-Patchwork-Id: 63602 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp93282wrd; Thu, 2 Mar 2023 14:07:29 -0800 (PST) X-Google-Smtp-Source: AK7set91v1yf+iiRWULapP8QgsmpBaduDKZkNfU0CQDrv+0xlrlL/jeeDL0OCPLBaPI7kyQLa4iM X-Received: by 2002:a17:907:1c28:b0:896:427b:148 with SMTP id nc40-20020a1709071c2800b00896427b0148mr16035289ejc.1.1677794849212; Thu, 02 Mar 2023 14:07:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677794849; cv=none; d=google.com; s=arc-20160816; b=qWnDvOCn0sp6B3zA5HSzqoWmwwXuJ7mSx8RTYoiDMwyRsLIWQGRfc9IwLqg1UrDidZ b4ib7MDreMuebZuKt1Q8lmq4+G1+lpx/lUn3WL8oRS09g7dWaG3kbsYgS3UbA0Js0eZx ReQljWwfkqEvR0eOcsewn4mAOFtgYd/GTQ7zjyAvwe49CKFyGMQKfRqnYfZQjvNQSror 9e/16XDJXym06CYxdEC6eWfM6ZaLpz4Cj+F8ilr+eafsA18uCFYtAAAEpCpm4+01UQui HviB2q51vOZpByrLeuCTwIahHSkIjtmU7roCFZDF90kMBcpMYm3mSbxMKfmKO8xUhqBy eshg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=q4YyzIPYBDmCuC/0VSADoH3E8OeH41eqx4ZMlbZ4Qt0=; b=aaj6COTqD3SS1E3dhfYQx03ZTouszk2c96sexYd3yFzggbplsw0M+lBvNd6oEua0Zo gcS1mjT4DxoB3gd9cvBP4ylNAPuB3urJT6OH93BGe7pctEWHNijWGUjw4QWEz23TCtf9 DiPgH48ayk1ptzmAasVYxiAQQYKibueA8RGjJ1BQ9tsRtguo3LwRhjlSW2fS13XOpBxP B6+frbFySA9KrNerxOql0ZlwqSP+kIkdACg5XGbHUYBFik2cjpYDqPWfkUuM4Vtycx5S UdPzppkNhAkutk5MxSfbxsIr0fzCRrTNI0EOB1a/TTzoDCnfByaArtkcvrR4ZyLiNUZs KMNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=XahgjpWC; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id dx13-20020a170906a84d00b008b23ed7e385si388161ejb.91.2023.03.02.14.07.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 14:07:29 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=XahgjpWC; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4908B384841D for ; Thu, 2 Mar 2023 22:05:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4908B384841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677794740; bh=q4YyzIPYBDmCuC/0VSADoH3E8OeH41eqx4ZMlbZ4Qt0=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=XahgjpWCdzM5at+JOL/hG0YWluPJwCOA8+OWpKalL6WS11Q4KD+vY0IVfwlBIF7WV hdWZqnZMrhifS6s82gjL9Lzcy8TkmfFu2Xu5NvGZRbojRqFhHN+vnx50MrQUMEAdVV HRe4rkCe0vfuYWrF9jZhhFh/+Y5lOTCO8ucHrs9s= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from emagii.se (www.emagii.com [185.133.207.17]) by sourceware.org (Postfix) with ESMTPS id B0AFD385781A for ; Thu, 2 Mar 2023 22:04:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B0AFD385781A Received: from valinor.ownit.se (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id 5C6031201D6; Thu, 2 Mar 2023 23:04:29 +0100 (CET) Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) To: binutils@sourceware.org Cc: nickc@redhat.com, Simon Marchi , Tom Tromey Subject: [PATCH v9 04/11] gdb: add HtabPrinter to gdb-gdb.py.in Date: Thu, 2 Mar 2023 23:04:01 +0100 Message-Id: <20230302220408.1925678-5-binutils@emagii.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230302220408.1925678-1-binutils@emagii.com> References: <20230302220408.1925678-1-binutils@emagii.com> MIME-Version: 1.0 X-PPP-Message-ID: <167779466962.1167706.6231515105395084328@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_FAIL, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Ulf Samuelsson via Binutils From: "Frager, Neal via Binutils" Reply-To: binutils@emagii.com Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759295411399518927?= X-GMAIL-MSGID: =?utf-8?q?1759295411399518927?= From: Simon Marchi When debugging GDB, I find it a bit tedious to inspect htab_t objects. It is possible to find the entries by poking at the fields, but it's annoying to do each time. I think a pretty printer would help. Add a basic one to gdb-gdb.py. The pretty printer advertises itself as "array-like", and the result looks like: (top-gdb) p bfcache $3 = htab_t with 3 elements = {0x6210003252a0, 0x62100032caa0, 0x62100033baa0} The htab_t itself doesn't know about the type of pointed objects. But it's easy enough to cast the addresses to the right type to use them: (top-gdb) print *((btrace_frame_cache *) 0x6210003252a0) $6 = {tp = 0x61700002ed80, frame = 0x6210003251e0, bfun = 0x62000000b390} Change-Id: Ia692e3555fe7a117b7ec087840246b1260a704c6 Reviewed-By: Tom Tromey --- gdb/gdb-gdb.py.in | 31 +++++++++++++++++++++++++ gdb/testsuite/gdb.gdb/python-helper.exp | 3 +++ 2 files changed, 34 insertions(+) diff --git a/gdb/gdb-gdb.py.in b/gdb/gdb-gdb.py.in index 95b7d84966f..56d063cd506 100644 --- a/gdb/gdb-gdb.py.in +++ b/gdb/gdb-gdb.py.in @@ -369,6 +369,35 @@ class IntrusiveListPrinter: return self._children_generator() +class HtabPrinter: + """Pretty-printer for htab_t hash tables.""" + + def __init__(self, val): + self._val = val + + def display_hint(self): + return "array" + + def to_string(self): + n = int(self._val["n_elements"]) - int(self._val["n_deleted"]) + return "htab_t with {} elements".format(n) + + def children(self): + size = int(self._val["size"]) + entries = self._val["entries"] + + child_i = 0 + for entries_i in range(size): + entry = entries[entries_i] + # 0 (NULL pointer) means there's nothing, 1 (HTAB_DELETED_ENTRY) + # means there was something, but is now deleted. + if int(entry) in (0, 1): + continue + + yield (str(child_i), entry) + child_i += 1 + + def type_lookup_function(val): """A routine that returns the correct pretty printer for VAL if appropriate. Returns None otherwise. @@ -383,6 +412,8 @@ def type_lookup_function(val): return CoreAddrPrettyPrinter(val) elif tag is not None and tag.startswith("intrusive_list<"): return IntrusiveListPrinter(val) + elif name == "htab_t": + return HtabPrinter(val) return None diff --git a/gdb/testsuite/gdb.gdb/python-helper.exp b/gdb/testsuite/gdb.gdb/python-helper.exp index f1e95fbe5ee..16b419984cf 100644 --- a/gdb/testsuite/gdb.gdb/python-helper.exp +++ b/gdb/testsuite/gdb.gdb/python-helper.exp @@ -208,6 +208,9 @@ proc test_python_helper {} { " cplus_stuff = $hex}"] gdb_test -prompt $outer_prompt_re "print *type->main_type" $answer + # Test the htab_t pretty-printer. + gdb_test -prompt $outer_prompt_re "print all_bfds" "htab_t with ${::decimal} elements = \\{${::hex}.*\\}" + return 0 } From patchwork Thu Mar 2 22:04:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Frager, Neal via Binutils" X-Patchwork-Id: 63608 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp94763wrd; Thu, 2 Mar 2023 14:11:25 -0800 (PST) X-Google-Smtp-Source: AK7set8NHJ70DpU6lNsubDEE/unFbt1CJEnyCdM3p1saFolGw8mjeUijFaI9sKHweN//fwlR5l4F X-Received: by 2002:aa7:cb99:0:b0:4ab:178d:3d9f with SMTP id r25-20020aa7cb99000000b004ab178d3d9fmr11410742edt.28.1677795085112; Thu, 02 Mar 2023 14:11:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677795085; cv=none; d=google.com; s=arc-20160816; b=BeMRx9kbkyAAYSs4xCKSV0lg7KIT4gR+nsCNJ2NwdiUkLz0suSqT6xePuBa7fDIS13 okmhDz9n8rhuwjLL7ZF+b7Nd+KhBCtotmsmeR8lE56G8b9FPOm1dRcVG1uqGtXO9UqC8 bzavn/pz54TrpVsn+WmraeoArj4WHh3QLRNfwDbjku+X/EuuhsQytpWtWBpBNF7mlGI8 OdC+6XdjHUrpT+exVYZ2YIAnz15RfJXuuDfelqaC1yXfN9iwkklUu3bCT1h5G48ldURR PxmeeLmJcINsh54g4uJ1XA9d+UNtGfaJjk2FjGpErKi8cQvH+SzsMp3urYQAG8RzpU/k 5O2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=HRvleSQbWCTVYYdpR61IJ7w71GzqyodUUqtPQca/i0I=; b=iv2IVYDN8S8aU0We8MgOWBrt3RMRs7UdQCOWWDxp3uPse0blBEPA/mmSm8M4Zn7Jy/ 7tB4ZiIQPTqOPN332lTNdWda16ma2OxWdvY4JyQv7B+fBTWUS+5thqQamCH0ZJw0FTco nm17oUNi2XVaRm/siSMpsQIH3Ed5XdP1XKHR8YgfPeFFlHAfxrF5tl6xJi2rG5p27ORz bh+XA5xSDj9UH3+v6tuyYgSWgfK0O9Bz7egprjDbBmhUrdcaJxWurpTIeqnRVvfqpDzo HEm3RTvoiLNU0fSXaTlD7XHnsvfZNdErMaV2Ft5no3SaOTdXFPEXYDZXzESW4c8CCBMO Goiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=UjwuoOj4; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id a7-20020aa7d747000000b004c1288f6212si764988eds.313.2023.03.02.14.11.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 14:11:25 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=UjwuoOj4; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2FCEA384641C for ; Thu, 2 Mar 2023 22:07:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2FCEA384641C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677794862; bh=HRvleSQbWCTVYYdpR61IJ7w71GzqyodUUqtPQca/i0I=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=UjwuoOj4CC9ifW2Xkun+Y0ZSmtStLCDJC/dpZH8mlWajo+bWCwT93HDHIVjljhkER PpMaxtylLLLJA3TV0d+obHn0jMBEvZRDqZtQ1e0RflfC0JLdbCkH15G4GN/wWSnVJw 9g4b5rwmPZURMLGY873EZf8ICmk6M3p3NgmxoNVg= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from emagii.se (www.emagii.com [185.133.207.17]) by sourceware.org (Postfix) with ESMTPS id 01A003858033; Thu, 2 Mar 2023 22:04:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 01A003858033 Received: from valinor.ownit.se (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id B4A351201F3; Thu, 2 Mar 2023 23:04:30 +0100 (CET) Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) To: binutils@sourceware.org Cc: nickc@redhat.com, GDB Administrator Subject: [PATCH v9 05/11] Automatic date update in version.in Date: Thu, 2 Mar 2023 23:04:02 +0100 Message-Id: <20230302220408.1925678-6-binutils@emagii.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230302220408.1925678-1-binutils@emagii.com> References: <20230302220408.1925678-1-binutils@emagii.com> MIME-Version: 1.0 X-PPP-Message-ID: <167779467101.1167716.5163627036401659575@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_FAIL, SPF_PASS, TXREP, URIBL_BLACK autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Ulf Samuelsson via Binutils From: "Frager, Neal via Binutils" Reply-To: binutils@emagii.com Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759295659199457670?= X-GMAIL-MSGID: =?utf-8?q?1759295659199457670?= From: GDB Administrator --- bfd/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bfd/version.h b/bfd/version.h index 493a1ef6e1a..34e031adef5 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -16,7 +16,7 @@ In releases, the date is not included in either version strings or sonames. */ -#define BFD_VERSION_DATE 20230228 +#define BFD_VERSION_DATE 20230301 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ #define REPORT_BUGS_TO @report_bugs_to@ From patchwork Thu Mar 2 22:04:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Frager, Neal via Binutils" X-Patchwork-Id: 63609 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp95012wrd; Thu, 2 Mar 2023 14:12:05 -0800 (PST) X-Google-Smtp-Source: AK7set94ORKpafGm5UkQpGq9kT3n+TlcFn64dzb8FIoVvg7BJUrkCDeSei0LmHG3fF4tAIMaGg9l X-Received: by 2002:a17:906:698d:b0:8fa:b2b:9de with SMTP id i13-20020a170906698d00b008fa0b2b09demr11367839ejr.25.1677795124952; Thu, 02 Mar 2023 14:12:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677795124; cv=none; d=google.com; s=arc-20160816; b=V0+T5MzXVCvrMMgQ/hmBIwmtUaWHNwAc90Hs1O3GRZdprhQvC22CsGqcobI3I7yICE 5LJ/PNRAzSHLM7/sce1erMiYgV/CuYxgKJ1Eg2MuB2qPkHVXlVGamL4Jy7LgIN/lo07O evyFZfzzsXyjoSyjdUrVldqkqw7liy2TN56aVtrsL8DhBAJ30aJEoQDaHvuTYuRhukz/ xeQ2JyePkjt+NxNTS7vgYbU4qqy0gVxfmNNzOBqoxVHTVHMLbvsyRFY1zHvQBPUTnIaS 30zs3shcgy5vxztPKgEsw68oR+q2NvDdyRTAdRrjUEAgpiqBThY4cniE5iluRO21GHYq OTaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=dn3oZhe4UF9hWwq+Pm2Q0pDBcuptVcxDTNxcD3+y1kk=; b=AfF1eHoWnjF3TedFUtl5kJ/CKQypUm2fFgRjm0mLRfHKNphohxr1rIYTAfJHmTw4ov yTfQZ+jX/uRmYVvRSFcxZPItuNycQ6MOsO4WgIl4xUFz/nYIXZP4zsVjb8WmhZ5jWwKf PtKbXnRp3SP61SJOwQ1D2N3ArhSDVptY177jUwJugX3eGoAmz6Q8ReKGHbJMIde1Xth4 QvXJinQvpWoftnUFIo9rA2jc5oD2LSiDUnFIfcj1SlO6bmCEukjIgEXlvgT+9khsYPPv sHiN8lD2ZElZRSscobmfg0wCjQhOkyTpJzH6RBIB1dxUDW530jADC0OAwRD+kTLCqKxI R2XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=RUmaE0yc; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id v23-20020a17090606d700b008e01fdef87fsi382686ejb.831.2023.03.02.14.12.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 14:12:04 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=RUmaE0yc; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8E9C0385B53F for ; Thu, 2 Mar 2023 22:08:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8E9C0385B53F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677794921; bh=dn3oZhe4UF9hWwq+Pm2Q0pDBcuptVcxDTNxcD3+y1kk=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=RUmaE0yc0cEpae7VeO5ON53KMYFzYGUl41VIUkXicTZtIbc8ZYk4SXXA464YRpchv 1C4Qx0Y2rfrI2OSK4FlzpmFZ/00HknUEsYNjiZVa6RwzYJ5Zok0uYfSAfzLs+P2TFd HnLmrtEFlHSNwn7CholWCOIFVPK5k0seQyHYWoPo= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from emagii.se (www.emagii.com [185.133.207.17]) by sourceware.org (Postfix) with ESMTPS id 49EC5385841C for ; Thu, 2 Mar 2023 22:04:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 49EC5385841C Received: from valinor.ownit.se (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id 08CFB12018B; Thu, 2 Mar 2023 23:04:32 +0100 (CET) Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) To: binutils@sourceware.org Cc: nickc@redhat.com, Alan Modra Subject: [PATCH v9 06/11] Memory leak in gas do_repeat Date: Thu, 2 Mar 2023 23:04:03 +0100 Message-Id: <20230302220408.1925678-7-binutils@emagii.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230302220408.1925678-1-binutils@emagii.com> References: <20230302220408.1925678-1-binutils@emagii.com> MIME-Version: 1.0 X-PPP-Message-ID: <167779467233.1167725.13301106735261954383@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_FAIL, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Ulf Samuelsson via Binutils From: "Frager, Neal via Binutils" Reply-To: binutils@emagii.com Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759295701010785713?= X-GMAIL-MSGID: =?utf-8?q?1759295701010785713?= From: Alan Modra * read.c (do_repeat): Free sb on error path. --- gas/read.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gas/read.c b/gas/read.c index f1099cba1a3..d43584be28c 100644 --- a/gas/read.c +++ b/gas/read.c @@ -3029,6 +3029,7 @@ do_repeat (size_t count, const char *start, const char *end, if (!buffer_and_nest (start, end, &one, get_non_macro_line_sb)) { as_bad (_("%s without %s"), start, end); + sb_kill (&one); return; } From patchwork Thu Mar 2 22:04:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Frager, Neal via Binutils" X-Patchwork-Id: 63599 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp92488wrd; Thu, 2 Mar 2023 14:05:32 -0800 (PST) X-Google-Smtp-Source: AK7set/hb7LpGPPFXG4MMMd73WCRV5HCWffdEJN1IesM8mzbziVZaN6VCWr+Kc3h8VpZ09NyRZ9L X-Received: by 2002:aa7:d68f:0:b0:4c0:57b:47a9 with SMTP id d15-20020aa7d68f000000b004c0057b47a9mr4081723edr.35.1677794732056; Thu, 02 Mar 2023 14:05:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677794732; cv=none; d=google.com; s=arc-20160816; b=xcs+qOKk37uH5DQZ2DKyeFzpHjcoQbCAyw7CspypiKVhR6TCHEL/9lVrH41JNtQ+mR eAtniPwHyB0LXfzRDN0/FgeyZLIbF24BHxf/gDSaSu98lPhZ3Gsxi8rrNAcm8L7fqlDi 5nFJWludJQiWLBKtbeiGZH9FjwFc7UJY9rrAcBxyW30RKxARXqyRqMk5+vbsIiiYqKNk r3+C9DUFWdNKvLqxitGqi9MwjZHSAeI0pfB+KW5o32QX3DnXbR1KLLWs5UVoHW1mq+bf y5kHQYw3ppE5ZhSy3VfURZZWBj7dfYhlsJd+qmnASw/vIcj6aFDAu5BJ3bdmk0JKCS/N lNMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=0UEJPx+cOwjCVTq089fsqcbt3E5yCr9OkJ9cOsTFjKw=; b=UAvjuZyZDmdDcBEvDKi1UmlEa1iqFUc4/+A6/qOlMrGFz8dVkytXEHMI4dqdCuRv8Q ecSHNIJJAH0PrLmZAZtI03YnXoWeI1X4KfKUlOBS+mVdkdthhxkGFDUjrXGpxqVOI2QK un2FbYI1RW+ETZzDs55VaIOOgHoqv5KQlsatrGk88dFfTI4famqy4bJSjbkEgAnCEYep RBrVAMQllAK83GLm7l4I6a6QBqMuKDi65gB2tPd9dkrfpIxFG/18+tU2zuZjmIB/Dfn2 3gTWZD9ru8cLyxME/L653ro45hc0MouVyrqx4Ne34Q3fYRLy1On+Wpu7kkhojxT5u+jf G+Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=fgUrL5Yl; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id ba7-20020a0564021ac700b004a0a7d851f5si711587edb.634.2023.03.02.14.05.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 14:05:32 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=fgUrL5Yl; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 979D23850224 for ; Thu, 2 Mar 2023 22:04:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 979D23850224 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677794696; bh=0UEJPx+cOwjCVTq089fsqcbt3E5yCr9OkJ9cOsTFjKw=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=fgUrL5YlJq/s6YYcrR0jyDsXq+TKefdeccI2ejqs38d5QaDpcBBEfQqqF49asMwfV O+KzgtAfxUa9SG0PpqXHuZpXv/HbCZYlFFza6Is7v2KH/POWVABi7QI5rRTrJ7HY9P qpcvo9FxTjVw0Y4T00aGCgPciwTvGED1BJm7u5Po= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from emagii.se (www.emagii.com [185.133.207.17]) by sourceware.org (Postfix) with ESMTPS id 75966385B53E for ; Thu, 2 Mar 2023 22:04:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 75966385B53E Received: from valinor.ownit.se (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id 417521201F3; Thu, 2 Mar 2023 23:04:33 +0100 (CET) Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) To: binutils@sourceware.org Cc: nickc@redhat.com, Alan Modra Subject: [PATCH v9 07/11] gas s_fill caused internal error in frag_new Date: Thu, 2 Mar 2023 23:04:04 +0100 Message-Id: <20230302220408.1925678-8-binutils@emagii.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230302220408.1925678-1-binutils@emagii.com> References: <20230302220408.1925678-1-binutils@emagii.com> MIME-Version: 1.0 X-PPP-Message-ID: <167779467351.1167733.7043154958185137929@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_FAIL, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Ulf Samuelsson via Binutils From: "Frager, Neal via Binutils" Reply-To: binutils@emagii.com Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759295289194459170?= X-GMAIL-MSGID: =?utf-8?q?1759295289194459170?= From: Alan Modra Fix an internal error after "non-constant fill count for absolute section". * read.c (s_fill): Don't create frags after errors. --- gas/read.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/gas/read.c b/gas/read.c index d43584be28c..5d83d35e0aa 100644 --- a/gas/read.c +++ b/gas/read.c @@ -2201,22 +2201,32 @@ s_fill (int ignore ATTRIBUTE_UNUSED) as_warn (_("repeat < 0; .fill ignored")); size = 0; } - - if (size && !need_pass_2) + else if (size && !need_pass_2) { - if (now_seg == absolute_section) + if (now_seg == absolute_section && rep_exp.X_op != O_constant) { - if (rep_exp.X_op != O_constant) - as_bad (_("non-constant fill count for absolute section")); - else if (fill && rep_exp.X_add_number != 0) - as_bad (_("attempt to fill absolute section with non-zero value")); - abs_section_offset += rep_exp.X_add_number * size; + as_bad (_("non-constant fill count for absolute section")); + size = 0; + } + else if (now_seg == absolute_section && fill && rep_exp.X_add_number != 0) + { + as_bad (_("attempt to fill absolute section with non-zero value")); + size = 0; } else if (fill && (rep_exp.X_op != O_constant || rep_exp.X_add_number != 0) && in_bss ()) - as_bad (_("attempt to fill section `%s' with non-zero value"), - segment_name (now_seg)); + { + as_bad (_("attempt to fill section `%s' with non-zero value"), + segment_name (now_seg)); + size = 0; + } + } + + if (size && !need_pass_2) + { + if (now_seg == absolute_section) + abs_section_offset += rep_exp.X_add_number * size; if (rep_exp.X_op == O_constant) { From patchwork Thu Mar 2 22:04:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Frager, Neal via Binutils" X-Patchwork-Id: 63610 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp95239wrd; Thu, 2 Mar 2023 14:12:41 -0800 (PST) X-Google-Smtp-Source: AK7set/1JRk1hyIwKB0vzgcPtbXXvPK9QHz7H7Aoks499TVT8/kmz59PZjtKvaOi7C6fJWu5uYT/ X-Received: by 2002:a17:907:3f97:b0:906:430e:8309 with SMTP id hr23-20020a1709073f9700b00906430e8309mr9088404ejc.64.1677795161332; Thu, 02 Mar 2023 14:12:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677795161; cv=none; d=google.com; s=arc-20160816; b=zcLqmG0LH/qaiSY0euwPeQu6IBfDvu843ltKeaxXJ2gsZIIRgSS3CvYwZWiO8wdg2x TzfhR+dSSCMKG87Snt4x24A0bY1uG0maxoPqdIZxG4z1lp7Ykx2qpa6wxJ2i+beOWsuH IvXG8gGKvVV0rLUgz97J2KGg086zBihAC6e4ccHHr6wM0S+UMUZgtMCX3erBQ5hGhfV5 vxie6isREXF82BzeRS//cHAxy3scMx0tpV9cB0S7vVhPxwS1RDNxr6+OHaQDKu6VXeWH IMVHtQ6x0vmwO57qSzIxuLfEt+kl+Zk1ueaIlt7snLBGjsEXtM1EkG5O4s4250vRH7eg NziA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=yuMJ4essTmtqwhiIjpjp6A9Woo4WOD5OLWffHk9Z7Zo=; b=SZPAXEqHauK70GP1I80X/h4S7Fn7iL5QlAFYf3SSeRNm2bTsjuEYkCVDSFi4ZcqEiv 4fNZLz6zeireyH62WmZcZuX/dRbdpX1yLW7fRT9pM4Vv71zoywsdeRvMJsJCiIVgxzbG I7J34O27IBGCbbqkv1RsuPVA/n7m2d6ZgKUOAtORNGInGq0m28b0Q93x5y/jMhQts9Rm LT2S5XWJZKhlPZEJPt0VdxqqMUODWUKYBWdWzoZJK9DxZr/CFqvq7u6m75tcxqXUoUDN k0BjJig6+yhXGrBl+BBgD6DNshk+87nys4Hf3lIJ4Twp7FUL+xONdRRTM/dnoFwAjluI OJzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=VoM+0Wa5; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id mj8-20020a170906af8800b008b223acdc5esi437727ejb.226.2023.03.02.14.12.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 14:12:41 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=VoM+0Wa5; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B854B384D19A for ; Thu, 2 Mar 2023 22:09:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B854B384D19A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677794980; bh=yuMJ4essTmtqwhiIjpjp6A9Woo4WOD5OLWffHk9Z7Zo=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=VoM+0Wa5PsncL5viqqAcGQ00ZPidVKXm4asTj+1L9hoXQbWKqirPNxlsb6E7Ci+Ud y6F5SpyqooJ5MvzlfJf2Zd3tCgNeBYysJhVSza+RS1n8vXqdZgy0v0/iiBPlgtrvaZ NNgnApeSDOwdh9FLJJyw/3b1jShch8/L9/qmIuYY= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from emagii.se (www.emagii.com [185.133.207.17]) by sourceware.org (Postfix) with ESMTPS id 982553858296 for ; Thu, 2 Mar 2023 22:04:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 982553858296 Received: from valinor.ownit.se (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id 5ED361201FF; Thu, 2 Mar 2023 23:04:34 +0100 (CET) Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) To: binutils@sourceware.org Cc: nickc@redhat.com, Alan Modra Subject: [PATCH v9 08/11] Catch overflow in gas s_space Date: Thu, 2 Mar 2023 23:04:05 +0100 Message-Id: <20230302220408.1925678-9-binutils@emagii.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230302220408.1925678-1-binutils@emagii.com> References: <20230302220408.1925678-1-binutils@emagii.com> MIME-Version: 1.0 X-PPP-Message-ID: <167779467465.1167741.17759279959567811794@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_FAIL, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Ulf Samuelsson via Binutils From: "Frager, Neal via Binutils" Reply-To: binutils@emagii.com Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759295739067291326?= X-GMAIL-MSGID: =?utf-8?q?1759295739067291326?= From: Alan Modra Also fix an error introduced in 1998 in reporting a zero count for negative counts. * read.c (s_space): Use unsigned multiply, and catch overflow. Correct order of tests for invalid repeat counts. Ensure ignored directives don't affect mri_pending_align. --- gas/read.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/gas/read.c b/gas/read.c index 5d83d35e0aa..cff44623541 100644 --- a/gas/read.c +++ b/gas/read.c @@ -3328,27 +3328,37 @@ s_space (int mult) if (exp.X_op == O_constant) { - offsetT repeat; + addressT repeat = exp.X_add_number; + addressT total; - repeat = exp.X_add_number; - if (mult) - repeat *= mult; - bytes = repeat; - if (repeat <= 0) + bytes = 0; + if ((offsetT) repeat < 0) + { + as_warn (_(".space repeat count is negative, ignored")); + goto getout; + } + if (repeat == 0) { if (!flag_mri) as_warn (_(".space repeat count is zero, ignored")); - else if (repeat < 0) - as_warn (_(".space repeat count is negative, ignored")); goto getout; } + if ((unsigned int) mult <= 1) + total = repeat; + else if (gas_mul_overflow (repeat, mult, &total) + || (offsetT) total < 0) + { + as_warn (_(".space repeat count overflow, ignored")); + goto getout; + } + bytes = total; /* If we are in the absolute section, just bump the offset. */ if (now_seg == absolute_section) { if (val.X_op != O_constant || val.X_add_number != 0) as_warn (_("ignoring fill value in absolute section")); - abs_section_offset += repeat; + abs_section_offset += total; goto getout; } @@ -3358,13 +3368,13 @@ s_space (int mult) if (mri_common_symbol != NULL) { S_SET_VALUE (mri_common_symbol, - S_GET_VALUE (mri_common_symbol) + repeat); + S_GET_VALUE (mri_common_symbol) + total); goto getout; } if (!need_pass_2) p = frag_var (rs_fill, 1, 1, (relax_substateT) 0, (symbolS *) 0, - (offsetT) repeat, (char *) 0); + (offsetT) total, (char *) 0); } else { From patchwork Thu Mar 2 22:04:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Frager, Neal via Binutils" X-Patchwork-Id: 63606 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp94209wrd; Thu, 2 Mar 2023 14:09:55 -0800 (PST) X-Google-Smtp-Source: AK7set+xMEUvuthlUpfW9Re7gZ89hStWf4rhjpidpCvV+mS1P8ooW52vPUNqvev2kSD6dBLgChWu X-Received: by 2002:a17:906:48c1:b0:8e9:9e13:9290 with SMTP id d1-20020a17090648c100b008e99e139290mr11963120ejt.27.1677794995218; Thu, 02 Mar 2023 14:09:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677794995; cv=none; d=google.com; s=arc-20160816; b=QjtrbnbcaCCL8Qmi1joLXXYByGkwdGe9AbziO0sv0/CExBd6U/4+yaYtElemDwmWdH TQKtS3SH42tEG/JUWYkj/pJNe4wfmGXe8MtGog4ZFk6juHQCLoHtluNakqJ9HLY6LB2r YjKgFQjgoq14HNUoB3QjO9g2gStkm0iVCGh+hMnBnbv+H0aeSYh19NInK1+orq4nb8oN HN6eptyyWQp8BsYmLnQpDnc+t+muezqnmyNDfkeS2rR/MKKcDOOkeRJ3cncGUxQXlhbt in72UP0EG1k4hrf6lQYA5PBGSMoYkpv8+IKmiVs/5/dFhhz3jdqaSojbqA5NPzfONomm Y0xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=4yv/w3ae8TRkMXLr9SzKdfulfyHMJptbM5Dofi8aXSM=; b=NyUXdydhsiwFmTnbfU9UGBwUiZnkarofT5S6FUVMiqo+WrmmAwJQsdfkCWzEORjVKq rTSUYbow0IzzOtXJShoLD+i3ZGMoqSLPGNjjDH/YpcGxeLk67APuq6pEzm4e6TPcbf7u eE047KHiEN022pDQ0K8woTy6qhEAxRuh8E5SNAP3YBPa5b4RB+3rY4ZEqC2Amw6Gg8wm jFJUcykSthqlJo9FQicQWlg9ILAlPNtRAnMh7Un2/cFqTFuw2c8HiFxDeVBG7nRw4+3v VgUOSgO8bdHs0lzVG6seZAtInJLEOgDtxJQpqSoVaVoGBPsDjQrZhGA4Dqv0mrUMbKBy aVtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=TU0JJzVI; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org ([2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id sb24-20020a170906edd800b008cf79b051cesi357900ejb.895.2023.03.02.14.09.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 14:09:55 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=TU0JJzVI; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B387382CD55 for ; Thu, 2 Mar 2023 22:06:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B387382CD55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677794800; bh=4yv/w3ae8TRkMXLr9SzKdfulfyHMJptbM5Dofi8aXSM=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=TU0JJzVIOdNk2ghu9NwHed8EN5WBgscP5QX6sFKKQ7zP9WhxIAQnCHXgIZ6rCeX77 oXY4Duh/sw0w0/7DymYeVhh4pG+KhFl2+BRIntWalc2EJZo8fBd+dhxvgVNT30OAcc 7FDBbm4M5c1oYGrpuHTlKvjbNeczY+VH/Lkk9ri8= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from emagii.se (www.emagii.com [185.133.207.17]) by sourceware.org (Postfix) with ESMTPS id B7EB0385700E for ; Thu, 2 Mar 2023 22:04:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B7EB0385700E Received: from valinor.ownit.se (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id 7C16712018B; Thu, 2 Mar 2023 23:04:35 +0100 (CET) Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) To: binutils@sourceware.org Cc: nickc@redhat.com, Tom de Vries , "Markus T . Metzger" Subject: [PATCH v9 09/11] [gdb/testsuite] Add another xfail case in gdb.python/py-record-btrace.exp Date: Thu, 2 Mar 2023 23:04:06 +0100 Message-Id: <20230302220408.1925678-10-binutils@emagii.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230302220408.1925678-1-binutils@emagii.com> References: <20230302220408.1925678-1-binutils@emagii.com> MIME-Version: 1.0 X-PPP-Message-ID: <167779467577.1167749.135041310937362418@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_FAIL, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Ulf Samuelsson via Binutils From: "Frager, Neal via Binutils" Reply-To: binutils@emagii.com Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759295564983541359?= X-GMAIL-MSGID: =?utf-8?q?1759295564983541359?= From: Tom de Vries I ran into: ... (gdb) PASS: gdb.python/py-record-btrace.exp: function call: \ python print(c.prev) python print(c == c.next.prev)^M Traceback (most recent call last):^M File "", line 1, in ^M AttributeError: 'NoneType' object has no attribute 'prev'^M Error while executing Python code.^M (gdb) FAIL: gdb.python/py-record-btrace.exp: function call: \ python print(c == c.next.prev) ... due to having only 4 insn instead of 100: ... python print(len(insn))^M 4^M ... This could be caused by the same hw bug as we already have an xfail for, so expand the xfail matching. Tested on x86_64-linux. PR testsuite/30185 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30185 Approved-By: Markus T. Metzger --- gdb/testsuite/gdb.python/py-record-btrace.exp | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.python/py-record-btrace.exp b/gdb/testsuite/gdb.python/py-record-btrace.exp index 703db0ce8e1..bd397d3c974 100644 --- a/gdb/testsuite/gdb.python/py-record-btrace.exp +++ b/gdb/testsuite/gdb.python/py-record-btrace.exp @@ -101,6 +101,25 @@ with_test_prefix "prepare record" { return } + # Also handle the case that we're running into the hw bug without + # triggering a decode error. + gdb_test_multiple "python print(len(insn))" "" { + -re -wrap "100" { + pass $gdb_test_name + } + -re -wrap "" { + if { $have_xfail } { + xfail $gdb_test_name + set got_xfail 1 + } else { + fail $gdb_test_name + } + } + } + if { $got_xfail } { + return + } + gdb_test_no_output "python call = r.function_call_history" gdb_test_no_output "python i = insn\[0\]" gdb_test_no_output "python c = call\[0\]" @@ -138,7 +157,6 @@ with_test_prefix "function call" { } with_test_prefix "list" { - gdb_test "python print(len(insn))" "100" gdb_test "python print(len(insn\[23:65\]))" "42" gdb_test "python print(insn\[17:\]\[2\].number)" "20" gdb_test "python print(i in insn)" "True" From patchwork Thu Mar 2 22:04:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Frager, Neal via Binutils" X-Patchwork-Id: 63605 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp93723wrd; Thu, 2 Mar 2023 14:08:36 -0800 (PST) X-Google-Smtp-Source: AK7set9zOJb5NuS2g73Sqy0t+hOTQkuhcvJMHDyb8Ioj/syO6yqYOCI2iseYIEvfRvDCRzbjy1hs X-Received: by 2002:a17:907:2d1f:b0:88f:8a5:b4cd with SMTP id gs31-20020a1709072d1f00b0088f08a5b4cdmr14678623ejc.1.1677794915982; Thu, 02 Mar 2023 14:08:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677794915; cv=none; d=google.com; s=arc-20160816; b=pa487EvYTziWnuA8fm1YRCHr7uHD35gjztR3UP1UZdAAJO4hkqrJm+NfFXrlfcDNTt m3QRg4G/BXjFk6b3dzhhHZvkrp6sNE1qsO0Mc1NaLbe5iHEwrs/C8wvhDYJRdfHAqeR9 Nvx94ITufVj0jTAU3H/14whbXGNhYaVnowQTHj8E3w8sMfmJYhaeaExfztqSH/jiA6ns EdmzuK8Fns/uJ2+aPQ3BennMawzbUxH2nzqzaeiQs8fhjgUsNNOIksWsANV1vsDzNbiI YW1bdTyiRgove5WcPQKsdT2ZCY2umcPLT/CtsU6mBJFMi54zaUkZTBABo49SrID9sxo7 hpHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=ntY1HitF77eIvTp3L5Eekmc/x9yDF1ibDFbyWbKUEmw=; b=QJimmuIIUrIQCD9rh6qA8AEiMSlwr/lAkKPwPEDRbEBG9M5sW6KXuAf25eIs5awwBo QZhJYa80zeFBdGMJOpb7pnBpCI7ts7WRT4VbOAlsZXA6ddvsHwwR7t783fggIeXWY9vS vhzAtEOUS6FZVty9MXv54I7CH/L+7wNV0Es3dPZ+yOnSYSgJS8R0wGAmu1R1mw348Ug8 NcTvMOPtnqwBMQ3P0L1pcJJLmxMz+Kae0Vi2YvCwKnHRPOm08HbIEWjyp9e0x0Q2uzPh LSYXaYYLfy/8yU6S3L5TNELO7+pjAylTQUfHZyemrLEF5GmNw5iBl06avTCwMsyn9Dw5 XEpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=CjYVosel; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id e25-20020a170906375900b008dffd95e783si379551ejc.568.2023.03.02.14.08.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 14:08:35 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=CjYVosel; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2CCF43836E8C for ; Thu, 2 Mar 2023 22:06:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2CCF43836E8C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677794765; bh=ntY1HitF77eIvTp3L5Eekmc/x9yDF1ibDFbyWbKUEmw=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=CjYVoselsCysKT17v99NNW2fz7DE/amZIXsy6AzF14X/nZyGkzpJD0K+RbMrGeUpa mDbluDy0CTNptzDce1c85zv9yiY2hF9DrpVa/8takASzesQXWnxBJDpDukGfsPZcEA 3ge0mQJmUFCAjWjk11C5X+MjEevH8PaijK8LkgI0= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from emagii.se (www.emagii.com [185.133.207.17]) by sourceware.org (Postfix) with ESMTPS id E8DAF3858C62 for ; Thu, 2 Mar 2023 22:04:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E8DAF3858C62 Received: from valinor.ownit.se (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id 8DAA41201F3; Thu, 2 Mar 2023 23:04:36 +0100 (CET) Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) To: binutils@sourceware.org Cc: nickc@redhat.com, Tom Tromey , Bruno Larsen Subject: [PATCH v9 10/11] Fix btrace regression Date: Thu, 2 Mar 2023 23:04:07 +0100 Message-Id: <20230302220408.1925678-11-binutils@emagii.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230302220408.1925678-1-binutils@emagii.com> References: <20230302220408.1925678-1-binutils@emagii.com> MIME-Version: 1.0 X-PPP-Message-ID: <167779467686.1167769.17566891087244466437@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_FAIL, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Ulf Samuelsson via Binutils From: "Frager, Neal via Binutils" Reply-To: binutils@emagii.com Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759295481940382381?= X-GMAIL-MSGID: =?utf-8?q?1759295481940382381?= From: Tom Tromey Tom de Vries pointed out that my earlier patch: commit 873a185be258ad2552b9579005852815b4da5baf Date: Fri Dec 16 07:56:57 2022 -0700 Don't use struct buffer in handle_qxfer_btrace regressed gdb.btrace/reconnect.exp. I didn't notice this because I did not have libipt installed. This patch fixes the bug. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30169 Tested-By: Bruno Larsen --- gdbserver/linux-low.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc index dec1944d45f..0ca3bb1cd6a 100644 --- a/gdbserver/linux-low.cc +++ b/gdbserver/linux-low.cc @@ -6781,7 +6781,7 @@ linux_low_encode_raw (std::string *buffer, const gdb_byte *data, elem[0] = tohex ((*data >> 4) & 0xf); elem[1] = tohex (*data++ & 0xf); - buffer->append (elem); + buffer->append (elem, 2); } *buffer += "\n"; From patchwork Thu Mar 2 22:04:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Frager, Neal via Binutils" X-Patchwork-Id: 63601 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp93158wrd; Thu, 2 Mar 2023 14:07:10 -0800 (PST) X-Google-Smtp-Source: AK7set9flll2YDc9QiJZ1z9++S8lIVMzxEgL9T6GbjGqWOmoRcKLKQ95ZQt/PsOmGjfNUEwp7hml X-Received: by 2002:aa7:cd88:0:b0:4ac:b2dc:8d55 with SMTP id x8-20020aa7cd88000000b004acb2dc8d55mr11879307edv.14.1677794830300; Thu, 02 Mar 2023 14:07:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677794830; cv=none; d=google.com; s=arc-20160816; b=qCFayCHzPdK82pH5WCnBw1A7Oe/7kt82GEDbgZIgH0wE3T0Muz7k7RxB/z06EqWadx mSl8jiOG0RrMNH1x26FfabQyPXdKpGAnC7MeZkuDJKy6vdM63n/h3obcGVtFwBDgJDeM +u/7ScFQT2nejbQlc7pAXI8R16KQffFS64mbPZjpj955kp3RDCIZBhhhH6k6y0TSiBrc 7AEGmYE0zog4v1+5W04gsPoy/yOL/k0SNqTzAzgo5ga1pibEqMH0oygtW58Lqgg/rVij qOoJ8xLe+HhTBSdYX8sGwm2zbX37p8Cp5/kZ4sGvj1IUViZiGeI5jvqbhMppmeSdJ1Bt w2gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=a24INRfwwlkagp2YKL0/p4ATjfD771i41eA8OfePBHc=; b=h4O4I/Ey5cQFrQW4oeXxo1+4R+8ZXLY6LduZMHTnyglofR0iaKYQG00axVobX488xz 41joglEfoup7nctWYf5uFXP87l6mczBSOQtSmvcAizjjyN1nqwsDk0+2ORORpCSTQsEz MsGavHfJOYWUJzrl0GtrgT+q6TEoOlb3K893Ju+1rd+Z9MeANNtybfAsqOIz6z5XKmwq zlCD4+z8ogKZ6+yx5ooBaMlF8u3MuRaaFUgxy5tccjtdYvOAuP8wm/4L1jv3M6C5q3DZ tYWkxcPKRIY/livHG9aUec0euWBhdFuS8Qhl1a7qaAshhYSQ01b/5LPPB5Ul7YgnMdXR k+3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=S1TvD8Sx; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org ([2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id p15-20020aa7d30f000000b004bd5e278481si6529edq.628.2023.03.02.14.07.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 14:07:10 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=S1TvD8Sx; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B7FFD384841F for ; Thu, 2 Mar 2023 22:05:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B7FFD384841F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677794732; bh=a24INRfwwlkagp2YKL0/p4ATjfD771i41eA8OfePBHc=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=S1TvD8SxJuF+rrMujiUadLd+lTJ1Xsh58pXdV9m2wPHDHqlvtYc8pUt3GK3lKI4lO Y1odxBzXtv551CUB+vzw/+JXhxqzU5OMEfKuPQ7uspJUlnCv/SUzbJmFWIZENLIzqP mzXoRYTPFcVpOeT3rEBko0tj8vFBXUsp1TRa+RLc= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from emagii.se (www.emagii.com [185.133.207.17]) by sourceware.org (Postfix) with ESMTPS id ECCB2385C301 for ; Thu, 2 Mar 2023 22:04:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ECCB2385C301 Received: from valinor.ownit.se (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id B295B1201FF; Thu, 2 Mar 2023 23:04:37 +0100 (CET) Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) To: binutils@sourceware.org Cc: nickc@redhat.com Subject: [PATCH v9 11/11] Fix typo with my email address Date: Thu, 2 Mar 2023 23:04:08 +0100 Message-Id: <20230302220408.1925678-12-binutils@emagii.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230302220408.1925678-1-binutils@emagii.com> References: <20230302220408.1925678-1-binutils@emagii.com> MIME-Version: 1.0 X-PPP-Message-ID: <167779467800.1167779.4527881969588864756@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_FAIL, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Ulf Samuelsson via Binutils From: "Frager, Neal via Binutils" Reply-To: binutils@emagii.com Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759295391834025490?= X-GMAIL-MSGID: =?utf-8?q?1759295391834025490?= From: Nick Clifton --- ld/ld.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ld/ld.texi b/ld/ld.texi index 7802f0661b0..3367075cae8 100644 --- a/ld/ld.texi +++ b/ld/ld.texi @@ -85,7 +85,7 @@ section entitled ``GNU Free Documentation License''. @tex {\parskip=0pt \hfill Red Hat Inc\par -\hfill nickc\@credhat.com, doc\@redhat.com\par +\hfill nickc\@redhat.com, doc\@redhat.com\par \hfill {\it The GNU linker}\par \hfill Edited by Jeffrey Osier (jeffrey\@cygnus.com)\par }