Re: [PATCH 20/24] gdb: make so_list::{so_original_name, so_name} std::strings

Simon Marchi
2023-10-14T20:01:43Z

On 10/13/23 18:28, Lancelot SIX wrote:
> Hi Simon,
>
> On Tue, Oct 10, 2023 at 04:40:15PM -0400, Simon Marchi wrote:
>> Change these two fields, simplifying memory management and copying.
>>
>> Change-Id: If2559284c515721e71e1ef56ada8b64667eebe55
>> ---
>> gdb/break-catch-load.c | 2 +-
>> gdb/breakpoint.c | 2 +-
>> gdb/bsd-uthread.c | 8 +++----
>> gdb/mi/mi-cmd-file.c | 2 +-
>> gdb/solib-aix.c | 8 +++----
>> gdb/solib-darwin.c | 5 ++---
>> gdb/solib-dsbt.c | 5 ++---
>> gdb/solib-frv.c | 6 ++----
>> gdb/solib-rocm.c | 8 ++-----
>> gdb/solib-svr4.c | 25 ++++++++++------------
>> gdb/solib-target.c | 18 ++++++----------
>> gdb/solib.c | 47 +++++++++++++++++++++++-------------------
>> gdb/solist.h | 4 ++--
>> 13 files changed, 63 insertions(+), 77 deletions(-)
>>
>> diff --git a/gdb/mi/mi-cmd-file.c b/gdb/mi/mi-cmd-file.c
>> index 822d3df40005..5f63ce4494cb 100644
>> --- a/gdb/mi/mi-cmd-file.c
>> +++ b/gdb/mi/mi-cmd-file.c
>> @@ -167,7 +167,7 @@ mi_cmd_file_list_shared_libraries (const char *command,
>> {
>> if (so->so_name[0] == '\0')
>
> I think this should become "so->so_name.empty ()".

I believe that it's functionally equivalent, but I agree, I will fix
these up.

Simon