public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Mark Harmstone <mark@harmstone.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 05/11] Handle const and varible modifiers for CodeView
Date: Sun, 23 Jun 2024 21:39:37 -0600	[thread overview]
Message-ID: <95e88a1a-4797-460e-97ef-c4417f40eab7@gmail.com> (raw)
In-Reply-To: <20240618001713.24034-6-mark@harmstone.com>



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

  reply	other threads:[~2024-06-24  3:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18  0:17 [PATCH 00/11] CodeView variables and type system Mark Harmstone
2024-06-18  0:17 ` [PATCH 01/11] Output CodeView data about variables Mark Harmstone
2024-06-23 23:50   ` Jeff Law
2024-06-18  0:17 ` [PATCH 02/11] Handle CodeView base types Mark Harmstone
2024-06-24  0:18   ` Jeff Law
2024-06-18  0:17 ` [PATCH 03/11] Handle typedefs for CodeView Mark Harmstone
2024-06-24  0:30   ` Jeff Law
2024-06-18  0:17 ` [PATCH 04/11] Handle pointers " Mark Harmstone
2024-06-24  3:31   ` Jeff Law
2024-06-18  0:17 ` [PATCH 05/11] Handle const and varible modifiers " Mark Harmstone
2024-06-24  3:39   ` Jeff Law [this message]
2024-06-25  2:49     ` Mark Harmstone
2024-06-25  5:42       ` Jeff Law
2024-06-18  0:17 ` [PATCH 06/11] Handle enums " Mark Harmstone
2024-06-24  3:49   ` Jeff Law
2024-06-18  0:17 ` [PATCH 07/11] Handle structs and classes " Mark Harmstone
2024-06-25  5:40   ` Jeff Law
2024-06-18  0:17 ` [PATCH 08/11] Handle unions " Mark Harmstone
2024-06-25 23:29   ` Jeff Law
2024-06-18  0:17 ` [PATCH 09/11] Handle arrays " Mark Harmstone
2024-06-25 23:32   ` Jeff Law
2024-06-18  0:17 ` [PATCH 10/11] Handle bitfields " Mark Harmstone
2024-06-26  2:21   ` Jeff Law
2024-06-18  0:17 ` [PATCH 11/11] Handle subroutine types in CodeView Mark Harmstone
2024-06-26  2:27   ` Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=95e88a1a-4797-460e-97ef-c4417f40eab7@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mark@harmstone.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).