GDB (xrefs)
Classes | Enumerations | Functions | Variables
/tmp/gdb-7.10/gdb/jv-lang.c File Reference
#include "defs.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
#include "parser-defs.h"
#include "language.h"
#include "symfile.h"
#include "objfiles.h"
#include "value.h"
#include "c-lang.h"
#include "jv-lang.h"
#include "varobj.h"
#include "gdbcore.h"
#include "block.h"
#include "demangle.h"
#include "dictionary.h"
#include <ctype.h>
#include "charset.h"
#include "valprint.h"
#include "cp-support.h"

Go to the source code of this file.

Classes

struct  jv_per_objfile_data
 

Enumerations

enum  java_primitive_types {
  java_primitive_type_int, java_primitive_type_short, java_primitive_type_long, java_primitive_type_byte,
  java_primitive_type_boolean, java_primitive_type_char, java_primitive_type_float, java_primitive_type_double,
  java_primitive_type_void, nr_java_primitive_types
}
 

Functions

void _initialize_java_language (void)
 
static int java_demangled_signature_length (const char *)
 
static void java_demangled_signature_copy (char *, const char *)
 
static struct compunit_symtabget_java_class_symtab (struct gdbarch *gdbarch)
 
static char * get_java_utf8_name (struct obstack *obstack, struct value *name)
 
static int java_class_is_primitive (struct value *clas)
 
static struct valuejava_value_string (char *ptr, int len)
 
static void java_emit_char (int c, struct type *type, struct ui_file *stream, int quoter)
 
static char * java_class_name_from_physname (const char *physname)
 
static struct typejava_link_class_type (struct gdbarch *, struct type *, struct value *)
 
static void jv_per_objfile_free (struct objfile *objfile, void *data)
 
static struct objfileget_dynamics_objfile (struct gdbarch *gdbarch)
 
static void add_class_symtab_symbol (struct symbol *sym)
 
static struct symboladd_class_symbol (struct type *type, CORE_ADDR addr)
 
struct typejava_lookup_class (char *name)
 
struct valuejava_class_from_object (struct value *obj_val)
 
struct typetype_from_class (struct gdbarch *gdbarch, struct value *clas)
 
struct typeget_java_object_type (void)
 
int get_java_object_header_size (struct gdbarch *gdbarch)
 
int is_object_type (struct type *type)
 
struct typejava_primitive_type (struct gdbarch *gdbarch, int signature)
 
struct typejava_primitive_type_from_name (struct gdbarch *gdbarch, const char *name, int namelen)
 
static char * java_primitive_type_name (int signature)
 
char * java_demangle_type_signature (const char *signature)
 
struct typejava_array_type (struct type *type, int dims)
 
static const char * java_get_encoding (struct type *type)
 
static void java_printchar (int c, struct type *type, struct ui_file *stream)
 
static void java_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string, unsigned int length, const char *encoding, int force_ellipses, const struct value_print_options *options)
 
static struct valueevaluate_subexp_java (struct type *expect_type, struct expression *exp, int *pos, enum noside noside)
 
static char * java_demangle (const char *mangled, int options)
 
static const char * java_find_last_component (const char *name)
 
static void java_language_arch_info (struct gdbarch *gdbarch, struct language_arch_info *lai)
 
static void * build_java_types (struct gdbarch *gdbarch)
 
const struct builtin_java_typebuiltin_java_type (struct gdbarch *gdbarch)
 

Variables

static const struct objfile_data * jv_dynamics_objfile_data_key
 
static const struct program_space_data * jv_dynamics_progspace_key
 
const struct op_print java_op_print_tab []
 
const struct exp_descriptor exp_descriptor_java
 
const struct language_defn java_language_defn
 
static struct gdbarch_datajava_type_data
 

Enumeration Type Documentation

Enumerator
java_primitive_type_int 
java_primitive_type_short 
java_primitive_type_long 
java_primitive_type_byte 
java_primitive_type_boolean 
java_primitive_type_char 
java_primitive_type_float 
java_primitive_type_double 
java_primitive_type_void 
nr_java_primitive_types 

