From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124846 invoked by alias); 21 Dec 2017 23:24:39 -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 124713 invoked by uid 89); 21 Dec 2017 23:24:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.2 spammy=HX-AuditID:sk:c1b4fb3 X-HELO: sesbmg22.ericsson.net Received: from sesbmg22.ericsson.net (HELO sesbmg22.ericsson.net) (193.180.251.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 21 Dec 2017 23:24:25 +0000 Received: from ESESSHC014.ericsson.se (Unknown_Domain [153.88.183.60]) by sesbmg22.ericsson.net (Symantec Mail Security) with SMTP id 73.8D.27591.E924C3A5; Fri, 22 Dec 2017 00:24:14 +0100 (CET) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (153.88.183.145) by oa.msg.ericsson.com (153.88.183.60) with Microsoft SMTP Server (TLS) id 14.3.352.0; Fri, 22 Dec 2017 00:24:13 +0100 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=simon.marchi@ericsson.com; Received: from [142.133.49.21] (192.75.88.130) by DBXPR07MB317.eurprd07.prod.outlook.com (2a01:111:e400:941d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.366.3; Thu, 21 Dec 2017 23:24:10 +0000 Subject: Re: [PATCH/RFA] Do not emit "field_type" var if not needed on "maint print c-tdesc" To: Yao Qi CC: Sergio Durigan Junior , GDB Patches References: <20171219191817.7554-1-sergiodj@redhat.com> <9ed3a5f3-f8ea-9a87-d201-40cfb0abd67e@ericsson.com> <86zi6cjvji.fsf@gmail.com> From: Simon Marchi Message-ID: <4f833fc4-7ca6-e74f-2952-9b16675cb8f9@ericsson.com> Date: Thu, 21 Dec 2017 23:24:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <86zi6cjvji.fsf@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MWHPR13CA0019.namprd13.prod.outlook.com (2603:10b6:300:16::29) To DBXPR07MB317.eurprd07.prod.outlook.com (2a01:111:e400:941d::11) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d4d9808e-b66a-4ea3-cd45-08d548c9f155 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060);SRVR:DBXPR07MB317; X-Microsoft-Exchange-Diagnostics: 1;DBXPR07MB317;3:M5a4Asi6KM+nHvOpafQIT5k56dHj1wWnOqNasolMwzBK2l4jVbsruSz49I1nbSMDMwTNa0YT5ZaKXbHboX6bsvTQxKi9pyWn8Ra219du/NlHwRlVlDQFOSfLVf1OUhIXyFNvLroQ1KT8Bk9VQr3ciDZ0Im5syjpasOFQW//lfe3YoIpBMUybptqJfhy9HPjtBJEjhyvmSBzih/Al6N9Ov9+IWNOVzirQKyiwBktxUb0LmFkjxzTcHBjTQ0Iuu1mE;25:TmtL47LTGJuCUO5XwTbvAh7n0yPmyyP6ueY6lKmEgbXC23f77WZCc/VuR1/qXmXa4TpcCbEIWGct7ib8zO3LiGlaucdrwHhieXNcj8NG+WBFZPYRexcR4GI5ZD+Pw7FBQ/ff6uYXVJRxt8sdCcjgJL+hwqr6LkW2Le3pfYZNZDDS5Y7op768pbiE19G82FYdvVr/0NmM2z56PEba0cNQZln6GJaN4ynwjxAyq8573L8zZsV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NSmf0g66g4SpKBy4UbINcW8kHZd1mMkHxZPIAeap0VkCDuh6eK3UUDglB+754AJ1jVvkyzrqPXkJC409hvW6jEHpg0C8vbmgF6GfqXN2EXGt0LWjFdsSMAEC7wJzz7QvjnHZQGiFqxdVAdcPSJ9i+lDc24V3F98wJOisF22DYkGR+9U+xbwWIgMld6pElaV+ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(37575265505322); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040470)(2401047)(8121501046)(5005006)(3231023)(3002001)(10201501046)(93006095)(93001095)(6041268)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011);SRVR:DBXPR07MB317;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:DBXPR07MB317; X-Forefront-PRVS: 0528942FD8 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(39860400002)(396003)(39380400002)(376002)(346002)(366004)(199004)(24454002)(54534003)(377424004)(189003)(6486002)(68736007)(86362001)(575784001)(31696002)(4326008)(105586002)(106356001)(31686004)(4001150100001)(230700001)(229853002)(478600001)(65956001)(66066001)(65806001)(8676002)(16526018)(6116002)(47776003)(64126003)(3846002)(50466002)(81166006)(58126008)(2950100002)(6916009)(6666003)(53946003)(54906003)(81156014)(316002)(8936002)(49976008)(16576012)(25786009)(5660300001)(36756003)(6246003)(52146003)(2486003)(23676004)(7736002)(76176011)(52116002)(305945005)(386003)(53936002)(39060400002)(97736004)(65826007)(53546011)(83506002)(2906002)(1411001)(78286006);DIR:OUT;SFP:1101;SCL:1;SRVR:DBXPR07MB317;H:[142.133.49.21];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQlhQUjA3TUIzMTc7MjM6SU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7:CVfOa1uD+zxL/Z0xE3i2h6aY1ZhmkAwGJTBQwzV6GNlmZ31Tv0E7hHyMQ2lByB8AOcAUKogrQ6I9u5PDrKUiizgJ+Gv+uBFX4VbRLS4AfvjAKmiDdxxvSIV+DXANekUN6BrQ8HOWtish1Sy/XB5w/9Q/hRW/tM1rNqYmSo5+kLVQwBFCWVHc1iwc2iqq2vXJCoSwr5m8jNo2VBoCDz8YnDRrBJh9jrDa2HQNhfDGvpAZzwi2aogU/QFASULwzo4j SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2017 23:24:10.5320 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d4d9808e-b66a-4ea3-cd45-08d548c9f155 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBXPR07MB317 X-OriginatorOrg: ericsson.com X-IsSubscribed: yes X-SW-Source: 2017-12/txt/msg00474.txt.bz2 On 2017-12-21 04:10 AM, Yao Qi wrote: > Simon Marchi writes: > >> A simpler way would be to emit the field lazily when we actually need it, see patch >> below for an example. There's a bit more collateral damage in the generated files, >> since some declarations change place. We would need to do the same for the other >> variable declarations. > > Yes, your patch in target-descriptions.c is simpler. The patch is good > to me. > Thanks, here's what I pushed. >From a8d2e5856f87a658d69018fe1ccd56482eebdd59 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 21 Dec 2017 18:19:17 -0500 Subject: [PATCH] Do not emit "field_type" var if not needed on "maint print c-tdesc" While fiddling a bit with -Wunused-variable, Sergio noticed that "maint print c-tdesc" was always generating code for the "tdesc_type *field_type" variable, even when it wasn't used. This is caught by GCC when using -Wunused-variable, of course. This patch changes the print_c_tdesc class to only output the field declaration when we actually need it. It shouldn't be necessary to do the same with the other variable declarations (type_with_fields and element_type), because they are always if they are declared. The C files in features/ are regenerated, some declarations of field_type are removed, as expected, while some others move to where they are used for the first time. gdb/ChangeLog: * target-descriptions.c (print_c_tdesc) : Don't output field_type declaration, use printf_field_type_assignment instead. : New method. * features/aarch64-core.c, features/aarch64-fpu.c features/arc-arcompact.c, features/arc-v2.c, features/arm/arm-with-iwmmxt.c, features/i386/32bit-core.c, features/i386/32bit-mpx.c, features/i386/32bit-sse.c, features/i386/64bit-avx512.c, features/i386/64bit-core.c, features/i386/64bit-mpx.c, features/i386/64bit-sse.c, features/i386/x32-core.c, features/or1k.c, features/rs6000/powerpc-7400.c, features/rs6000/powerpc-altivec32.c, features/rs6000/powerpc-altivec32l.c, features/rs6000/powerpc-altivec64.c, features/rs6000/powerpc-altivec64l.c, features/rs6000/powerpc-cell32l.c, features/rs6000/powerpc-cell64l.c, features/rs6000/powerpc-isa205-altivec32l.c, features/rs6000/powerpc-isa205-altivec64l.c, features/rs6000/powerpc-isa205-vsx32l.c, features/rs6000/powerpc-isa205-vsx64l.c, features/rs6000/powerpc-vsx32.c, features/rs6000/powerpc-vsx32l.c, features/rs6000/powerpc-vsx64.c, features/rs6000/powerpc-vsx64l.c, features/s390-gs-linux64.c, features/s390-tevx-linux64.c, features/s390-vx-linux64.c, features/s390x-gs-linux64.c, features/s390x-tevx-linux64.c, features/s390x-vx-linux64.c: Re-generate. --- gdb/ChangeLog | 33 ++++++++++++++++++++ gdb/features/aarch64-core.c | 1 - gdb/features/aarch64-fpu.c | 2 +- gdb/features/arc-arcompact.c | 1 - gdb/features/arc-v2.c | 1 - gdb/features/arm/arm-with-iwmmxt.c | 2 +- gdb/features/i386/32bit-core.c | 1 - gdb/features/i386/32bit-mpx.c | 2 +- gdb/features/i386/32bit-sse.c | 2 +- gdb/features/i386/64bit-avx512.c | 2 +- gdb/features/i386/64bit-core.c | 1 - gdb/features/i386/64bit-mpx.c | 2 +- gdb/features/i386/64bit-sse.c | 2 +- gdb/features/i386/x32-core.c | 1 - gdb/features/or1k.c | 1 - gdb/features/rs6000/powerpc-7400.c | 2 +- gdb/features/rs6000/powerpc-altivec32.c | 2 +- gdb/features/rs6000/powerpc-altivec32l.c | 2 +- gdb/features/rs6000/powerpc-altivec64.c | 2 +- gdb/features/rs6000/powerpc-altivec64l.c | 2 +- gdb/features/rs6000/powerpc-cell32l.c | 2 +- gdb/features/rs6000/powerpc-cell64l.c | 2 +- gdb/features/rs6000/powerpc-isa205-altivec32l.c | 2 +- gdb/features/rs6000/powerpc-isa205-altivec64l.c | 2 +- gdb/features/rs6000/powerpc-isa205-vsx32l.c | 2 +- gdb/features/rs6000/powerpc-isa205-vsx64l.c | 2 +- gdb/features/rs6000/powerpc-vsx32.c | 2 +- gdb/features/rs6000/powerpc-vsx32l.c | 2 +- gdb/features/rs6000/powerpc-vsx64.c | 2 +- gdb/features/rs6000/powerpc-vsx64l.c | 2 +- gdb/features/s390-gs-linux64.c | 2 +- gdb/features/s390-tevx-linux64.c | 2 +- gdb/features/s390-vx-linux64.c | 2 +- gdb/features/s390x-gs-linux64.c | 2 +- gdb/features/s390x-tevx-linux64.c | 2 +- gdb/features/s390x-vx-linux64.c | 2 +- gdb/target-descriptions.c | 41 +++++++++++++++---------- 37 files changed, 86 insertions(+), 51 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4f2c5c3..1b4b13a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,36 @@ +2017-12-21 Simon Marchi + Sergio Durigan Junior + + * target-descriptions.c (print_c_tdesc) : Don't output + field_type declaration, use printf_field_type_assignment + instead. + : New method. + * features/aarch64-core.c, features/aarch64-fpu.c + features/arc-arcompact.c, features/arc-v2.c, + features/arm/arm-with-iwmmxt.c, features/i386/32bit-core.c, + features/i386/32bit-mpx.c, features/i386/32bit-sse.c, + features/i386/64bit-avx512.c, features/i386/64bit-core.c, + features/i386/64bit-mpx.c, features/i386/64bit-sse.c, + features/i386/x32-core.c, features/or1k.c, + features/rs6000/powerpc-7400.c, + features/rs6000/powerpc-altivec32.c, + features/rs6000/powerpc-altivec32l.c, + features/rs6000/powerpc-altivec64.c, + features/rs6000/powerpc-altivec64l.c, + features/rs6000/powerpc-cell32l.c, + features/rs6000/powerpc-cell64l.c, + features/rs6000/powerpc-isa205-altivec32l.c, + features/rs6000/powerpc-isa205-altivec64l.c, + features/rs6000/powerpc-isa205-vsx32l.c, + features/rs6000/powerpc-isa205-vsx64l.c, + features/rs6000/powerpc-vsx32.c, + features/rs6000/powerpc-vsx32l.c, + features/rs6000/powerpc-vsx64.c, + features/rs6000/powerpc-vsx64l.c, features/s390-gs-linux64.c, + features/s390-tevx-linux64.c, features/s390-vx-linux64.c, + features/s390x-gs-linux64.c, features/s390x-tevx-linux64.c, + features/s390x-vx-linux64.c: Re-generate. + 2017-12-20 Uros Bizjak * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Remove diff --git a/gdb/features/aarch64-core.c b/gdb/features/aarch64-core.c index 618a7ef..3707b7e 100644 --- a/gdb/features/aarch64-core.c +++ b/gdb/features/aarch64-core.c @@ -10,7 +10,6 @@ create_feature_aarch64_core (struct target_desc *result, long regnum) feature = tdesc_create_feature (result, "org.gnu.gdb.aarch64.core", "aarch64-core.xml"); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_flags (feature, "cpsr_flags", 4); tdesc_add_flag (type_with_fields, 0, "SP"); tdesc_add_flag (type_with_fields, 1, ""); diff --git a/gdb/features/aarch64-fpu.c b/gdb/features/aarch64-fpu.c index 7328eb1..cac3981 100644 --- a/gdb/features/aarch64-fpu.c +++ b/gdb/features/aarch64-fpu.c @@ -47,8 +47,8 @@ create_feature_aarch64_fpu (struct target_desc *result, long regnum) tdesc_create_vector (feature, "v1i", element_type, 1); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vnd"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "v2d"); tdesc_add_field (type_with_fields, "f", field_type); field_type = tdesc_named_type (feature, "v2u"); diff --git a/gdb/features/arc-arcompact.c b/gdb/features/arc-arcompact.c index 79b6889..f81f0a2 100644 --- a/gdb/features/arc-arcompact.c +++ b/gdb/features/arc-arcompact.c @@ -52,7 +52,6 @@ initialize_tdesc_arc_arcompact (void) feature = tdesc_create_feature (result, "org.gnu.gdb.arc.aux-minimal"); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_flags (feature, "status32_type", 4); tdesc_add_flag (type_with_fields, 0, "H"); tdesc_add_bitfield (type_with_fields, "E", 1, 2); diff --git a/gdb/features/arc-v2.c b/gdb/features/arc-v2.c index 9908b4c..b2254b2 100644 --- a/gdb/features/arc-v2.c +++ b/gdb/features/arc-v2.c @@ -52,7 +52,6 @@ initialize_tdesc_arc_v2 (void) feature = tdesc_create_feature (result, "org.gnu.gdb.arc.aux-minimal"); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_flags (feature, "status32_type", 4); tdesc_add_flag (type_with_fields, 0, "H"); tdesc_add_bitfield (type_with_fields, "E", 1, 4); diff --git a/gdb/features/arm/arm-with-iwmmxt.c b/gdb/features/arm/arm-with-iwmmxt.c index 5d6c357..8729285 100644 --- a/gdb/features/arm/arm-with-iwmmxt.c +++ b/gdb/features/arm/arm-with-iwmmxt.c @@ -45,8 +45,8 @@ initialize_tdesc_arm_with_iwmmxt (void) tdesc_create_vector (feature, "iwmmxt_v2u32", element_type, 2); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "iwmmxt_vec64i"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "iwmmxt_v8u8"); tdesc_add_field (type_with_fields, "u8", field_type); field_type = tdesc_named_type (feature, "iwmmxt_v4u16"); diff --git a/gdb/features/i386/32bit-core.c b/gdb/features/i386/32bit-core.c index de2ce47..294e86d 100644 --- a/gdb/features/i386/32bit-core.c +++ b/gdb/features/i386/32bit-core.c @@ -10,7 +10,6 @@ create_feature_i386_32bit_core (struct target_desc *result, long regnum) feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core", "32bit-core.xml"); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_flags (feature, "i386_eflags", 4); tdesc_add_flag (type_with_fields, 0, "CF"); tdesc_add_flag (type_with_fields, 1, ""); diff --git a/gdb/features/i386/32bit-mpx.c b/gdb/features/i386/32bit-mpx.c index 38910d3..8f1be3a 100644 --- a/gdb/features/i386/32bit-mpx.c +++ b/gdb/features/i386/32bit-mpx.c @@ -10,8 +10,8 @@ create_feature_i386_32bit_mpx (struct target_desc *result, long regnum) feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx", "32bit-mpx.xml"); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_struct (feature, "br128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint64"); tdesc_add_field (type_with_fields, "lbound", field_type); field_type = tdesc_named_type (feature, "uint64"); diff --git a/gdb/features/i386/32bit-sse.c b/gdb/features/i386/32bit-sse.c index 1c8a7e8..cf48960 100644 --- a/gdb/features/i386/32bit-sse.c +++ b/gdb/features/i386/32bit-sse.c @@ -29,8 +29,8 @@ create_feature_i386_32bit_sse (struct target_desc *result, long regnum) tdesc_create_vector (feature, "v2i64", element_type, 2); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "v4f"); tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v2d"); diff --git a/gdb/features/i386/64bit-avx512.c b/gdb/features/i386/64bit-avx512.c index a565f42..e103e43 100644 --- a/gdb/features/i386/64bit-avx512.c +++ b/gdb/features/i386/64bit-avx512.c @@ -29,8 +29,8 @@ create_feature_i386_64bit_avx512 (struct target_desc *result, long regnum) tdesc_create_vector (feature, "v2i64", element_type, 2); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "v4f"); tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v2d"); diff --git a/gdb/features/i386/64bit-core.c b/gdb/features/i386/64bit-core.c index f4cad06..9e39ee4 100644 --- a/gdb/features/i386/64bit-core.c +++ b/gdb/features/i386/64bit-core.c @@ -10,7 +10,6 @@ create_feature_i386_64bit_core (struct target_desc *result, long regnum) feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core", "64bit-core.xml"); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_flags (feature, "i386_eflags", 4); tdesc_add_flag (type_with_fields, 0, "CF"); tdesc_add_flag (type_with_fields, 1, ""); diff --git a/gdb/features/i386/64bit-mpx.c b/gdb/features/i386/64bit-mpx.c index f8730b4..725e76a 100644 --- a/gdb/features/i386/64bit-mpx.c +++ b/gdb/features/i386/64bit-mpx.c @@ -10,8 +10,8 @@ create_feature_i386_64bit_mpx (struct target_desc *result, long regnum) feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx", "64bit-mpx.xml"); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_struct (feature, "br128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint64"); tdesc_add_field (type_with_fields, "lbound", field_type); field_type = tdesc_named_type (feature, "uint64"); diff --git a/gdb/features/i386/64bit-sse.c b/gdb/features/i386/64bit-sse.c index e4f99c2..2859217 100644 --- a/gdb/features/i386/64bit-sse.c +++ b/gdb/features/i386/64bit-sse.c @@ -29,8 +29,8 @@ create_feature_i386_64bit_sse (struct target_desc *result, long regnum) tdesc_create_vector (feature, "v2i64", element_type, 2); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "v4f"); tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v2d"); diff --git a/gdb/features/i386/x32-core.c b/gdb/features/i386/x32-core.c index acafc7d..c268e11 100644 --- a/gdb/features/i386/x32-core.c +++ b/gdb/features/i386/x32-core.c @@ -10,7 +10,6 @@ create_feature_i386_x32_core (struct target_desc *result, long regnum) feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core", "x32-core.xml"); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_flags (feature, "i386_eflags", 4); tdesc_add_flag (type_with_fields, 0, "CF"); tdesc_add_flag (type_with_fields, 1, ""); diff --git a/gdb/features/or1k.c b/gdb/features/or1k.c index 929a5f9..9169cae 100644 --- a/gdb/features/or1k.c +++ b/gdb/features/or1k.c @@ -16,7 +16,6 @@ initialize_tdesc_or1k (void) feature = tdesc_create_feature (result, "org.gnu.gdb.or1k.group0"); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_flags (feature, "sr_flags", 4); tdesc_add_flag (type_with_fields, 0, "SM"); tdesc_add_flag (type_with_fields, 1, "TEE"); diff --git a/gdb/features/rs6000/powerpc-7400.c b/gdb/features/rs6000/powerpc-7400.c index ba9f12c..58f8a69 100644 --- a/gdb/features/rs6000/powerpc-7400.c +++ b/gdb/features/rs6000/powerpc-7400.c @@ -152,8 +152,8 @@ initialize_tdesc_powerpc_7400 (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-altivec32.c b/gdb/features/rs6000/powerpc-altivec32.c index 9cb83ca..bbb36c8 100644 --- a/gdb/features/rs6000/powerpc-altivec32.c +++ b/gdb/features/rs6000/powerpc-altivec32.c @@ -104,8 +104,8 @@ initialize_tdesc_powerpc_altivec32 (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-altivec32l.c b/gdb/features/rs6000/powerpc-altivec32l.c index afaf8ed..81862cb 100644 --- a/gdb/features/rs6000/powerpc-altivec32l.c +++ b/gdb/features/rs6000/powerpc-altivec32l.c @@ -108,8 +108,8 @@ initialize_tdesc_powerpc_altivec32l (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-altivec64.c b/gdb/features/rs6000/powerpc-altivec64.c index 94041e1..f7a7c72 100644 --- a/gdb/features/rs6000/powerpc-altivec64.c +++ b/gdb/features/rs6000/powerpc-altivec64.c @@ -104,8 +104,8 @@ initialize_tdesc_powerpc_altivec64 (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-altivec64l.c b/gdb/features/rs6000/powerpc-altivec64l.c index c7ed171..ce0bc86 100644 --- a/gdb/features/rs6000/powerpc-altivec64l.c +++ b/gdb/features/rs6000/powerpc-altivec64l.c @@ -108,8 +108,8 @@ initialize_tdesc_powerpc_altivec64l (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-cell32l.c b/gdb/features/rs6000/powerpc-cell32l.c index 390d7b2..74c42f9 100644 --- a/gdb/features/rs6000/powerpc-cell32l.c +++ b/gdb/features/rs6000/powerpc-cell32l.c @@ -110,8 +110,8 @@ initialize_tdesc_powerpc_cell32l (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-cell64l.c b/gdb/features/rs6000/powerpc-cell64l.c index 39890ba..cbfda4c 100644 --- a/gdb/features/rs6000/powerpc-cell64l.c +++ b/gdb/features/rs6000/powerpc-cell64l.c @@ -110,8 +110,8 @@ initialize_tdesc_powerpc_cell64l (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-isa205-altivec32l.c b/gdb/features/rs6000/powerpc-isa205-altivec32l.c index 203bb4a..09f5c07 100644 --- a/gdb/features/rs6000/powerpc-isa205-altivec32l.c +++ b/gdb/features/rs6000/powerpc-isa205-altivec32l.c @@ -108,8 +108,8 @@ initialize_tdesc_powerpc_isa205_altivec32l (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-isa205-altivec64l.c b/gdb/features/rs6000/powerpc-isa205-altivec64l.c index 8f66a16..246fcef 100644 --- a/gdb/features/rs6000/powerpc-isa205-altivec64l.c +++ b/gdb/features/rs6000/powerpc-isa205-altivec64l.c @@ -108,8 +108,8 @@ initialize_tdesc_powerpc_isa205_altivec64l (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-isa205-vsx32l.c b/gdb/features/rs6000/powerpc-isa205-vsx32l.c index fc0f615..2a6e232 100644 --- a/gdb/features/rs6000/powerpc-isa205-vsx32l.c +++ b/gdb/features/rs6000/powerpc-isa205-vsx32l.c @@ -108,8 +108,8 @@ initialize_tdesc_powerpc_isa205_vsx32l (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-isa205-vsx64l.c b/gdb/features/rs6000/powerpc-isa205-vsx64l.c index 3313d04..d0e32f2 100644 --- a/gdb/features/rs6000/powerpc-isa205-vsx64l.c +++ b/gdb/features/rs6000/powerpc-isa205-vsx64l.c @@ -108,8 +108,8 @@ initialize_tdesc_powerpc_isa205_vsx64l (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-vsx32.c b/gdb/features/rs6000/powerpc-vsx32.c index 1a824a8..9eafb1c 100644 --- a/gdb/features/rs6000/powerpc-vsx32.c +++ b/gdb/features/rs6000/powerpc-vsx32.c @@ -104,8 +104,8 @@ initialize_tdesc_powerpc_vsx32 (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-vsx32l.c b/gdb/features/rs6000/powerpc-vsx32l.c index f5bf11e..f08df14 100644 --- a/gdb/features/rs6000/powerpc-vsx32l.c +++ b/gdb/features/rs6000/powerpc-vsx32l.c @@ -108,8 +108,8 @@ initialize_tdesc_powerpc_vsx32l (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-vsx64.c b/gdb/features/rs6000/powerpc-vsx64.c index 601df39..7991115 100644 --- a/gdb/features/rs6000/powerpc-vsx64.c +++ b/gdb/features/rs6000/powerpc-vsx64.c @@ -104,8 +104,8 @@ initialize_tdesc_powerpc_vsx64 (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/rs6000/powerpc-vsx64l.c b/gdb/features/rs6000/powerpc-vsx64l.c index d34bd81..1726e67 100644 --- a/gdb/features/rs6000/powerpc-vsx64l.c +++ b/gdb/features/rs6000/powerpc-vsx64l.c @@ -108,8 +108,8 @@ initialize_tdesc_powerpc_vsx64l (void) tdesc_create_vector (feature, "v16i8", element_type, 16); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "uint128"); tdesc_add_field (type_with_fields, "uint128", field_type); field_type = tdesc_named_type (feature, "v4f"); diff --git a/gdb/features/s390-gs-linux64.c b/gdb/features/s390-gs-linux64.c index 126835b..1416183 100644 --- a/gdb/features/s390-gs-linux64.c +++ b/gdb/features/s390-gs-linux64.c @@ -135,8 +135,8 @@ initialize_tdesc_s390_gs_linux64 (void) tdesc_create_vector (feature, "v2i64", element_type, 2); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "v4f"); tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v2d"); diff --git a/gdb/features/s390-tevx-linux64.c b/gdb/features/s390-tevx-linux64.c index a9ee9e1..ae62e8d 100644 --- a/gdb/features/s390-tevx-linux64.c +++ b/gdb/features/s390-tevx-linux64.c @@ -135,8 +135,8 @@ initialize_tdesc_s390_tevx_linux64 (void) tdesc_create_vector (feature, "v2i64", element_type, 2); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "v4f"); tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v2d"); diff --git a/gdb/features/s390-vx-linux64.c b/gdb/features/s390-vx-linux64.c index b6c5dda..d3ec081 100644 --- a/gdb/features/s390-vx-linux64.c +++ b/gdb/features/s390-vx-linux64.c @@ -113,8 +113,8 @@ initialize_tdesc_s390_vx_linux64 (void) tdesc_create_vector (feature, "v2i64", element_type, 2); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "v4f"); tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v2d"); diff --git a/gdb/features/s390x-gs-linux64.c b/gdb/features/s390x-gs-linux64.c index 5ab3e3d..d253a09 100644 --- a/gdb/features/s390x-gs-linux64.c +++ b/gdb/features/s390x-gs-linux64.c @@ -119,8 +119,8 @@ initialize_tdesc_s390x_gs_linux64 (void) tdesc_create_vector (feature, "v2i64", element_type, 2); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "v4f"); tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v2d"); diff --git a/gdb/features/s390x-tevx-linux64.c b/gdb/features/s390x-tevx-linux64.c index e5ecedf..1ac3249 100644 --- a/gdb/features/s390x-tevx-linux64.c +++ b/gdb/features/s390x-tevx-linux64.c @@ -119,8 +119,8 @@ initialize_tdesc_s390x_tevx_linux64 (void) tdesc_create_vector (feature, "v2i64", element_type, 2); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "v4f"); tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v2d"); diff --git a/gdb/features/s390x-vx-linux64.c b/gdb/features/s390x-vx-linux64.c index 1f24349..2e3d382 100644 --- a/gdb/features/s390x-vx-linux64.c +++ b/gdb/features/s390x-vx-linux64.c @@ -97,8 +97,8 @@ initialize_tdesc_s390x_vx_linux64 (void) tdesc_create_vector (feature, "v2i64", element_type, 2); tdesc_type_with_fields *type_with_fields; - tdesc_type *field_type; type_with_fields = tdesc_create_union (feature, "vec128"); + tdesc_type *field_type; field_type = tdesc_named_type (feature, "v4f"); tdesc_add_field (type_with_fields, "v4_float", field_type); field_type = tdesc_named_type (feature, "v2d"); diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c index 88ac55f..5dcc4c4 100644 --- a/gdb/target-descriptions.c +++ b/gdb/target-descriptions.c @@ -1894,13 +1894,6 @@ public: m_printed_type_with_fields = true; } - if (!type->fields.empty () - && !m_printed_field_type) - { - printf_unfiltered (" tdesc_type *field_type;\n"); - m_printed_field_type = true; - } - switch (type->kind) { case TDESC_TYPE_STRUCT: @@ -1949,8 +1942,8 @@ public: } else { - printf_unfiltered - (" field_type = tdesc_named_type (feature, \"%s\");\n", + printf_field_type_assignment + ("tdesc_named_type (feature, \"%s\");\n", type_name); printf_unfiltered (" tdesc_add_typed_bitfield (type_with_fields, \"%s\"," @@ -1962,10 +1955,8 @@ public: { gdb_assert (f.end == -1); gdb_assert (type->kind == TDESC_TYPE_STRUCT); - printf_unfiltered - (" field_type = tdesc_named_type (feature," - " \"%s\");\n", - type_name); + printf_field_type_assignment + ("tdesc_named_type (feature, \"%s\");\n", type_name); printf_unfiltered (" tdesc_add_field (type_with_fields, \"%s\", field_type);\n", f.name.c_str ()); @@ -1978,9 +1969,8 @@ public: type->name.c_str ()); for (const tdesc_type_field &f : type->fields) { - printf_unfiltered - (" field_type = tdesc_named_type (feature, \"%s\");\n", - f.type->name.c_str ()); + printf_field_type_assignment + ("tdesc_named_type (feature, \"%s\");\n", f.type->name.c_str ()); printf_unfiltered (" tdesc_add_field (type_with_fields, \"%s\", field_type);\n", f.name.c_str ()); @@ -2018,6 +2008,25 @@ protected: std::string m_filename_after_features; private: + + /* Print an assignment to the field_type variable. Print the declaration + of field_type if that has not been done yet. */ + void printf_field_type_assignment (const char *fmt, ...) + { + if (!m_printed_field_type) + { + printf_unfiltered (" tdesc_type *field_type;\n"); + m_printed_field_type = true; + } + + printf_unfiltered (" field_type = "); + + va_list args; + va_start (args, fmt); + vprintf_unfiltered (fmt, args); + va_end (args); + } + char *m_function; /* Did we print "struct tdesc_type *element_type;" yet? */ -- 2.7.4