Based on patch from Daniel Berlin <dberlin@dberlin.org>.
* buildsym.c: Include "demangle.h" for SYMBOL_INIT_DEMANGLED_NAME.
(finish_block) For non-function blocks, hash the symbol table. For
function blocks, mark the symbol table as unhashed.
* minsyms.c (msymbol_hash): Return hash value without taking modulus.
(msymbol_hash_iw): Likewise.
(add_minsym_to_hash_table): Take modulus of msymbol_hash's return
value.
(add_minsym_to_demangled_hash_table): Likewise for msymbol_hash_iw.
(lookup_minimal_symbol): Likewise for both.
* symtab.h (struct block): Add `hashtable' flag. Comment the
hashtable.
(BLOCK_HASHTABLE, BLOCK_BUCKETS, BLOCK_BUCKET): New macro.
(ALL_BLOCK_SYMBOLS): Update.
(BLOCK_SHOULD_SORT): Do not sort hashed blocks.
(struct symbol): Add `hash_next' pointer.
* symtab.c (lookup_block_symbol): Search using the hash table when
possible.
(find_pc_sect_symtab): Use ALL_BLOCK_SYMBOLS.
(search_symbols, find_addr_symbol): Likewise.
* dstread.c (process_dst_block): Clear hashtable bit for new block.
(read_dst_symtab): Likewise.
* jv-lang.c (get_java_class_symtab): Likewise.
* mdebugread.c: Include "gdb_assert.h".
(shrink_block): Assert that the block being modified is not hashed.
* coffread.c (patch_opaque_types): Use ALL_BLOCK_SYMBOLS.
* symmisc.c (free_symtab_block): Walk the hash table when freeing
symbols.
(dump_symtab): Recognize hashed blocks.
* printcmd.c (print_frame_args): Assert that function blocks do not
have hashed symbol tables.
* ada-lang.c (symtab_for_sym): Use ALL_BLOCK_SYMBOLS.
(fill_in_ada_prototype, debug_print_block): Likewise.
(ada_add_block_symbols): Use ALL_BLOCK_SYMBOLS. Handle hash tables.
* c-lang.c: Set case sensitivity on for c_language_defn,
cplus_language_defn, and asm_language_defn.
* ch-lang.c: Set case sensitivity on for chill_language_defn.
* f-lang.c: Set case sensivitity off for f_language_defn.
* jv-lang.c: Set case sensitivity on for java_language_defn.
* language.h: Add enum case_mode, case_sensitivity.
* language.c: Define case_mode, case_sensitivity. Set case
sensitivity on for unknown_language_defn, auto_language_defn,
and local_language_defn.
(show_case_command,set_case_command,set_case_str): New static func.
(set_type_range_case): New static func, replaces set_type_range ().
(set_language_command,set_type_command,set_range_command,set_language):
Call set_type_range_case ().
(language_info): Print case sensitivity setting.
(_initialize_language): Add set/show commands for 'case-sensitive'.
Set default case mode 'auto'. Set default language 'auto'.
* m2-lang.c: Set case sensitivity on for m2_language_defn.
* p-lang.c: Set case sensitivity on for pascal_language_defn.
* scm-lang.c: Set case sensitivity off for scm_language_defn.
* symtab.c (lookup_symbol): Downcase symbol name if case sensivitity
is off.
allow symbols with dots.
* gdbtypes.c (check_stub_method): Cosmetic. Use more descriptive
names for parameters.
start-sanitize-java
* jv-exp.y: Parser now accepts primitive types.
* (parse_number): Use correct ifdef for scanf long double support.
* jv-lang.c (java_array_type): Initial cut at array support.
end-sanitize-java
* language.c language.h (set_language): Now returns previous language.
* symtab.c (find_methods): Make static. Cosmetic changes, including
indentation, and adding descriptive comments. Move local variable defs
into the block they are used in.
* Don't call check_stub_method any more. Use gdb_mangle_name to
generate the full method name. find_method doesn't need all the other
goobldegook that check_stub_method does.
* (gdb_mangle_name): Use more descriptive names for parameters. Fix
comment.
start-sanitize-java
* (lookup_partial_symbol lookup_block_symbol): Check for java to
ensure we can find mangled names.
end-sanitize-java
* (decode_line_1): Move local variable defs into the block they are
used in. (Improves code readability.)
* parse.c, parser-defs.h (length_of_subexp): Make non-static.
* jv-exp.y (FieldAccess): Handle dollar-VARIABLE as primary.
(ArrayAccess): Likewise. Also remove warnings.
(CastExpression): Implement (typename) UnaryExpression.
(push_qualified_expression_name): Fix small bug.
* jv-lang.c: Use TYPE_TAG_NAME, not TYPE_NAME for class names.
(_initialize_jave_language): Fix typo (jave -> java).
(java_language): Java does *not* have C-style arrays.
(java_class_from_object): Make more general (and complicated).
(java_link_class_type): Fix typo "super" -> "class". Handle arrays.
(java_emit_char, java_printchar): New function.
(evaluate_subexp_java case BINOP_SUBSCRIPT): Handle Java arrays.
* jv-valprint.c (java_value_print): Implement printing of Java arrays.
(java_print_value_fields): New function.
(java_val_print): Better printing of TYPE_CODE_CHAR, TYPE_CODE_STRUCT.
(push_expression_name): New, to handle expression names.
(push_qualified_expression_name): New, for qualified expression names.
(parse_number): Fix bugs in parsing of non-decimal integers.
* jv-lang.h, jv-lang.c (java_demangle_type_signature): New.
* jv-lang.c (type_from_class): Just use name with java_lookup_class.
(java_link_class_type): Add dummy "class" field.
(java_lookup_type): New.
(evaluate_subexp_java case STRUCTOP_STRUCT): Force to address.
* jv-typeprint.c (java_type_print_base): Don't print "class" field.
Use java_demangle_type_signature to print array class types.
* jv-valprint.c (java_value_print): Preliminary array support.
Print pointer as TYPE@HEXADDR, instead of (TYPE)0xHEXADDR.
(java_val_print): Move check for object type to java_value_print.
Check for null. Print pointer as @HEXADDR, not 0xHEXADDR.
implied (missing) data field, as defined by cc1java.
(java_link_class_type): Type length and field offset (in interior)
now includes object header. Get static fields working.
* jv-lang.h (JAVA_OBJECT_SIZE): Update for change in Kaffe.
* jv-typeprint.c (java_type_print_derivation_info,
java_type_print_base): New functions, for better Java output.
* jv-valprint.c: Start to support Java-specific output.