From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) by sourceware.org (Postfix) with ESMTPS id 4A0BB386103C for ; Mon, 24 Jun 2024 03:39:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4A0BB386103C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4A0BB386103C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::112d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719200382; cv=none; b=vu2Xl605g0mcWFrcqNB8lcziqqxwzhfTKBO1SEAtBxHfO2SFa+wZyFFfWp8mt31X3IgNSjWUo6gBuhRarwZpiUKLyg7idKUmgGeT1OqCui1lV95BsmQ3WGWGkEB9s92O++BI6VSCuMo8PppIqCUMM9cIG8iTEW/IAVEcKtJomVA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719200382; c=relaxed/simple; bh=eYMuMX13DEadCFbthU4AQiZ6pHT+7Edye8TLKSM8q+Q=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=ZTZWeyOEUazGEb6C9F6740dQbwc2bcimWcwEgS9gsAyesrAX2Vc82Ldekbi5QVLIKnhKJBaCI9M0v6zh5MyUhdPrVZolQF90TP+Iu9IOVWO1r1rAb5H4rKmX5aiV9Km0Y9ylNuONCRXX6t2QG9wk/KXkcptCgxhgGt+Eocx4pMY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-63186c222eeso35037167b3.2 for ; Sun, 23 Jun 2024 20:39:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719200379; x=1719805179; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=dOXLih+8Qpls/ShMhOHNTa6JdOvV1tDjWXYYnaFFOYI=; b=kq0EVst2aeNPB365DDUH+Rjks1MS/gXKB5Pd1IhZ7KbZrRrmJJL2yVt4Xgk70RLt3z oQ4VUdVGOuTaCVnqm6smyRc7day+JeF7ok6W3/LcYzOTBXi/ozNbUT5PiVC+ai950COh LtSMHyuT/CydNmhf3ciNo1ksNgCa5rQhu56/Fhbj18NTYMwvPiXZ4m3NPooDVJneTy/V 58hUqaIG2gMZfOn0bO+s/8UYcrjCkiROZYl3FnjTGPuF3r6XT3X0ofrE3lUDrZhvoQ6x MDIMSVpFo/2PsOdd1gd60UW07zvtlfCwk1NeRBc4xwt7KZXMywxZZXpPirwW9FxNOIR0 kQhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719200379; x=1719805179; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dOXLih+8Qpls/ShMhOHNTa6JdOvV1tDjWXYYnaFFOYI=; b=aTeri4IWBu2SBFHHLAwmjfIZqxGfgaQrLQTdm2nJyZ2mAnwKBExnr2DED7hlv1G9CX 91mZ1KzAHYdE2GCaBqRcUGsAw4RAtzDrP6B+UHYeDA67sw+s03jX+0ZkyFHOFAljeA8x PkCXaZ/bLWJgHx35HwMPhuN2EH9p/C1hirz+k77YoNelwvl3CXWPPMgNyG48IIjzwTiN l3zTe33ToNBKZjd4x+YS1xBKIbF2WPnBvK3lnAAwXC20cNeOvnQl7mWGtaMOIn+SqoSQ t1jmWQc0U1AxVITza+qiOYGL2QZr9SwvIkTGIt4ej608pWKQnOfZYJ36nxRx8bpaSSOV pfVA== X-Forwarded-Encrypted: i=1; AJvYcCWF0zlZzXdVD6soQjqsezK8nZE/4S9ybFxiEI6JyOa+eX5TjGWgSTsVA53hwsiYj4XOysUr8ZxqSykrG9ozwgRtmlH0S5pecQ== X-Gm-Message-State: AOJu0YzQzQPnK0byd/aCos9llEXIMixzrPgvLR71ZdlkSnlxPP1jyAEd RiVBN0bblcMDgMF/jgISeKt7Rc6YrL+old+/YAAwGR7fky7Zv+jHR90J6w== X-Google-Smtp-Source: AGHT+IGxlpoiZVR3ATNXmmXlNPRd43anyghMFnDV+B/YuPNH6Wd5TiAAgHr7RFXbTdJDTBoNTp7I3g== X-Received: by 2002:a81:7241:0:b0:618:1034:f4ef with SMTP id 00721157ae682-643aab82db0mr27862157b3.16.1719200379194; Sun, 23 Jun 2024 20:39:39 -0700 (PDT) Received: from [172.31.0.109] ([136.36.72.243]) by smtp.gmail.com with ESMTPSA id 00721157ae682-63f154d6011sm25732837b3.119.2024.06.23.20.39.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 23 Jun 2024 20:39:38 -0700 (PDT) Message-ID: <95e88a1a-4797-460e-97ef-c4417f40eab7@gmail.com> Date: Sun, 23 Jun 2024 21:39:37 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH 05/11] Handle const and varible modifiers for CodeView Content-Language: en-US To: Mark Harmstone , gcc-patches@gcc.gnu.org References: <20240618001713.24034-1-mark@harmstone.com> <20240618001713.24034-6-mark@harmstone.com> From: Jeff Law In-Reply-To: <20240618001713.24034-6-mark@harmstone.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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 List-Id: On 6/17/24 6:17 PM, Mark Harmstone wrote: > Translate DW_TAG_const_type and DW_TAG_volatile_type DIEs into > LF_MODIFIER symbols. > > gcc/ > * dwarf2codeview.cc > (struct codeview_custom_type): Add lf_modifier to union. > (write_cv_padding, write_lf_modifier): New functions. > (write_custom_types): Call write_lf_modifier. > (get_type_num_const_type): New function. > (get_type_num_volatile_type): Likewise. > (get_type_num): Handle DW_TAG_const_type and > DW_TAG_volatile_type DIEs. > * dwarf2codeview.h (MOD_const, MOD_volatile): Define. > (LF_MODIFIER): Likewise. > --- > @@ -903,6 +908,76 @@ write_lf_pointer (codeview_custom_type *t) > asm_fprintf (asm_out_file, "%LLcv_type%x_end:\n", t->num); > } > > +/* All CodeView type definitions have to be aligned to a four-byte boundary, > + so write some padding bytes if necessary. These have to be specific values: > + f3, f2, f1. */ Consider changing the magic numbers to a #define or const object or an enum as a follow-up. > + > + ct = (codeview_custom_type *) xmalloc (sizeof (codeview_custom_type)); So presumably you're freeing these objects elsewhere? I see the free (custom_types), but I don' see where you free an subobjects. Did I miss something? I'll go ahead and commit, but please double check for memory leaks. Jeff