Index: gdb/jv-lang.c |
diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c |
index 443e2433f2a5cf231191a57fee5fe1d7132c4a29..a7cfb76369fdf222e966945b9616383e1185f9ed 100644 |
--- a/gdb/jv-lang.c |
+++ b/gdb/jv-lang.c |
@@ -45,8 +45,8 @@ |
extern void _initialize_java_language (void); |
-static int java_demangled_signature_length (char *); |
-static void java_demangled_signature_copy (char *, char *); |
+static int java_demangled_signature_length (const char *); |
+static void java_demangled_signature_copy (char *, const char *); |
static struct symtab *get_java_class_symtab (struct gdbarch *gdbarch); |
static char *get_java_utf8_name (struct obstack *obstack, struct value *name); |
@@ -158,8 +158,9 @@ get_java_class_symtab (struct gdbarch *gdbarch) |
BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK) = bl; |
/* Allocate GLOBAL_BLOCK. */ |
- bl = allocate_block (&objfile->objfile_obstack); |
+ bl = allocate_global_block (&objfile->objfile_obstack); |
BLOCK_DICT (bl) = dict_create_hashed_expandable (); |
+ set_block_symtab (bl, class_symtab); |
BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK) = bl; |
/* Arrange to free the dict. */ |
@@ -341,8 +342,8 @@ java_link_class_type (struct gdbarch *gdbarch, |
struct type *type, struct value *clas) |
{ |
struct value *temp; |
- char *unqualified_name; |
- char *name = TYPE_TAG_NAME (type); |
+ const char *unqualified_name; |
+ const char *name = TYPE_TAG_NAME (type); |
int ninterfaces, nfields, nmethods; |
int type_is_object = 0; |
struct fn_field *fn_fields; |
@@ -480,7 +481,7 @@ java_link_class_type (struct gdbarch *gdbarch, |
if (accflags & 0x0008) /* ACC_STATIC */ |
SET_FIELD_PHYSADDR (TYPE_FIELD (type, i), boffset); |
else |
- TYPE_FIELD_BITPOS (type, i) = 8 * boffset; |
+ SET_FIELD_BITPOS (TYPE_FIELD (type, i), 8 * boffset); |
if (accflags & 0x8000) /* FIELD_UNRESOLVED_FLAG */ |
{ |
TYPE_FIELD_TYPE (type, i) = get_java_object_type (); /* FIXME */ |
@@ -501,7 +502,6 @@ java_link_class_type (struct gdbarch *gdbarch, |
temp = clas; |
nmethods = value_as_long (value_struct_elt (&temp, NULL, "method_count", |
NULL, "structure")); |
- TYPE_NFN_FIELDS_TOTAL (type) = nmethods; |
j = nmethods * sizeof (struct fn_field); |
fn_fields = (struct fn_field *) |
obstack_alloc (&objfile->objfile_obstack, j); |
@@ -512,7 +512,7 @@ java_link_class_type (struct gdbarch *gdbarch, |
methods = NULL; |
for (i = 0; i < nmethods; i++) |
{ |
- char *mname; |
+ const char *mname; |
int k; |
if (methods == NULL) |
@@ -618,7 +618,7 @@ is_object_type (struct type *type) |
if (TYPE_CODE (type) == TYPE_CODE_PTR) |
{ |
struct type *ttype = check_typedef (TYPE_TARGET_TYPE (type)); |
- char *name; |
+ const char *name; |
if (TYPE_CODE (ttype) != TYPE_CODE_STRUCT) |
return 0; |
while (TYPE_N_BASECLASSES (ttype) > 0) |
@@ -668,7 +668,7 @@ java_primitive_type (struct gdbarch *gdbarch, int signature) |
struct type * |
java_primitive_type_from_name (struct gdbarch *gdbarch, |
- char *name, int namelen) |
+ const char *name, int namelen) |
{ |
const struct builtin_java_type *builtin = builtin_java_type (gdbarch); |
@@ -743,7 +743,7 @@ java_primitive_type_name (int signature) |
signature string SIGNATURE. */ |
static int |
-java_demangled_signature_length (char *signature) |
+java_demangled_signature_length (const char *signature) |
{ |
int array = 0; |
@@ -763,7 +763,7 @@ java_demangled_signature_length (char *signature) |
RESULT. */ |
static void |
-java_demangled_signature_copy (char *result, char *signature) |
+java_demangled_signature_copy (char *result, const char *signature) |
{ |
int array = 0; |
char *ptr; |
@@ -806,7 +806,7 @@ java_demangled_signature_copy (char *result, char *signature) |
as a freshly allocated copy. */ |
char * |
-java_demangle_type_signature (char *signature) |
+java_demangle_type_signature (const char *signature) |
{ |
int length = java_demangled_signature_length (signature); |
char *result = xmalloc (length + 1); |
@@ -906,7 +906,7 @@ evaluate_subexp_java (struct type *expect_type, struct expression *exp, |
{ |
int pc = *pos; |
int i; |
- char *name; |
+ const char *name; |
enum exp_opcode op = exp->elts[*pos].opcode; |
struct value *arg1; |
struct value *arg2; |
@@ -1182,6 +1182,7 @@ const struct language_defn java_language_defn = |
default_print_typedef, /* Print a typedef using appropriate syntax */ |
java_val_print, /* Print a value using appropriate syntax */ |
java_value_print, /* Print a top-level value */ |
+ default_read_var_value, /* la_read_var_value */ |
NULL, /* Language specific skip_trampoline */ |
"this", /* name_of_this */ |
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */ |
@@ -1197,7 +1198,7 @@ const struct language_defn java_language_defn = |
default_print_array_index, |
default_pass_by_reference, |
default_get_string, |
- strcmp_iw_ordered, |
+ NULL, /* la_get_symbol_name_cmp */ |
iterate_over_symbols, |
LANG_MAGIC |
}; |