Definition at line 1104 of file jv-lang.c.

Function Documentation

void _initialize_java_language ( void  )
static struct symbol* add_class_symbol ( struct type type,
CORE_ADDR  addr 
)
static
static void add_class_symtab_symbol ( struct symbol sym)
static
static void* build_java_types ( struct gdbarch gdbarch)
static
const struct builtin_java_type* builtin_java_type ( struct gdbarch gdbarch)
static struct value* evaluate_subexp_java ( struct type expect_type,
struct expression exp,
int pos,
enum noside  noside 
)
static
static struct objfile* get_dynamics_objfile ( struct gdbarch gdbarch)
static
static struct compunit_symtab * get_java_class_symtab ( struct gdbarch gdbarch)
static
int get_java_object_header_size ( struct gdbarch gdbarch)
struct type* get_java_object_type ( void  )
char * get_java_utf8_name ( struct obstack *  obstack,
struct value name 
)
static
int is_object_type ( struct type type)
struct type* java_array_type ( struct type type,
int  dims 
)

Definition at line 819 of file jv-lang.c.

References lookup_array_range_type(), and type.

Referenced by yyparse().

struct value* java_class_from_object ( struct value obj_val)
static int java_class_is_primitive ( struct value clas)
static

Definition at line 250 of file jv-lang.c.

References value_as_address(), and value_struct_elt().

Referenced by type_from_class().

static char * java_class_name_from_physname ( const char *  physname)
static

Definition at line 1049 of file jv-lang.c.

References java_demangle(), java_find_last_component(), xfree(), and xmalloc().

static char* java_demangle ( const char *  mangled,
int  options 
)
static

Definition at line 1012 of file jv-lang.c.

References gdb_demangle().

Referenced by java_class_name_from_physname().

char* java_demangle_type_signature ( const char *  signature)
static void java_demangled_signature_copy ( char *  result,
const char *  signature 
)
static

Definition at line 762 of file jv-lang.c.

References java_primitive_type_name().

Referenced by java_demangle_type_signature(), and type_from_class().

static int java_demangled_signature_length ( const char *  signature)
static

Definition at line 742 of file jv-lang.c.

References java_primitive_type_name().

Referenced by java_demangle_type_signature(), and type_from_class().

static void java_emit_char ( int  c,
struct type type,
struct ui_file stream,
int  quoter 
)
static

Definition at line 865 of file jv-lang.c.

References encoding, generic_emit_char(), and java_get_encoding().

static const char* java_find_last_component ( const char *  name)
static

Definition at line 1026 of file jv-lang.c.

Referenced by java_class_name_from_physname().

static const char* java_get_encoding ( struct type type)
static

Definition at line 842 of file jv-lang.c.

References encoding, gdbarch_byte_order(), get_type_arch(), and target_charset().

Referenced by java_emit_char(), and java_printstr().

static void java_language_arch_info ( struct gdbarch gdbarch,
struct language_arch_info lai 
)
static
static struct type * java_link_class_type ( struct gdbarch gdbarch,
struct type type,
struct value clas 
)
static
struct type* java_lookup_class ( char *  name)
struct type* java_primitive_type ( struct gdbarch gdbarch,
int  signature 
)
struct type* java_primitive_type_from_name ( struct gdbarch gdbarch,
const char *  name,
int  namelen 
)
static char* java_primitive_type_name ( int  signature)
static

Definition at line 712 of file jv-lang.c.

References _, and error().

Referenced by java_demangled_signature_copy(), and java_demangled_signature_length().

static void java_printchar ( int  c,
struct type type,
struct ui_file stream 
)
static

Definition at line 875 of file jv-lang.c.

References fputs_filtered(), and LA_EMIT_CHAR.

static void java_printstr ( struct ui_file stream,
struct type type,
const gdb_byte string,
unsigned int  length,
const char *  encoding,
int  force_ellipses,
const struct value_print_options options 
)
static

