diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2023-10-08 01:16:29 +0000 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2023-10-19 10:57:51 -0400 |
commit | 98107b0b17acd9d2c28829cbe93a75b72677d220 (patch) | |
tree | fcbc63a8764ed76342d61e040e92cc2f61a8764e /gdb/solib-frv.c | |
parent | 200b85632a99e749e14d1c026b7e24c15a5e2776 (diff) | |
download | fsf-binutils-gdb-98107b0b17acd9d2c28829cbe93a75b72677d220.zip fsf-binutils-gdb-98107b0b17acd9d2c28829cbe93a75b72677d220.tar.gz fsf-binutils-gdb-98107b0b17acd9d2c28829cbe93a75b72677d220.tar.bz2 |
gdb: make so_list::{so_original_name,so_name} std::strings
Change these two fields, simplifying memory management and copying.
Change-Id: If2559284c515721e71e1ef56ada8b64667eebe55
Approved-By: Pedro Alves <pedro@palves.net>
Reviewed-By: Reviewed-By: Lancelot Six <lancelot.six@amd.com>
Diffstat (limited to 'gdb/solib-frv.c')
-rw-r--r-- | gdb/solib-frv.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c index 2ed6280..d92c353 100644 --- a/gdb/solib-frv.c +++ b/gdb/solib-frv.c @@ -395,10 +395,8 @@ frv_current_sos (void) warning (_("Can't read pathname for link map entry.")); else { - strncpy (sop->so_name, name_buf.get (), - SO_NAME_MAX_PATH_SIZE - 1); - sop->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0'; - strcpy (sop->so_original_name, sop->so_name); + sop->so_name = name_buf.get (); + sop->so_original_name = sop->so_name; } sop->lm_info = std::move (li); |