From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rock.gnat.com (rock.gnat.com [205.232.38.15]) by sourceware.org (Postfix) with ESMTP id B69F13857C66 for ; Wed, 31 Mar 2021 15:24:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B69F13857C66 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey@adacore.com Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 7ED3B117C00; Wed, 31 Mar 2021 11:24:48 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Ajm9qeRH5NFk; Wed, 31 Mar 2021 11:24:48 -0400 (EDT) Received: from murgatroyd (71-211-182-15.hlrn.qwest.net [71.211.182.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id 2E98B1164D4; Wed, 31 Mar 2021 11:24:48 -0400 (EDT) From: Tom Tromey To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Add some error checking to DWARF assembler References: <20210318155826.3703918-1-tromey@adacore.com> <20210318171555.GF5520@embecosm.com> <87r1kcxqx6.fsf@tromey.com> <87im5oxixi.fsf@tromey.com> X-Attribution: Tom Date: Wed, 31 Mar 2021 09:24:47 -0600 In-Reply-To: <87im5oxixi.fsf@tromey.com> (Tom Tromey's message of "Thu, 18 Mar 2021 15:15:21 -0600") Message-ID: <874kgrtkg0.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2021 15:24:49 -0000 Andrew> Maybe I'm over thinking this, but you could change this to: Tom> Here's the definitive (IMNSHO) over-thinking approach. It works by Tom> having the helper proc set the necessary variables for the caller. Tom> One problem I thought of with that approach is that if you typo the code Tom> in one case, you could pick up a local variable set from some previous Tom> case. Tom> Switching this to use an array that's cleared after every opcode avoids Tom> this problem. I'm checking this in now. Tom