Definition at line 885 of file jv-lang.c.

References generic_printstr(), and java_get_encoding().

static struct value * java_value_string ( char *  ptr,
int  len 
)
static

Definition at line 833 of file jv-lang.c.

References _, and error().

Referenced by evaluate_subexp_java().

static void jv_per_objfile_free ( struct objfile objfile,
void *  data 
)
static
struct type* type_from_class ( struct gdbarch gdbarch,
struct value clas 
)

Variable Documentation

const struct exp_descriptor exp_descriptor_java
Initial value:
=
{
}
static struct value * evaluate_subexp_java(struct type *expect_type, struct expression *exp, int *pos, enum noside noside)
Definition: jv-lang.c:900
int dump_subexp_body_standard(struct expression *exp, struct ui_file *stream, int elt)
Definition: expprint.c:762
char * op_name_standard(enum exp_opcode opcode)
Definition: expprint.c:662
void print_subexp_standard(struct expression *exp, int *pos, struct ui_file *stream, enum precedence prec)
Definition: expprint.c:58
int operator_check_standard(struct expression *exp, int pos, int(*objfile_func)(struct objfile *objfile, void *data), void *data)
Definition: parse.c:1782
void operator_length_standard(const struct expression *expr, int endpos, int *oplenp, int *argsp)
Definition: parse.c:859

Definition at line 1151 of file jv-lang.c.

const struct language_defn java_language_defn

Definition at line 1161 of file jv-lang.c.

const struct op_print java_op_print_tab[]
Initial value:
=
{
{",", BINOP_COMMA, PREC_COMMA, 0},
{"=", BINOP_ASSIGN, PREC_ASSIGN, 1},
{"||", BINOP_LOGICAL_OR, PREC_LOGICAL_OR, 0},
{"&&", BINOP_LOGICAL_AND, PREC_LOGICAL_AND, 0},
{"|", BINOP_BITWISE_IOR, PREC_BITWISE_IOR, 0},
{"^", BINOP_BITWISE_XOR, PREC_BITWISE_XOR, 0},
{"&", BINOP_BITWISE_AND, PREC_BITWISE_AND, 0},
{"==", BINOP_EQUAL, PREC_EQUAL, 0},
{"!=", BINOP_NOTEQUAL, PREC_EQUAL, 0},
{"<=", BINOP_LEQ, PREC_ORDER, 0},
{">=", BINOP_GEQ, PREC_ORDER, 0},
{">", BINOP_GTR, PREC_ORDER, 0},
{"<", BINOP_LESS, PREC_ORDER, 0},
{">>", BINOP_RSH, PREC_SHIFT, 0},
{"<<", BINOP_LSH, PREC_SHIFT, 0},
{"+", BINOP_ADD, PREC_ADD, 0},
{"-", BINOP_SUB, PREC_ADD, 0},
{"*", BINOP_MUL, PREC_MUL, 0},
{"/", BINOP_DIV, PREC_MUL, 0},
{"%", BINOP_REM, PREC_MUL, 0},
{"-", UNOP_NEG, PREC_PREFIX, 0},
{"!", UNOP_LOGICAL_NOT, PREC_PREFIX, 0},
{"~", UNOP_COMPLEMENT, PREC_PREFIX, 0},
{"*", UNOP_IND, PREC_PREFIX, 0},
{"++", UNOP_PREINCREMENT, PREC_PREFIX, 0},
{"--", UNOP_PREDECREMENT, PREC_PREFIX, 0},
{NULL, 0, 0, 0}
}

Definition at line 1073 of file jv-lang.c.

struct gdbarch_data* java_type_data
static

Definition at line 1233 of file jv-lang.c.

const struct objfile_data* jv_dynamics_objfile_data_key
static
const struct program_space_data* jv_dynamics_progspace_key
static

Definition at line 63 of file jv-lang.c.

Referenced by _initialize_java_language(), get_dynamics_objfile(), and jv_per_objfile_free().