Message ID | 20231027-field-bits-v2-0-cbec64f2136a@adacore.com |
---|---|
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F41D9385276B for <patchwork@sourceware.org>; Fri, 27 Oct 2023 17:37:05 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-il1-x12b.google.com (mail-il1-x12b.google.com [IPv6:2607:f8b0:4864:20::12b]) by sourceware.org (Postfix) with ESMTPS id 7357F3858C2B for <gdb-patches@sourceware.org>; Fri, 27 Oct 2023 17:36:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7357F3858C2B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7357F3858C2B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::12b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698428211; cv=none; b=VcBk2mXe0A1b7uaIRdBkRIz6hdjQdmkHEWWFuhQ8LOA8F9WMp7P0lzw7NuohomL+59KY7cVb9zM/vtOtLVfo1pQmTxVB7lkiSzHrHv3aHRPxRidb0dsb2Qy1dzgs89hEh4MmltCEJHsbxl4vz+BetC080qJz/v19NU23HeR8xhA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698428211; c=relaxed/simple; bh=TpouOJOW6f1uWPkqy556rEHC4A6l2ZX1oZXM5g9dVbg=; h=DKIM-Signature:From:Subject:Date:Message-Id:MIME-Version:To; b=JSY+VbS9pQhgswdi9Es58qJw2J+qdpA726aIC5tY9BR6k64x8J2BO1GUWk8L2qzQv8OCqzoBOrHdWtNSqD2Ae03LsjgZ/PWTJDmR7wrTlF8XZNKFEl1zq14i1xSqN1/1fvBM8U8F2ZWKrwuiR38YY/9kMv7YYz6b4GLJ+bEXceM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-il1-x12b.google.com with SMTP id e9e14a558f8ab-35808023645so5756865ab.2 for <gdb-patches@sourceware.org>; Fri, 27 Oct 2023 10:36:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1698428209; x=1699033009; darn=sourceware.org; h=to:content-transfer-encoding:mime-version:message-id:date:subject :from:from:to:cc:subject:date:message-id:reply-to; bh=wNdI98fGJxMR8cfuigemfpxxKeu0kaIP8eMuv3T0vmI=; b=b0vhN0yNcJ/PIHiDiz5yREdbvmy/rbFHt71I4F4bYiij28zs/uoc9jD3YRJzoSvcbS U9fMyB9SJu3N9wqIhWvlshFqSJUkrGSj3jWCe+P5VXVdV9t/yD8fMvNvf3WOQS5S7Q/9 9Jguax6I+MP0uHxGSxai8zm4l3iUraqYEhA9avr+YxNsEKb9IP06wGC2Squt0S0aBFG8 lSCDEAWt50TUKfA920xTOgN4HDUxXFOkBqCM6QgcI99j5gpBNbUArk+nJKNg1aBPyZBK jFRHJ6ptZE6VJ6Zxj77lYetYHV8LgcqfzD+f0RXRRV7+KGkPLC/tPNUKwmETLJSlszIo 4OQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698428209; x=1699033009; h=to:content-transfer-encoding:mime-version:message-id:date:subject :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wNdI98fGJxMR8cfuigemfpxxKeu0kaIP8eMuv3T0vmI=; b=Wmk3ATANc2LHoubq7MLICCHcAOhAL9eo/cYd1immKXoV8RSa/egrEDGgTd3jLjLpdT qsVAPD/1ByHVc9vkmZVkzCulOq8e5ghN0GxjxsfBwhRlCuVzZzcP7pkA2A2AnO5CnUAT LJ86RATkD/UpAZkIhpF4OLVTtDcy72gXAFe2R2XPyXue1vMLNmR4yY/tCkqiIM1y4nyU 2MwJfShYbImReXaoj2qRX+6dy9KVYw9lUfRu48LsTdY8Y6JHfVKHvqxLWbGTlBfbrVba nltM+QFtwiqe+XjjNYfSDGNSu8VIzP4ykxN9mrqGxWNCoXBL2Z9Po7StK79RQUQKmaa4 Fx1A== X-Gm-Message-State: AOJu0YxyuQBtFUBJ82OjiOz4yuJRrUlZmHlOiJMawS++08PiR2SMW4aY CRz9vrJoDdGaDu6U5gwC44n0Jl2T4aXMHfWnCu1itA== X-Google-Smtp-Source: AGHT+IFnt98e5qS322reqd5JtpoNTSc5OTa7gWrL4ypsLQplwjUYjiaq5DQDt7ZXhOy4Aa6jsaOokw== X-Received: by 2002:a05:6e02:1a48:b0:34d:e998:fb4f with SMTP id u8-20020a056e021a4800b0034de998fb4fmr4524904ilv.10.1698428209587; Fri, 27 Oct 2023 10:36:49 -0700 (PDT) Received: from localhost.localdomain (97-122-77-73.hlrn.qwest.net. [97.122.77.73]) by smtp.gmail.com with ESMTPSA id r4-20020a92ce84000000b00357ce043118sm591754ilo.79.2023.10.27.10.36.48 for <gdb-patches@sourceware.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 10:36:48 -0700 (PDT) From: Tom Tromey <tromey@adacore.com> Subject: [PATCH v2 0/9] Remove char-based bitfield macros Date: Fri, 27 Oct 2023 11:36:40 -0600 Message-Id: <20231027-field-bits-v2-0-cbec64f2136a@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIACj1O2UC/22NQQ6CMBBFr2Jm7ZjpoIa68h6GRVsGmUSoaQnRE O5uYe3yJe+/v0CWpJLhdlggyaxZ41iAjwcIvRufgtoWBiauyLLBTuXVotcpo/W2q4nFn9lDGby TdPrZY4+msHdZ0Cc3hn5LDC5Pkjax1zzF9N1PZ7Ppf/uzQUImw/WlupIlurvWhZjkFOIAzbquP zEyXOS/AAAA To: gdb-patches@sourceware.org X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org |
Series |
Remove char-based bitfield macros
|
|
Message
Tom Tromey
Oct. 27, 2023, 5:36 p.m. UTC
This series removes the char-based bitfield macros from gdbtypes.h, moving the associated data into 'struct field'. A few other minor cleanups are done along the way. Regression tested on x86-64 Fedora 36. --- Changes in v2: - Introduced accessibility enum per review - Added two new simplification patches - Link to v1: https://inbox.sourceware.org/gdb-patches/20230921-field-bits-v1-0-201285360900@adacore.com --- Tom Tromey (9): Use .def file to stringify type codes Print field accessibility inline Remove byte vectors from cplus_struct_type Add field::is_public Remove some QUIT calls from need_access_label_p Remove some type field accessor macros Remove char-based bitfield macros Use enum accessibility in types and member functions Simplify C++ type-printing gdb/ada-valprint.c | 2 +- gdb/c-typeprint.c | 145 ++++++------------------- gdb/c-varobj.c | 39 ++----- gdb/compile/compile-cplus-types.c | 7 +- gdb/cp-valprint.c | 4 +- gdb/dwarf2/read.c | 94 ++++------------ gdb/gdbtypes.c | 181 +++++++------------------------ gdb/gdbtypes.h | 162 ++++++++++++--------------- gdb/p-typeprint.c | 6 +- gdb/p-valprint.c | 4 +- gdb/stabsread.c | 127 ++++++++-------------- gdb/testsuite/gdb.base/ptype-offsets.exp | 6 - 12 files changed, 228 insertions(+), 549 deletions(-) --- base-commit: 2c1e03b4520e908aa1eb36ecda279047b17bab23 change-id: 20230921-field-bits-9b9f802eb42b Best regards,
Comments
On 10/27/23 10:36, Tom Tromey wrote: > This series removes the char-based bitfield macros from gdbtypes.h, > moving the associated data into 'struct field'. A few other minor > cleanups are done along the way. > > Regression tested on x86-64 Fedora 36. This is a really nice change which demonstrates the wins we can see with C++. I find the code eminently more readable and understandable. I know Lancelot reviewed your original patches, but I've looked over this revision, and I am at a loss to find anything requiring additional attention. Reviewed-by: Keith Seitz <keiths@redhat.com> Keith
On 2023-11-02 12:54, Keith Seitz wrote: > On 10/27/23 10:36, Tom Tromey wrote: >> This series removes the char-based bitfield macros from gdbtypes.h, >> moving the associated data into 'struct field'. A few other minor >> cleanups are done along the way. >> >> Regression tested on x86-64 Fedora 36. > > This is a really nice change which demonstrates the wins we can see > with C++. I find the code eminently more readable and understandable. Agreed, I'm especially glad that you got rid of some more TYPE_ macros. I only looked at the changes in diagonal, but I like where this is going, so: Acked-By: Simon Marchi <simon.marchi@efficios.com> Simon