GDB (API)
/home/stan/gdb/src/gdb/minsyms.h
Go to the documentation of this file.
00001 /* Minimal symbol table definitions for GDB.
00002 
00003    Copyright (C) 2011-2013 Free Software Foundation, Inc.
00004 
00005    This file is part of GDB.
00006 
00007    This program is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 3 of the License, or
00010    (at your option) any later version.
00011 
00012    This program is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016 
00017    You should have received a copy of the GNU General Public License
00018    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00019 
00020 #ifndef MINSYMS_H
00021 #define MINSYMS_H
00022 
00028 struct bound_minimal_symbol
00029 {
00034   struct minimal_symbol *minsym;
00035 
00040   struct objfile *objfile;
00041 };
00042 
00067 void init_minimal_symbol_collection (void);
00068 
00077 struct cleanup *make_cleanup_discard_minimal_symbols (void);
00078 
00102 struct minimal_symbol *prim_record_minimal_symbol_full
00103     (const char *name,
00104      int name_len,
00105      int copy_name,
00106      CORE_ADDR address,
00107      enum minimal_symbol_type ms_type,
00108      int section,
00109      struct objfile *objfile);
00110 
00119 void prim_record_minimal_symbol (const char *, CORE_ADDR,
00120                                  enum minimal_symbol_type,
00121                                  struct objfile *);
00122 
00128 struct minimal_symbol *prim_record_minimal_symbol_and_info
00129     (const char *,
00130      CORE_ADDR,
00131      enum minimal_symbol_type,
00132      int section,
00133      struct objfile *);
00134 
00142 void install_minimal_symbols (struct objfile *objfile);
00143 
00150 void terminate_minimal_symbol_table (struct objfile *objfile);
00151 
00157 void msymbols_sort (struct objfile *objfile);
00158 
00159 
00160 
00163 unsigned int msymbol_hash (const char *);
00164 
00169 unsigned int msymbol_hash_iw (const char *);
00170 
00176 #define SYMBOL_HASH_NEXT(hash, c)                       \
00177   ((hash) * 67 + tolower ((unsigned char) (c)) - 113)
00178 
00179 
00180 
00193 struct minimal_symbol *lookup_minimal_symbol (const char *name,
00194                                               const char *sfile,
00195                                               struct objfile *objf);
00196 
00203 struct bound_minimal_symbol lookup_bound_minimal_symbol (const char *name);
00204 
00211 struct bound_minimal_symbol lookup_minimal_symbol_and_objfile
00212     (const char *name);
00213 
00222 struct minimal_symbol *lookup_minimal_symbol_text (const char *name,
00223                                                    struct objfile *objf);
00224 
00234 struct minimal_symbol *lookup_minimal_symbol_solib_trampoline
00235     (const char *,
00236      struct objfile *);
00237 
00244 struct minimal_symbol *lookup_minimal_symbol_by_pc_name
00245     (CORE_ADDR, const char *, struct objfile *);
00246 
00258 struct bound_minimal_symbol lookup_minimal_symbol_by_pc_section
00259     (CORE_ADDR,
00260      struct obj_section *);
00261 
00269 struct bound_minimal_symbol lookup_minimal_symbol_by_pc (CORE_ADDR);
00270 
00280 void iterate_over_minimal_symbols (struct objfile *objf,
00281                                    const char *name,
00282                                    void (*callback) (struct minimal_symbol *,
00283                                                      void *),
00284                                    void *user_data);
00285 
00286 #endif /* MINSYMS_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines