From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by sourceware.org (Postfix) with ESMTP id 3A9F2386F80C for ; Sun, 10 May 2020 18:57:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3A9F2386F80C Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-71-FPR_h3VLMk28zRuGUfOH_Q-1; Sun, 10 May 2020 14:57:13 -0400 X-MC-Unique: FPR_h3VLMk28zRuGUfOH_Q-1 Received: by mail-ed1-f72.google.com with SMTP id i3so863069edf.17 for ; Sun, 10 May 2020 11:57:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=u65WFg+zGltyTdwg0d68rJ7QLWxmt01Bol3CPLuI1kc=; b=Ja7lc/ExmaSltHnBvlkXg45vsZZVmeTYi5GOcf1LAx34Uw4EfZQ6GE7uO81xK8ecPW 7dBKgTk8W9HwDSzhmpYIVmicHsXf+CXj+OlR8GG2kLL7hivTdsbJIYv2yOiQwusLwBv1 vs5DJbmap5fuJvJvVZEQAstqrcXOEsYyBnrDibPr2d8j6iHheC10IrcdPbohKZaqYUGI 1BvhX3AJWUpIZ1vbIukpZqMz93xCbRYhwMNdFgZZg1Os1Y87zLxhNUe3NNSO6O+06bup HOg19lJRsGXAbmErRKvNYPcfS2b1tw9yFwFrwXnkSSm3EibR5R4JJlUMJTX8oObkOLu0 T0ag== X-Gm-Message-State: AGi0PuZHew11VEigsG6D5qq1LDFv1njhHcOk8uSjS/EsO3R+qixH0KBs nGL+GnKQ+dOICHHGdxcdVUuQdXuC/OFtK7pGUEn11YcCTErf3pgLUby5pg2i7lv97i5GmPIlZn3 NVas5mNaM5NDomPIo3t25ag== X-Received: by 2002:a05:6402:793:: with SMTP id d19mr10371627edy.95.1589137031716; Sun, 10 May 2020 11:57:11 -0700 (PDT) X-Google-Smtp-Source: APiQypKkuvB9AyH41j2AJNBf2dzBc6hMh6vjf6LNYI8y9pVOdY/E+8aDPMlaG35NB44R/9rvcgc8dQ== X-Received: by 2002:a05:6402:793:: with SMTP id d19mr10371623edy.95.1589137031483; Sun, 10 May 2020 11:57:11 -0700 (PDT) Received: from ?IPv6:2001:8a0:f909:7b00:56ee:75ff:fe8d:232b? ([2001:8a0:f909:7b00:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id h16sm992673edz.91.2020.05.10.11.57.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 10 May 2020 11:57:10 -0700 (PDT) Subject: Re: [PATCH 0/7] Make gdbarch.sh shellcheck-clean To: Tom Tromey , Simon Marchi via Gdb-patches References: <20200428214655.3255454-1-simon.marchi@efficios.com> <878sie57an.fsf@tromey.com> Cc: Simon Marchi From: Pedro Alves Message-ID: <94e06111-2801-644f-3906-7c622d1ec611@redhat.com> Date: Sun, 10 May 2020 19:57:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <878sie57an.fsf@tromey.com> Content-Language: en-US X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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: Sun, 10 May 2020 18:57:20 -0000 On 4/29/20 10:08 PM, Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi via Gdb-patches writes: > > Simon> I ran shellcheck on gdbarch.sh and addressed all the warnings. It > Simon> didn't catch anything serious, but I think it's good to have it clean > Simon> anyway, so we can catch potential problems in future changes we do to > Simon> this file. > > These all seemed fine to me. > > I'd like to see gdbarch.sh eventually go away entirely. > Most of it could be ordinary C++ code. I don't have a concrete plan for > this though. Mostly I've been reluctant to do it due to the amount of > reindentation that will probably be involved, though I guess maybe I > could write an emacs lisp script to handle this. My main gripe with gdbarch.sh is that the function/variable/method definitions and the generator code is all in the same file. If those were split to separate files, like, the definitions inside function_list() were moved to a separate gdbarch.def file, which would be read by gdbarch.sh, that'd already be a large win, IMHO. Also, I would like it to be able to generate the gdbarch.h/c files in place, instead of generating new "new-gdbarch.h/c" files. Thanks, Pedro Alves