Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tom@tromey.com>
Cc: Simon Marchi <simon.marchi@efficios.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: restore nullptr check in compunit_symtab::find_call_site
Date: Tue, 3 Dec 2024 15:05:23 -0500	[thread overview]
Message-ID: <eab86f97-445a-4ac3-b568-4d00f65f9062@simark.ca> (raw)
In-Reply-To: <875xo0mu1m.fsf@tromey.com>



On 2024-12-03 14:43, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
> 
>>> On the one hand, obstacks are nice since they reduce free overhead.
>>> But on the other hand, they mean we can't use destructors... and for
>>> this case, I think there normally aren't "too many" symtabs, so it's
>>> probably fine to make the change.
> 
> Simon> We can still use destructors, we might just need to call it manually.
> 
> Yeah, that just doesn't seem significantly better to me.  It is more
> like a spelling change.

I don't think it's just a spelling change, because a destructor would
invoke the destructor of fields.  So I think that if we started invoking
~compunit_symtab() manually (instead of compunit_symtab::finalize()),
we could start using non-trivially-destructible stuff directly as fields
of compunit_symtab.  In other words, m_call_site_htab wouldn't have to
be a pointer anymore.

Simon

  reply	other threads:[~2024-12-03 20:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-03 15:52 Simon Marchi
2024-12-03 16:17 ` Tom de Vries
2024-12-03 19:19   ` Simon Marchi
2024-12-03 17:49 ` Tom Tromey
2024-12-03 19:11   ` Simon Marchi
2024-12-03 19:43     ` Tom Tromey
2024-12-03 20:05       ` Simon Marchi [this message]
2024-12-03 20:15         ` Tom Tromey

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=eab86f97-445a-4ac3-b568-4d00f65f9062@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.com \
    --cc=tom@tromey.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