]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: rename ldirname to gdb_ldirname
authorAndreas Schwab <schwab@suse.de>
Wed, 14 May 2025 15:08:52 +0000 (17:08 +0200)
committerAndreas Schwab <schwab@suse.de>
Thu, 15 May 2025 08:20:53 +0000 (10:20 +0200)
It conflicts with the ldirname function that will be added in the next
libiberty sync.

gdb/corelow.c
gdb/darwin-nat.c
gdb/dwarf2/dwz.c
gdb/dwarf2/read.c
gdb/python/python.c
gdb/symtab.c
gdb/utils.c
gdb/utils.h
gdb/xml-syscall.c
gdb/xml-tdesc.c

index 45187816d78ab0f8b32dbe6c89758712c272a892..127400eabaa0c42a067486c87e810097225bd798 100644 (file)
@@ -957,7 +957,7 @@ locate_exec_from_corefile_exec_context (bfd *cbfd,
     execbfd = open_and_check_build_id (exec_name);
   else
     {
-      std::string p = (ldirname (bfd_get_filename (cbfd))
+      std::string p = (gdb_ldirname (bfd_get_filename (cbfd))
                       + '/'
                       + exec_name);
       execbfd = open_and_check_build_id (p.c_str ());
@@ -971,7 +971,7 @@ locate_exec_from_corefile_exec_context (bfd *cbfd,
   if (execbfd == nullptr)
     {
       const char *base_name = lbasename (exec_name);
-      std::string p = (ldirname (bfd_get_filename (cbfd))
+      std::string p = (gdb_ldirname (bfd_get_filename (cbfd))
                       + '/'
                       + base_name);
       execbfd = open_and_check_build_id (p.c_str ());
index 6bc0e4f8e7a9e910616b20671e49f230b49ccd3b..ffbf949fe796bd76d5efc74742a3f8ce63dc8dbc 100644 (file)
@@ -1853,7 +1853,7 @@ copy_shell_to_cache (const char *shell, const std::string &new_name)
     error (_("Could not open shell (%s) for reading: %s"),
           shell, safe_strerror (errno));
 
-  std::string new_dir = ldirname (new_name.c_str ());
+  std::string new_dir = gdb_ldirname (new_name.c_str ());
   if (!mkdir_recursive (new_dir.c_str ()))
     error (_("Could not make cache directory \"%s\": %s"),
           new_dir.c_str (), safe_strerror (errno));
index 59fe8e4886b4290a945bef663e8fa3ad4a745fc4..1aa0d035d22cc3fd2662a29f07696a0ff3957075 100644 (file)
@@ -343,7 +343,7 @@ dwz_file::read_dwz_file (dwarf2_per_objfile *per_objfile)
     {
       gdb::unique_xmalloc_ptr<char> abs = gdb_realpath (per_bfd->filename ());
 
-      filename = ldirname (abs.get ()) + SLASH_STRING + filename;
+      filename = gdb_ldirname (abs.get ()) + SLASH_STRING + filename;
     }
 
   /* First try the file name given in the section.  If that doesn't
index 891e10f6e816135e002ee32529291b59bfcb5ffe..75e13159c64c98d2639f5649b22370a29563c90c 100644 (file)
@@ -5859,7 +5859,7 @@ find_file_and_directory (struct die_info *die, struct dwarf2_cu *cu)
       && res.get_name () != nullptr
       && IS_ABSOLUTE_PATH (res.get_name ()))
     {
-      res.set_comp_dir (ldirname (res.get_name ()));
+      res.set_comp_dir (gdb_ldirname (res.get_name ()));
       res.set_name (make_unique_xstrdup (lbasename (res.get_name ())));
     }
 
@@ -7434,7 +7434,7 @@ try_open_dwop_file (dwarf2_per_bfd *per_bfd, const char *file_name, int is_dwp,
     search_path = per_bfd->captured_debug_dir.c_str ();
 
   /* Add the path for the executable binary to the list of search paths.  */
-  std::string objfile_dir = ldirname (per_bfd->filename ());
+  std::string objfile_dir = gdb_ldirname (per_bfd->filename ());
   search_path_holder.reset (concat (objfile_dir.c_str (),
                                    dirname_separator_string,
                                    search_path, nullptr));
@@ -7807,7 +7807,7 @@ open_and_init_dwp_file (dwarf2_per_objfile *per_objfile)
       struct objfile *backlink = objfile->separate_debug_objfile_backlink;
       const char *backlink_basename = lbasename (backlink->original_name);
 
-      dwp_name = ldirname (objfile->original_name) + SLASH_STRING + backlink_basename;
+      dwp_name = gdb_ldirname (objfile->original_name) + SLASH_STRING + backlink_basename;
     }
   else
     dwp_name = objfile->original_name;
index 24cb511c3d570fe7a6192f0beb0354bdda91769a..7c3d0d104b52482ea1ea34b23564c6d1dd7a1c53 100644 (file)
@@ -2446,7 +2446,7 @@ py_initialize ()
      /foo/lib/pythonX.Y/...
      This must be done before calling Py_Initialize.  */
   gdb::unique_xmalloc_ptr<char> progname
-    (concat (ldirname (python_libdir.c_str ()).c_str (), SLASH_STRING, "bin",
+    (concat (gdb_ldirname (python_libdir.c_str ()).c_str (), SLASH_STRING, "bin",
              SLASH_STRING, "python", (char *) NULL));
 
   {
index 313aa5ffa00561fc44db9addcf7d881af3120ed1..febd04176db77331550d8ccf7a561d43e83afafc 100644 (file)
@@ -4492,7 +4492,7 @@ info_sources_filter::matches (const char *fullname) const
       switch (m_match_type)
        {
        case match_on::DIRNAME:
-         dirname = ldirname (fullname);
+         dirname = gdb_ldirname (fullname);
          to_match = dirname.c_str ();
          break;
        case match_on::BASENAME:
index 7b0c8127583c973857770b6815b25e41a70a080c..8d9f0033225f81fe6156ba335759f83403aac157 100644 (file)
@@ -3333,7 +3333,7 @@ gdb_argv_as_array_view_test ()
    argument.  */
 
 std::string
-ldirname (const char *filename)
+gdb_ldirname (const char *filename)
 {
   std::string dirname;
   const char *base = lbasename (filename);
index a8834cf4bc2bbba9e212c94bd484d62217b0fd1d..b37e8f7d7a1719fa84fe99b94d90163b1e19a031 100644 (file)
@@ -133,7 +133,7 @@ private:
 extern int gdb_filename_fnmatch (const char *pattern, const char *string,
                                 int flags);
 
-std::string ldirname (const char *filename);
+std::string gdb_ldirname (const char *filename);
 
 extern int count_path_elements (const char *path);
 
index fe0ea2b75a030ba44797cfeb67acb8ed97b344bb..b58fe5d0d2f31f4f3217a85ab3ea6f360b32b9ef 100644 (file)
@@ -319,7 +319,7 @@ xml_init_syscalls_info (const char *filename)
   if (!full_file)
     return NULL;
 
-  const std::string dirname = ldirname (filename);
+  const std::string dirname = gdb_ldirname (filename);
   auto fetch_another = [&dirname] (const char *name)
     {
       return xml_fetch_content_from_file (name, dirname.c_str ());
index 6c095afa699895f03be538259419070ee3f1e00c..2f213dc973d57550bd5c7a9ad5e9e9b6b622679d 100644 (file)
@@ -670,7 +670,7 @@ file_read_description_xml (const char *filename)
       return NULL;
     }
 
-  const std::string dirname = ldirname (filename);
+  const std::string dirname = gdb_ldirname (filename);
   auto fetch_another = [&dirname] (const char *name)
     {
       return xml_fetch_content_from_file (name, dirname.c_str ());