Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@efficios.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] gdb: fix crash when pretty printing anonymous struct with base class
Date: Thu, 20 Aug 2026 12:26:26 -0400	[thread overview]
Message-ID: <cbc856f4-c700-47cd-bc1e-2880476279b3@efficios.com> (raw)
In-Reply-To: <87se48u5i2.fsf@tromey.com>

On 8/20/26 12:21 PM, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
> 
> Simon> As I was reviewing another patch, I was wondering if we allowed
> Simon type->name() to be nullptr.  The answer is yes, but there are some spots
> Simon> that don't check for nullptr, when they should.    
> 
> Thanks for looking at this.
> 
> I sometimes wonder if this is something we ought to fix, like reject
> nullptr here.  But shrug.

I think we could initialize it to "" so that it's never nullptr, and we
have just one normal way to representing a type with no name.

> Simon> -		  gdb_puts (type->name (), stream);
> Simon> +		  gdb_puts (type->safe_name (), stream);
> 
> It would be nice here if the <...> form were in metadata style.

I'll look into it.

Simon

      reply	other threads:[~2026-08-20 16:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17 14:59 Simon Marchi
2026-08-17 14:59 ` [PATCH 2/2] gdb: don't print trailing space after base classes in pretty format Simon Marchi
2026-08-18  5:21 ` [PATCH 1/2] gdb: fix crash when pretty printing anonymous struct with base class Kevin Buettner
2026-08-20 14:12   ` Simon Marchi
2026-08-20 16:21 ` Tom Tromey
2026-08-20 16:26   ` 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=cbc856f4-c700-47cd-bc1e-2880476279b3@efficios.com \
    --to=simon.marchi@efficios.com \
    --cc=gdb-patches@sourceware.org \
    --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