From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id TJu3Fe072mqyBAwAWB0awg (envelope-from ) for ; Thu, 22 Oct 2026 12:38:05 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=MUkSYKLl; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 16AE51E007; Thu, 22 Oct 2026 12:38:05 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 6C0F11E007 for ; Thu, 22 Oct 2026 12:38:02 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0FF6F4BA2E2F for ; Thu, 22 Oct 2026 16:38:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0FF6F4BA2E2F Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=MUkSYKLl Received: from mail-oi1-x230.google.com (mail-oi1-x230.google.com [IPv6:2607:f8b0:4864:20::230]) by sourceware.org (Postfix) with ESMTPS id 084724BA2E04 for ; Thu, 22 Oct 2026 16:37:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 084724BA2E04 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine 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 084724BA2E04 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::230 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792687056; cv=none; b=Kc8pW9jKGZhumsK8GI/nFb+ms1pLfNSr5MhkY5cNaVamLKhVX4HHAKltA0s2O659GewR+hD1Zjh7GKywMLjFjE3Z3qwfP/ojRheDp1UWmNnLaH/VBCbt+v2XgTD1Uc0xnV+UEYJfkoGxGDDWgTQR2EwCUXdbJp5hDnJS4v6xyWU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792687056; c=relaxed/simple; bh=i7jRkFcJw0qn7vtb4dqnIayMU/1aMTjw4hHBZVkViCs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=BEWbb6SRfG+GbaoSzCrkd7a0UrI2O+wfVzED8kOhN4aSq29hlViFTzjNC8wZffsbcP0TLW2pVYgIZSaidBtBKswalvYPmeEP+ngV6aEi5YN4pEdFYK/jT/j7W1OyLespJ4Nplp2DqMHR4gqI7UwVeMsQzih4tEzfLGj3PVqSgBI= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=MUkSYKLl DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 084724BA2E04 Received: by mail-oi1-x230.google.com with SMTP id 5614622812f47-4f66bb2ab57so26596b6e.3 for ; Thu, 22 Oct 2026 09:37:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1792687055; x=1793291855; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=T0LqY+MXZILZycK4SxaLL7UBE5+OY70fwJESKMFnH8Y=; b=MUkSYKLlgcGENqEUGLzxuw1+vFc1w5IhTxBBDE2uc9a9i/0vtejKqAP4zFOTwXc8Fb LALVgZGkJ4yJmoNeAS0K/bEJaBKDuKcGbdYEJyfhBPNRdeockVJw9NwQ1E8MUfo1wgxx Hbe+sCf2jeCPlRl1mjqh3yzL7GROnyJe/Yv/kSV4eDfc6+riifUTBYQ3CvgjZ1TFIYVD F6kM3O1WdyWutVmIy2WmRkZUN+b95l2O/8B2rgIkcuZbWOX472LIRNPOvSViT4aK2eCe MLjWvh1AuK8dKonYUztHaDgAajIhXLj78hyZGKfkqmlnmC35tKNzJPHh/UTD8aO2y6Q8 u4jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792687055; x=1793291855; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=T0LqY+MXZILZycK4SxaLL7UBE5+OY70fwJESKMFnH8Y=; b=L07dOyJmxy+nycxP0SWs3Xb/+U3CV+BnK5asHFR9FmxZz9e8wVI/W8CJkWyUwyezsY c0cgCLtF/a2L36+tQoBP+6FX74IUIqOTXCmXUvM9ne3GWulc7+IrYIKTashmGT1H43a1 naijZ3hdkfQgyJdCwhoReyPkc05SZ4498gI5MLELaAfw69b7Ff0kyrBJSIr8/HVBXY+s Uc1Ev+UysFk0Sk31saWwaPJ5Nx1J4XlOPe5t8ltI3ZyivyaOb/OQnL0bvoAnkmV6NnH1 5A1WQaQy81DrkgUnvgFmzJ4Ko+bVA+8WeKXrYW/XuvqS+wM9JwtuAhBeI3YvT9kcHhW+ jyPA== X-Gm-Message-State: AFq9FYLd4b1lNIqCMjyy5O5WRIs1OLNFAoeFueX+IdUGX2Gs3IcKixQT HSIpAyfjH/VKb5QJxJ8j/Z9g9La2d4dg8to/Q6qtXVIhTVrpIomV4dHscg89ng7Sr5ixIwdWVoo OaG0luA== X-Gm-Gg: AYBFou3IqqzoDa1sD8676vD6id7w0qC+1C18yU6GOnwYJY/VjmpQwDC5AiMbj2hjCA9 wALQoH9J0tD84fTKvCj6d7ejHmZEGYwvHyiFhIS4As0JIoissIbLYFEnp2TMSBGuGre2DMTDCp6 fy2uBJHRopY9fSn2jH69r8mB6O8GBnoyCtX1O52TeF0lHiXZR81FiORmU5RpnmQa7nhNJXz66Ba qtzr/SLDPyFrqjcPZSuni+Usl07RH73+nYlRsE80Uf57BoUQDXY5fQbQV9d8Dtk2y1Zon/sZJ65 c8NDR0Aj0e2wrmRXzGjhyhBR8+WP8nrv/x8KfeQvFpw6FPU4FjLOYOwMV/GBXlqoEJLzC6Ur6sb S2WYct2UO8CXofuSyXUsgR5iP62S/JXDTN4f4MWlWexrlAJvIBR/jMYXta57yGnxacbrKFCXgIv JkdpFwGIkXEn4BIt4SN5+onGxgLjoPkboThx3C4YPFwLDw8sVCabg8pFAw5jo4Blnvf2vACqPJ2 O52QIzlvYDmIGkysLzpPtLI66VqLfcK239Xv9mPVmizITOegRYaMeZlw16bIJg3R2PfuAxF0EIZ V2Y= X-Received: by 2002:a05:6808:17a5:b0:4f7:ddf4:a202 with SMTP id 5614622812f47-55359cc9c1fmr4387119b6e.28.1792687055130; Thu, 22 Oct 2026 09:37:35 -0700 (PDT) Received: from bapiya (97-122-110-129.hlrn.qwest.net. [97.122.110.129]) by smtp.gmail.com with ESMTPSA id 5614622812f47-552a182d59bsm4978269b6e.0.2026.10.22.09.37.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2026 09:37:34 -0700 (PDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH] Remove type::is_ignored Date: Thu, 22 Oct 2026 10:37:32 -0600 Message-ID: <20261022163732.391272-1-tromey@adacore.com> X-Mailer: git-send-email 2.56.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org I noticed that nothing calls type::set_ignored, so this patch removes that method and the code checking type::is_ignored. Regression tested on x86-64 Fedora 43. --- gdb/ada-valprint.c | 34 ++++++++++++------------------- gdb/compile/compile-cplus-types.c | 3 +-- gdb/cp-valprint.c | 17 +++------------- gdb/gdbtypes.c | 2 -- gdb/gdbtypes.h | 13 ------------ gdb/p-valprint.c | 17 +++------------- 6 files changed, 20 insertions(+), 66 deletions(-) diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c index 020478bdf40..7bb5e1394b0 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -492,27 +492,19 @@ print_field_values (struct value *value, struct value *outer_value, { /* Bitfields require special handling, especially due to byte order problems. */ - if (type->field (i).is_ignored ()) - { - fputs_styled (_(""), - metadata_style.style (), stream); - } - else - { - struct value *v; - int bit_pos = type->field (i).loc_bitpos (); - int bit_size = type->field (i).bitsize (); - value_print_options opts; - - v = ada_value_primitive_packed_val - (value, nullptr, - bit_pos / HOST_CHAR_BIT, - bit_pos % HOST_CHAR_BIT, - bit_size, type->field (i).type ()); - opts = options; - opts.deref_ref = false; - common_val_print (v, stream, recurse + 1, opts, language); - } + struct value *v; + int bit_pos = type->field (i).loc_bitpos (); + int bit_size = type->field (i).bitsize (); + value_print_options opts; + + v = ada_value_primitive_packed_val + (value, nullptr, + bit_pos / HOST_CHAR_BIT, + bit_pos % HOST_CHAR_BIT, + bit_size, type->field (i).type ()); + opts = options; + opts.deref_ref = false; + common_val_print (v, stream, recurse + 1, opts, language); } else { diff --git a/gdb/compile/compile-cplus-types.c b/gdb/compile/compile-cplus-types.c index 8352c9324f4..01482d4082b 100644 --- a/gdb/compile/compile-cplus-types.c +++ b/gdb/compile/compile-cplus-types.c @@ -583,8 +583,7 @@ compile_cplus_convert_struct_or_union_members { const char *field_name = type->field (i).name (); - if (type->field (i).is_ignored () - || type->field (i).is_artificial ()) + if (type->field (i).is_artificial ()) continue; /* GDB records unnamed/anonymous fields with empty string names. */ diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c index 30291a6c8be..b623ebaa4af 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -279,14 +279,8 @@ cp_print_value_fields (struct value *val, struct ui_file *stream, /* Bitfields require special handling, especially due to byte order problems. */ - if (type->field (i).is_ignored ()) - { - fputs_styled ("", - metadata_style.style (), stream); - } - else if (val->bits_synthetic_pointer - (type->field (i).loc_bitpos (), - type->field (i).bitsize ())) + if (val->bits_synthetic_pointer (type->field (i).loc_bitpos (), + type->field (i).bitsize ())) { fputs_styled (_(""), metadata_style.style (), stream); @@ -304,12 +298,7 @@ cp_print_value_fields (struct value *val, struct ui_file *stream, } else { - if (type->field (i).is_ignored ()) - { - fputs_styled ("", - metadata_style.style (), stream); - } - else if (type->field (i).is_static ()) + if (type->field (i).is_static ()) { try { diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index e0c25c58d83..97e7a012b0c 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -5070,8 +5070,6 @@ recursive_dump_type (struct type *type, int spaces) gdb_printf (" private"); else if (fld.is_protected ()) gdb_printf (" protected"); - else if (fld.is_ignored ()) - gdb_printf (" ignored"); gdb_printf ("\n"); if (fld.type () != NULL) diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 1fd90f0531e..af3d47c4a20 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -738,17 +738,6 @@ struct field void set_virtual () { m_virtual = true; } - /* True if this field is 'ignored'. */ - bool is_ignored () const - { return m_ignored; } - - /* Set the field's "ignored" flag. Note that the 'ignored' bit is - deprecated. It was used by some unknown stabs generator, and has - been replaced by the optimized-out approach -- however, it - remains because the stabs reader was never updated. */ - void set_ignored () - { m_ignored = true; } - union field_location m_loc; /* For a function or member type, this is 1 if the argument is @@ -760,8 +749,6 @@ struct field /* Whether the field is 'virtual'. */ bool m_virtual : 1; - /* Whether the field is 'ignored'. */ - bool m_ignored : 1; /* Discriminant for union field_location. */ diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index 0f992bb92a9..bcd3f7a6619 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -604,14 +604,8 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream, /* Bitfields require special handling, especially due to byte order problems. */ - if (type->field (i).is_ignored ()) - { - fputs_styled ("", - metadata_style.style (), stream); - } - else if (val->bits_synthetic_pointer - (type->field (i).loc_bitpos (), - type->field (i).bitsize ())) + if (val->bits_synthetic_pointer (type->field (i).loc_bitpos (), + type->field (i).bitsize ())) { fputs_styled (_(""), metadata_style.style (), stream); @@ -629,12 +623,7 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream, } else { - if (type->field (i).is_ignored ()) - { - fputs_styled ("", - metadata_style.style (), stream); - } - else if (type->field (i).is_static ()) + if (type->field (i).is_static ()) { /* struct value *v = value_static_field (type, i); v4.17 specific. */ base-commit: 21cffe7c0955c6bdb0c14ded96939d409f3c21f0 -- 2.56.0