mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-05 23:23:09 +00:00
gdb: rename ldirname to gdb_ldirname
It conflicts with the ldirname function that will be added in the next libiberty sync.
This commit is contained in:
@@ -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 ());
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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));
|
||||
|
||||
{
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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 ());
|
||||
|
||||
@@ -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 ());
|
||||
|
||||
Reference in New Issue
Block a user