From: Pedro Alves <pedro@palves.net>
To: gdb-patches@sourceware.org
Subject: [PATCH 1/4] Remove SO_NAME_MAX_PATH_SIZE limit from core solib code
Date: Fri, 22 Mar 2024 19:04:21 +0000 [thread overview]
Message-ID: <20240322190424.1231540-2-pedro@palves.net> (raw)
In-Reply-To: <20240322190424.1231540-1-pedro@palves.net>
solib_map_sections errors out if the library file name is longer than
SO_NAME_MAX_PATH_SIZE.
solib::so_name and solib::so_original_name used to be arrays of
SO_NAME_MAX_PATH_SIZE size, so that check made sense then.
However, since commit 98107b0b17ac ("gdb: make
so_list::{so_original_name,so_name} std::strings") those fields are of
std::string type, so there's really no need for the limit.
This commit simply removes the length limit check.
Change-Id: I2ec676b231cd18ae900c61c5caea461f47e989e6
---
gdb/solib.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/gdb/solib.c b/gdb/solib.c
index 952897c37fc..9497f5d3099 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -591,8 +591,6 @@ solib_map_sections (solib &so)
the library's host-side path. If we let the target dictate
that objfile's path, and the target is different from the host,
GDB/MI will not provide the correct host-side path. */
- if (strlen (bfd_get_filename (so.abfd.get ())) >= SO_NAME_MAX_PATH_SIZE)
- error (_ ("Shared library file name is too long."));
so.so_name = bfd_get_filename (so.abfd.get ());
so.sections = build_section_table (so.abfd.get ());
--
2.43.2
next prev parent reply other threads:[~2024-03-22 19:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-22 19:04 [PATCH 0/4] Down with SO_NAME_MAX_PATH_SIZE and windows_make_so spring cleaning Pedro Alves
2024-03-22 19:04 ` Pedro Alves [this message]
2024-03-22 19:04 ` [PATCH 2/4] Simplify windows-nat.c:windows_make_so #ifdefery Pedro Alves
2024-03-22 19:04 ` [PATCH 3/4] windows-nat: Remove SO_NAME_MAX_PATH_SIZE limit Pedro Alves
2024-03-22 19:04 ` [PATCH 4/4] windows-nat: Use gdb_realpath Pedro Alves
2024-03-22 19:37 ` [PATCH 0/4] Down with SO_NAME_MAX_PATH_SIZE and windows_make_so spring cleaning John Baldwin
2024-03-22 19:49 ` Pedro Alves
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=20240322190424.1231540-2-pedro@palves.net \
--to=pedro@palves.net \
--cc=gdb-patches@sourceware.org \
/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