Code cleanup.
* dwarf2read.c (dw2_map_symbol_filenames): Use symbol_filename_ftype
for fun.
* psymtab.c (map_symbol_filenames_psymtab)
(map_partial_symbol_filenames): Likewise.
* psymtab.h: Include symfile.h.
(map_partial_symbol_filenames): Use symbol_filename_ftype for fun.
* symfile.h (symbol_filename_ftype): New.
(struct quick_symbol_functions): Use symbol_filename_ftype for fun of
map_symbol_filenames, clarify more the naming in comment.
+2011-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Code cleanup.
+ * dwarf2read.c (dw2_map_symbol_filenames): Use symbol_filename_ftype
+ for fun.
+ * psymtab.c (map_symbol_filenames_psymtab)
+ (map_partial_symbol_filenames): Likewise.
+ * psymtab.h: Include symfile.h.
+ (map_partial_symbol_filenames): Use symbol_filename_ftype for fun.
+ * symfile.h (symbol_filename_ftype): New.
+ (struct quick_symbol_functions): Use symbol_filename_ftype for fun of
+ map_symbol_filenames, clarify more the naming in comment.
+
2011-06-07 Doug Evans <dje@google.com>
* cc-with-index.sh: Fix typos in comment.
}
static void
-dw2_map_symbol_filenames (struct objfile *objfile,
- void (*fun) (const char *, const char *, void *),
+dw2_map_symbol_filenames (struct objfile *objfile, symbol_filename_ftype *fun,
void *data)
{
int i;
static void
map_symbol_filenames_psymtab (struct objfile *objfile,
- void (*fun) (const char *, const char *,
- void *),
- void *data)
+ symbol_filename_ftype *fun, void *data)
{
struct partial_symtab *ps;
}
void
-map_partial_symbol_filenames (void (*fun) (const char *, const char *,
- void *),
- void *data)
+map_partial_symbol_filenames (symbol_filename_ftype *fun, void *data)
{
struct objfile *objfile;
#ifndef PSYMTAB_H
#define PSYMTAB_H
+#include "symfile.h"
+
/* A bcache for partial symbols. */
struct psymbol_bcache;
void expand_partial_symbol_names (int (*fun) (const char *, void *),
void *data);
-void map_partial_symbol_filenames (void (*) (const char *, const char *,
- void *),
- void *);
+void map_partial_symbol_filenames (symbol_filename_ftype *fun, void *data);
extern const struct quick_symbol_functions psym_functions;
int *segment_info;
};
+/* Callback for quick_symbol_functions->map_symbol_filenames. */
+
+typedef void (symbol_filename_ftype) (const char *filename,
+ const char *fullname, void *data);
+
/* The "quick" symbol functions exist so that symbol readers can
avoiding an initial read of all the symbols. For example, symbol
readers might choose to use the "partial symbol table" utilities,
int warn_if_readin);
/* Call a callback for every file defined in OBJFILE whose symtab is
- not already read in. FUN is the callback. It is passed the file's name,
- the file's full name, and the DATA passed to this function. */
+ not already read in. FUN is the callback. It is passed the file's
+ FILENAME, the file's FULLNAME, and the DATA passed to this function. */
void (*map_symbol_filenames) (struct objfile *objfile,
- void (*fun) (const char *, const char *,
- void *),
- void *data);
+ symbol_filename_ftype *fun, void *data);
};
/* Structure to keep track of symbol reading functions for various