1 // name-finder.h - Convert addresses to names
3 /* Copyright (C) 2000, 2002 Free Software Foundation, Inc
5 This file is part of libgcj.
7 This software is copyrighted work licensed under the terms of the
8 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
12 * @author Andrew Haley <aph@cygnus.com>
19 #include <sys/types.h>
21 #ifdef HAVE_SYS_WAIT_H
32 /* _Jv_name_finder is a class wrapper around a mechanism that can
33 convert addresses of methods to their names and the names of files
34 in which they appear. */
39 _Jv_name_finder (char *executable);
42 #if defined (HAVE_PIPE) && defined (HAVE_FORK)
47 // We don't care about errors here.
48 waitpid (pid, &wstat, 0);
52 /* Given a pointer to a function or method, try to convert it into a
53 name and the appropriate line and source file. The caller passes
54 the code pointer in p.
56 Returns false if the lookup fails. Even if this happens, the field
57 hex will have been correctly filled in with the pointer.
59 The other fields are method_name and file_name, which lookup will
60 attempt to fill appropriately. If the lookup has failed, these
61 fields contain garbage.*/
62 bool lookup (void *p);
64 char method_name[1024];
66 char hex[sizeof (void *) * 2 + 5];
70 #if defined (HAVE_PIPE) && defined (HAVE_FORK)
72 int f_pipe[2], b_pipe[2];