public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@efficios.com>
To: Tom Tromey <tom@tromey.com>,
	Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] gdbsupport: change path_join parameter to std::vector<const char *>
Date: Wed, 21 Sep 2022 11:38:00 -0400	[thread overview]
Message-ID: <798e60b7-de41-b394-05cf-d5c79d7e22d6@efficios.com> (raw)
In-Reply-To: <877d1w4udl.fsf@tromey.com>

On 2022-09-21 11:31, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Simon> When a GDB built with -D_GLIBCXX_DEBUG=1 reads a binary with a single
> Simon> character name, we hit this assertion failure:
> [...]
> 
> Simon> This patch makes the easy fix, that is to change the path_join parameter
> Simon> from a vector of to a vector of `const char *`.  Another solution would
> Simon> be to introduce a non-standard gdb::cstring_view class, which would be a
> Simon> view over a null-terminated string.  With that class, it would be
> Simon> correct to access index 1, it would yield the NUL character.  If there
> Simon> is interest in having this class (it has been mentioned a few times in
> Simon> the past) I can do it and use it here.
> 
> I think it's fine to just do this for the time being.
> Thank you.

I had forgotten about that patch, thanks.  I also realized the subject is
wrong, it should be array_view instead of vector.  Will push with that
fixed.

Simon

      reply	other threads:[~2022-09-21 15:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-19 14:27 Simon Marchi
2022-07-19 15:10 ` Bruno Larsen
2022-07-19 18:55   ` Simon Marchi
2022-09-21 15:34   ` Simon Marchi
2022-09-21 15:31 ` Tom Tromey
2022-09-21 15:38   ` 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=798e60b7-de41-b394-05cf-d5c79d7e22d6@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).