|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
#include <debug/syms.h> char *syms_val2line (unsigned long addr, int *line, int exact);
This function takes an address addr and returns the source file name which correspond to that address. The line number in that source file is stored in the variable pointed by line. If exact is non-zero, the function succeeds only if addr is the first address which corresponds to some source line.
You must call
syms_init (see section syms_init) before calling any of
syms_* functions for the first time.
The name of the source file which corresponds to addr, or
NULL if none was found.
int lineno; char *file_name; syms_init ("foo.exe"); file_name = syms_val2line (0x1c12, &lineno); printf ("The address %x is on %s, line %d\n", 0x1c12, file_name, line);
|webmaster||delorie software privacy|
|Copyright © 2004||Updated Apr 2004|