1 // name-finder.h - Convert addresses to names
3 /* Copyright (C) 2000 Red Hat 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>
29 /* _Jv_name_finder is a class wrapper around a mechanism that can
30 convert addresses of methods to their names and the names of files
31 in which they appear. */
36 _Jv_name_finder (char *executable
);
39 #if defined (HAVE_PIPE) && defined (HAVE_FORK)
44 // We don't care about errors here.
45 waitpid (pid
, &wstat
, 0);
49 /* Given a pointer to a function or method, try to convert it into a
50 name and the appropriate line and source file. The caller passes
51 the code pointer in p.
53 Returns false if the lookup fails. Even if this happens, the field
54 hex will have been correctly filled in with the pointer.
56 The other fields are method_name and file_name, which lookup will
57 attempt to fill appropriately. If the lookup has failed, these
58 fields contain garbage.*/
59 bool lookup (void *p
);
61 char method_name
[1024];
63 char hex
[sizeof (void *) * 2 + 5];
67 #if defined (HAVE_PIPE) && defined (HAVE_FORK)
69 int f_pipe
[2], b_pipe
[2];