/* Definitions for reading symbol files into GDB.
- Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2007, 2008, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 1990-2004, 2007-2012 Free Software Foundation, Inc.
This file is part of GDB.
/* Forget all cached full file names for OBJFILE. */
void (*forget_cached_source_info) (struct objfile *objfile);
- /* Look up the symbol table, in OBJFILE, of a source file named
- NAME. If there is no '/' in the name, a match after a '/' in the
- symbol table's file name will also work. FULL_PATH is the
- absolute file name, and REAL_PATH is the same, run through
- gdb_realpath.
-
- If no such symbol table can be found, returns 0.
-
- Otherwise, sets *RESULT to the symbol table and returns 1. This
- might return 1 and set *RESULT to NULL if the requested file is
- an include file that does not have a symtab of its own. */
- int (*lookup_symtab) (struct objfile *objfile,
- const char *name,
- const char *full_path,
- const char *real_path,
- struct symtab **result);
+ /* Expand and iterate over each "partial" symbol table in OBJFILE
+ where the source file is named NAME.
+
+ If NAME is not absolute, a match after a '/' in the symbol
+ table's file name will also work. FULL_PATH is the absolute file
+ name, and REAL_PATH is the same, run through gdb_realpath.
+
+ If a match is found, the "partial" symbol table is expanded.
+ Then, this calls iterate_over_some_symtabs (or equivalent) over
+ all newly-created symbol tables, passing CALLBACK and DATA to it.
+ The result of this call is returned. */
+ int (*map_symtabs_matching_filename) (struct objfile *objfile,
+ const char *name,
+ const char *full_path,
+ const char *real_path,
+ int (*callback) (struct symtab *,
+ void *),
+ void *data);
/* Check to see if the symbol is defined in a "partial" symbol table
of OBJFILE. KIND should be either GLOBAL_BLOCK or STATIC_BLOCK,
through global symbols if GLOBAL and otherwise static symbols.
Passes NAME, NAMESPACE, and DATA to CALLBACK with each symbol
found. After each block is processed, passes NULL to CALLBACK.
- MATCH must be weaker than strcmp_iw in the sense that
- strcmp_iw(x,y) == 0 --> MATCH(x,y) == 0. ORDERED_COMPARE, if
- non-null, must be an ordering relation compatible with strcmp_iw
- in the sense that
- strcmp_iw(x,y) == 0 --> ORDERED_COMPARE(x,y) == 0
+ MATCH must be weaker than strcmp_iw_ordered in the sense that
+ strcmp_iw_ordered(x,y) == 0 --> MATCH(x,y) == 0. ORDERED_COMPARE,
+ if non-null, must be an ordering relation compatible with
+ strcmp_iw_ordered in the sense that
+ strcmp_iw_ordered(x,y) == 0 --> ORDERED_COMPARE(x,y) == 0
and
- strcmp_iw(x,y) <= 0 --> ORDERED_COMPARE(x,y) <= 0
- (allowing strcmp_iw(x,y) < 0 while ORDERED_COMPARE(x, y) == 0).
+ strcmp_iw_ordered(x,y) <= 0 --> ORDERED_COMPARE(x,y) <= 0
+ (allowing strcmp_iw_ordered(x,y) < 0 while ORDERED_COMPARE(x, y) == 0).
CALLBACK returns 0 to indicate that the scan should continue, or
non-zero to indicate that the scan should be terminated. */
file is skipped. If FILE_MATCHER is NULL such file is not skipped.
Otherwise, if KIND does not match this symbol is skipped.
-
- If even KIND matches, then NAME_MATCHER is called for each symbol defined
- in the file. The symbol's "natural" name and DATA are passed to
- NAME_MATCHER.
+
+ If even KIND matches, then NAME_MATCHER is called for each symbol
+ defined in the file. The symbol "search" name and DATA are passed
+ to NAME_MATCHER.
If NAME_MATCHER returns zero, then this symbol is skipped.
DATA is user data that is passed unmodified to the callback
functions. */
- void (*expand_symtabs_matching) (struct objfile *objfile,
- int (*file_matcher) (const char *, void *),
- int (*name_matcher) (const char *, void *),
- enum search_domain kind,
- void *data);
+ void (*expand_symtabs_matching)
+ (struct objfile *objfile,
+ int (*file_matcher) (const char *, void *),
+ int (*name_matcher) (const char *, void *),
+ enum search_domain kind,
+ void *data);
/* Return the symbol table from OBJFILE that contains PC and
SECTION. Return NULL if there is no such symbol table. This