+2005-02-09 Corinna Vinschen <vinschen@redhat.com>
+
+ * symmisc.c: Include gdb_stat.h.
+ (maintenance_print_msymbols): Use inode numbers to compare files.
+
2005-02-09 Andrew Cagney <cagney@gnu.org>
* config/sh/linux.mt (TDEPFILES): Add symfile-mem.o.
#include "bcache.h"
#include "block.h"
#include "gdb_regex.h"
+#include "gdb_stat.h"
#include "dictionary.h"
#include "gdb_string.h"
char *symname = NULL;
struct objfile *objfile;
+ struct stat sym_st, obj_st;
+
dont_repeat ();
if (args == NULL)
/* If a second arg is supplied, it is a source file name to match on */
if (argv[1] != NULL)
{
- symname = argv[1];
+ symname = xfullpath (argv[1]);
+ make_cleanup (xfree, symname);
+ if (symname && stat (symname, &sym_st))
+ perror_with_name (symname);
}
}
immediate_quit++;
ALL_OBJFILES (objfile)
- if (symname == NULL || strcmp (symname, objfile->name) == 0)
- dump_msymbols (objfile, outfile);
+ if (symname == NULL
+ || (!stat (objfile->name, &obj_st) && sym_st.st_ino == obj_st.st_ino))
+ dump_msymbols (objfile, outfile);
immediate_quit--;
fprintf_filtered (outfile, "\n\n");
do_cleanups (cleanups);