This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[review] Only make a nullterminated string if we need to
- From: "Tom Tromey (Code Review)" <gerrit at gnutoolchain-gerrit dot osci dot io>
- To: Christian Biesinger <cbiesinger at google dot com>, gdb-patches at sourceware dot org
- Cc: Luis Machado <luis dot machado at linaro dot org>
- Date: Fri, 25 Oct 2019 13:59:13 -0400
- Subject: [review] Only make a nullterminated string if we need to
- Auto-submitted: auto-generated
- References: <gerrit.1571783424000.I183302e1f51483ff6dff0fd5c3b0f32f0f04a5d2@gnutoolchain-gerrit.osci.io>
- Reply-to: gnutoolchain-gerrit at osci dot io
Tom Tromey has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/222
......................................................................
Patch Set 1:
Thanks for the patch.
The patch moves the `linkage_name_copy` code a bit lower.
But, I think this copy is actually no longer needed at all, and
so the code can be removed. The only real (non-flag) use of
linkage_name_copy is to again copy:
strcpy (mangled_ptr, linkage_name_copy);
... but this could be replaced by a memcpy and then a store of
the trailing \0.
Wouldn't this change also re-enable the string_view change?
It seems that way to me, but I wonder if I am missing something here.
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I183302e1f51483ff6dff0fd5c3b0f32f0f04a5d2
Gerrit-Change-Number: 222
Gerrit-PatchSet: 1
Gerrit-Owner: Christian Biesinger <cbiesinger@google.com>
Gerrit-Reviewer: Luis Machado <luis.machado@linaro.org>
Gerrit-CC: Tom Tromey <tromey@sourceware.org>
Gerrit-Comment-Date: Fri, 25 Oct 2019 17:59:13 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment