mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-02 11:01:35 +08:00
gdb/
Replace xfullpath calls by gdb_realpath calls. * cli/cli-cmds.c (find_and_open_script): Remove xfullpath from the function comment. * dwarf2read.c (dw2_map_expand_apply): Remove parameter full_path. Remove it from the iterate_over_some_symtabs call. (dw2_map_symtabs_matching_filename): Remove parameter full_path. Remove it from the dw2_map_expand_apply calls, remove a block handling it. * psymtab.c (partial_map_expand_apply): Remove parameter full_path. Remove it from the iterate_over_some_symtabs call. (partial_map_symtabs_matching_filename): Remove parameter full_path. Remove it from the partial_map_expand_apply calls, remove a block handling it. Drop gdb_realpath call and cleanups from the real_path handling. * source.c (openp): Drop the comment part about xfullpath. Replace xfullpath calls by gdb_realpath calls. (find_and_open_source): Replace xfullpath call by gdb_realpath call. * symfile.h (struct quick_symbol_functions): Remove parameter full_path from method map_symtabs_matching_filename and its comment. * symmisc.c (maintenance_print_msymbols): Replace xfullpath call by gdb_realpath call. * symtab.c (iterate_over_some_symtabs): Remove parameter full_path, remove it also from the function comment, remove a block handling it. Drop gdb_realpath call and cleanups from the real_path handling. (iterate_over_symtabs): Drop variable full_path and its use. * symtab.h (iterate_over_some_symtabs): Remove parameter full_path. * utils.c (xfullpath): Remove. * utils.h (xfullpath): Remove. gdb/testsuite/ * gdb.gdb/xfullpath.exp: Replace xfullpath calls by gdb_realpath calls.
This commit is contained in:
@ -131,7 +131,6 @@ require_partial_symbols (struct objfile *objfile, int verbose)
|
||||
static int
|
||||
partial_map_expand_apply (struct objfile *objfile,
|
||||
const char *name,
|
||||
const char *full_path,
|
||||
const char *real_path,
|
||||
struct partial_symtab *pst,
|
||||
int (*callback) (struct symtab *, void *),
|
||||
@ -151,7 +150,7 @@ partial_map_expand_apply (struct objfile *objfile,
|
||||
all of them. */
|
||||
psymtab_to_symtab (objfile, pst);
|
||||
|
||||
return iterate_over_some_symtabs (name, full_path, real_path, callback, data,
|
||||
return iterate_over_some_symtabs (name, real_path, callback, data,
|
||||
objfile->symtabs, last_made);
|
||||
}
|
||||
|
||||
@ -160,7 +159,6 @@ partial_map_expand_apply (struct objfile *objfile,
|
||||
static int
|
||||
partial_map_symtabs_matching_filename (struct objfile *objfile,
|
||||
const char *name,
|
||||
const char *full_path,
|
||||
const char *real_path,
|
||||
int (*callback) (struct symtab *,
|
||||
void *),
|
||||
@ -184,7 +182,7 @@ partial_map_symtabs_matching_filename (struct objfile *objfile,
|
||||
if (FILENAME_CMP (name, pst->filename) == 0
|
||||
|| (!is_abs && compare_filenames_for_search (pst->filename, name)))
|
||||
{
|
||||
if (partial_map_expand_apply (objfile, name, full_path, real_path,
|
||||
if (partial_map_expand_apply (objfile, name, real_path,
|
||||
pst, callback, data))
|
||||
return 1;
|
||||
}
|
||||
@ -197,34 +195,14 @@ partial_map_symtabs_matching_filename (struct objfile *objfile,
|
||||
|
||||
/* If the user gave us an absolute path, try to find the file in
|
||||
this symtab and use its absolute path. */
|
||||
if (full_path != NULL)
|
||||
if (real_path != NULL)
|
||||
{
|
||||
psymtab_to_fullname (pst);
|
||||
if (pst->fullname != NULL
|
||||
&& (FILENAME_CMP (full_path, pst->fullname) == 0
|
||||
|| (!is_abs && compare_filenames_for_search (pst->fullname,
|
||||
name))))
|
||||
{
|
||||
if (partial_map_expand_apply (objfile, name, full_path, real_path,
|
||||
pst, callback, data))
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (real_path != NULL)
|
||||
{
|
||||
char *rp = NULL;
|
||||
psymtab_to_fullname (pst);
|
||||
if (pst->fullname != NULL)
|
||||
{
|
||||
rp = gdb_realpath (pst->fullname);
|
||||
make_cleanup (xfree, rp);
|
||||
}
|
||||
if (rp != NULL
|
||||
&& (FILENAME_CMP (real_path, rp) == 0
|
||||
&& (FILENAME_CMP (real_path, pst->fullname) == 0
|
||||
|| (!is_abs && compare_filenames_for_search (real_path, name))))
|
||||
{
|
||||
if (partial_map_expand_apply (objfile, name, full_path, real_path,
|
||||
if (partial_map_expand_apply (objfile, name, real_path,
|
||||
pst, callback, data))
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user