From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79033 invoked by alias); 15 Jan 2020 19:12:41 -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 79022 invoked by uid 89); 15 Jan 2020 19:12:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-13.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1075 X-HELO: mail.efficios.com Received: from mail.efficios.com (HELO mail.efficios.com) (167.114.26.124) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 Jan 2020 19:12:30 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id A58F123CF1C for ; Wed, 15 Jan 2020 14:12:28 -0500 (EST) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id MUaI_DFBzmJB; Wed, 15 Jan 2020 14:12:28 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 4B03323CDD8; Wed, 15 Jan 2020 14:12:28 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 4B03323CDD8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1579115548; bh=a84ba/v9IAXfx4EcH0WRPRrEvGcdvZxH3ZuPQqMJ3+0=; h=From:To:Date:Message-Id:MIME-Version; b=I+TYYNXhxy9AyLaWNP3663iMWL+JDpWL7HpJ5Y0zyN3af7/5fUh0g3maSgmiLq3Wl oKwjozGLZh7RIylMJdejZtoTDJWhE0guAmdGIYtXaxIee/wxeHMC6QoU/xRklZa7W+ JVYtdWX32Hc21ozwbEOZ0gKYZTIRFwLmWERg2OBl2ZwPG9MjmtaFsaaz2sJ8zGRSXs 1Hq8E1oyOIsVygJsuYPVZ+FhPXYf8P/QTd6msRGBF902t3VpCp09eFwR3Tguwbtzgp cUlfWLY7ovF06mezBV2whtQrJZ87QpbdQ1iF1NJUi0XekufizofY+SNLre1l33PsoX SFbSS6r4LpPqQ== Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id rGRqQ7h63ciN; Wed, 15 Jan 2020 14:12:28 -0500 (EST) Received: from smarchi-efficios.internal.efficios.com (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) by mail.efficios.com (Postfix) with ESMTPSA id 24B6B23CDD6; Wed, 15 Jan 2020 14:12:28 -0500 (EST) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 0/4] Remove some uses of iterate_over_inferiors Date: Wed, 15 Jan 2020 19:12:00 -0000 Message-Id: <20200115191222.28208-1-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2020-01/txt/msg00425.txt.bz2 Today, it's very easy to iterate over inferiors using a range-based for loop combined with all_inferiors. I think it gives simpler and easier to understand code than iterate_over_inferiors, which uses a void pointer to pass data from the caller. I noticed that there were very few uses of iterate_over_inferiors left, so I think we could convert them to range-based for loop and get rid of it. This patch series removes the uses that are in the files I can build easily, I can take care of the rest later. Simon Marchi (4): gdb: remove use of iterate_over_inferiors in py-inferior.c gdb: remove use of iterate_over_inferiors in mi/mi-interp.c gdb: remove uses of iterate_over_inferiors in mi/mi-main.c gdb: remove uses of iterate_over_inferiors in top.c gdb/mi/mi-interp.c | 40 +++++++++------------- gdb/mi/mi-main.c | 73 +++++++++++++++------------------------- gdb/python/py-inferior.c | 24 ++++++------- gdb/top.c | 51 +++++++++++----------------- 4 files changed, 72 insertions(+), 116 deletions(-) --=20 2.25.0