#include "complaints.h"
#include "demangle.h"
#include "psympriv.h"
+#include "filenames.h"
extern void _initialize_elfread (void);
{
struct gdbarch *gdbarch = get_objfile_arch (objfile);
- if (ms_type == mst_text || ms_type == mst_file_text)
+ if (ms_type == mst_text || ms_type == mst_file_text
+ || ms_type == mst_text_gnu_ifunc)
address = gdbarch_smash_text_address (gdbarch, address);
return prim_record_minimal_symbol_full (name, name_len, copy_name, address,
{
if (sym->flags & (BSF_GLOBAL | BSF_WEAK))
{
- ms_type = mst_text;
+ if (sym->flags & BSF_GNU_INDIRECT_FUNCTION)
+ ms_type = mst_text_gnu_ifunc;
+ else
+ ms_type = mst_text;
}
else if ((sym->name[0] == '.' && sym->name[1] == 'L')
|| ((sym->flags & BSF_LOCAL)
build_id_name = build_id_to_debug_filename (build_id);
xfree (build_id);
/* Prevent looping on a stripped .debug file. */
- if (build_id_name != NULL && strcmp (build_id_name, objfile->name) == 0)
+ if (build_id_name != NULL
+ && filename_cmp (build_id_name, objfile->name) == 0)
{
warning (_("\"%s\": separate debug info file has no debug info"),
build_id_name);
struct stab_section_info *maybe = dbx->stab_section_info;
struct stab_section_info *questionable = 0;
int i;
- char *p;
/* The ELF symbol info doesn't include path names, so strip the path
(if any) from the psymtab filename. */
- while (0 != (p = strchr (filename, '/')))
- filename = p + 1;
+ filename = lbasename (filename);
/* FIXME: This linear search could speed up significantly
if it was chained in the right order to match how we search it,
for (; maybe; maybe = maybe->next)
{
if (filename[0] == maybe->filename[0]
- && strcmp (filename, maybe->filename) == 0)
+ && filename_cmp (filename, maybe->filename) == 0)
{
/* We found a match. But there might be several source files
(from different directories) with the same name. */