Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: make symtab::compunit return a reference
Date: Fri, 19 Jun 2026 10:22:08 -0400	[thread overview]
Message-ID: <7e778a1e-fd07-4270-955a-82f2b239e626@polymtl.ca> (raw)
In-Reply-To: <becece68-2b59-4e45-b502-404198c5a9c7@suse.de>



On 2026-06-19 08:16, Tom de Vries wrote:
> On 6/18/26 8:39 PM, simon.marchi@polymtl.ca wrote:
>> From: Simon Marchi <simon.marchi@polymtl.ca>
>>
>> The compunit symtab backlink of a symtab is never null (the constructor
>> asserts it), so make symtab::compunit return a reference instead of a
>> pointer, and have the symtab constructor take the compunit_symtab as a
>> reference too.  Update all callers accordingly.
>>
>> This came up earlier in review, where a caller would check the result of
>> `symtab->compunit ()` for nullptr, and I pointed out that it was
>> unnecessary.  Returning a reference makes this clear.
>>
> 
> Hi Simon,
> 
> Looks reasonable to me.
> 
> Reviewed-By: Tom de Vries <tdevries@suse.de>

Thanks, pushed.

Simon

      reply	other threads:[~2026-06-19 14:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-18 18:39 simon.marchi
2026-06-19 12:16 ` Tom de Vries
2026-06-19 14:22   ` Simon Marchi [this message]

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=7e778a1e-fd07-4270-955a-82f2b239e626@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /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