delorie.com/djgpp/doc/libc/libc_793.html | search |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include <debug/syms.h> void syms_listwild (char *pattern, void (*handler) (unsigned long addr, char type_c, char *name, char *file, int lnum)); |
This function walks through all the symbols that were read by a previous
call to syms_init
(see section syms_init). For each symbol whose
name matches pattern, it invokes the user-defined function
handler, passing it information about that symbol:
address
type_c
a.out
file only).
a.out
file only).
a.out
file only).
name
file
lnum
Since variables and functions defined in C get prepended with an underscore `_', begin pattern with `_' if you want it to match C symbols.
You must call syms_init
(see section syms_init) before calling any of
the other syms_*
functions for the first time.
None.
ANSI/ISO C | No |
POSIX | No |
void print_sym (unsigned long addr, char type_c, char *name, char *file, int lnum) { printf (file ? "%s: %lx %c %s:%d\n" : "%s: %lx %c\n", name, addr, type_c, file ? file : "", lnum ); } int main (void) { syms_init ("foo.exe"); /* List all the symbols which begin with "___djgpp". */ syms_listwild ("___djgpp*", print_sym); return 0; } |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
webmaster | delorie software privacy |
Copyright © 2004 | Updated Apr 2004 |