GDB (xrefs)
Classes | Enumerations | Functions | Variables
/home/stan/gdb/src/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 "gdb_string.h"
#include "value.h"
#include "c-lang.h"
#include "jv-lang.h"
#include "gdbcore.h"
#include "block.h"
#include "demangle.h"
#include "dictionary.h"
#include <ctype.h>
#include "gdb_assert.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 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)
struct builtin_java_typebuiltin_java_type (struct gdbarch *gdbarch)

Variables

static struct objfile_data * jv_dynamics_objfile_data_key
static struct program_space_data * jv_dynamics_progspace_key
struct op_print java_op_print_tab []
struct exp_descriptor exp_descriptor_java
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 1105 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, read]
static void add_class_symtab_symbol ( struct symbol sym) [static]
static void* build_java_types ( struct gdbarch gdbarch) [static]
struct builtin_java_type* builtin_java_type ( struct gdbarch gdbarch) [read]
static struct value* evaluate_subexp_java ( struct type expect_type,
struct expression exp,
int pos,
enum noside  noside 
) [static, read]
static struct objfile* get_dynamics_objfile ( struct gdbarch gdbarch) [static, read]
static struct symtab * get_java_class_symtab ( struct gdbarch gdbarch) [static, read]
int get_java_object_header_size ( struct gdbarch gdbarch)

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

References gdbarch_ptr_bit(), get_java_object_type(), and TYPE_LENGTH.

Referenced by evaluate_subexp_java(), and java_value_print().

struct type* get_java_object_type ( void  ) [read]
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 
) [read]

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

References lookup_array_range_type(), and type.

struct value* java_class_from_object ( struct value obj_val) [read]
static int java_class_is_primitive ( struct value clas) [static]

Definition at line 251 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 1050 of file jv-lang.c.

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

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

Definition at line 1013 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 763 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 743 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 866 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 1027 of file jv-lang.c.

References p, and strchr().

Referenced by java_class_name_from_physname().

static const char* java_get_encoding ( struct type type) [static]

Definition at line 843 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, read]
struct type* java_lookup_class ( char *  name) [read]
struct type* java_primitive_type ( struct gdbarch gdbarch,
int  signature 
) [read]
struct type* java_primitive_type_from_name ( struct gdbarch gdbarch,
const char *  name,
int  namelen 
) [read]
static char* java_primitive_type_name ( int  signature) [static]

Definition at line 713 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 876 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 886 of file jv-lang.c.

References generic_printstr(), and java_get_encoding().

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

Definition at line 834 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 
) [read]

Variable Documentation

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

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 1074 of file jv-lang.c.

struct gdbarch_data* java_type_data [static]

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

struct objfile_data* jv_dynamics_objfile_data_key [static]

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

Referenced by get_dynamics_objfile(), and get_java_class_symtab().

struct program_space_data* jv_dynamics_progspace_key [static]

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

Referenced by get_dynamics_objfile(), and jv_per_objfile_free().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines