xref: /dflybsd-src/contrib/gdb-7/gdb/jv-lang.h (revision 5796c8dc12c637f18a1740c26afd8d40ffa9b719)
1*5796c8dcSSimon Schubert /* Java language support definitions for GDB, the GNU debugger.
2*5796c8dcSSimon Schubert 
3*5796c8dcSSimon Schubert    Copyright (C) 1997, 1998, 1999, 2000, 2005, 2007, 2008, 2009
4*5796c8dcSSimon Schubert    Free Software Foundation, Inc.
5*5796c8dcSSimon Schubert 
6*5796c8dcSSimon Schubert    This file is part of GDB.
7*5796c8dcSSimon Schubert 
8*5796c8dcSSimon Schubert    This program is free software; you can redistribute it and/or modify
9*5796c8dcSSimon Schubert    it under the terms of the GNU General Public License as published by
10*5796c8dcSSimon Schubert    the Free Software Foundation; either version 3 of the License, or
11*5796c8dcSSimon Schubert    (at your option) any later version.
12*5796c8dcSSimon Schubert 
13*5796c8dcSSimon Schubert    This program is distributed in the hope that it will be useful,
14*5796c8dcSSimon Schubert    but WITHOUT ANY WARRANTY; without even the implied warranty of
15*5796c8dcSSimon Schubert    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16*5796c8dcSSimon Schubert    GNU General Public License for more details.
17*5796c8dcSSimon Schubert 
18*5796c8dcSSimon Schubert    You should have received a copy of the GNU General Public License
19*5796c8dcSSimon Schubert    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
20*5796c8dcSSimon Schubert 
21*5796c8dcSSimon Schubert #ifndef JV_LANG_H
22*5796c8dcSSimon Schubert #define JV_LANG_H
23*5796c8dcSSimon Schubert 
24*5796c8dcSSimon Schubert struct value;
25*5796c8dcSSimon Schubert 
26*5796c8dcSSimon Schubert extern int java_parse (void);	/* Defined in jv-exp.y */
27*5796c8dcSSimon Schubert 
28*5796c8dcSSimon Schubert extern void java_error (char *);	/* Defined in jv-exp.y */
29*5796c8dcSSimon Schubert 
30*5796c8dcSSimon Schubert struct builtin_java_type
31*5796c8dcSSimon Schubert {
32*5796c8dcSSimon Schubert   struct type *builtin_int;
33*5796c8dcSSimon Schubert   struct type *builtin_byte;
34*5796c8dcSSimon Schubert   struct type *builtin_short;
35*5796c8dcSSimon Schubert   struct type *builtin_long;
36*5796c8dcSSimon Schubert   struct type *builtin_boolean;
37*5796c8dcSSimon Schubert   struct type *builtin_char;
38*5796c8dcSSimon Schubert   struct type *builtin_float;
39*5796c8dcSSimon Schubert   struct type *builtin_double;
40*5796c8dcSSimon Schubert   struct type *builtin_void;
41*5796c8dcSSimon Schubert };
42*5796c8dcSSimon Schubert 
43*5796c8dcSSimon Schubert extern const struct builtin_java_type *builtin_java_type (struct gdbarch *);
44*5796c8dcSSimon Schubert 
45*5796c8dcSSimon Schubert extern int java_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
46*5796c8dcSSimon Schubert 			   struct ui_file *, int,
47*5796c8dcSSimon Schubert 			   const struct value_print_options *);
48*5796c8dcSSimon Schubert 
49*5796c8dcSSimon Schubert extern int java_value_print (struct value *, struct ui_file *,
50*5796c8dcSSimon Schubert 			     const struct value_print_options *);
51*5796c8dcSSimon Schubert 
52*5796c8dcSSimon Schubert extern struct value *java_class_from_object (struct value *);
53*5796c8dcSSimon Schubert 
54*5796c8dcSSimon Schubert extern struct type *type_from_class (struct gdbarch *, struct value *);
55*5796c8dcSSimon Schubert 
56*5796c8dcSSimon Schubert extern struct type *java_primitive_type (struct gdbarch *, int signature);
57*5796c8dcSSimon Schubert 
58*5796c8dcSSimon Schubert extern struct type *java_primitive_type_from_name (struct gdbarch *,
59*5796c8dcSSimon Schubert 						   char *, int);
60*5796c8dcSSimon Schubert 
61*5796c8dcSSimon Schubert extern struct type *java_array_type (struct type *, int);
62*5796c8dcSSimon Schubert 
63*5796c8dcSSimon Schubert extern struct type *get_java_object_type (void);
64*5796c8dcSSimon Schubert extern int get_java_object_header_size (struct gdbarch *);
65*5796c8dcSSimon Schubert 
66*5796c8dcSSimon Schubert extern struct type *java_lookup_class (char *);
67*5796c8dcSSimon Schubert 
68*5796c8dcSSimon Schubert extern int is_object_type (struct type *);
69*5796c8dcSSimon Schubert 
70*5796c8dcSSimon Schubert /* Defined in jv-typeprint.c */
71*5796c8dcSSimon Schubert extern void java_print_type (struct type *, char *, struct ui_file *, int,
72*5796c8dcSSimon Schubert 			     int);
73*5796c8dcSSimon Schubert 
74*5796c8dcSSimon Schubert extern char *java_demangle_type_signature (char *);
75*5796c8dcSSimon Schubert 
76*5796c8dcSSimon Schubert #endif
77