From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id RaIZBA/qel83AQAAWB0awg (envelope-from ) for ; Mon, 05 Oct 2020 05:40:31 -0400 Received: by simark.ca (Postfix, from userid 112) id 047D71EE0F; Mon, 5 Oct 2020 05:40:31 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 876B61E58C for ; Mon, 5 Oct 2020 05:40:29 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0C44A3857C62; Mon, 5 Oct 2020 09:40:29 +0000 (GMT) Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id 3BD0F3857C62 for ; Mon, 5 Oct 2020 09:40:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3BD0F3857C62 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=undo.io Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mbarisione@undo.io Received: by mail-wr1-x435.google.com with SMTP id m6so8776820wrn.0 for ; Mon, 05 Oct 2020 02:40:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=undo-io.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=iK8NnBTQ6drSm7R1wJ9eG37hk+PYPzyuTH39/XeBNy0=; b=OwxPXZFkicAHk8z8Iky2d7jbkb8Cicx9iKdQZzp/WZ6NBzAafaOgcILXN4MjOSKp8D EjpqfDNyCxQvyn38AZYeu7DPGbYVaamdk6hhcVWPmJGdUnCa2yP0fGT//ai5hLxN+3Iu XpOgreFp2wKq60hnMny2TID7FEWKDLa5cdSmcMLXakk5zJXwv3pQiGyclcBRvtg9V7gt k9FOBaUSDQ1HSILkg7S5wD8eNb4JoIvZW+xVssXhlk/PMy0ACLJwwu9aEpnMBY4OYe/g 74Gq4jgHEGpSSc0GRJhAmCKvJOGA8bUedkwl9BoC38j6dKn9/guCBbhoeQ54pY82NWXX HOpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=iK8NnBTQ6drSm7R1wJ9eG37hk+PYPzyuTH39/XeBNy0=; b=qgWj8Py11q4qxvXf/E8dq5ogY8MepN/fraEyd9zn5dzlCWCRhg5DbUtMfJlliT1rpe c2lUVfykJ6zMpmt+fFnw6TLi5R201/jKYJkaD/N9QJEcXNTaW4XMJFqTMGKSufKUfQwP 2DsM/7Zi3XkA1zFzO3cTrD5gMCaMl2DmVIdmiQVGKSW7wi4A87XHMS5PM+sdU7BAUoLy Prlevc/HBz68ZGTWnw2Ytx0vvqrdE/xUO8epdK9X9PWFbm2KHH3EJSHx6wJcQltqzTN5 o6mDMMbgdeB0d4xR0mcN+yd5AX9MeFxGfX8E1XPAlaazyQS1nG8yoNUfi5BZq+hohI4P k6wQ== X-Gm-Message-State: AOAM532HvAJ5AbmPzZBsx32roPRmRgNMPdsOsQBNgdJ2Lr7eKLm28wC+ H27CVfh24tV+WGMLeH6WK77L8N+K7tpIgbFl X-Google-Smtp-Source: ABdhPJwnhk7Kuk9tF1ACoJliDyMLXfsSDGSHM+D0DtCwTTz0jY7ZP5K/Ma9xdvXWeKNXCjAMLuhg6A== X-Received: by 2002:a5d:4603:: with SMTP id t3mr16106670wrq.424.1601890824008; Mon, 05 Oct 2020 02:40:24 -0700 (PDT) Received: from [192.168.0.107] (cpc159317-cmbg20-2-0-cust117.5-4.cable.virginm.net. [81.111.29.118]) by smtp.gmail.com with ESMTPSA id w11sm4449516wrs.26.2020.10.05.02.40.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Oct 2020 02:40:23 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: Re: [PATCH 1/2] Move the code to execute a cmd_list_element out from execute_command From: Marco Barisione In-Reply-To: <20201005090804.GF605036@embecosm.com> Date: Mon, 5 Oct 2020 10:40:19 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20200914093925.5442-1-mbarisione@undo.io> <20200914093925.5442-2-mbarisione@undo.io> <20201005090804.GF605036@embecosm.com> To: Andrew Burgess X-Mailer: Apple Mail (2.3445.104.8) 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: , Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 5 Oct 2020, at 10:08, Andrew Burgess = wrote: >> gdb/ChangeLog: >>=20 >> * gdbcmd.h (execute_cmd_list_command): Add declaration. >> * top.c (execute_command): Move out the code to execute a >> command from a cmd_list_element. >> (execute_cmd_list_command): Add from code originally in >> execute_command. >> * top.h (execute_cmd_list_command): Add declaration. >=20 > Why is execute_cmd_list_command declared twice? This doesn't feel > right. On top of gdbcmd.h there=E2=80=99s this comment: /* ***DEPRECATED*** The gdblib files must not be calling/using things = in any of the possible command languages. If necessary, a hook (that may be present or not) must be used and set to the appropriate routine by = any command language that cares about it. If you are having to include = this file you are possibly doing things the old way. This file will = dissapear. fnasser@redhat.com */ This deprecation notice was added 20 years ago in commit . I couldn't really work out the details, so I just copied what is = currently done for execute_command, which is declared in two header files: $ git grep '\bexecute_command\b' -- '*.h' gdbcmd.h:extern void execute_command (const char *, int); top.h:extern void execute_command (const char *, int); --=20 Marco Barisione