xref: /dflybsd-src/contrib/gdb-7/gdb/jv-lang.h (revision de8e141f24382815c10a4012d209bbbf7abf1112)
15796c8dcSSimon Schubert /* Java language support definitions for GDB, the GNU debugger.
25796c8dcSSimon Schubert 
3*ef5ccd6cSJohn Marino    Copyright (C) 1997-2013 Free Software Foundation, Inc.
45796c8dcSSimon Schubert 
55796c8dcSSimon Schubert    This file is part of GDB.
65796c8dcSSimon Schubert 
75796c8dcSSimon Schubert    This program is free software; you can redistribute it and/or modify
85796c8dcSSimon Schubert    it under the terms of the GNU General Public License as published by
95796c8dcSSimon Schubert    the Free Software Foundation; either version 3 of the License, or
105796c8dcSSimon Schubert    (at your option) any later version.
115796c8dcSSimon Schubert 
125796c8dcSSimon Schubert    This program is distributed in the hope that it will be useful,
135796c8dcSSimon Schubert    but WITHOUT ANY WARRANTY; without even the implied warranty of
145796c8dcSSimon Schubert    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
155796c8dcSSimon Schubert    GNU General Public License for more details.
165796c8dcSSimon Schubert 
175796c8dcSSimon Schubert    You should have received a copy of the GNU General Public License
185796c8dcSSimon Schubert    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
195796c8dcSSimon Schubert 
205796c8dcSSimon Schubert #ifndef JV_LANG_H
215796c8dcSSimon Schubert #define JV_LANG_H
225796c8dcSSimon Schubert 
235796c8dcSSimon Schubert struct value;
24*ef5ccd6cSJohn Marino struct type_print_options;
255796c8dcSSimon Schubert 
265796c8dcSSimon Schubert extern int java_parse (void);		/* Defined in jv-exp.y */
275796c8dcSSimon Schubert 
285796c8dcSSimon Schubert extern void java_error (char *);	/* Defined in jv-exp.y */
295796c8dcSSimon Schubert 
305796c8dcSSimon Schubert struct builtin_java_type
315796c8dcSSimon Schubert {
325796c8dcSSimon Schubert   struct type *builtin_int;
335796c8dcSSimon Schubert   struct type *builtin_byte;
345796c8dcSSimon Schubert   struct type *builtin_short;
355796c8dcSSimon Schubert   struct type *builtin_long;
365796c8dcSSimon Schubert   struct type *builtin_boolean;
375796c8dcSSimon Schubert   struct type *builtin_char;
385796c8dcSSimon Schubert   struct type *builtin_float;
395796c8dcSSimon Schubert   struct type *builtin_double;
405796c8dcSSimon Schubert   struct type *builtin_void;
415796c8dcSSimon Schubert };
425796c8dcSSimon Schubert 
435796c8dcSSimon Schubert extern const struct builtin_java_type *builtin_java_type (struct gdbarch *);
445796c8dcSSimon Schubert 
45*ef5ccd6cSJohn Marino extern void java_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
465796c8dcSSimon Schubert 			    struct ui_file *, int,
47cf7f2e2dSJohn Marino 			    const struct value *,
485796c8dcSSimon Schubert 			    const struct value_print_options *);
495796c8dcSSimon Schubert 
50*ef5ccd6cSJohn Marino extern void java_value_print (struct value *, struct ui_file *,
515796c8dcSSimon Schubert 			      const struct value_print_options *);
525796c8dcSSimon Schubert 
535796c8dcSSimon Schubert extern struct value *java_class_from_object (struct value *);
545796c8dcSSimon Schubert 
555796c8dcSSimon Schubert extern struct type *type_from_class (struct gdbarch *, struct value *);
565796c8dcSSimon Schubert 
575796c8dcSSimon Schubert extern struct type *java_primitive_type (struct gdbarch *, int signature);
585796c8dcSSimon Schubert 
595796c8dcSSimon Schubert extern struct type *java_primitive_type_from_name (struct gdbarch *,
60*ef5ccd6cSJohn Marino 						   const char *, int);
615796c8dcSSimon Schubert 
625796c8dcSSimon Schubert extern struct type *java_array_type (struct type *, int);
635796c8dcSSimon Schubert 
645796c8dcSSimon Schubert extern struct type *get_java_object_type (void);
655796c8dcSSimon Schubert extern int get_java_object_header_size (struct gdbarch *);
665796c8dcSSimon Schubert 
675796c8dcSSimon Schubert extern struct type *java_lookup_class (char *);
685796c8dcSSimon Schubert 
695796c8dcSSimon Schubert extern int is_object_type (struct type *);
705796c8dcSSimon Schubert 
715796c8dcSSimon Schubert /* Defined in jv-typeprint.c */
72c50c785cSJohn Marino extern void java_print_type (struct type *, const char *,
73*ef5ccd6cSJohn Marino 			     struct ui_file *, int, int,
74*ef5ccd6cSJohn Marino 			     const struct type_print_options *);
755796c8dcSSimon Schubert 
76*ef5ccd6cSJohn Marino extern char *java_demangle_type_signature (const char *);
775796c8dcSSimon Schubert 
785796c8dcSSimon Schubert #endif
79