Commit Graph

226 Commits

Author SHA1 Message Date
Joel Brobecker 74ccd7f58b Ada: allow unqualified function names in linespecs
This is the meat, where we replace the old la_symbol_name_compare
language method with the new ada_get_symbol_name_match_p.
It fixes the problem when trying to insert a breakpoint on "+".

gdb/ChangeLog:

        * language.h (symbol_name_match_p_ftype): New typedef.
        (struct language_defn): Replace field la_symbol_name_compare
        by la_get_symbol_name_match_p.
        * ada-lang.c (ada_get_symbol_name_match_p): New function.
        (ada_language_defn): Use it.
        * linespec.c (struct symbol_matcher_data): New type.
        (iterate_name_matcher): Rewrite.
        (iterate_over_all_matching_symtabs): Pass a pointer to
        a symbol_matcher_data struct to expand_symtabs_matching
        instead of just the lookup name.
        * c-lang.c, d-lang.c, jv-lang.c, m2-lang.c, objc-lang.c,
        opencl-lang.c, p-lang.c, language.c: Delete field
        la_symbol_name_compare, and replace by NULL for new field
        la_get_symbol_name_match_p.
        * symfile.h (struct quick_symbol_functions): Update comment.
2012-01-26 04:20:36 +00:00
Joel Brobecker 0b30217134 Copyright year update in most files of the GDB Project.
gdb/ChangeLog:

        Copyright year update in most files of the GDB Project.
2012-01-04 08:17:56 +00:00
Tom Tromey f8eba3c616 the "ambiguous linespec" series
gdb
2011-12-06  Joel Brobecker  <brobecker@acacore.com>

        * language.h (struct language_defn): Add new component
        la_symbol_name_compare.
        * symfile.h (struct quick_symbol_functions): Update the profile
        of parameter "name_matcher" for the expand_symtabs_matching
        method.  Update the documentation accordingly.
        * ada-lang.h (ada_name_for_lookup): Add declaration.
        * ada-lang.c (ada_name_for_lookup): New function, extracted out
        from ada_iterate_over_symbols.
        (ada_iterate_over_symbols): Do not encode symbol name anymore.
        (ada_expand_partial_symbol_name): Adjust profile.
        (ada_language_defn): Add value for la_symbol_name_compare field.
        * linespec.c: #include "ada-lang.h".
        (iterate_name_matcher): Add language parameter. Replace call
        to strcmp_iw by call to language->la_symbol_name_compare.
        (decode_variable): Encode COPY if current language is Ada.
        * dwarf2read.c (dw2_expand_symtabs_matching): Adjust profile
        of name_matcher parameter.  Adjust call to name_matcher.
        * psymtab.c (expand_symtabs_matching_via_partial): Likewise.
        (expand_partial_symbol_names): Update profile of parameter "fun".
        * psymtab.h (expand_partial_symbol_names): Update profile of
        parameter "fun".
        * symtab.c (demangle_for_lookup): Update function documentation.
        (search_symbols_name_matches): Add language parameter.
        (expand_partial_symbol_name): Likewise.
        * c-lang.c (c_language_defn, cplus_language_defn)
        (asm_language_defn, minimal_language_defn): Add value for
        la_symbol_name_compare field.
        * d-lang.c (d_language_defn): Likewise.
        * f-lang.c (f_language_defn): Ditto.
        * jv-lang.c (java_language_defn): Ditto.
        * m2-lang.c (m2_language_defn): Ditto.
        * objc-lang.c (objc_language_defn): Ditto.
        * opencl-lang.c (opencl_language_defn): Ditto.
        * p-lang.c (pascal_language_defn): Ditto.
        * language.c (unknown_language_defn, auto_language_defn)
        (local_language_defn): Ditto.

2011-12-06  Tom Tromey  <tromey@redhat.com>

	* linespec.c (iterate_over_all_matching_symtabs): Use
	LA_ITERATE_OVER_SYMBOLS.
	(lookup_prefix_sym, add_matching_symbols_to_info): Likewise.
	(find_function_symbols, decode_variable): Remove Ada special
	case.
	* language.h (struct language_defn) <la_iterate_over_symbols>: New
	field.
	(LA_ITERATE_OVER_SYMBOLS): New macro.
	* language.c (unknown_language_defn, auto_language_defn)
	(local_language_defn): Update.
	* c-lang.c (c_language_defn, cplus_language_defn)
	(asm_language_defn, minimal_language_defn): Update.
	* d-lang.c (d_language_defn): Update.
	* f-lang.c (f_language_defn): Update.
	* jv-lang.c (java_language_defn): Update.
	* m2-lang.c (m2_language_defn): Update.
	* objc-lang.c (objc_language_defn): Update.
	* opencl-lang.c (opencl_language_defn): Update.
	* p-lang.c (pascal_language_defn): Update.
	* ada-lang.c (ada_iterate_over_symbols): New function.
	(ada_language_defn): Update.

2011-12-06  Tom Tromey  <tromey@redhat.com>
	    Joel Brobecker  <brobecker@acacore.com>

	PR breakpoints/13105, PR objc/8341, PR objc/8343, PR objc/8366,
	PR objc/8535, PR breakpoints/11657, PR breakpoints/11970,
	PR breakpoints/12023, PR breakpoints/12334, PR breakpoints/12856,
	PR shlibs/8929, PR shlibs/7393:
	* python/py-type.c (compare_maybe_null_strings): Rename from
	compare_strings.
	(check_types_equal): Update.
	* utils.c (compare_strings): New function.
	* tui/tui-winsource.c (tui_update_breakpoint_info): Update for
	location changes.
	* tracepoint.c (scope_info): Update.
	(trace_find_line_command): Use DECODE_LINE_FUNFIRSTLINE.
	* symtab.h (iterate_over_minimal_symbols)
	(iterate_over_some_symtabs, iterate_over_symtabs)
	(find_pcs_for_symtab_line, iterate_over_symbols)
	(demangle_for_lookup): Declare.
	(expand_line_sal): Remove.
	* symtab.c (iterate_over_some_symtabs, iterate_over_symtabs)
	(lookup_symtab_callback): New functions.
	(lookup_symtab): Rewrite.
	(demangle_for_lookup): New function, extract from
	lookup_symbol_in_language.
	(lookup_symbol_in_language): Use it.
	(iterate_over_symbols): New function.
	(find_line_symtab): Update.
	(find_pcs_for_symtab_line): New functions.
	(find_line_common): Add 'start' argument.
	(decode_line_spec): Update.  Change argument to 'flags', change
	interpretation.
	(append_expanded_sal): Remove.
	(append_exact_match_to_sals): Remove.
	(expand_line_sal): Remove.
	* symfile.h (struct quick_symbol_functions) <lookup_symtab>:
	Remove.
	<map_symtabs_matching_filename>: New field.
	* stack.c (func_command): Only look in the current program space.
	Use DECODE_LINE_FUNFIRSTLINE.
	* source.c (line_info): Set pspace on sal.  Check program space in
	the loop.  Use DECODE_LINE_LIST_MODE.
	(select_source_symtab): Use DECODE_LINE_FUNFIRSTLINE.
	* solib-target.c: Remove DEF_VEC_I(CORE_ADDR).
	* python/python.c (gdbpy_decode_line): Update.
	* psymtab.c (partial_map_expand_apply): New function.
	(partial_map_symtabs_matching_filename): Rename from
	lookup_partial_symbol.  Update arguments.
	(lookup_symtab_via_partial_symtab): Remove.
	(psym_functions): Update.
	* objc-lang.h (parse_selector, parse_method): Don't declare.
	(find_imps): Update.
	* objc-lang.c (parse_selector, parse_method): Now static.
	(find_methods): Change arguments.  Fill in a vector of symbol
	names.
	(uniquify_strings): New function.
	(find_imps): Change arguments.
	* minsyms.c (iterate_over_minimal_symbols): New function.
	* linespec.h (enum decode_line_flags): New.
	(struct linespec_sals): New.
	(struct linespec_result) <canonical>: Remove.
	<pre_expanded, addr_string, sals>: New fields.
	(destroy_linespec_result, make_cleanup_destroy_linespec_result)
	(decode_line_full): Declare.
	(decode_line_1): Update.
	* linespec.c (struct address_entry, struct linespec_state, struct
	collect_info): New types.
	(add_sal_to_sals_basic, add_sal_to_sals, hash_address_entry)
	(eq_address_entry, maybe_add_address): New functions.
	(total_number_of_methods): Remove.
	(iterate_name_matcher, iterate_over_all_matching_symtabs): New
	functions.
	(find_methods): Change arguments.  Don't canonicalize input.
	Simplify logic.
	(add_matching_methods, add_constructors)
	(build_canonical_line_spec): Remove.
	(filter_results, convert_results_to_lsals): New functions.
	(decode_line_2): Change arguments.  Rewrite for new data
	structures.
	(decode_line_internal): Rename from decode_line_1.  Change
	arguments.  Add cleanups.  Update for new data structures.
	(linespec_state_constructor, linespec_state_destructor)
	(decode_line_full, decode_line_1): New functions.
	(decode_indirect): Change arguments.  Update.
	(locate_first_half): Use skip_spaces.
	(decode_objc): Change arguments.  Update for new data structures.
	Simplify logic.
	(decode_compound): Change arguments.  Add cleanups.  Remove
	fallback code, replace with error.
	(struct decode_compound_collector): New type.
	(collect_one_symbol): New function.
	(lookup_prefix_sym): Change arguments.  Update.
	(compare_symbol_name, add_all_symbol_names_from_pspace)
	(find_superclass_methods ): New functions.
	(find_method): Rewrite.
	(struct symtab_collector): New type.
	(add_symtabs_to_list, collect_symtabs_from_filename): New
	functions.
	(symtabs_from_filename): Change API.  Rename from
	symtab_from_filename.
	(collect_function_symbols): New function.
	(find_function_symbols): Change API.  Rename from
	find_function_symbol.  Rewrite.
	(decode_all_digits): Change arguments.  Rewrite.
	(decode_dollar): Change arguments.  Use decode_variable.
	(decode_label): Change arguments.  Rewrite.
	(collect_symbols): New function.
	(minsym_found): Change arguments.  Rewrite.
	(check_minsym, search_minsyms_for_name)
	(add_matching_symbols_to_info): New function.
	(decode_variable): Change arguments.  Iterate over all symbols.
	(symbol_found): Remove.
	(symbol_to_sal): New function.
	(init_linespec_result, destroy_linespec_result)
	(cleanup_linespec_result, make_cleanup_destroy_linespec_result):
	New functions.
	(decode_digits_list_mode, decode_digits_ordinary): New functions.
	* dwarf2read.c (dw2_map_expand_apply): New function.
	(dw2_map_symtabs_matching_filename): Rename from
	dw2_lookup_symtab.  Change arguments.
	(dwarf2_gdb_index_functions): Update.
	* dwarf2loc.c: Remove DEF_VEC_I(CORE_ADDR).
	* defs.h (compare_strings): Declare.
	* cli/cli-cmds.c (compare_strings): Move to utils.c.
	(edit_command, list_command): Use DECODE_LINE_LIST_MODE.  Call
	filter_sals.
	(compare_symtabs, filter_sals): New functions.
	* breakpoint.h (struct bp_location) <line_number, source_file>:
	New fields.
	(struct breakpoint) <line_number, source_file>: Remove.
	<filter>: New field.
	* breakpoint.c (print_breakpoint_location, init_raw_breakpoint)
	(momentary_breakpoint_from_master, add_location_to_breakpoint):
	Update for changes to locations.
	(init_breakpoint_sal): Add 'filter' argument.  Set 'filter' on
	breakpoint.
	(create_breakpoint_sal): Add 'filter' argument.
	(remove_sal, expand_line_sal_maybe): Remove.
	(create_breakpoints_sal): Remove 'sals' argument.  Handle
	pre-expanded sals and the filter.
	(parse_breakpoint_sals): Use decode_line_full.
	(check_fast_tracepoint_sals): Use get_sal_arch.
	(create_breakpoint): Create a linespec_sals.  Update.
	(break_range_command): Use decode_line_full.  Update.
	(until_break_command): Update.
	(clear_command): Update match conditions for linespec.c changes.
	Use DECODE_LINE_LIST_MODE.
	(say_where): Update for changes to locations.
	(bp_location_dtor): Free 'source_file'.
	(base_breakpoint_dtor): Free 'filter'.  Don't free 'source_file'.
	(update_static_tracepoint): Update for changes to locations.
	(update_breakpoint_locations): Disable ranged breakpoint if too
	many locations match.  Update.
	(addr_string_to_sals): Use decode_line_full.  Resolve all sal
	PCs.
	(breakpoint_re_set_default): Don't call expand_line_sal_maybe.
	(decode_line_spec_1): Update.  Change argument name to 'flags',
	change interpretation.
	* block.h (block_containing_function): Declare.
	* block.c (block_containing_function): New function.
	* skip.c (skip_function_command): Update.
	(skip_re_set): Update.
	* infcmd.c (jump_command): Use DECODE_LINE_FUNFIRSTLINE.
	* mi/mi-main.c (mi_cmd_trace_find): Use DECODE_LINE_FUNFIRSTLINE.
	* NEWS: Add entry.

2011-12-06  Tom Tromey  <tromey@redhat.com>

	* elfread.c (elf_gnu_ifunc_resolver_return_stop): Allow
	breakpoint's pspace to be NULL.
	* breakpoint.h (struct breakpoint) <pspace>: Update comment.
	* breakpoint.c (init_raw_breakpoint): Conditionally set
	breakpoint's pspace.
	(init_breakpoint_sal): Don't set breakpoint's pspace.
	(prepare_re_set_context): Conditionally switch program space.
	(addr_string_to_sals): Check executing_startup on location's
	program space.

2011-12-06  Tom Tromey  <tromey@redhat.com>

	* breakpoint.h (enum enable_state) <bp_startup_disabled>: Remove.
	* breakpoint.c (should_be_inserted): Explicitly check if program
	space is executing startup.
	(describe_other_breakpoints): Update.
	(disable_breakpoints_before_startup): Change executing_startup
	earlier.  Remove loop.
	(enable_breakpoints_after_startup): Likewise.
	(init_breakpoint_sal): Don't use bp_startup_disabled.
	(create_breakpoint): Don't use bp_startup_disabled.
	(update_global_location_list): Use should_be_inserted.
	(bkpt_re_set): Update.
gdb/testsuite
2011-12-06  Joel Brobecker  <brobecker@acacore.com>

        * gdb.ada/fullname_bp.exp: Add tests for other valid linespecs
        involving a fully qualified function name.

2011-12-06  Tom Tromey  <tromey@redhat.com>

	* gdb.ada/homonym.exp: Add three breakpoint tests.

2011-12-06  Tom Tromey  <tromey@redhat.com>

	* gdb.base/solib-weak.exp (do_test): Remove kfail.
	* gdb.trace/tracecmd.exp: Disable pending breakpoints earlier.
	* gdb.objc/objcdecode.exp: Update for output changes.
	* gdb.linespec/linespec.exp: New file.
	* gdb.linespec/lspec.cc: New file.
	* gdb.linespec/lspec.h: New file.
	* gdb.linespec/body.h: New file.
	* gdb.linespec/base/two/thefile.cc: New file.
	* gdb.linespec/base/one/thefile.cc: New file.
	* gdb.linespec/Makefile.in: New file.
	* gdb.cp/templates.exp (test_template_breakpoints): Update for
	output changes.
	* gdb.cp/re-set-overloaded.exp: Remove kfail.
	* gdb.cp/ovldbreak.exp: Update for output changes.  "all" test now
	makes one breakpoint.
	* gdb.cp/method2.exp (test_break): Update for output changes.
	* gdb.cp/mb-templates.exp: Update for output changes.
	* gdb.cp/mb-inline.exp: Update for output changes.
	* gdb.cp/mb-ctor.exp: Update for output changes.
	* gdb.cp/ovsrch.exp: Use fully-qualified names.
	* gdb.base/solib-symbol.exp: Run to main later.  Breakpoint now
	has multiple matches.
	* gdb.base/sepdebug.exp: Disable pending breakpoints.  Update for
	error message change.
	* gdb.base/list.exp (test_list_filename_and_number): Update for
	error message change.
	* gdb.base/break.exp: Disable pending breakpoints.  Update for
	output changes.
	* configure.ac: Add gdb.linespec.
	* configure: Rebuild.
	* Makefile.in (ALL_SUBDIRS): Add gdb.linespec.
gdb/doc
2011-12-06  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Set Breaks): Update for new behavior.
2011-12-06 18:54:43 +00:00
Tom Tromey 3b2b8feaf4 gdb
PR fortran/10036:
	* valprint.h (generic_emit_char, generic_printstr): Declare.
	* valprint.c (wchar_printable, append_string_as_wide)
	(print_wchar): Move from c-lang.c.
	(generic_emit_char): New function; mostly taken from c_emit_char.
	(generic_printstr): New function; mostly taken from c_printstr.
	* f-valprint.c (f_val_print) <TYPE_CODE_ARRAY>: Handle strings
	represented as arrays.
	<TYPE_CODE_CHAR>: Treat as TYPE_CODE_INT; recognize as character
	type.
	* f-typeprint.c (f_type_print_base) <TYPE_CODE_CHAR>: Treat
	identically to TYPE_CODE_INT.
	* f-lang.c (f_get_encoding): New function.
	(f_emit_char): Use generic_emit_char.
	(f_printchar): Replace comment.
	(f_printstr): Use generic_printstr.
	* dwarf2read.c (read_base_type) <DW_ATE_unsigned>: Handle Fortran
	"character" types specially.
	<DW_ATE_signed_char, DW_ATE_unsigned_char>: Make TYPE_CODE_CHAR
	for Fortran.
	* c-lang.c (wchar_printable, append_string_as_wide, print_wchar):
	Move to valprint.c
	(c_emit_char): Call generic_emit_char.
	(c_printstr): Call generic_printstr.
gdb/testsuite
	* gdb.fortran/charset.exp: New file.
	* gdb.fortran/charset.f90: New file.
2011-06-29 15:32:40 +00:00
Tom Tromey c50491a797 gdb
* c-lang.c (evaluate_subexp_c): Use expect_type if it is not
	NULL.
gdb/testsuite
	* gdb.base/charset.exp (string_display): Add tests to assign to
	arrays.
	* gdb.base/charset.c (short_array, int_array, long_array): New.
2011-05-23 20:27:23 +00:00
Michael Snyder 9b20d036b6 2011-01-11 Michael Snyder <msnyder@vmware.com>
* arm-tdep.c: Internationalization.
	* c-lang.c: Ditto.
	* charset.c: Ditto.
	* fork-child.c: Ditto.
	* nto-procfs.c: Ditto.
	* ppc-sysv-tdep.c: Ditto.
	* procfs.c: Ditto.
	* remote-mips.c: Ditto.
	* remote.c: Ditto.
	* rs6000-nat.c: Ditto.
	* rs6000-tdep.c: Ditto.
	* target.c: Ditto.
	* valops.c: Ditto.
	* value.c: Ditto.
	* xml-support.c: Ditto.
	* mi/mi-cmd-break.c: Ditto.
	* mi/mi-cmd-var.c: Ditto.
	* mi/mi-interp.c: Ditto.
	* mi/mi-main.c: Ditto.
2011-01-11 15:10:03 +00:00
Michael Snyder 3e43a32aaa 2011-01-05 Michael Snyder <msnyder@vmware.com>
* addrmap.c: Shorten lines of >= 80 columns.
	* arch-utils.c: Ditto.
	* arch-utils.h: Ditto.
	* ax-gdb.c: Ditto.
	* ax-general.c: Ditto.
	* bcache.c: Ditto.
	* blockframe.c: Ditto.
	* breakpoint.c: Ditto.
	* buildsym.c: Ditto.
	* c-lang.c: Ditto.
	* c-typeprint.c: Ditto.
	* charset.c: Ditto.
	* coffread.c: Ditto.
	* command.h: Ditto.
	* corelow.c: Ditto.
	* cp-abi.c: Ditto.
	* cp-namespace.c: Ditto.
	* cp-support.c: Ditto.
	* dbug-rom.c: Ditto.
	* dbxread.c: Ditto.
	* defs.h: Ditto.
	* dfp.c: Ditto.
	* dfp.h: Ditto.
	* dictionary.c: Ditto.
	* disasm.c: Ditto.
	* doublest.c: Ditto.
	* dwarf2-frame.c: Ditto.
	* dwarf2expr.c: Ditto.
	* dwarf2loc.c: Ditto.
	* dwarf2read.c: Ditto.
	* elfread.c: Ditto.
	* eval.c: Ditto.
	* event-loop.c: Ditto.
	* event-loop.h: Ditto.
	* exceptions.h: Ditto.
	* exec.c: Ditto.
	* expprint.c: Ditto.
	* expression.h: Ditto.
	* f-lang.c: Ditto.
	* f-valprint.c: Ditto.
	* findcmd.c: Ditto.
	* frame-base.c: Ditto.
	* frame-unwind.c: Ditto.
	* frame-unwind.h: Ditto.
	* frame.c: Ditto.
	* frame.h: Ditto.
	* gcore.c: Ditto.
	* gdb-stabs.h: Ditto.
	* gdb_assert.h: Ditto.
	* gdb_dirent.h: Ditto.
	* gdb_obstack.h: Ditto.
	* gdbcore.h: Ditto.
	* gdbtypes.c: Ditto.
	* gdbtypes.h: Ditto.
	* inf-ttrace.c: Ditto.
	* infcall.c: Ditto.
	* infcmd.c: Ditto.
	* inflow.c: Ditto.
	* infrun.c: Ditto.
	* inline-frame.h: Ditto.
	* language.c: Ditto.
	* language.h: Ditto.
	* libunwind-frame.c: Ditto.
	* libunwind-frame.h: Ditto.
	* linespec.c: Ditto.
	* linux-nat.c: Ditto.
	* linux-nat.h: Ditto.
	* linux-thread-db.c: Ditto.
	* machoread.c: Ditto.
	* macroexp.c: Ditto.
	* macrotab.c: Ditto.
	* main.c: Ditto.
	* maint.c: Ditto.
	* mdebugread.c: Ditto.
	* memattr.c: Ditto.
	* minsyms.c: Ditto.
	* monitor.c: Ditto.
	* monitor.h: Ditto.
	* objfiles.c: Ditto.
	* objfiles.h: Ditto.
	* osabi.c: Ditto.
	* p-typeprint.c: Ditto.
	* p-valprint.c: Ditto.
	* parse.c: Ditto.
	* printcmd.c: Ditto.
	* proc-events.c: Ditto.
	* procfs.c: Ditto.
	* progspace.c: Ditto.
	* progspace.h: Ditto.
	* psympriv.h: Ditto.
	* psymtab.c: Ditto.
	* record.c: Ditto.
	* regcache.c: Ditto.
	* regcache.h: Ditto.
	* remote-fileio.c: Ditto.
	* remote.c: Ditto.
	* ser-mingw.c: Ditto.
	* ser-tcp.c: Ditto.
	* ser-unix.c: Ditto.
	* serial.c: Ditto.
	* serial.h: Ditto.
	* solib-frv.c: Ditto.
	* solib-irix.c: Ditto.
	* solib-osf.c: Ditto.
	* solib-pa64.c: Ditto.
	* solib-som.c: Ditto.
	* solib-sunos.c: Ditto.
	* solib-svr4.c: Ditto.
	* solib-target.c: Ditto.
	* solib.c: Ditto.
	* somread.c: Ditto.
	* source.c: Ditto.
	* stabsread.c: Ditto.
	* stabsread.c: Ditto.
	* stack.c: Ditto.
	* stack.h: Ditto.
	* symfile-mem.c: Ditto.
	* symfile.c: Ditto.
	* symfile.h: Ditto.
	* symmisc.c: Ditto.
	* symtab.c: Ditto.
	* symtab.h: Ditto.
	* target-descriptions.c: Ditto.
	* target-memory.c: Ditto.
	* target.c: Ditto.
	* target.h: Ditto.
	* terminal.h: Ditto.
	* thread.c: Ditto.
	* top.c: Ditto.
	* tracepoint.c: Ditto.
	* tracepoint.h: Ditto.
	* ui-file.c: Ditto.
	* ui-file.h: Ditto.
	* ui-out.h: Ditto.
	* user-regs.c: Ditto.
	* user-regs.h: Ditto.
	* utils.c: Ditto.
	* valarith.c: Ditto.
	* valops.c: Ditto.
	* valprint.c: Ditto.
	* valprint.h: Ditto.
	* value.c: Ditto.
	* varobj.c: Ditto.
	* varobj.h: Ditto.
	* vec.h: Ditto.
	* xcoffread.c: Ditto.
	* xcoffsolib.c: Ditto.
	* xcoffsolib.h: Ditto.
	* xml-syscall.c: Ditto.
	* xml-tdesc.c: Ditto.
2011-01-05 22:22:53 +00:00
Joel Brobecker 7b6bb8daac run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
Michael Snyder aff410f180 2010-12-31 Michael Snyder <msnyder@vmware.com>
* charset.c: Comment cleanup and long line wrapping.
	* charset.h: Ditto.
	* c-lang.c: Ditto.
	* c-lang.h: Ditto.
	* coff-pe-read.c: Ditto.
	* coff-pe-read.h: Ditto.
	* coffread.c: Ditto.
	* command.h: Ditto.
	* complaints.c: Ditto.
	* complaints.h: Ditto.
	* completer.c: Ditto.
	* completer.h: Ditto.
	* corefile.c: Ditto.
	* corelow.c: Ditto.
	* core-regset.c: Ditto.
	* cp-abi.c: Ditto.
	* cp-abi.h: Ditto.
	* cp-namespace.c: Ditto.
	* cp-support.c: Ditto.
	* cp-support.h: Ditto.
	* cp-valprint.c: Ditto.
	* cp-typeprint.c: Ditto.
	* c-valprint.c: Ditto.
2010-12-31 22:59:52 +00:00
Tom Tromey 621c83642d gdb
* varobj.c (value_get_print_value): Rearrange.  Pass stream to
	apply_varobj_pretty_printer.
	* c-lang.c: Include exceptions.h.
	(c_get_string): Throw MEMORY_ERROR when appropriate.
	* python/py-prettyprint.c (enum string_repr_result): New.
	(print_stack_unless_memory_error): New function.
	(print_string_repr): Change return type.  Use
	print_stack_unless_memory_error.
	(print_children): Use print_stack_unless_memory_error.
	(apply_val_pretty_printer): Update.  Don't print children if
	string representation threw an exception.
	(apply_varobj_pretty_printer): Add 'stream' argument.  Use
	print_stack_unless_memory_error.
	* python/python.c (gdbpy_gdb_error, gdbpy_gdb_memory_error): New
	globals.
	(_initialize_python): Initialize them.
	* python/python-internal.h (GDB_PY_HANDLE_EXCEPTION): Use
	gdbpy_convert_exception.
	(GDB_PY_SET_HANDLE_EXCEPTION): Likewise.
	(gdbpy_gdb_error, gdbpy_gdb_memory_error): Declare.
	(gdbpy_convert_exception): Declare.
	(apply_varobj_pretty_printer): Update.
	* python/py-utils.c (gdbpy_convert_exception): New function.
gdb/doc
	* gdb.texinfo (Basic Python): Update.  Add xref.
	(Exception Handling): Document new exception classes.
	(Types In Python): Update.
	(Frames In Python): Update.
gdb/testsuite
	* gdb.python/py-prettyprint.c (main): Add new 'ns2' local.
	* gdb.python/py-prettyprint.exp (run_lang_tests): Add test for
	MemoryError.
	* gdb.python/python.exp (gdb_py_test_multiple): Update exception
	type.
	* gdb.python/py-value.exp (test_value_in_inferior): Add test for
	MemoryError.
	(test_subscript_regression): Update exception type.
2010-11-12 20:49:43 +00:00
Ken Werner f4b8a18de7 gdb:
* NEWS: Mention OpenCL C language support.
	* Makefile.in (SFILES): Add opencl-lang.c.
	(COMMON_OBS): Add opencl-lang.o.
	* opencl-lang.c: New File
	* defs.h (enum language): Add language_opencl.
	* dwarf2read.c (read_file_scope): Handle DW_AT_producer for the
	IBM XL C OpenCL compiler.
	* c-lang.h: Include "parser-defs.h".
	(evaluate_subexp_c): Declare.
	* c-lang.c (evaluate_subexp_c): Remove the static qualifier.
	(c_op_print_tab): Add declaration.
	* eval.c (binop_promote): Handle language_opencl.
	* c-exp.y: Lookup the primitive types instead of referring to the
	builtins.

gdb/testsuite:
	* Makefile.in (ALL_SUBDIRS): Add gdb.opencl.
	* configure.ac (AC_OUTPUT): Add gdb.opencl/Makefile.
	* configure: Regenerate.
	* gdb.opencl/Makefile.in: New File.
	* gdb.opencl/datatypes.exp: Likewise.
	* gdb.opencl/datatypes.cl: Likewise.
	* gdb.opencl/operators.exp: Likewise.
	* gdb.opencl/operators.cl: Likewise.
	* gdb.opencl/vec_comps.exp: Likewise.
	* gdb.opencl/vec_comps.cl: Likewise.
	* gdb.opencl/convs_casts.exp: Likewise.
	* gdb.opencl/convs_casts.cl: Likewise.
	* lib/opencl.exp: Likewise.
	* lib/opencl_hostapp.c: Likewise.
	* lib/opencl_kernel.cl: Likewise.
	* lib/cl_util.c: Likewise.
	* lib/cl_util.c: Likewise.
	* gdb.base/default.exp (set language): Add "opencl" to the list of
	languages.

gdb/doc:
	* gdb.texinfo: (Summary) Add mention about OpenCL C language support.
	(OpenCL C): New node.
2010-11-05 14:31:30 +00:00
Andreas Schwab 3872d37d18 PR gdb/11092
* c-lang.c (c_printstr): Compute real length of NUL terminated
string at first.
2010-05-17 16:53:21 +00:00
Michael Snyder c5504eafbc 2010-05-13 Michael Snyder <msnyder@vmware.com>
* charset.c: White space.
	* c-lang.c: White space.
	* cli-out.c: White space.
	* coffread.c: White space.
	* complaints.c: White space.
	* completer.c: White space.
	* corefile.c: White space.
	* corelow.c: White space.
	* cp-abi.c: White space.
	* cp-namespace.c: White space.
	* cp-support.c: White space.
	* cp-valprint.c: White space.
	* c-typeprint.c: White space.
	* c-valprint.c: White space.
2010-05-13 23:53:32 +00:00
Michael Snyder b5385fc0f0 2010-05-06 Michael Snyder <msnyder@vmware.com>
* ada-lang.c (add_defn_to_vec): Delete unused variable.
	(decode_constrained_packed_array_type): Delete unused variable.
	(add_defn_to_vec): Delete unused variable.
	(symbol_completion_match): Delete unused variable.
	(value_tag_from_contents_and_address): Delete unused variable.
	(ada_evaluate_subexp): Delete unused variable.
	* c-lang.c (classify_type): Delete unused variable.
	* f-lang.c (f_printstr): Delete unused variable.
	* objc-lang.c (objc_printstr): Delete unused variable.
	* ada-tasks.c (get_known_tasks_addr): Delete unused variable.
	* jv-lang.c (type_from_class): ifdef unused variable.
	(java_class_name_from_physname): Delete unused variable.
	* m2-lang.c (m2_printstr): Delete unused variable.
2010-05-06 23:36:39 +00:00
Joel Brobecker 6aecb9c228 D language support.
gdb/ChangeLog:

        D language support.
        * Makefile.in (SFILES): Add d-lang.c d-valprint.c.
        (COMMON_OBS): Add d-lang.o d-valprint.o.
        (HFILES_NO_SRCDIR): Add d-lang.h.
        * NEWS: Mention D language support.
        * c-lang.c (c_emit_char, exp_descriptor_c): Make public.
        * c-lang.h (c_emit_char, exp_descriptor_c): Add declaration.
        * d-lang.c: New file.
        * d-lang.h: New file.
        * d-valprint.c: New file.
        * defs.h (enum language): Add language_d.
        * dwarf2read.c (set_cu_language): Add DW_LANG_D.
        * language.c (binop_result_type, integral_type, character_type)
        (string_type, boolean_type, structured_type): Add language_d.
        * symfile.c (init_filename_language_table): Add language_d.
        * symtab.c: Include d-lang.h.
        (symbol_init_language_specific, symbol_find_demangled_name)
        (symbol_natural_name, lookup_symbol_in_language)
        (symbol_demangled_name, symbol_matches_domain): Add language_d.

gdb/doc/ChangeLog:

        * gdb.texinfo: (Summary) Add mention about D language support.
        (Filenames): Add D suffixes.
        (D): New node.

gdb/testsuite/ChangeLog:

        * gdb.base/default.exp: Fix "set language" test.
2010-04-29 14:45:39 +00:00
Jan Kratochvil c0201579c8 gdb/
Fix crashes on dangling display expressions.
	* ada-lang.c (ada_operator_check): New function.
	(ada_exp_descriptor): Fill-in the field operator_check.
	* c-lang.c (exp_descriptor_c): Fill-in the field operator_check.
	* jv-lang.c (exp_descriptor_java): Likewise.
	* m2-lang.c (exp_descriptor_modula2): Likewise.
	* scm-lang.c (exp_descriptor_scm): Likewise.
	* parse.c (exp_descriptor_standard): Likewise.
	(operator_check_standard): New function.
	(exp_iterate, exp_uses_objfile_iter, exp_uses_objfile): New functions.
	* parser-defs.h (struct exp_descriptor): New field operator_check.
	(operator_check_standard, exp_uses_objfile): New declarations.
	* printcmd.c: Remove the inclusion of solib.h.
	(display_uses_solib_p): Remove the function.
	(clear_dangling_display_expressions): Call lookup_objfile_from_block
	and exp_uses_objfile instead of display_uses_solib_p.
	* solist.h (struct so_list) <objfile>: New comment.
	* symtab.c (lookup_objfile_from_block): Remove the static qualifier.
	* symtab.h (lookup_objfile_from_block): New declaration.
	(struct general_symbol_info) <obj_section>: Extend the comment.

gdb/testsuite/
	Fix crashes on dangling display expressions.
	* gdb.base/solib-display.exp: Call gdb_gnu_strip_debug if LIBSEPDEBUG
	is SEP.
	(lib_flags): Remove the "debug" keyword.
	(libsepdebug): New variable for iterating new loop.
	(save_pf_prefix): New variable wrapping the loop.
	(sep_lib_flags): New variable derived from LIB_FLAGS.  Use it.
	* lib/gdb.exp (gdb_gnu_strip_debug): Document the return code.
2010-04-22 23:15:43 +00:00
Tom Tromey f870a310ee gdb
2010-03-05  Corinna Vinschen  <vinschen@redhat.com>
	    Tom Tromey  <tromey@redhat.com>

	* utils.c (host_char_to_target): Add 'gdbarch' argument.
	(parse_escape): Likewise.
	* python/py-utils.c (unicode_to_target_string): Update.
	(unicode_to_target_python_string): Update.
	(target_string_to_unicode): Update.
	* printcmd.c (printf_command): Update.
	* p-exp.y (yylex): Update.
	* objc-exp.y (yylex): Update.
	* mi/mi-parse.c: Include charset.h.
	(mi_parse_escape): New function.
	(mi_parse_argv): Use it.
	* jv-exp.y (yylex): Update.
	* i386-cygwin-tdep.c (i386_cygwin_auto_wide_charset): New
	function.
	(i386_cygwin_init_abi): Call set_gdbarch_auto_wide_charset.
	* gdbarch.sh (auto_charset, auto_wide_charset): New.
	* gdbarch.c: Rebuild.
	* gdbarch.h: Rebuild.
	* defs.h (parse_escape): Update.
	* cli/cli-setshow.c: Include arch-utils.h.
	(do_setshow_command): Update.
	* cli/cli-cmds.c (echo_command): Update.
	* charset.h (target_charset, target_wide_charset): Update.
	* charset.c: Include arch-utils.h.
	(target_charset_name): Default to "auto".
	(target_wide_charset_name): Likewise.
	(show_target_charset_name): Handle "auto".
	(show_target_wide_charset_name): Likewise.
	(be_le_arch): New global.
	(set_be_le_names): Add 'gdbarch' argument.
	(validate): Likewise.  Don't call set_be_le_names.
	(set_charset_sfunc, set_host_charset_sfunc)
	(set_target_charset_sfunc, set_target_wide_charset_sfunc):
	Update.
	(target_charset): Add 'gdbarch' argument.
	(target_wide_charset): Likewise.  Remove 'byte_order' argument.
	(auto_target_charset_name): New global.
	(default_auto_charset, default_auto_wide_charset): New functions.
	(_initialize_charset): Set auto_target_charset_name.  Allow "auto"
	for target charsets.  Copy result of nl_langinfo.  Use GetACP if
	USE_WIN32API.
	* c-lang.c (charset_for_string_type): Add 'gdbarch' argument,
	remove 'byte_order' argument.  Update.
	(classify_type): Likewise.
	(c_emit_char): Update.
	(c_printchar): Update.
	(c_printstr): Update.
	(c_get_string): Update.
	(evaluate_subexp_c): Update.
	* arch-utils.h (default_auto_charset, default_auto_wide_charset):
	Declare.
	* python/python.c (gdbpy_target_charset): New function.
	(gdbpy_target_wide_charset): Likewise.
	(GdbMethods): Update.
	* NEWS: Update.
gdb/doc
	* gdb.texinfo (Basic Python): Document target_charset and
	target_wide_charset.
gdb/testsuite
	* gdb.python/py-prettyprint.py (pp_nullstr.to_string): Use
	gdb.target_charset.
	(pp_ns.to_string): Likewise.
2010-03-05 20:18:19 +00:00
Phil Muldoon be759fcf73 2010-01-13 Phil Muldoon <pmuldoon@redhat.com>
PR python/10705

	* python/python-internal.h: Add lazy_string_object_type
	definition.
	(create_lazy_string_object, gdbpy_initialize_lazy_string)
	(gdbpy_is_lazystring, gdbpy_extract_lazy_string): Define.
	* python/py-value.c (valpy_lazy_string): New function.
	(convert_value_from_python): Add lazy string conversion.
	* python/py-prettyprint.c (pretty_print_one_value): Check if
	return is also a lazy string.
	(print_string_repr): Add lazy string printing branch.
	(print_children): Likewise.
	* python/py-lazy-string.c: New file. Implement lazy strings.
	* python/python.c (_initialize_python): Call
	gdbpy_initialize_lazy_string.
	* varobj.c (value_get_print_value): Add lazy string printing
	branch.  Account for encoding.
	* c-lang.c (c_printstr): Account for new encoding argument.  If
	encoding is NULL, find encoding suited for type, otherwise use
	user encoding.
	* language.h (language_defn): Add encoding argument.
	(LA_PRINT_STRING): Likewise.
	* language.c (unk_lang_printstr): Update to reflect new encoding
	argument to language_defn.
	* ada-lang.h (ada_printstr): Likewise.
	* c-lang.h (c_printstr): Likewise.
	* p-lang.h (pascal_printstr);
	* f-lang.c (f_printstr): Likewise.
	* m2-lang.c (m2_printstr): Likewise.
	* objc-lang.c (objc_printstr): Likewise.
	* p-lang.c (pascal_printstr): Likewise.
	* scm-lang.c (scm_printstr): Likewise.
	* c-valprint.c (c_val_print): Update LA_PRINT_STRING call for
	encoding argument.
	* ada-valprint.c (ada_printstr): Likewise.
	* f-valprint.c (f_val_print): Likewise
	* m2-valprint.c (m2_val_print): Likewise.
	* p-valprint.c (pascal_val_print): Likewise.
	* expprint.c (print_subexp_standard): Likewise.
	* valprint.c (val_print_string): Likewise.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add py-lazy-string.
	(SUBDIR_PYTHON_SRCS): Likewise.
	(py-lazy-string.o): New rule.

2010-01-13  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.texinfo (Values From Inferior): Document lazy_string value
	method.
	(Python API): Add Lazy strings menu item.
	(Lazy Strings In Python): New node.

2010-01-13  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.python/py-value.exp (test_lazy_strings): Add lazy string test.
	* gdb.python/py-prettyprint.py (pp_ls): New printer.
	* gdb.python/py-prettyprint.exp (run_lang_tests): Add lazy string
	test.
	* gdb.python/py-prettyprint.c: Define lazystring test structure.
	* gdb.python/py-mi.exp: Add lazy string test.
2010-01-14 08:03:37 +00:00
Joel Brobecker 4c38e0a4fc Update copyright year in most headers.
Automatic update by copyright.sh.
2010-01-01 07:32:07 +00:00
Tom Tromey 96c07c5b96 gdb
PR python/10664:
	* language.h (struct language_defn) <la_get_string>: Add
	'char_type' argument.
	(LA_GET_STRING): Likewise.
	(default_get_string, c_get_string): Update.
	* language.c (default_get_string): Add 'char_type' argument.
	* c-valprint.c (c_textual_element_type): Rename from
	textual_element_type.  No longer static.  Update callers.
	* c-lang.h (c_textual_element_type): Declare.
	* c-lang.c (c_get_string): Add 'char_type' argument.
gdb/testsuite
	PR python/10664:
	* gdb.base/charset.exp: Test utf-16 strings with Python.
2009-09-25 21:39:53 +00:00
Tom Tromey b8899f2b68 gdb
* charset.c (iconv_open): Use UTF-16 and UTF-32, not UCS-2 and
	UCS-4.
	(iconv): Rename 'ucs_flag'.
	(GDB_DEFAULT_TARGET_WIDE_CHARSET): Use UTF-32.
	* c-lang.c (charset_for_string_type): Use UTF-16 and UTF-32, not
	UCS-2 and UCS-4.
	(convert_ucn): Use UTF-32.
gdb/testsuite
	* gdb.base/charset.exp: Use UTF-16 and UTF-32, not UCS-2 and
	UCS-4.
	* gdb.base/charset.c (utf_32_string): Rename.
	(init_utf32): Rename.
	(main): Update.
2009-09-25 20:53:14 +00:00
Phil Muldoon 7a9fe1016c 2009-09-21 Phil Muldoon <pmuldoon@redhat.com>
PR python/10633

	* c-lang.c (c_printstr): Do not loop past  options->print_max when
	iterating with wchar_iterate.

2009-09-21  Phil Muldoon <pmuldoon@redhat.com>

	PR python/10633

	* gdb.python/py-prettyprint.exp (gdb_py_test_silent_cmd): New
	Function.
	(run_lang_tests): Add print elements test.
2009-09-21 09:39:53 +00:00
Phil Muldoon fbb8f2990c 2009-07-10 Phil Muldoon <pmuldoon@redhat.com>
* python/python-internal.h (apply_varobj_pretty_printer): Update
	definition.
	(python_string_to_target_python_string): Add definition.
	* python/python-utils.c (unicode_to_encoded_python_string)
	(unicode_to_target_python_string)
	(python_string_to_target_python_string): New Functions.
	* python/python-prettyprint.c (pretty_print_one_value): Likewise.
	(print_string_repr): Refactor to logic to account for PyObject
	returned strings.
	(apply_varobj_pretty_printer): Likewise.
	* python/python-value.c (valpy_string): Parse length keyword. Use
	length keyword in LA_GET_STRING.
	* varobj.c (value_get_print_value): Refactor logic to account for
	PyObject returned strings.
	* c-lang.c (c_get_string): If the length parameter is specified,
	use that. Return value in characters. Update comments.
	* language.h: Update c_get_string prototype comments.

2009-07-10  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.texinfo (Values From Inferior): Add length parameter
	description.

2009-07-10 Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.python/python-prettyprint.c: Add counted null string
	structure.
	* gdb.python/python-prettyprint.exp: Print null string. Test for
	embedded nulls.
	* gdb.python/python-prettyprint.py (pp_ns): New Function.
	* gdb.python/python-value.exp (test_value_in_inferior): Add
	variable length string fetch tests.
	* gdb.python/python-value.c (main): Add strings for string fetch tests.
2009-07-10 10:35:17 +00:00
Tom Tromey 30b66ecc73 gdb
* c-lang.c (convert_octal): Only allow 3 octal digits.
	(print_wchar): Prefer 3-digit octal form.  Fall back to hex if
	needed.
	* c-exp.y (c_parse_escape): Only allow 3 octal digits.
gdb/testsuite
	* gdb.base/call-rt-st.exp: Update for change to escape output.
	* gdb.base/callfuncs.exp: Likewise.
	* gdb.base/charset.exp: Likewise.
	* gdb.base/constvars.exp: Likewise.
	* gdb.base/long_long.exp: Likewise.
	* gdb.base/pointers.exp: Likewise.
	* gdb.base/printcmds.exp: Likewise.
	* gdb.base/setvar.exp: Likewise.
	* gdb.base/store.exp: Likewise.
	* gdb.cp/ref-types.exp: Likewise.
	* gdb.mi/mi-var-child.exp: Likewise.
	* gdb.mi/mi-var-display.exp: Likewise.
	* gdb.mi/mi2-var-display.exp: Likewise.
	* gdb.base/charset.exp: Test octal escape sequence length.
	Update for change to escape output.
2009-07-07 21:33:50 +00:00
Ulrich Weigand e17a411335 * defs.h (extract_signed_integer, extract_unsigned_integer,
extract_long_unsigned_integer, store_signed_integer,
	store_unsigned_integer): Add BYTE_ORDER parameter.
	* findvar.c (extract_signed_integer, extract_unsigned_integer,
	extract_long_unsigned_integer, store_signed_integer,
	store_unsigned_integer): Add BYTE_ORDER parameter.  Use it
	instead of current_gdbarch.

	* gdbcore.h (read_memory_integer, safe_read_memory_integer,
	read_memory_unsigned_integer, write_memory_signed_integer,
	write_memory_unsigned_integer): Add BYTE_ORDER parameter.
	* corefile.c (struct captured_read_memory_integer_arguments): Add
	BYTE_ORDER member.
	(safe_read_memory_integer): Add BYTE_ORDER parameter.  Store it into
	struct captured_read_memory_integer_arguments.
	(do_captured_read_memory_integer): Pass it to read_memory_integer.
	(read_memory_integer): Add BYTE_ORDER parameter.  Pass it to
	extract_signed_integer.
	(read_memory_unsigned_integer): Add BYTE_ORDER parameter.  Pass it to
	extract_unsigned_integer.
	(write_memory_signed_integer): Add BYTE_ORDER parameter.  Pass it
	to store_signed_integer.
	(write_memory_unsigned_integer): Add BYTE_ORDER parameter.  Pass it
	to store_unsigned_integer.

	* target.h (get_target_memory_unsigned): Add BYTE_ORDER parameter.
	* target.c (get_target_memory_unsigned): Add BYTE_ORDER parameter.
	Pass it to extract_unsigned_integer.


	Update calls to extract_signed_integer, extract_unsigned_integer,
	extract_long_unsigned_integer, store_signed_integer,
	store_unsigned_integer, read_memory_integer,
	read_memory_unsigned_integer, safe_read_memory_integer,
	write_memory_signed_integer, write_memory_unsigned_integer, and
	get_target_memory_unsigned to pass byte order:
	* ada-lang.c (ada_value_binop): Update.
	* ada-valprint.c (char_at): Update.
	* alpha-osf1-tdep.c (alpha_osf1_sigcontext_addr): Update.
	* alpha-tdep.c (alpha_lds, alpha_sts, alpha_push_dummy_call,
	alpha_extract_return_value, alpha_read_insn,
	alpha_get_longjmp_target): Update.
	* amd64-linux-tdep.c (amd64_linux_sigcontext_addr): Update.
	* amd64obsd-tdep.c (amd64obsd_supply_uthread,
	amd64obsd_collect_uthread, amd64obsd_trapframe_cache): Update.
	* amd64-tdep.c (amd64_push_dummy_call, amd64_analyze_prologue,
	amd64_frame_cache, amd64_sigtramp_frame_cache, fixup_riprel,
	amd64_displaced_step_fixup): Update.
	* arm-linux-tdep.c (arm_linux_sigreturn_init,
	arm_linux_rt_sigreturn_init, arm_linux_supply_gregset): Update.
	* arm-tdep.c (thumb_analyze_prologue, arm_skip_prologue,
	arm_scan_prologue, arm_push_dummy_call, thumb_get_next_pc,
	arm_get_next_pc, arm_extract_return_value, arm_store_return_value,
	arm_return_value): Update.
	* arm-wince-tdep.c (arm_pe_skip_trampoline_code): Update.
	* auxv.c (default_auxv_parse): Update.
	* avr-tdep.c (avr_address_to_pointer, avr_pointer_to_address,
	avr_scan_prologue, avr_extract_return_value,
	avr_frame_prev_register, avr_push_dummy_call): Update.
	* bsd-uthread.c (bsd_uthread_check_magic, bsd_uthread_lookup_offset,
	bsd_uthread_wait, bsd_uthread_thread_alive,
	bsd_uthread_extra_thread_info): Update.
	* c-lang.c (c_printstr, print_wchar): Update.
	* cp-valprint.c (cp_print_class_member): Update.
	* cris-tdep.c (cris_sigcontext_addr, cris_sigtramp_frame_unwind_cache,
	cris_push_dummy_call, cris_scan_prologue, cris_store_return_value,
	cris_extract_return_value, find_step_target, dip_prefix,
	sixteen_bit_offset_branch_op, none_reg_mode_jump_op,
	move_mem_to_reg_movem_op, get_data_from_address): Update.
	* dwarf2expr.c (dwarf2_read_address, execute_stack_op): Update.
	* dwarf2-frame.c (execute_cfa_program): Update.
	* dwarf2loc.c (find_location_expression): Update.
	* dwarf2read.c (dwarf2_const_value): Update.
	* expprint.c (print_subexp_standard): Update.
	* findvar.c (unsigned_pointer_to_address, signed_pointer_to_address,
	unsigned_address_to_pointer, address_to_signed_pointer,
	read_var_value): Update.
	* frame.c (frame_unwind_register_signed,
	frame_unwind_register_unsigned, get_frame_memory_signed,
	get_frame_memory_unsigned): Update.
	* frame-unwind.c (frame_unwind_got_constant): Update.
	* frv-linux-tdep.c (frv_linux_pc_in_sigtramp,
	frv_linux_sigcontext_reg_addr, frv_linux_sigtramp_frame_cache):
	Update.
	* frv-tdep.c (frv_analyze_prologue, frv_skip_main_prologue,
	frv_extract_return_value, find_func_descr,
	frv_convert_from_func_ptr_addr, frv_push_dummy_call): Update.
	* f-valprint.c (f_val_print): Update.
	* gnu-v3-abi.c (gnuv3_decode_method_ptr, gnuv3_make_method_ptr):
	Update.
	* h8300-tdep.c (h8300_is_argument_spill, h8300_analyze_prologue,
	h8300_push_dummy_call, h8300_extract_return_value,
	h8300h_extract_return_value, h8300_store_return_value,
	h8300h_store_return_value): Update.
	* hppabsd-tdep.c (hppabsd_find_global_pointer): Update.
	* hppa-hpux-nat.c (hppa_hpux_fetch_register, hppa_hpux_store_register):
	Update.
	* hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline,
	hppa64_hpux_in_solib_call_trampoline,
	hppa_hpux_in_solib_return_trampoline, hppa_hpux_skip_trampoline_code,
	hppa_hpux_sigtramp_frame_unwind_cache,
	hppa_hpux_sigtramp_unwind_sniffer, hppa32_hpux_find_global_pointer,
	hppa64_hpux_find_global_pointer, hppa_hpux_search_pattern,
	hppa32_hpux_search_dummy_call_sequence,
	hppa64_hpux_search_dummy_call_sequence, hppa_hpux_supply_save_state,
	hppa_hpux_unwind_adjust_stub): Update.
	* hppa-linux-tdep.c (insns_match_pattern,
	hppa_linux_find_global_pointer): Update.
	* hppa-tdep.c (hppa_in_function_epilogue_p, hppa32_push_dummy_call,
	hppa64_convert_code_addr_to_fptr, hppa64_push_dummy_call,
	skip_prologue_hard_way, hppa_frame_cache, hppa_fallback_frame_cache,
	hppa_pseudo_register_read, hppa_frame_prev_register_helper,
	hppa_match_insns): Update.
	* hpux-thread.c (hpux_thread_fetch_registers): Update.
	* i386-tdep.c (i386bsd_sigcontext_addr): Update.
	* i386-cygwin-tdep.c (core_process_module_section): Update.
	* i386-darwin-nat.c (i386_darwin_sstep_at_sigreturn,
	amd64_darwin_sstep_at_sigreturn): Update.
	* i386-darwin-tdep.c (i386_darwin_sigcontext_addr,
	amd64_darwin_sigcontext_addr): Likewise.
	* i386-linux-nat.c (i386_linux_sigcontext_addr): Update.
	* i386nbsd-tdep.c (i386nbsd_sigtramp_cache_init): Update.
	* i386-nto-tdep.c (i386nto_sigcontext_addr): Update.
	* i386obsd-nat.c (i386obsd_supply_pcb): Update.
	* i386obsd-tdep.c (i386obsd_supply_uthread, i386obsd_collect_uthread,
	i386obsd_trapframe_cache): Update.
	* i386-tdep.c (i386_displaced_step_fixup, i386_follow_jump,
	i386_analyze_frame_setup, i386_analyze_prologue,
	i386_skip_main_prologue, i386_frame_cache, i386_sigtramp_frame_cache,
	i386_get_longjmp_target, i386_push_dummy_call,
	i386_pe_skip_trampoline_code, i386_svr4_sigcontext_addr,
	i386_fetch_pointer_argument): Update.
	* i387-tdep.c (i387_supply_fsave): Update.
	* ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Update.
	* ia64-tdep.c (ia64_pseudo_register_read, ia64_pseudo_register_write,
	examine_prologue, ia64_frame_cache, ia64_frame_prev_register,
	ia64_sigtramp_frame_cache, ia64_sigtramp_frame_prev_register,
	ia64_access_reg, ia64_access_rse_reg, ia64_libunwind_frame_this_id,
	ia64_libunwind_frame_prev_register,
	ia64_libunwind_sigtramp_frame_this_id,
	ia64_libunwind_sigtramp_frame_prev_register, ia64_find_global_pointer,
	find_extant_func_descr, find_func_descr,
	ia64_convert_from_func_ptr_addr, ia64_push_dummy_call, ia64_dummy_id,
	ia64_unwind_pc): Update.
	* iq2000-tdep.c (iq2000_pointer_to_address, iq2000_address_to_pointer,
	iq2000_scan_prologue, iq2000_extract_return_value,
	iq2000_push_dummy_call): Update.
	* irix5nat.c (fill_gregset): Update.
	* jv-lang.c (evaluate_subexp_java): Update.
	* jv-valprint.c (java_value_print): Update.
	* lm32-tdep.c (lm32_analyze_prologue, lm32_push_dummy_call,
	lm32_extract_return_value, lm32_store_return_value): Update.
	* m32c-tdep.c (m32c_push_dummy_call, m32c_return_value,
	m32c_skip_trampoline_code, m32c_m16c_address_to_pointer,
	m32c_m16c_pointer_to_address): Update.
	* m32r-tdep.c (m32r_store_return_value, decode_prologue,
	m32r_skip_prologue, m32r_push_dummy_call, m32r_extract_return_value):
	Update.
	* m68hc11-tdep.c (m68hc11_pseudo_register_read,
	m68hc11_pseudo_register_write, m68hc11_analyze_instruction,
	m68hc11_push_dummy_call): Update.
	* m68linux-tdep.c (m68k_linux_pc_in_sigtramp,
	m68k_linux_get_sigtramp_info, m68k_linux_sigtramp_frame_cache):
	Update.
	* m68k-tdep.c (m68k_push_dummy_call, m68k_analyze_frame_setup,
	m68k_analyze_register_saves, m68k_analyze_prologue, m68k_frame_cache,
	m68k_get_longjmp_target): Update.
	* m88k-tdep.c (m88k_fetch_instruction): Update.
	* mep-tdep.c (mep_pseudo_cr32_read, mep_pseudo_csr_write,
	mep_pseudo_cr32_write, mep_get_insn, mep_push_dummy_call): Update.
	* mi/mi-main.c (mi_cmd_data_write_memory): Update.
	* mips-linux-tdep.c (mips_linux_get_longjmp_target, supply_32bit_reg,
	mips64_linux_get_longjmp_target, mips64_fill_gregset,
	mips64_fill_fpregset, mips_linux_in_dynsym_stub): Update.
	* mipsnbdsd-tdep.c (mipsnbsd_get_longjmp_target): Update.
	* mips-tdep.c (mips_fetch_instruction, fetch_mips_16,
	mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call,
	mips_o32_push_dummy_call, mips_o64_push_dummy_call,
	mips_single_step_through_delay, mips_skip_pic_trampoline_code,
	mips_integer_to_address): Update.
	* mn10300-tdep.c (mn10300_analyze_prologue, mn10300_push_dummy_call):
	Update.
	* monitor.c (monitor_supply_register, monitor_write_memory,
	monitor_read_memory_single): Update.
	* moxie-tdep.c (moxie_store_return_value, moxie_extract_return_value,
	moxie_analyze_prologue): Update.
	* mt-tdep.c (mt_return_value, mt_skip_prologue, mt_select_coprocessor,
	mt_pseudo_register_read, mt_pseudo_register_write, mt_registers_info,
	mt_push_dummy_call): Update.
	* objc-lang.c (read_objc_method, read_objc_methlist_nmethods,
	read_objc_methlist_method, read_objc_object, read_objc_super,
	read_objc_class, find_implementation_from_class): Update.
	* ppc64-linux-tdep.c (ppc64_desc_entry_point,
	ppc64_linux_convert_from_func_ptr_addr, ppc_linux_sigtramp_cache):
	Update.
	* ppcobsd-tdep.c (ppcobsd_sigtramp_frame_sniffer,
	ppcobsd_sigtramp_frame_cache): Update.
	* ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call,
	do_ppc_sysv_return_value, ppc64_sysv_abi_push_dummy_call,
	ppc64_sysv_abi_return_value): Update.
	* ppc-linux-nat.c (ppc_linux_auxv_parse): Update.
	* procfs.c (procfs_auxv_parse): Update.
	* p-valprint.c (pascal_val_print): Update.
	* regcache.c (regcache_raw_read_signed, regcache_raw_read_unsigned,
	regcache_raw_write_signed, regcache_raw_write_unsigned,
	regcache_cooked_read_signed, regcache_cooked_read_unsigned,
	regcache_cooked_write_signed, regcache_cooked_write_unsigned): Update.
	* remote-m32r-sdi.c (m32r_fetch_register): Update.
	* remote-mips.c (mips_wait, mips_fetch_registers, mips_xfer_memory):
	Update.
	* rs6000-aix-tdep.c (rs6000_push_dummy_call, rs6000_return_value,
	rs6000_convert_from_func_ptr_addr, branch_dest,
	rs6000_software_single_step): Update.
	* rs6000-tdep.c (rs6000_in_function_epilogue_p,
	ppc_displaced_step_fixup, ppc_deal_with_atomic_sequence,
	bl_to_blrl_insn_p, rs6000_fetch_instruction, skip_prologue,
	rs6000_skip_main_prologue, rs6000_skip_trampoline_code,
	rs6000_frame_cache): Update.
	* s390-tdep.c (s390_pseudo_register_read, s390_pseudo_register_write,
	s390x_pseudo_register_read, s390x_pseudo_register_write, s390_load,
	s390_backchain_frame_unwind_cache, s390_sigtramp_frame_unwind_cache,
	extend_simple_arg, s390_push_dummy_call, s390_return_value): Update.
	* scm-exp.c (scm_lreadr): Update.
	* scm-lang.c (scm_get_field, scm_unpack): Update.
	* scm-valprint.c (scm_val_print): Update.
	* score-tdep.c (score_breakpoint_from_pc, score_push_dummy_call,
	score_fetch_inst): Update.
	* sh64-tdep.c (look_for_args_moves, sh64_skip_prologue_hard_way,
	sh64_analyze_prologue, sh64_push_dummy_call, sh64_extract_return_value,
	sh64_pseudo_register_read, sh64_pseudo_register_write,
	sh64_frame_prev_register): Update:
	* sh-tdep.c (sh_analyze_prologue, sh_push_dummy_call_fpu,
	sh_push_dummy_call_nofpu, sh_extract_return_value_nofpu,
	sh_store_return_value_nofpu, sh_in_function_epilogue_p): Update.
	* solib-darwin.c (darwin_load_image_infos): Update.
	* solib-frv.c (fetch_loadmap, lm_base, frv_current_sos, enable_break2,
	find_canonical_descriptor_in_load_object): Update.
	* solib-irix.c (extract_mips_address, fetch_lm_info, irix_current_sos,
	irix_open_symbol_file_object): Update.
	* solib-som.c (som_solib_create_inferior_hook, link_map_start,
	som_current_sos, som_open_symbol_file_object): Update.
	* solib-sunos.c (SOLIB_EXTRACT_ADDRESS, LM_ADDR, LM_NEXT, LM_NAME):
	Update.
	* solib-svr4.c (read_program_header, scan_dyntag_auxv,
	solib_svr4_r_ldsomap): Update.
	* sparc64-linux-tdep.c (sparc64_linux_step_trap): Update.
	* sparc64obsd-tdep.c (sparc64obsd_supply_uthread,
	sparc64obsd_collect_uthread): Update.
	* sparc64-tdep.c (sparc64_pseudo_register_read,
	sparc64_pseudo_register_write, sparc64_supply_gregset,
	sparc64_collect_gregset): Update.
	* sparc-linux-tdep.c (sparc32_linux_step_trap): Update.
	* sparcobsd-tdep.c (sparc32obsd_supply_uthread,
	sparc32obsd_collect_uthread): Update.
	* sparc-tdep.c (sparc_fetch_wcookie, sparc32_push_dummy_code,
	sparc32_store_arguments, sparc32_return_value, sparc_supply_rwindow,
	sparc_collect_rwindow): Update.
	* spu-linux-nat.c (parse_spufs_run): Update.
	* spu-tdep.c (spu_pseudo_register_read_spu,
	spu_pseudo_register_write_spu, spu_pointer_to_address,
	spu_analyze_prologue, spu_in_function_epilogue_p,
	spu_frame_unwind_cache, spu_push_dummy_call, spu_software_single_step,
	spu_get_longjmp_target, spu_get_overlay_table, spu_overlay_update_osect,
	info_spu_signal_command, info_spu_mailbox_list, info_spu_dma_cmdlist,
	info_spu_dma_command, info_spu_proxydma_command): Update.
	* stack.c (print_frame_nameless_args, frame_info): Update.
	* symfile.c (read_target_long_array, simple_read_overlay_table,
	simple_read_overlay_region_table): Update.
	* target.c (debug_print_register): Update.
	* tramp-frame.c (tramp_frame_start): Update.
	* v850-tdep.c (v850_analyze_prologue, v850_push_dummy_call,
	v850_extract_return_value, v850_store_return_value,
	* valarith.c (value_binop, value_bit_index): Update.
	* valops.c (value_cast): Update.
	* valprint.c (val_print_type_code_int, val_print_string,
	read_string): Update.
	* value.c (unpack_long, unpack_double, unpack_field_as_long,
	modify_field, pack_long): Update.
	* vax-tdep.c (vax_store_arguments, vax_push_dummy_call,
	vax_skip_prologue): Update.
	* xstormy16-tdep.c (xstormy16_push_dummy_call,
	xstormy16_analyze_prologue, xstormy16_in_function_epilogue_p,
	xstormy16_resolve_jmp_table_entry, xstormy16_find_jmp_table_entry,
	xstormy16_pointer_to_address, xstormy16_address_to_pointer): Update.
	* xtensa-tdep.c (extract_call_winsize, xtensa_pseudo_register_read,
	xtensa_pseudo_register_write, xtensa_frame_cache,
	xtensa_push_dummy_call, call0_track_op, call0_frame_cache): Update.


	* dfp.h (decimal_to_string, decimal_from_string, decimal_from_integral,
	decimal_from_floating, decimal_to_doublest, decimal_is_zero): Add
	BYTE_ORDER parameter.
	(decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT
	parameters.
	(decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters.
	(decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters.
	* dfp.c (match_endianness): Add BYTE_ORDER parameter.  Use it
	instead of current_gdbarch.
	(decimal_to_string, decimal_from_integral, decimal_from_floating,
	decimal_to_doublest, decimal_is_zero): Add BYTE_ORDER parameter.
	Pass it to match_endianness.
	(decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT
	parameters.  Pass them to match_endianness.
	(decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters.
	Pass them to match_endianness.
	(decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters.
	Pass them to match_endianness.
	* valarith.c (value_args_as_decimal): Add BYTE_ORDER_X and
	BYTE_ORDER_Y output parameters.
	(value_binop): Update call to value_args_as_decimal.

	Update calls to decimal_to_string, decimal_from_string,
	decimal_from_integral, decimal_from_floating, decimal_to_doublest,
	decimal_is_zero, decimal_binop, decimal_compare and decimal_convert
	to pass/receive byte order:
	* c-exp.y (parse_number): Update.
	* printcmd.c (printf_command): Update.
	* valarith.c (value_args_as_decimal, value_binop, value_logical_not,
	value_equal, value_less): Update.
	* valops.c (value_cast, value_one): Update.
	* valprint.c (print_decimal_floating): Update.
	* value.c (unpack_long, unpack_double): Update.
	* python/python-value.c (valpy_nonzero): Update.


	* ada-valprint.c (char_at): Add BYTE_ORDER parameter.
	(printstr): Update calls to char_at.
	(ada_val_print_array): Likewise.
	* valprint.c (read_string): Add BYTE_ORDER parameter.
	(val_print_string): Update call to read_string.
	* c-lang.c (c_get_string): Likewise.
	* charset.h (target_wide_charset): Add BYTE_ORDER parameter.
	* charset.c (target_wide_charset): Add BYTE_ORDER parameter.
	Use it instead of current_gdbarch.
	* printcmd.c (printf_command): Update calls to target_wide_charset.
	* c-lang.c (charset_for_string_type): Add BYTE_ORDER parameter.
	Pass to target_wide_charset.  Use it instead of current_gdbarch.
	(classify_type): Add BYTE_ORDER parameter.  Pass to
	charset_for_string_type.  Allow NULL encoding pointer.
	(print_wchar): Add BYTE_ORDER parameter.
	(c_emit_char): Update calls to classify_type and print_wchar.
	(c_printchar, c_printstr): Likewise.


	* gdbarch.sh (in_solib_return_trampoline): Convert to type "m".
	* gdbarch.c, gdbarch.h: Regenerate.
	* arch-utils.h (generic_in_solib_return_trampoline): Add GDBARCH
	parameter.
	* arch-utils.c (generic_in_solib_return_trampoline): Likewise.
	* hppa-hpux-tdep.c (hppa_hpux_in_solib_return_trampoline): Likewise.
	* rs6000-tdep.c (rs6000_in_solib_return_trampoline): Likewise.
	(rs6000_skip_trampoline_code): Update call.

	* alpha-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to
	dynamic_sigtramp_offset and pc_in_sigtramp callbacks.
	(alpha_read_insn): Add GDBARCH parameter.
	* alpha-tdep.c (alpha_lds, alpha_sts): Add GDBARCH parameter.
	(alpha_register_to_value): Pass architecture to alpha_sts.
	(alpha_extract_return_value): Likewise.
	(alpha_value_to_register): Pass architecture to alpha_lds.
	(alpha_store_return_value): Likewise.
	(alpha_read_insn): Add GDBARCH parameter.
	(alpha_skip_prologue): Pass architecture to alpha_read_insn.
	(alpha_heuristic_proc_start): Likewise.
	(alpha_heuristic_frame_unwind_cache): Likewise.
	(alpha_next_pc): Likewise.
	(alpha_sigtramp_frame_this_id): Pass architecture to
	tdep->dynamic_sigtramp_offset callback.
	(alpha_sigtramp_frame_sniffer): Pass architecture to
	tdep->pc_in_sigtramp callback.
	* alphafbsd-tdep.c (alphafbsd_pc_in_sigtramp): Add GDBARCH parameter.
	(alphafbsd_sigtramp_offset): Likewise.
	* alpha-linux-tdep.c (alpha_linux_sigtramp_offset_1): Add GDBARCH
	parameter.  Pass to alpha_read_insn.
	(alpha_linux_sigtramp_offset): Add GDBARCH parameter.  Pass to
	alpha_linux_sigtramp_offset_1.
	(alpha_linux_pc_in_sigtramp): Add GDBARCH parameter.  Pass to
	alpha_linux_sigtramp_offset.
	(alpha_linux_sigcontext_addr): Pass architecture to alpha_read_insn
	and alpha_linux_sigtramp_offset.
	* alphanbsd-tdep.c (alphanbsd_sigtramp_offset): Add GDBARCH parameter.
	(alphanbsd_pc_in_sigtramp): Add GDBARCH parameter.  Pass to
	alphanbsd_sigtramp_offset.
	* alphaobsd-tdep.c (alphaobsd_sigtramp_offset): Add GDBARCH parameter.
	(alphaobsd_pc_in_sigtramp): Add GDBARCH parameter.  Pass to
	alpha_read_insn.
	(alphaobsd_sigcontext_addr): Pass architecture to
	alphaobsd_sigtramp_offset.
	* alpha-osf1-tdep.c (alpha_osf1_pc_in_sigtramp): Add GDBARCH
	parameter.

	* amd64-tdep.c (amd64_analyze_prologue): Add GDBARCH parameter.
	(amd64_skip_prologue): Pass architecture to amd64_analyze_prologue.
	(amd64_frame_cache): Likewise.

	* arm-tdep.c (SWAP_SHORT, SWAP_INT): Remove.
	(thumb_analyze_prologue, arm_skip_prologue, arm_scan_prologue,
	thumb_get_next_pc, arm_get_next_pc): Do not use SWAP_ macros.
	* arm-wince-tdep.c: Include "frame.h".

	* avr-tdep.c (EXTRACT_INSN): Remove.
	(avr_scan_prologue): Add GDBARCH argument, inline EXTRACT_INSN.
	(avr_skip_prologue): Pass architecture to avr_scan_prologue.
	(avr_frame_unwind_cache): Likewise.

	* cris-tdep.c (struct instruction_environment): Add BYTE_ORDER member.
	(find_step_target): Initialize it.
	(get_data_from_address): Add BYTE_ORDER parameter.
	(bdap_prefix): Pass byte order to get_data_from_address.
	(handle_prefix_assign_mode_for_aritm_op): Likewise.
	(three_operand_add_sub_cmp_and_or_op): Likewise.
	(handle_inc_and_index_mode_for_aritm_op): Likewise.

	* frv-linux-tdep.c (frv_linux_pc_in_sigtramp): Add GDBARCH parameter.
	(frv_linux_sigcontext_reg_addr): Pass architecture to
	frv_linux_pc_in_sigtramp.
	(frv_linux_sigtramp_frame_sniffer): Likewise.

	* h8300-tdep.c (h8300_is_argument_spill): Add GDBARCH parameter.
	(h8300_analyze_prologue): Add GDBARCH parameter.  Pass to
	h8300_is_argument_spill.
	(h8300_frame_cache, h8300_skip_prologue): Pass architecture
	to h8300_analyze_prologue.

	* hppa-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to
	in_solib_call_trampoline callback.
	(hppa_in_solib_call_trampoline): Add GDBARCH parameter.
	* hppa-tdep.c (hppa64_convert_code_addr_to_fptr): Add GDBARCH
	parameter.
	(hppa64_push_dummy_call): Pass architecture to
	hppa64_convert_code_addr_to_fptr.
	(hppa_match_insns): Add GDBARCH parameter.
	(hppa_match_insns_relaxed): Add GDBARCH parameter.  Pass to
	hppa_match_insns.
	(hppa_skip_trampoline_code): Pass architecture to hppa_match_insns.
	(hppa_in_solib_call_trampoline): Add GDBARCH parameter.  Pass to
	hppa_match_insns_relaxed.
	(hppa_stub_unwind_sniffer): Pass architecture to
	tdep->in_solib_call_trampoline callback.
	* hppa-hpux-tdep.c (hppa_hpux_search_pattern): Add GDBARCH parameter.
	(hppa32_hpux_search_dummy_call_sequence): Pass architecture to
	hppa_hpux_search_pattern.
	* hppa-linux-tdep.c (insns_match_pattern): Add GDBARCH parameter.
	(hppa_linux_sigtramp_find_sigcontext): Add GDBARCH parameter.
	Pass to insns_match_pattern.
	(hppa_linux_sigtramp_frame_unwind_cache): Pass architecture to
	hppa_linux_sigtramp_find_sigcontext.
	(hppa_linux_sigtramp_frame_sniffer): Likewise.
	(hppa32_hpux_in_solib_call_trampoline): Add GDBARCH parameter.
	(hppa64_hpux_in_solib_call_trampoline): Likewise.

	* i386-tdep.c (i386_follow_jump): Add GDBARCH parameter.
	(i386_analyze_frame_setup): Add GDBARCH parameter.
	(i386_analyze_prologue): Add GDBARCH parameter.  Pass to
	i386_follow_jump and i386_analyze_frame_setup.
	(i386_skip_prologue): Pass architecture to i386_analyze_prologue
	and i386_follow_jump.
	(i386_frame_cache): Pass architecture to i386_analyze_prologue.
	(i386_pe_skip_trampoline_code): Add FRAME parameter.
	* i386-tdep.h (i386_pe_skip_trampoline_code): Add FRAME parameter.
	* i386-cygwin-tdep.c (i386_cygwin_skip_trampoline_code): Pass
	frame to i386_pe_skip_trampoline_code.

	* ia64-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter
	to sigcontext_register_address callback.
	* ia64-tdep.c (ia64_find_global_pointer): Add GDBARCH parameter.
	(ia64_find_unwind_table): Pass architecture to
	ia64_find_global_pointer.
	(find_extant_func_descr): Add GDBARCH parameter.
	(find_func_descr): Pass architecture to find_extant_func_descr
	and ia64_find_global_pointer.
	(ia64_sigtramp_frame_init_saved_regs): Pass architecture to
	tdep->sigcontext_register_address callback.
	* ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Add
	GDBARCH parameter.

	* iq2000-tdep.c (iq2000_scan_prologue): Add GDBARCH parameter.
	(iq2000_frame_cache): Pass architecture to iq2000_scan_prologue.

	* lm32-tdep.c (lm32_analyze_prologue): Add GDBARCH parameter.
	(lm32_skip_prologue, lm32_frame_cache): Pass architecture to
	lm32_analyze_prologue.

	* m32r-tdep.c (decode_prologue): Add GDBARCH parameter.
	(m32r_skip_prologue): Pass architecture to decode_prologue.

	* m68hc11-tdep.c (m68hc11_analyze_instruction): Add GDBARCH parameter.
	(m68hc11_scan_prologue): Pass architecture to
	m68hc11_analyze_instruction.

	* m68k-tdep.c (m68k_analyze_frame_setup): Add GDBARCH parameter.
	(m68k_analyze_prologue): Pass architecture to
	m68k_analyze_frame_setup.

	* m88k-tdep.c (m88k_fetch_instruction): Add BYTE_ORDER parameter.
	(m88k_analyze_prologue): Add GDBARCH parameter.  Pass byte order
	to m88k_fetch_instruction.
	(m88k_skip_prologue): Pass architecture to m88k_analyze_prologue.
	(m88k_frame_cache): Likewise.

	* mep-tdep.c (mep_get_insn): Add GDBARCH parameter.
	(mep_analyze_prologue): Pass architecture to mep_get_insn.

	* mips-tdep.c (mips_fetch_instruction): Add GDBARCH parameter.
	(mips32_next_pc): Pass architecture to mips_fetch_instruction.
	(deal_with_atomic_sequence): Likewise.
	(unpack_mips16): Add GDBARCH parameter, pass to mips_fetch_instruction.
	(mips16_scan_prologue): Likewise.
	(mips32_scan_prologue): Likewise.
	(mips16_in_function_epilogue_p): Likewise.
	(mips32_in_function_epilogue_p): Likewise.
	(mips_about_to_return): Likewise.
	(mips_insn16_frame_cache): Pass architecture to mips16_scan_prologue.
	(mips_insn32_frame_cache): Pass architecture to mips32_scan_prologue.
	(mips_skip_prologue): Pass architecture to mips16_scan_prologue
	and mips32_scan_prologue.
	(mips_in_function_epilogue_p): Pass architecture to
	mips16_in_function_epilogue_p and
	mips32_in_function_epilogue_p.
	(heuristic_proc_start): Pass architecture to mips_fetch_instruction
	and mips_about_to_return.
	(mips_skip_mips16_trampoline_code): Pass architecture to
	mips_fetch_instruction.
	(fetch_mips_16): Add GDBARCH parameter.
	(mips16_next_pc): Pass architecture to fetch_mips_16.
	(extended_mips16_next_pc): Pass architecture to unpack_mips16 and
	fetch_mips_16.

	* objc-lang.c (read_objc_method, read_objc_methlist_nmethods,
	read_objc_methlist_method, read_objc_object, read_objc_super,
	read_objc_class): Add GDBARCH parameter.
	(find_implementation_from_class): Add GDBARCH parameter, pass
	to read_objc_class, read_objc_methlist_nmethods, and
	read_objc_methlist_method.
	(find_implementation): Add GDBARCH parameter, pass to
	read_objc_object and find_implementation_from_class.
	(resolve_msgsend, resolve_msgsend_stret): Pass architecture
	to find_implementation.
	(resolve_msgsend_super, resolve_msgsend_super_stret): Pass
	architecture to read_objc_super and find_implementation_from_class.

	* ppc64-linux-tdep.c (ppc64_desc_entry_point): Add GDBARCH parameter.
	(ppc64_standard_linkage1_target, ppc64_standard_linkage2_target,
	ppc64_standard_linkage3_target): Pass architecture to
	ppc64_desc_entry_point.
	* rs6000-tdep.c (bl_to_blrl_insn_p): Add BYTE_ORDER parameter.
	(skip_prologue): Pass byte order to bl_to_blrl_insn_p.
	(rs6000_fetch_instruction): Add GDBARCH parameter.
	(rs6000_skip_stack_check): Add GDBARCH parameter, pass to
	rs6000_fetch_instruction.
	(skip_prologue): Pass architecture to rs6000_fetch_instruction.

	* remote-mips.c (mips_store_word): Return old_contents as host
	integer value instead of target bytes.

	* s390-tdep.c (struct s390_prologue_data): Add BYTE_ORDER member.
	(s390_analyze_prologue): Initialize it.
	(extend_simple_arg): Add GDBARCH parameter.
	(s390_push_dummy_call): Pass architecture to extend_simple_arg.

	* scm-lang.c (scm_get_field): Add BYTE_ORDER parameter.
	* scm-lang.h (scm_get_field): Add BYTE_ORDER parameter.
	(SCM_CAR, SCM_CDR): Pass SCM_BYTE_ORDER to scm_get_field.
	* scm-valprint.c (scm_scmval_print): Likewise.
	(scm_scmlist_print, scm_ipruk, scm_scmval_print): Define
	SCM_BYTE_ORDER.

	* sh64-tdep.c (look_for_args_moves): Add GDBARCH parameter.
	(sh64_skip_prologue_hard_way): Add GDBARCH parameter, pass to
	look_for_args_moves.
	(sh64_skip_prologue): Pass architecture to
	sh64_skip_prologue_hard_way.
	* sh-tdep.c (sh_analyze_prologue): Add GDBARCH parameter.
	(sh_skip_prologue): Pass architecture to sh_analyze_prologue.
	(sh_frame_cache): Likewise.

	* solib-irix.c (extract_mips_address): Add GDBARCH parameter.
	(fetch_lm_info, irix_current_sos, irix_open_symbol_file_object):
	Pass architecture to extract_mips_address.

	* sparc-tdep.h (sparc_fetch_wcookie): Add GDBARCH parameter.
	* sparc-tdep.c (sparc_fetch_wcookie): Add GDBARCH parameter.
	(sparc_supply_rwindow, sparc_collect_rwindow): Pass architecture
	to sparc_fetch_wcookie.
	(sparc32_frame_prev_register): Likewise.
	* sparc64-tdep.c (sparc64_frame_prev_register): Likewise.
	* sparc32nbsd-tdep.c (sparc32nbsd_sigcontext_saved_regs): Likewise.
	* sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_saved_regs): Likewise.

	* spu-tdep.c (spu_analyze_prologue): Add GDBARCH parameter.
	(spu_skip_prologue): Pass architecture to spu_analyze_prologue.
	(spu_virtual_frame_pointer): Likewise.
	(spu_frame_unwind_cache): Likewise.
	(info_spu_mailbox_list): Add BYTE_ORER parameter.
	(info_spu_mailbox_command): Pass byte order to info_spu_mailbox_list.
	(info_spu_dma_cmdlist): Add BYTE_ORER parameter.
	(info_spu_dma_command, info_spu_proxydma_command): Pass byte order
	to info_spu_dma_cmdlist.

	* symfile.c (read_target_long_array): Add GDBARCH parameter.
	(simple_read_overlay_table, simple_read_overlay_region_table,
	simple_overlay_update_1): Pass architecture to read_target_long_array.

	* v850-tdep.c (v850_analyze_prologue): Add GDBARCH parameter.
	(v850_frame_cache): Pass architecture to v850_analyze_prologue.

	* xstormy16-tdep.c (xstormy16_analyze_prologue): Add GDBARCH
	parameter.
	(xstormy16_skip_prologue, xstormy16_frame_cache): Pass architecture
	to xstormy16_analyze_prologue.
	(xstormy16_resolve_jmp_table_entry): Add GDBARCH parameter.
	(xstormy16_find_jmp_table_entry): Likewise.
	(xstormy16_skip_trampoline_code): Pass architecture to
	xstormy16_resolve_jmp_table_entry.
	(xstormy16_pointer_to_address): Likewise.
	(xstormy16_address_to_pointer): Pass architecture to
	xstormy16_find_jmp_table_entry.

	* xtensa-tdep.c (call0_track_op): Add GDBARCH parameter.
	(call0_analyze_prologue): Add GDBARCH parameter, pass to
	call0_track_op.
	(call0_frame_cache): Pass architecture to call0_analyze_prologue.
	(xtensa_skip_prologue): Likewise.
2009-07-02 17:25:59 +00:00
Tom Tromey 85e306ed0e gdb
PR gdb/10309:
	* c-lang.c (classify_type): Iterate over typedefs.
	* c-valprint.c (textual_element_type): Iterate over typedefs.
gdb/testsuite
	* gdb.base/charset.exp (test_combination): Regression test.
	* gdb.base/charset.c (my_wchar_t): New typedef.
	(myvar): New global.
	(main): Set myvar.
2009-06-23 16:26:05 +00:00
Ulrich Weigand 3b7538c031 * gdbtypes.c (create_string_type): Receive character type as argument.
* gdbtypes.h (create_string_type): Add character type argument.
        * dwarf2read.c (read_tag_string_type): Pass character type to
	create_string_type.

	* value.h (value_string): Add character type argument.
	* valops.c (value_string): Add character type argument.  Pass it to
	create_string_type.  Do not allocate space in inferior.
	* valarith.c (value_concat): Pass character type to value_string.

	* value.h (value_typed_string): Rename to ...
	(value_cstring): ... this.
	* valops.c (value_typed_string): Rename to ...
	(value_cstring): ... this.
	* c-lang.c (evaluate_subexp_c): Update.

	* python/python-value.c (builtin_type_pychar): New define.
	(convert_value_from_python): Call value_cstring instead
	of value_from_string.
	* value.c (value_from_string): Remove.
	* value.h (value_from_string): Remove.

	* eval.c (evaluate_subexp_standard): Pass character type to
	value_string.  Pass expression architecture to value_nsstring
	and lookup_child_selector.
	* objc-lang.h (lookup_objc_class): Add GDBARCH parameter.
	(lookup_child_selector): Likewise.
	(value_nsstring): Likewise.
	* objc-lang.c (lookup_objc_class): Add GDBARCH parameter.
	Pass character type to value_string..
	(lookup_child_selector): Likewise.
	(value_nsstring): Add GDBARCH parameter, use it instead of
	objfile architecture.  Pass architecture to lookup_objc_class
	and lookup_child_selector. Pass character type to value_string.
	(end_msglist): Pass architecture to lookup_objc_class.
	* objc-exp.y: Pass architecture to lookup_objc_class.
2009-06-17 18:47:35 +00:00
Ulrich Weigand e6c014f28f * gdbtypes.h (struct language_defn): Add forward declaration.
(lookup_typename): Add LANGUAGE and GDBARCH parameters.
	(lookup_unsigned_typename): Likewise.
	(lookup_signed_typename): Likewise.
	* gdbtypes.c (lookup_typename): Add LANGUAGE and GDBARCH parameters.
	Use them instead of current_language and current_gdbarch.
	(lookup_unsigned_typename): Add LANGUAGE and GDBARCH parameters.
	Pass them to lookup_typename.
	(lookup_signed_typename): Likewise.

	* c-exp.y: Pass parse_language and parse_gdbarch to
	lookup_unsigned_typename and lookup_signed_typename.
	* objc-exp.y: Likewise.
	* m2-exp.y: Pass parse_language and parse_gdbarch to lookup_typename.

	* c-lang.c (evaluate_subexp_c): Pass expression language and
	gdbarch to lookup_typename.
	* printcmd.c (printf_command): Pass current language and
	gdbarch to lookup_typename.
	* python/python-type.c (typy_lookup_typename): Likewise.
	Include "language.h".
2009-06-17 18:46:26 +00:00
Ulrich Weigand d80b854b33 * dummy-frame.c (deprecated_pc_in_call_dummy): Add GDBARCH parameter,
use it instead of current_gdbarch.
	* frame.h (deprecated_pc_in_call_dummy): Add GDBARCH parameter.
	* arm-tdep.c (arm_skip_prologue): Pass architecture to
	deprecated_pc_in_call_dummy.

	* symtab.c (skip_prologue_using_sal): Add GDBARCH parameter.
	Use it instead of current_gdbarch.
	* symtab.h (skip_prologue_using_sal): Add GDBARCH parameter.
	* breakpoint.c (expand_line_sal_maybe): Pass architecture to
	skip_prologue_using_sal.
	* arm-tdep.c (skip_prologue_using_sal): Likewise.
	* lm32-tdep.c (lm32_skip_prologue): Likewise.
	* m32-tdep.c (m32c_skip_prologue): Likewise.
	* mips-tdep.c (mips_skip_prologue): Likewise.
	* moxie-tdep.c (moxie_skip_prologue): Likewise.
	* mt-tdep.c (mt_frame_unwind_cache): Likewise.
	* rs6000-tdep.c (rs6000_skip_prologue): Likewise.
	* frv-tdep.c (frv_analyze_prologue): Add GDBARCH parameter, pass
	it to skip_prologue_using_sal.  Update call sites ...
	(frv_skip_prologue, frv_frame_unwind_cache): ... here.

	* mn10300-tdep.c (struct mn10300_prologue): Add GDBARCH member.
	(check_for_saved): Use it instead of current_gdbarch.
	(mn10300_analyze_prologue): Set it.

	* value.c (using_struct_return): Add GDBARCH parameter.  Use it
	instead of current_gdbarch.
	* value.h (using_struct_return): Add GDBARCH parameter.
	* eval.c (evaluate_subexp_standard): Pass architecture to
	using_struct_return.
	* infcall.c (call_function_by_hand): Likewise.
	* stack.c (return_command): Likewise.
	* sparc-tdep.c (sparc32_push_dummy_code): Likewise.

	* symtab.c (in_prologue): Add GDBARCH parameter.  Use it instead of
	current_gdbarch.
	* symtab.h (in_prologue): Add GDBARCH parameter.
	* infrun.c (handle_inferior_event): Pass architecture to in_prologue.

	* eval.c (evaluate_subexp_standard): Use expression architecture
	instead of current_gdbarch.

	* c-lang.c (evaluate_subexp_c): Use expression architecture and
	language instead of current_gdbarch and current_language.

	* printcmd.c (do_one_display): Use expression architecture instead
	of current_gdbarch.

	* infcmd.c (print_return_value): Use architecture of stop_regcache
	instead of current_gdbarch.
	(print_vector_info, print_float_info): Remove GDBARCH argument,
	use frame architecture instead.
	(vector_info, float_info): Update calls.

	* objc-lang.c (objc_skip_trampoline): Use frame architecture
	instead of current_gdbarch.

	* parse.c (write_dollar_variable): Use parse architecture instead
	of current_gdbarch.

	* source.c (line_info): Use objfile architecture instead of
	current_gdbarch.

	* symtab.c (find_function_start_sal): Use gdbarch instead of
	current_gdbarch.
	(print_msymbol_info): Use objfile architecture instead of
	current_gdbarch.

	* valops.c (value_assign): Use frame architecture instead of
	current_gdbarch.
2009-06-17 18:43:24 +00:00
Joel Brobecker 3f7f5fe45a * c-lang.c (print_wchar): Remove unnecessary cast. 2009-05-13 09:41:57 +00:00
Joel Brobecker 2d90c72afe * c-lang.c (print_wchar): Convert w into a gdb_wchar_t before
pushing it on the output obstack.
2009-05-12 08:05:52 +00:00
Tom Tromey 732f6a935c gdb
* c-lang.c (c_emit_char): Use INTERMEDIATE_ENCODING.
	(c_printstr): Likewise.
	* charset.c: Include gdb_wait.h.
	(make_wchar_iterator): Use INTERMEDIATE_ENCODING.
	(find_charset_names): Use pexecute.  Handle libiconv's output.
	Detect errors.
	(_initialize_charset): Use xstrdup.
	* gdb_wchar.h: Check HAVE_BTOWC.  Split PHONY_ICONV and wchar
	cases.
	(INTERMEDIATE_ENCODING): New define.
	* configure, config.in: Rebuild.
	* configure.ac: Check for btowc.
gdb/doc
	* gdb.texinfo (Character Sets): Document default character set.
2009-04-15 22:20:32 +00:00
Tom Tromey 334cc82d44 gdb
* c-lang.c (evaluate_subexp_c): Correctly handle EVAL_SKIP.
gdb/testsuite
	* gdb.base/charset.exp: Add regression test.
2009-04-15 21:55:04 +00:00
Jan Kratochvil 8ea5dfdf09 gdb/
* c-lang.c (c_get_string): Fix xfree crash on a failed string read.
2009-04-14 21:54:33 +00:00
Tom Tromey 546e879ee8 * c-lang.c (evaluate_subexp_c): Call check_typedef. 2009-03-21 00:46:17 +00:00
Tom Tromey 6c7a06a3fa gdb:
2009-03-19  Tom Tromey  <tromey@redhat.com>
	    Julian Brown  <julian@codesourcery.com>

	PR i18n/7220, PR i18n/7821, PR exp/8815, PR exp/9103,
	PR i18n/9401, PR exp/9613:
	* NEWS: Update
	* value.h (value_typed_string): Declare.
	(val_print_string): Update.
	* valprint.h (print_char_chars): Update.
	* valprint.c (print_char_chars): Add type argument.  Update.
	(val_print_string): Likewise.
	* valops.c (value_typed_string): New function.
	* utils.c (host_char_to_target): New function.
	(parse_escape): Use host_char_to_target, host_hex_value.  Update.
	Remove '^' case.
	(no_control_char_error): Remove.
	* typeprint.c (print_type_scalar): Update.
	* scm-valprint.c (scm_scmval_print): Update.
	* scm-lang.h (scm_printchar, scm_printstr): Update.
	* scm-lang.c (scm_printchar): Add type argument.
	(scm_printstr): Likewise.
	* printcmd.c (print_formatted): Update.
	(print_scalar_formatted): Update.
	(printf_command) <wide_string_arg, wide_char_arg>: New constants.
	Handle '%lc' and '%ls'.
	* parser-defs.h (struct typed_stoken): New type.
	(struct stoken_vector): Likewise.
	(write_exp_string_vector): Declare.
	* parse.c (write_exp_string_vector): New function.
	* p-valprint.c (pascal_val_print): Update.
	* p-lang.h (is_pascal_string_type, pascal_printchar,
	pascal_printstr): Update.
	* p-lang.c (is_pascal_string_type): Remove 'char_size' argument.
	Add 'char_type' argument.
	(pascal_emit_char): Add type argument.
	(pascal_printchar): Likewise.
	(pascal_printstr): Likewise.
	* objc-lang.c (objc_emit_char): Add type argument.
	(objc_printchar): Likewise.
	(objc_printstr): Likewise.
	* macroexp.c (get_character_constant): Handle unicode characters.
	Use c_parse_escape.
	(get_string_literal): Handle unicode strings.  Use
	c_parse_escape.
	* m2-valprint.c (print_unpacked_pointer): Update.
	(m2_print_array_contents): Update.
	(m2_val_print): Update.
	* m2-lang.c (m2_emit_char): Add type argument.
	(m2_printchar): Likewise.
	(m2_printstr): Likewise.
	* language.h (struct language_defn) <la_printchar>: Add type
	argument.
	<la_printstr, la_emitchar>: Likewise.
	(LA_PRINT_CHAR): Likewise.
	(LA_PRINT_STRING): Likewise.
	(LA_EMIT_CHAR): Likewise.
	* language.c (unk_lang_emit_char): Add type argument.
	(unk_lang_printchar): Likewise.
	(unk_lang_printstr): Likewise.
	* jv-valprint.c (java_val_print): Update.
	* jv-lang.c (java_emit_char): Add type argument.
	* f-valprint.c (f_val_print): Update.
	* f-lang.c (f_emit_char): Add type argument.
	(f_printchar): Likewise.
	(f_printstr): Likewise.
	* expprint.c (print_subexp_standard): Update.
	* charset.h (target_wide_charset): Declare.
	(c_target_char_has_backslash_escape, c_parse_backslash,
	host_char_print_literally, host_char_to_target,
	target_char_to_host, target_char_to_control_char): Remove.
	(enum transliterations): New type.
	(convert_between_encodings): Declare.
	(HOST_ESCAPE_CHAR): New define.
	(host_letter_to_control_character, host_hex_value): Declare.
	(enum wchar_iterate_result): New enum.
	(struct wchar_iterator): Declare.
	(make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
	wchar_push_back): Declare.
	* charset-list.h: New file.
	* c-valprint.c (textual_name): New function.
	(textual_element_type): Handle wide character types.
	(c_val_print): Pass original type to textual_element_type.  Handle
	wide character types.
	(c_value_print): Use textual_element_type.  Pass original type of
	value to val_print.
	* c-lang.h (enum c_string_type): New type.
	(c_printchar, c_printstr): Update.
	* c-lang.c (classify_type): New function.
	(print_wchar): Likewise.
	(c_emit_char): Add type argument.  Handle wide characters.
	(c_printchar): Likewise.
	(c_printstr): Add type argument.  Handle wide and multibyte
	character sets.
	(convert_ucn): New function.
	(emit_numeric_character): Likewise.
	(convert_octal): Likewise.
	(convert_hex): Likewise.
	(ADVANCE): New macro.
	(convert_escape): New function.
	(parse_one_string): Likewise.
	(evaluate_subexp_c): Likewise.
	(exp_descriptor_c): New global.
	(c_language_defn): Use exp_descriptor_c.
	(cplus_language_defn): Likewise.
	(asm_language_defn): Likewise.
	(minimal_language_defn): Likewise.
	(charset_for_string_type): New function.
	* c-exp.y (%union): Add 'svec' and 'tsval'.
	(CHAR): New token.
	(exp): Add CHAR production.
	(string_exp): Rewrite.
	(exp) <string_exp>: Rewrite.
	(tempbuf): Now global.
	(tempbuf_init): New global.
	(parse_string_or_char): New function.
	(yylex) <tempbuf>: Now global.
	<tokptr, tempbufindex, tempbufsize, token_string, class_prefix>:
	Remove.
	Handle 'u', 'U', and 'L' prefixes.  Call parse_string_or_char.
	(c_parse_escape): New function.
	* auxv.c (fprint_target_auxv): Update.
	* ada-valprint.c (ada_emit_char): Add type argument.
	(ada_printchar): Likewise.
	(ada_print_scalar): Update.
	(printstr): Add type argument.  Update calls to ada_emit_char.
	(ada_printstr): Add type argument.
	(ada_val_print_array): Update.
	(ada_val_print_1): Likewise.
	* ada-lang.c (emit_char): Add type argument.
	* ada-lang.h (ada_emit_char, ada_printchar, ada_printstr): Add
	type arguments.
	* gdb_locale.h: Include langinfo.h.
	* charset.c (_initialize_charset): Set default host charset from
	the locale.  Don't register charsets.  Add target-wide-charset
	commands.  Call find_charset_names.
	(struct charset, struct translation): Remove.
	(GDB_DEFAULT_HOST_CHARSET): Remove.
	(GDB_DEFAULT_TARGET_WIDE_CHARSET): New define.
	(target_wide_charset_name): New global.
	(show_host_charset_name): Handle "auto".
	(show_target_wide_charset_name): New function.
	(host_charset_enum, target_charset_enum): Remove.
	(charset_enum): New global.
	(all_charsets, register_charset, lookup_charset, all_translations,
	register_translation, lookup_translation): Remove.
	(simple_charset, ascii_print_literally, ascii_to_control): Remove.
	(iso_8859_print_literally, iso_8859_to_control,
	iso_8859_family_charset): Remove.
	(ebcdic_print_literally, ebcdic_to_control,
	ebcdic_family_charset): Remove.
	(struct cached_iconv, check_iconv_cache, cached_iconv_convert,
	register_iconv_charsets): Remove.
	(target_wide_charset_be_name, target_wide_charset_le_name): New
	globals.
	(identity_either_char_to_other): Remove.
	(set_be_le_names, validate): New functions.
	(backslashable, backslashed, represented): Remove.
	(default_c_target_char_has_backslash_escape): Remove.
	(default_c_parse_backslash, iconv_convert): Remove.
	(ascii_to_iso_8859_1_table, ascii_to_ebcdic_us_table,
	ascii_to_ibm1047_table, iso_8859_1_to_ascii_table,
	iso_8859_1_to_ebcdic_us_table, iso_8859_1_to_ibm1047_table,
	ebcdic_us_to_ascii_table, ebcdic_us_to_iso_8859_1_table,
	ebcdic_us_to_ibm1047_table, ibm1047_to_ascii_table,
	ibm1047_to_iso_8859_1_table, ibm1047_to_ebcdic_us_table): Remove.
	(table_convert_char, table_translation, simple_table_translation):
	Remove.
	(current_host_charset, current_target_charset,
	c_target_char_has_backslash_escape_func,
	c_target_char_has_backslash_escape_baton): Remove.
	(c_parse_backslash_func, c_parse_backslash_baton): Remove.
	(host_char_to_target_func, host_char_to_target_baton): Remove.
	(target_char_to_host_func, target_char_to_host_baton): Remove.
	(cached_iconv_host_to_target, cached_iconv_target_to_host):
	Remove.
	(lookup_charset_or_error, check_valid_host_charset): Remove.
	(set_host_and_target_charsets): Remove.
	(set_host_charset, set_target_charset): Remove.
	(set_host_charset_sfunc, set_target_charset_sfunc): Rewrite.
	(set_target_wide_charset_sfunc): New function.
	(show_charset): Print target wide character set.
	(host_charset, target_charset): Rewrite.
	(target_wide_charset): New function.
	(c_target_char_has_backslash_escape): Remove.
	(c_parse_backslash): Remove.
	(host_letter_to_control_character): New function.
	(host_char_print_literally): Remove.
	(host_hex_value): New function.
	(target_char_to_control_char): Remove.
	(cleanup_iconv): New function.
	(convert_between_encodings): New function.
	(target_char_to_host): Remove.
	(struct wchar_iterator): Define.
	(make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
	wchar_push_back): New functions.
	(do_cleanup_iterator): New function.
	(char_ptr): New typedef.
	(charsets): New global.
	(add_one, find_charset_names): New functions.
	(default_charset_names): New global.
	(auto_host_charset_name): Likewise.
	* aclocal.m4, config.in, configure: Rebuild.
	* configure.ac: Call AM_LANGINFO_CODESET.
	(GDB_DEFAULT_HOST_CHARSET): Default to UTF-8.
	(AM_ICONV): Invoke earlier.
	* acinclude.m4: Include codeset.m4.  Subst LIBICONV_INCLUDE and
	LIBICONV_LIBDIR.  Check for libiconv in build tree.
	* Makefile.in (LIBICONV_LIBDIR, LIBICONV_INCLUDE): New macros.
	(INTERNAL_CFLAGS_BASE): Add LIBICONV_INCLUDE.
	(INTERNAL_LDFLAGS): Add LIBICONV_LIBDIR.
	* gdb_obstack.h (obstack_grow_wstr): New define.
        * gdb_wchar.h: New file.
        * defs.h: Include it.
gdb/testsuite:
	* gdb.base/store.exp: Update for change to escape output.
	* gdb.base/callfuncs.exp (fetch_all_registers): Update for change
	to escape output.
	* gdb.base/pointers.exp: Update for change to escape output.
	* gdb.base/long_long.exp (gdb_test_long_long): Update for change
	to escape output.
	* gdb.base/constvars.exp (do_constvar_tests): Update for change to
	escape output.
	* gdb.base/call-rt-st.exp (print_struct_call): Update for change
	to escape output.
	* gdb.cp/ref-types.exp (gdb_start_again): Update for change to
	escape output.
	* gdb.base/setvar.exp: Update for change to escape output.
	* lib/gdb.exp (default_gdb_start): Set LC_CTYPE to C.
	* gdb.base/printcmds.exp (test_print_all_chars): Update for change
	to escape output.
	(test_print_string_constants): Likewise.
	* gdb.base/charset.exp (valid_host_charset): Check size of
	wchar_t.  Handle UCS-2 and UCS-4.  Add tests for wide and unicode
	cases.  Handle "auto"-related output.
	* gdb.base/charset.c (char16_t, char32_t): New typedefs.
	(uvar, Uvar): New globals.
gdb/doc:
	* gdb.texinfo (Character Sets): Remove obsolete text.  Document
	set target-wide-charset.
	(Requirements): Mention iconv.
2009-03-20 23:04:40 +00:00
Thiago Jung Bauermann ae6a3a4c2a 2009-02-05 Thiago Jung Bauermann <bauerman@br.ibm.com>
* language.h (language_dfn): Add la_get_string member.
	(LA_GET_STRING): New macro.
	(default_get_string): New prototype.
	* language.c (default_get_string): New function.
	(unknown_language_defn, auto_language_defn, local_language_defn): Use
	default_get_string for la_get_string.
	* c-lang.c (c_get_string): New function.
	(c_language_defn, cplus_language_defn, asm_language_defn): Use
	c_get_string for la_get_string.
	(minimal_language_defn): Likewise
	* ada-lang.c (ada_language_defn): Likewise.
	* f-lang.c (f_language_defn): Use default_get_string for
	la_get_string.
	* jv-lang.c (java_language_defn): Likewise.
	* m2-lang.c (m2_language_defn): Likewise.
	* objc-lang.c (objc_language_defn): Likewise.
	* p-lang.c (p_language_defn): Likewise.
	* scm-lang.c (scm_language_defn): Likewise.
	* typeprint.c (type_to_string): New function.
	* value.h (type_to_string): New prototype.
	* valprint.c (val_print_string): Factor out code for reading string
	from the inferior into its own function.  Put 2 spaces after period
	in comments.
	(read_string): New function.
	* valprint.h (read_string): New prototype.
2009-02-05 12:16:25 +00:00
Joel Brobecker 0fb0cc7590 Updated copyright notices for most files. 2009-01-03 05:58:08 +00:00
Tom Tromey 7c8adf682b gdb
PR macros/2564:
	* c-exp.y (macro_original_text, expansion_obstack,
	expression_macro_scope): New globals.
	(scan_macro_expansion): New function.
	(scanning_macro_expansion): Likewise.
	(finished_macro_expansion): Likewise.
	(scan_macro_cleanup): Likewise.
	(c_parse): Find macro scope.  Initialize obstack.
	* c-lang.h (scan_macro_expansion, scanning_macro_expansion,
	finished_macro_expansion, expression_macro_lookup_func,
	expression_macro_lookup_baton): Remove.
	* c-lang.c (scan_macro_expansion, scanning_macro_expansion,
	finished_macro_expansion, expression_macro_lookup_func,
	expression_macro_lookup_baton): Remove.
	(macro_original_text, macro_expanded_text,
	c_preprocess_and_parse): Remove.
	(c_language_defn, cplus_language_defn, asm_language_defn,
	minimal_language_defn): Use c_parse.
gdb/testsuite
	* gdb.base/macscp.exp: Print "address.addr".
	* gdb.base/macscp1.c (struct outer): New struct.
	(address): New global.
2008-12-11 18:30:28 +00:00
Tom Tromey 79a45b7d67 gdb
* varobj.c (value_get_print_value): Include valprint.h.
	(value_get_print_value): Use get_formatted_print_options.
	* value.h (struct value_print_options): Declare.
	(value_print, val_print, common_val_print, val_print_string):
	Update.
	* value.c: Include valprint.h.
	(show_values): Use get_user_print_options.
	(show_convenience): Likewise.
	* valprint.h (prettyprint_arrays, prettyprint_structs): Don't
	declare.
	(struct value_print_options): New type.
	(vtblprint, unionprint, addressprint, objectprint, print_max,
	inspect_it, repeat_count_threshold, output_format,
	stop_print_at_null): Don't declare.
	(user_print_options, get_user_print_options,
	get_raw_print_options, get_formatted_print_options): Declare.
	(print_array_indexes_p): Don't declare.
	(maybe_print_array_index, val_print_array_elements): Update.
	* valprint.c (print_max): Remove.
	(user_print_options): New global.
	(get_user_print_options, get_raw_print_options,
	get_formatted_print_options): New functions.
	(print_array_indexes, repeat_count_threshold, stop_print_at_null,
	prettyprint_structs, prettyprint_arrays, unionprint,
	addressprint): Remove.
	(val_print): Remove format, deref_ref, pretty arguments; add
	options.  Update.
	(common_val_print): Likewise.
	(print_array_indexes_p): Remove.
	(maybe_print_array_index): Remove format, pretty arguments; add
	options.  Update.
	(val_print_array_elements): Remove format, deref_ref, pretty
	arguments; add options.  Update.
	(val_print_string): Add options argument.  Update.
	(_initialize_valprint): Use user_print_options.
	(output_format): Remove.
	(set_output_radix_1): Use user_print_options.
	* typeprint.c: Include valprint.h.
	(objectprint): Don't declare.
	(whatis_exp): Use get_user_print_options.
	* tui/tui-regs.c: Include valprint.h.
	(tui_register_format): Use get_formatted_print_options.
	* tracepoint.c: Include valprint.h.
	(addressprint): Don't declare.
	(trace_mention): Use get_user_print_options.
	(tracepoints_info): Likewise.
	* stack.c (print_frame_args): Use get_raw_print_options.
	(print_frame_info): Use get_user_print_options.
	(print_frame): Likewise.
	* sh64-tdep.c: Include valprint.h
	(sh64_do_register): Use get_formatted_print_options.
	* scm-valprint.c (scm_inferior_print): Remove format, deref_ref,
	pretty arguments; add options.
	(scm_scmlist_print): Likewise.  Update.
	(scm_scmval_print): Likewise.
	(scm_val_print): Likewise.
	(scm_value_print): Remove format, pretty arguments; add options.
	Update.
	* scm-lang.h (scm_value_print, scm_val_print, scm_scmval_print):
	Update.
	* scm-lang.c (scm_printstr): Add options argument.
	* python/python-value.c: Include valprint.h.
	(valpy_str): Use get_user_print_options.
	* printcmd.c: Include valprint.h.
	(addressprint): Don't declare.
	(inspect_it): Remove.
	(print_formatted): Remove format option; add options.  Update.
	(print_scalar_formatted): Likewise.
	(print_address_demangle): Use get_user_print_options.
	(do_examine): Use get_formatted_print_options.
	(print_command_1): Likewise.
	(output_command): Use get_formatted_print_options.
	(do_one_display): Likewise.
	(print_variable_value): Use get_user_print_options.
	* p-valprint.c (pascal_val_print): Remove format, deref_ref,
	pretty arguments; add options.  Update.
	(pascal_value_print): Remove format, pretty arguments; add
	options.  Update.
	(vtblprint, objectprint): Don't declare.
	(pascal_static_field_print): Remove.
	(pascal_object_print_value_fields): Remove format, pretty
	arguments; add options.  Update.
	(pascal_object_print_static_field): Likewise.
	(_initialize_pascal_valprint): Use user_print_options.  Update.
	* p-lang.h (pascal_val_print, pascal_value_print,
	pascal_printstr, pascal_object_print_value_fields): Update.
	(vtblprint, static_field_print): Don't declare.
	* p-lang.c (pascal_printstr): Add options argument.  Update.
	* objc-lang.c (objc_printstr): Add options argument.  Update.
	* mt-tdep.c: Include valprint.h.
	(mt_registers_info): Use get_raw_print_options.
	* mips-tdep.c: Include valprint.h.
	(mips_print_fp_register): Use get_formatted_print_options.
	(mips_print_register): Likewise.
	* mi/mi-main.c: Include valprint.h.
	(get_register): Use get_user_print_options.
	(mi_cmd_data_evaluate_expression): Likewise.
	(mi_cmd_data_read_memory): Use get_formatted_print_options.
	* mi/mi-cmd-stack.c: Include valprint.h.
	(list_args_or_locals): Use get_raw_print_options.
	* m2-valprint.c (print_function_pointer_address): Add addressprint
	argument.
	(m2_print_long_set): Remove format, pretty arguments.
	(m2_print_unbounded_array): Remove format, deref_ref, pretty
	arguments; add options.  Update.
	(print_unpacked_pointer): Remove format argument; add options.
	Now static.  Update.
	(print_variable_at_address): Remove format, deref_ref, pretty
	arguments; add options.  Update.
	(m2_print_array_contents): Likewise.
	(m2_val_print): Likewise.
	* m2-lang.h (m2_val_print): Update.
	* m2-lang.c (m2_printstr): Add options argument. Update.
	* language.h (struct value_print_options): Declare.
	(struct language_defn) <la_printstr>: Add options argument.
	<la_val_print>: Remove format, deref_ref, pretty argument; add
	options.
	<la_value_print>: Remove format, pretty arguments; add options.
	<la_print_array_index>: Likewise.
	(LA_VAL_PRINT, LA_VALUE_PRINT, LA_PRINT_STRING,
	LA_PRINT_ARRAY_INDEX): Update.
	(default_print_array_index): Update.
	* language.c (default_print_array_index): Remove format, pretty
	arguments; add options.  Update.
	(unk_lang_printstr): Add options argument.
	(unk_lang_val_print): Remove format, deref_ref, pretty arguments;
	add options.
	(unk_lang_value_print): Remove format, pretty arguments; add
	options.
	* jv-valprint.c (java_value_print): Remove format, pretty
	arguments; add options.  Update.
	(java_print_value_fields): Likewise.
	(java_val_print): Remove format, deref_ref, pretty arguments; add
	options.  Update.
	* jv-lang.h (java_val_print, java_value_print): Declare.
	* infcmd.c: Include valprint.h.
	(print_return_value): Use get_raw_print_options.
	(default_print_registers_info): Use get_user_print_options,
	get_formatted_print_options.
	(registers_info): Use get_formatted_print_options.
	* gdbtypes.h (struct value_print_options): Declare.
	(print_scalar_formatted): Update.
	* f-valprint.c (f77_print_array_1): Remove format, deref_ref,
	pretty arguments; add options.  Update.
	(f77_print_array): Likewise.
	(f_val_print): Likewise.
	* f-lang.h (f_val_print): Update.
	* f-lang.c (f_printstr): Add options argument.  Update.
	(c_value_print): Update declaration.
	* expprint.c: Include valprint.h.
	(print_subexp_standard): Use get_raw_print_options,
	get_user_print_options.
	* eval.c: Include valprint.h.
	(objectprint): Don't declare.
	(evaluate_subexp_standard): Use get_user_print_options.
	* cp-valprint.c (vtblprint, objectprint, static_field_print):
	Remove.
	(cp_print_value_fields): Remove format, pretty arguments; add
	options.  Update.
	(cp_print_value): Likewise.
	(cp_print_static_field): Likewise.
	(_initialize_cp_valprint): Use user_print_options.  Update.
	* c-valprint.c (print_function_pointer_address): Add addressprint
	argument.
	(c_val_print): Remove format, deref_ref, pretty arguments; add
	options.  Update.
	(c_value_print): Add options argument.  Update.
	* c-lang.h (c_val_print, c_value_print, c_printstr): Update.
	(vtblprint, static_field_print): Don't declare.
	(cp_print_value_fields): Update.
	* c-lang.c (c_printstr): Add options argument.  Update.
	* breakpoint.c: Include valprint.h.
	(addressprint): Don't declare.
	(watchpoint_value_print): Use get_user_print_options.
	(print_one_breakpoint_location): Likewise.
	(breakpoint_1, print_it_catch_fork, print_it_catch_vfork, mention,
	print_exception_catchpoint): Likewise.
	* auxv.c (fprint_target_auxv): Don't declare addressprint.  Use
	get_user_print_options.
	* ada-valprint.c (struct ada_val_print_args): Remove format,
	deref_ref, and pretty; add options.
	(print_optional_low_bound): Add options argument.
	(val_print_packed_array_elements): Remove format and pretty
	arguments; add options.  Update.
	(printstr): Add options argument.  Update.
	(ada_printstr): Likewise.
	(ada_val_print): Remove format, deref_ref, pretty arguments; add
	options argument.  Update.
	(ada_val_print_stub): Update.
	(ada_val_print_array): Remove format, deref_ref, pretty arguments;
	add options.  Update.
	(ada_val_print_1): Likewise.
	(print_variant_part): Likewise.
	(ada_value_print): Remove format, pretty arguments; add options.
	Update.
	(print_record): Likewise.
	(print_field_values): Likewise.
	* ada-lang.h (ada_val_print, ada_value_print, ada_printstr):
	Update.
	* ada-lang.c (ada_print_array_index): Add options argument; remove
	format and pretty arguments.
	(print_one_exception): Use get_user_print_options.
gdb/testsuite
	* gdb.base/exprs.exp (test_expr): Add enum formatting tests.
2008-10-28 17:19:58 +00:00
Tom Tromey 9a044a8903 gdb
PR gdb/2484:
	* symtab.c (struct add_macro_name_data): New struct.
	(add_macro_name): New function.
	(default_make_symbol_completion_list): Complete macro names.
	* scm-lang.c (scm_language_defn): Update.
	* p-lang.c (pascal_language_defn): Update.
	* objc-lang.c (objc_language_defn): Update.
	* macrotab.h (macro_callback_fn): Add user_data argument.
	(macro_for_each): Likewise.
	(macro_for_each_in_scope): Declare.
	* macrotab.c: (struct macro_for_each_data): New struct.
	(foreach_macro): Use it.
	(macro_for_each): Likewise.
	(foreach_macro_in_scope): New function.
	(macro_for_each_in_scope): Likewise.
	* macrocmd.c (print_one_macro): Add argument.
	(macro_list_command): Pass NULL to macro_for_each.
	* m2-lang.c (m2_language_defn): Update.
	* language.h (struct language_defn) <la_macro_expansion>: New
	field.
	(macro_expansion): New enum.
	* language.c (unknown_language_defn): Update.  Fix order of
	initializers.
	(auto_language_defn): Likewise.
	(local_language_defn): Update.
	* jv-lang.c (java_language_defn): Update.
	* f-lang.c (f_language_defn): Update.
	* c-lang.c (c_language_defn): Update.
	(cplus_language_defn): Likewise.
	(asm_language_defn): Likewise.
	(minimal_language_defn): Likewise.
	* ada-lang.c (ada_language_defn): Update.
gdb/testsuite
	* gdb.base/macscp.exp: Add completion tests.
	* gdb.base/macscp1.c (FIFTY_SEVEN): New macro.
	(TWENTY_THREE): Likewise.
	(FORTY_EIGHT): Likewise.
2008-09-30 17:21:28 +00:00
Tom Tromey 5c6ce71d76 gdb
* scm-lang.c (scm_language_defn): Update.
	* p-typeprint.c (pascal_print_typedef): New function.
	* p-lang.h: (pascal_print_typedef): Declare.
	* p-lang.c (pascal_language_defn): Update.
	* objc-lang.c (objc_language_defn): Update.
	* m2-typeprint.c (m2_print_typedef): New function.
	* m2-lang.h (m2_print_typedef): Declare.
	* m2-lang.c (m2_language_defn): Update.
	* language.h (_LANG_c, _LANG_m2, _LANG_fortran, _LANG_pascal):
	Remove.
	(struct language_defn) <la_print_typedef>: New field.
	(default_print_typedef): Declare.
	(LA_PRINT_TYPEDEF): New define.
	* language.c (unknown_language_defn): Update.
	(auto_language_defn): Update.
	(local_language_defn): Update.
	* jv-lang.c (java_language_defn): Update.
	* f-lang.c (f_language_defn): Update.
	* c-typeprint.c (c_print_typedef): New function.
	* c-lang.h (c_print_typedef): Declare.
	* c-lang.c (c_language_defn): Update.
	(cplus_language_defn): Update.
	(asm_language_defn): Update.
	(minimal_language_defn): Update.
	* ada-lang.c (ada_language_defn): Update.
	* typeprint.c (default_print_typedef): New function.
gdb/doc
	* gdbint.texinfo (Language Support): Remove text about omitting
	support for a language.
2008-09-27 21:29:30 +00:00
Ulrich Weigand fbb06eb1ba * language.h (struct language_arch_info): New members
bool_type_default and bool_type_symbol.
	(lang_bool_type): Remove prototype.
	(LA_BOOL_TYPE): Remove macro.
	(language_bool_type): Add prototype.
	* language.c (lang_bool_type): Remove.
	(language_bool_type): New function.

	* value.h (value_in): Change return value to int.
	* value.c (value_in): Return int instead of struct value *.

	* eval.c (evaluate_subexp_standard): Call language_bool_type instead
	of using LA_BOOL_TYPE.  Update call to value_in.
	* ada-lang.c (ada_evaluate_subexp): Call language_bool_type instead
	of using LA_BOOL_TYPE or builtin_type_int for boolean values.

	* language.c (unknown_language_arch_info): Set bool_type_default member
	of struct language_arch_info.
	* ada-lang.c (ada_language_arch_info): Set bool_type_symbol and
	bool_type_default members of struct language_arch_info.
	* c-lang.c (c_language_arch_info): Set bool_type_default member
	of struct language_arch_info.
	(cplus_language_arch_info): Set bool_type_symbol and bool_type_default
	members of struct language_arch_info.
	* f-lang.c (f_language_arch_info): Set bool_type_symbol and
	bool_type_default members of struct language_arch_info.
	* jv-lang.c (java_language_arch_info): Set bool_type_symbol and
	bool_type_default members of struct language_arch_info.
	* m2-lang.c (m2_language_arch_info): Set bool_type_symbol and
	bool_type_default members of struct language_arch_info.
	* p-lang.c (p_language_arch_info): Set bool_type_symbol and
	bool_type_default members of struct language_arch_info.
2008-09-11 14:11:40 +00:00
Tom Tromey d7d9f01ea1 gdb
PR gdb/855:
	* NEWS: Add entry for macro commands.
	* Makefile.in (macrocmd.o): Add gdb_string.h.
	* macroscope.h (user_macro_scope): Declare.
	(default_macro_scope): Update documentation.
	(macro_user_macros): Declare.
	* c-lang.c (c_preprocess_and_parse): Always attempt macro lookup.
	Use user_macro_scope.
	(null_macro_lookup): Remove.
	* macrotab.h (macro_callback_fn): Declare.
	(macro_for_each): Likewise.
	(macro_allow_redefinitions): Likewise.
	* macrotab.c (foreach_macro): New function
	(macro_for_each): Likewise.
	(struct macro_table) <redef_ok>: New field.
	(macro_allow_redefinitions): New function.
	(new_macro_table): Update.
	(macro_define_function): Likewise.
	(macro_define_object): Likewise.
	* macroscope.c (user_macro_scope): New function.
	(default_macro_scope): Use it.
	(macro_user_macros): New global.
	(standard_macro_lookup): Look in macro_user_macros.
	(_initialize_macroscope): New function.
	* macroexp.h (macro_is_whitespace, macro_is_digit,
	macro_is_identifier_nondigit): Declare.
	* macroexp.c (macro_is_whitespace): Rename.  No longer static.
	(macro_is_digit): Likewise.
	(macro_is_identifier_nondigit): Likewise.
	(get_identifier): Update.
	(get_pp_number): Likewise.
	(get_token): Likewise.
	* macrocmd.c (skip_ws): New function.
	(extract_identifier): Likewise.
	(free_macro_definition_ptr): Likewise.
	(user_macros): Remove.
	(macro_define_command): Implement.
	(_initialize_macrocmd): Update.
	(macro_undef_command): Implement.
	(print_one_macro): New function.
	(macro_list_command): Implement.
gdb/doc
	* gdb.texinfo (Macros): Update.  Use @code rather than @command.
gdb/testsuite
	* gdb.base/macscp.exp: Add macro tests.
2008-07-18 20:55:33 +00:00
Vladimir Prus 2b2d9e11a0 Fix breakpoint condition that use member variables.
* valops.c (check_field): Remove.
        (check_field_in): Rename to check_field.
        (value_of_this): Use la_name_of_this.
        * value.h (check_field): Adjust prototype.

        * language.h (la_value_of_this): Rename to la_name_of_this.
        * language.c (unknown_language_defn): Specify "this" for
        name_of_this.
        (auto_language_defn): Likewise.
        (local_language_defn): Likewise.
        * ada-lang.c (ada_language_defn): Adjust comment.
        * c-lang.c (c_language_defn): Adjust comment.
        (cplus_language_defn): Specify "this" for name_of_this.
        (asm_language_defn): Adjust comment.
        (minimal_language_defn): Adjust comment.
        * f-lang.c (f_language_defn): Specify NULL for name_of_this.
        * jv-lang.c (java_language_defn): Specify "this" for name_of_this.
        * m2-lang.c (m2_language_defn): Specify "this" for name_of_this.
        * objc-lang.c (objc_language_defn): Specify "self" for
        name_of_this.
        * p-lang.c (pascal_language_defn): Specify "this" for
        name_of_this.
        * scm-lang.c (scm_language_defn): Specify NULL for name_of_this.

        * symtab.c (lookup_symbol_aux): Lookup "this" in the
        proper scope, and check for field in type of "this", without
        trying to create a value.
2008-04-06 08:56:37 +00:00
Joel Brobecker 41d27058f2 * language.h (struct language_defn): Add new field
la_make_symbol_completion_list.
        * symtab.c (default_make_symbol_completion_list): Renames
        make_symbol_completion_list.
        (make_symbol_completion_list): New function.
        * symtab.h (default_make_symbol_completion_list): Add declaration.
        * langauge.c (unknown_language): Set la_make_symbol_completion_list.
        (auto_language, local_language): Likewise.
        * objc-lang.c (objc_language_defn): Likewise.
        * scm-lang.c (scm_language_defn): Likewise.
        * m2-lang.c (m2_language_defn): Likewise.
        * f-lang.c (f_language_defn): Likewise.
        * jv-lang.c (java_language_defn): Likewise.
        * p-lang.c (pascal_language_defn): Likewise.
        * c-lang.c (c_language_defn, cplus_language_defn, asm_language_defn)
        (minimal_language_defn): Likewise.
        * ada-lang.c (struct string_vector): New structure.
        (new_string_vector, string_vector_append, ada_unqualified_name)
        (add_angle_brackets, symbol_completion_match, symbol_completion_add)
        (ada_make_symbol_completion_list): New functions.
        (ada_language_defn): Set la_make_symbol_completion_list.
        * ada-lang.h (ada_make_symbol_completion_list): Remove declaration,
        this function is static.
2008-02-05 22:17:41 +00:00
Daniel Jacobowitz 9b254dd1ce Updated copyright notices for most files. 2008-01-01 22:53:26 +00:00
Thiago Jung Bauermann 213e4dc22e * gdbtypes.c (gdbtypes_post_init): Change names of decimal float types
to conform to C extension for decimal float.
	* c-lang.c (enum c_primitive_types): Add entries for Decimal Floating
	Point types.
	(enum cplus_primitive_types): Likewise.
	(c_language_arch_info): Add Decimal Floating Point builtin types to
	the primitive_type_vector.
	(cplus_language_arch_info): Likewise.
2007-12-20 17:17:21 +00:00
Ulrich Weigand 6ccb916229 * coffread.c (decode_type): Use builtin_type_int32 instead
of FT_INTEGER fundamental type for array range index type.
	(decode_base_type): Use builtin types of current_gdbarch
	instead of fundamental types.

	* dwarf2read.c (struct dwarf2_cu): Remove ftypes member.
	(read_file_scope): Do not initialize ftypes member.
	(dwarf_base_type, dwarf2_fundamental_types): Remove functions.
	(read_array_type): Use builtin_type_int32 instead of FT_INTEGER
	fundamental type for array range index type.
	(read_tag_string_type): Likewise for string range index type.
	Also, do not overwrite FT_CHAR type with new string type.
	(read_base_type): If DW_AT_name is missing, create unnamed type
	with given properties instead of looking for a fundamental type.
	Create new types as TYPE_TARGET_TYPE for DW_ATE_address and
	DW_ATE_complex_float types.
	(read_subrange_type): Create new type to represent missing
	DW_AT_type instead of looking for a fundamental type.
	(die_type): Use builtin type to represent "void" instead of
	looking for a fundamental type.

	* stabsread.c (define_symbol): Use builtin types to represent
	'r' and 'i' floating-point and integer constants.

	* gdbtypes.c (lookup_fundamental_type): Remove.
	* gdbtypes.h (lookup_fundamental_type): Remove prototype.
	(FT_VOID, FT_BOOLEAN, FT_CHAR, FT_SIGNED_CHAR, FT_UNSIGNED_CHAR,
	FT_SHORT, FT_SIGNED_SHORT, FT_UNSIGNED_SHORT, FT_INTEGER,
	FT_SIGNED_INTEGER, FT_UNSIGNED_INTEGER, FT_LONG, FT_SIGNED_LONG,
	FT_UNSIGNED_LONG, FT_LONG_LONG, FT_SIGNED_LONG_LONG,
	FT_UNSIGNED_LONG_LONG, FT_FLOAT, FT_DBL_PREC_FLOAT, FT_EXT_PREC_FLOAT,
	FT_COMPLEX, FT_DBL_PREC_COMPLEX, FT_EXT_PREC_COMPLEX, FT_STRING,
	FT_FIXED_DECIMAL, FT_FLOAT_DECIMAL, FT_BYTE, FT_UNSIGNED_BYTE,
	FT_TEMPLATE_ARG, FT_DECFLOAT, FT_DBL_PREC_DECFLOAT,
	FT_EXT_PREC_DECFLOAT, FT_NUM_MEMBERS): Remove macros.
	* objfiles.c (struct objfile): Remove fundamental_types member.
	* symfile.c (reread_symbols): Do not clear fundamental_types.

	* language.h (struct language_defn): Remove la_fund_type member.
	(create_fundamental_type): Remove.
	* language.c (unk_lang_create_fundamental_type): Remove.
	(unknown_language_defn, auto_language_defn,
	local_language_defn): Adapt initializer.
	* ada-lang.c (ada_create_fundamental_type): Remove.
	(ada_language_defn): Adapt initializer.
	* c-lang.h (c_create_fundamental_type): Remove prototype.
	* c-lang.c (c_create_fundamental_type): Remove.
	(c_language_defn, cplus_language_defn, asm_language_defn,
	minimal_language_defn): Adapt initializer.
	* f-lang.c (f_create_fundamental_type): Remove.
	(f_language_defn): Adapt initializer.
	* jv-lang.c (java_create_fundamental_type): Remove.
	(java_language_defn): Adapt initializer.
	* m2-lang.c (m2_create_fundamental_type): Remove.
	(m2_language_defn): Adapt initializer.
	* objc-lang.c (objc_create_fundamental_type): Remove.
	(objc_language_defn): Adapt initializer.
	* p-lang.h (pascal_create_fundamental_type): Remove prototype.
	* p-lang.c (pascal_create_fundamental_type): Remove.
	(pascal_language_defn): Adapt initializer.
	* scm-lang.c (scm_language_defn): Adapt initializer.
2007-12-04 23:33:00 +00:00
Ulrich Weigand aba2dd37f7 * language.h (struct language_defn): Remove la_builtin_type_vector
and string_char_type members.
	* language.c (language_string_char_type): No longer consult
	la->string_char_type.
	(language_lookup_primitive_type_by_name): No longer consult
	current_language->la_builtin_type_vector.

	* language.c (unknown_language_defn, auto_language_defn,
	local_language_defn): Adapt initializer.
	* ada-lang.c (ada_language_defn): Likewise.
	* c-lang.c (c_language_defn, cplus_language_defn, asm_language_defn,
	minimal_language_defn): Likewise.
	* f-lang.c (f_language_defn): Likewise.
	* jv-lang.c (java_language_defn): Likewise.
	* m2-lang.c (m2_language_defn): Likewise.
	* objc-lang.c (objc_language_defn): Likewise.
	* p-lang.c (pascal_language_defn): Likewise.
	* scm-lang.c (scm_language_defn): Likewise.
2007-11-02 19:34:11 +00:00
Thiago Jung Bauermann 7678ef8fb0 2007-10-25 Wu Zhou <woodzltc@cn.ibm.com>
Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* c-lang.c (c_create_fundamental_type): Create fundamental
	types for DFP.
	* c-typeprint.c (c_type_print_varspec_prefix): Add
	TYPE_CODE_DECFLOAT to no prefix needed case.
	(c_type_print_varspec_suffix): Add TYPE_CODE_DECFLOAT to no
	suffix needed case.
	* c-valprint.c (c_val_print): Call print_decimal_floating to
	print DFP values.
	* dwarf2read.c (read_base_type): Read DW_ATE_decimal_float
	attribute code and return TYPE_CODE_DECFLOAT.
	(dwarf_base_type): Set dwarf2_fundamental_type for DFP values.
	* gdbtypes.c (gdbtypes_post_init): Initialize builtin_decfloat,
	builtin_decdouble and builtin_declong.
	* gdbtypes.h (enum type_code): Add TYPE_CODE_DECFLOAT as a
	type code for DFP.
	(FT_DECFLOAT, FT_DBL_PREC_DECFLOAT, FT_EXT_PREC_DECFLOAT): New
	types, for decimal floating point.
	(FT_NUM_MEMBERS):  Increment, new types added.
	(struct builtin_type): Add builtin_decfloat, builtin_decdouble
	and builtin_declong.
	* valprint.c (print_decimal_floating): New function to print DFP
	values.
	* value.h (print_decimal_floating): Prototype.
2007-10-25 17:57:34 +00:00
Daniel Jacobowitz 41f1b6975d * infcall.c (call_function_by_hand): Handle language-specific
pass and return by reference.

	* cp-abi.c (cp_pass_by_reference): New.
	* cp-abi.h (cp_pass_by_reference): Declare.
	(struct cp_abi_ops): Add pass_by_reference.
	* gnu-v3-abi.c (gnuv3_pass_by_reference): New.
	(init_gnuv3_ops): Set pass_by_reference.

	* language.c (language_pass_by_reference): New.
	(default_pass_by_reference): New.
	(unknown_language_defn, auto_language_defn, local_language_defn): Add
	default_pass_by_reference.
	* langauge.h (struct language_defn): Add la_pass_by_reference.
	(language_pass_by_reference, default_pass_by_reference): Declare.
	* ada-lang.c (ada_language_defn): Add default_pass_by_reference.
	* c-lang.c (c_language_defn, asm_language_defn)
	(minimal_language_defn): Likewise.
	(cplus_language_defn): Add cp_pass_by_reference.
	* f-lang.c (f_language_defn): Add default_pass_by_reference.
	* jv-lang.c (java_language_defn): Likewise.
	* m2-lang.c (m2_language_defn): Likewise.
	* objc-lang.c (objc_language_defn): Likewise.
	* p-lang.c (pascal_language_defn): Likewise.
	* scm-lang.c (scm_language_defn): Likewise

	* gdb.cp/pass-by-ref.cc, gdb.cp/pass-by-ref.exp: New files.
2007-09-23 16:25:06 +00:00
Joel Brobecker a9762ec78a Switch the license of all .c files to GPLv3.
Switch the license of all .h files to GPLv3.
        Switch the license of all .cc files to GPLv3.
2007-08-23 18:08:50 +00:00
Ulrich Weigand cad351d11d * c-lang.c (cplus_builtin_types): Remove.
(enum cplus_primitive_types): New data type.
	(cplus_language_arch_info): New function.
	(cplus_language_defn): Set la_language_arch_info member.  Do not set
	la_builtin_type_vector and string_char_type members.

	* f-lang.c (f_builtin_types): Remove.
	(enum f_primitive_types): New data type.
	(f_language_arch_info): New function.
	(f_language_de): Set la_language_arch_info member.  Do not set
	la_builtin_type_vector and string_char_type members.

	* m2-lang.c (m2_builtin_types): Remove.
	(enum m2_primitive_types): New data type.
	(m2_language_arch_info): New function.
	(m2_language_defn): Set la_language_arch_info member.  Do not set
	la_builtin_type_vector and string_char_type members.

	* objc-lang.c (objc_builtin_types): Remove.
	(objc_language): Set la_language_arch_info member.  Do not set
	la_builtin_type_vector and string_char_type members.

	* p-lang.c (pascal_builtin_types): Remove.
	(enum pascal_primitive_types): New data type.
	(pascal_language_arch_info): New function.
	(pascal_language_defn): Set la_language_arch_info member.  Do not set
	la_builtin_type_vector and string_char_type members.
2007-06-16 17:23:12 +00:00
Ulrich Weigand ea06eb3dd8 2007-06-12 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (TARGET_FLOAT_BIT): Replace by gdbarch_float_bit.
	* p-lang.c (pascal_create_fundamental_type): Likewise.
	* objc-lang.c (objc_create_fundamental_type): Likewise.
	* mdebugread.c (_initialize_mdebugread): Likewise.
	* m2-lang.c (m2_create_fundamental_type)
	(_initialize_m2_language): Likewise.
	* gdbtypes.c (build_gdbtypes): Likewise.
	* f-lang.c (f_create_fundamental_type, build_fortran_types): Likewise.
	* doublest.c (floatformat_from_length): Likewise.
	* c-lang.c (c_create_fundamental_type): Likewise.
	* ada-lang.c (ada_create_fundamental_type)
	(ada_language_arch_info): Likewise.
	* gdbarch.sh (TARGET_FLOAT_FORMAT): Replace by gdbarch_float_format.
	* value.c (unpack_double): Likewise (comment).
	* gdbtypes.c (build_gdbtypes): Likewise.
	* doublest.c (floatformat_from_length): Likewise.
	* gdbarch.sh (TARGET_DOUBLE_BIT): Replace by gdbarch_double_bit.
	* valarith.c (value_binop): Likewise.
	* p-lang.c (pascal_create_fundamental_type): Likewise.
	* objc-lang.c (objc_create_fundamental_type): Likewise.
	* mdebugread.c (_initialize_mdebugread): Likewise.
	* m2-lang.c (m2_create_fundamental_type): Likewise.
	* gdbtypes.c (build_gdbtypes): Likewise.
	* f-lang.c (f_create_fundamental_type, build_fortran_types): Likewise.
	* doublest.c (floatformat_from_length): Likewise.
	* cris-tdep.c (cris_gdbarch_init): Likewise (comment).
	* c-lang.c (c_create_fundamental_type): Likewise.
	* ada-lex.l (processReal): Likewise.
	* ada-lang.c (ada_create_fundamental_type)
	(ada_language_arch_info): Likewise.
	* gdbarch.sh (TARGET_DOUBLE_FORMAT): Replace by gdbarch_double_format.
	* value.c (unpack_double): Likewise (comment).
	* gdbtypes.c (build_gdbtypes): Likewise.
	* doublest.c (floatformat_from_length): Likewise.
	* gdbarch.sh (TARGET_LONG_DOUBLE_BIT): Replace by
	gdbarch_long_double_bit.
	* p-lang.c (pascal_create_fundamental_type): Likewise.
	* objc-lang.c (objc_create_fundamental_type): Likewise.
	* m2-lang.c (m2_create_fundamental_type): Likewise.
	* gdbtypes.c (build_gdbtypes): Likewise.
	* f-lang.c (f_create_fundamental_type, build_fortran_types): Likewise.
	* doublest.c (floatformat_from_length): Likewise.
	* c-lang.c (c_create_fundamental_type): Likewise.
	* ada-lex.l (processReal): Likewise.
	* ada-lang.c (ada_create_fundamental_type)
	(ada_language_arch_info): Likewise.
	* gdbarch.sh (TARGET_LONG_DOUBLE_FORMAT): Replace by
	gdbarch_long_double_format.
	* gdbtypes.c (build_gdbtypes): Likewise.
	* doublest.c (floatformat_from_length): Likewise.
	* gdbarch.c, gdbarch.h: Regenerate.
2007-06-12 16:33:20 +00:00
Ulrich Weigand 9a76efb656 2007-06-12 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (TARGET_SHORT_BIT): Replace by gdbarch_int_bit.
	* ada-lang.c (ada_create_fundamental_type)
	(ada_language_arch_info): Likewise.
	* c-lang.c (c_create_fundamental_type): Likewise.
	* f-lang.c (f_create_fundamental_type, build_fortran_types): Likewise.
	* gdbtypes.c (build_gdbtypes, gdbtypes_post_init): Likewise.
	* m2-lang.c (m2_create_fundamental_type): Likewise.
	* objc-lang.c (objc_create_fundamental_type): Likewise.
	* p-lang.c (pascal_create_fundamental_type): Likewise.
	* gdbarch.sh (TARGET_INT_BIT): Replace by gdbarch_int_bit.
	* c-exp.y (parse_number): Likewise.
	* objc-exp.y (parse_number): Likewise.
	* ada-lex.l (processInt): Likewise.
	* f-exp.y (parse_number): Likewise.
	* p-exp.y (parse_number): Likewise.
	* ada-lang.c (ada_create_fundamental_type, ada_language_arch_info)
	(gdbtypes_post_init, build_gdbtypes): Likewise.
	* p-lang.c (pascal_create_fundamental_type): Likewise.
	* parse.c (build_parse): Likewise.
	* xcoffread.c (_initialize_xcoffread): Likewise.
	* stabsread.c (define_symbol, read_one_struct_field, read_enum_type)
	(read_range_type): Likewise.
	* objc-lang.c (objc_create_fundamental_type): Likewise.
	* f-lang.c (build_fortran_types, f_create_fundamental_type): Likewise.
	* m2-lang.c (m2_create_fundamental_type, _initialize_m2_language)
	(m2_create_fundamental_type): Likewise.
	* c-lang.c (c_create_fundamental_type): Likewise.
	* coffread.c (coff_read_enum_type): Likewise.
	* mdebugread.c (parse_symbol, _initialize_mdebugread): Likewise.
	* dwarf2read.c (new_symbol): Likewise.
	* gdbarch.sh (TARGET_LONG_BIT): Replace by gdbarch_long_bit.
	* c-exp.y (parse_number): Likewise.
	* objc-exp.y (parse_number): Likewise.
	* ada-lex.l (processInt): Likewise.
	* f-exp.y (parse_number): Likewise.
	* p-exp.y (parse_number): Likewise.
	* valarith.c (value_binop): Likewise.
	* symfile.c (read_target_long_array, simple_overlay_update_1): Likewise.
	* ada-lang.c (ada_create_fundamental_type)
	(ada_language_arch_info): Likewise.
	* gdbtypes.c (build_gdbtypes, gdbtypes_post_init): Likewise.
	* symfile.c (TARGET_LONG_BYTES): Likewise.
	* p-lang.c (pascal_create_fundamental_type): Likewise.
	* objc-lang.c (objc_create_fundamental_type): Likewise.
	* m2-lang.c (m2_create_fundamental_type): Likewise.
	* f-lang.c (f_create_fundamental_type): Likewise.
	* c-lang.c (c_create_fundamental_type): Likewise.
	* coffread.c (decode_base_type): Likewise.
	* gdbarch.sh (TARGET_LONG_LONG_BIT): Replace by gdbarch_long_long_bit.
	* c-exp.y (parse_number): Likewise.
	* objc-exp.y (parse_number): Likewise.
	* p-exp.y (parse_number): Likewise.
	* ada-lang.c (ada_create_fundamental_type)
	(ada_language_arch_info): Likewise.
	* gdbtypes.c (gdbtypes_post_init, build_gdbtypes): Likewise.
	* stabsread.c (read_range_type): Likewise.
	* p-lang.c (pascal_create_fundamental_type): Likewise.
	* objc-lang.c (objc_create_fundamental_type): Likewise.
	* m2-lang.c (m2_create_fundamental_type): Likewise.
	* f-lang.c (f_create_fundamental_type): Likewise.
	* c-lang.c (c_create_fundamental_type): Likewise.
	* gdbarch.c, gdbarch.h: Regenerate.
2007-06-12 15:33:04 +00:00
Daniel Jacobowitz b18be20d0a * Makefile.in (c-lang.o, gnu-v3-abi.o): Update.
* NEWS: Mention improved C++ thunk support.
	* c-lang.c (cplus_language_defn): Mention cplus_skip_trampoline.
	* cp-abi.c (cplus_skip_trampoline): New.
	* cp-abi.h (cplus_skip_trampoline): New prototype.
	(struct cp_abi_ops): Add skip_trampoline member.
	* gnu-v3-abi.c (gnuv3_skip_trampoline): New.
	(init_gnuv3_ops): Set skip_trampoline.

	* gdb.cp/virtfunc.exp (proc do_tests): Test stepping through a thunk.
2007-05-07 11:49:05 +00:00
Daniel Jacobowitz 6aba47ca06 Copyright updates for 2007. 2007-01-09 17:59:20 +00:00
Eli Zaretskii 197e01b6dc * breakpoint.c:
* arm-tdep.c:
	* ia64-tdep.c:
	* i386-tdep.c:
	* hpread.c:
	* hppa-tdep.c:
	* hppa-hpux-tdep.c:
	* gnu-nat.c:
	* gdbtypes.c:
	* gdbarch.h:
	* gdbarch.c:
	* eval.c:
	* dwarf2read.c:
	* dbxread.c:
	* copying:
	* symfile.c:
	* stabsread.c:
	* sh64-tdep.c:
	* sh-tdep.c:
	* s390-tdep.c:
	* rs6000-tdep.c:
	* remote.c:
	* remote-mips.c:
	* mips-tdep.c:
	* mdebugread.c:
	* linux-nat.c:
	* infrun.c:
	* xcoffread.c:
	* win32-nat.c:
	* valops.c:
	* utils.c:
	* tracepoint.c:
	* target.c:
	* symtab.c:
	* c-exp.y:
	* ada-valprint.c:
	* ada-typeprint.c:
	* ada-lex.l:
	* ada-lang.h:
	* ada-lang.c:
	* ada-exp.y:
	* alphafbsd-tdep.c:
	* alphabsd-tdep.h:
	* alphabsd-tdep.c:
	* alphabsd-nat.c:
	* alpha-tdep.h:
	* alpha-tdep.c:
	* alpha-osf1-tdep.c:
	* alpha-nat.c:
	* alpha-mdebug-tdep.c:
	* alpha-linux-tdep.c:
	* alpha-linux-nat.c:
	* aix-thread.c:
	* abug-rom.c:
	* arch-utils.c:
	* annotate.h:
	* annotate.c:
	* amd64obsd-tdep.c:
	* amd64obsd-nat.c:
	* amd64nbsd-tdep.c:
	* amd64nbsd-nat.c:
	* amd64fbsd-tdep.c:
	* amd64fbsd-nat.c:
	* amd64bsd-nat.c:
	* amd64-tdep.h:
	* amd64-tdep.c:
	* amd64-sol2-tdep.c:
	* amd64-nat.h:
	* amd64-nat.c:
	* amd64-linux-tdep.c:
	* amd64-linux-nat.c:
	* alphanbsd-tdep.c:
	* block.h:
	* block.c:
	* bfd-target.h:
	* bfd-target.c:
	* bcache.h:
	* bcache.c:
	* ax.h:
	* ax-general.c:
	* ax-gdb.h:
	* ax-gdb.c:
	* avr-tdep.c:
	* auxv.h:
	* auxv.c:
	* armnbsd-tdep.c:
	* armnbsd-nat.c:
	* arm-tdep.h:
	* arm-linux-nat.c:
	* arch-utils.h:
	* charset.c:
	* call-cmds.h:
	* c-valprint.c:
	* c-typeprint.c:
	* c-lang.h:
	* c-lang.c:
	* buildsym.h:
	* buildsym.c:
	* bsd-uthread.h:
	* bsd-uthread.c:
	* bsd-kvm.h:
	* bsd-kvm.c:
	* breakpoint.h:
	* core-regset.c:
	* core-aout.c:
	* completer.h:
	* completer.c:
	* complaints.h:
	* complaints.c:
	* command.h:
	* coffread.c:
	* coff-solib.h:
	* coff-solib.c:
	* coff-pe-read.h:
	* coff-pe-read.c:
	* cli-out.h:
	* cli-out.c:
	* charset.h:
	* dink32-rom.c:
	* dictionary.h:
	* dictionary.c:
	* demangle.c:
	* defs.h:
	* dcache.h:
	* dcache.c:
	* d10v-tdep.c:
	* cpu32bug-rom.c:
	* cp-valprint.c:
	* cp-support.h:
	* cp-support.c:
	* cp-namespace.c:
	* cp-abi.h:
	* cp-abi.c:
	* corelow.c:
	* corefile.c:
	* environ.c:
	* elfread.c:
	* dwarfread.c:
	* dwarf2loc.c:
	* dwarf2expr.h:
	* dwarf2expr.c:
	* dwarf2-frame.h:
	* dwarf2-frame.c:
	* dve3900-rom.c:
	* dummy-frame.h:
	* dummy-frame.c:
	* dsrec.c:
	* doublest.h:
	* doublest.c:
	* disasm.h:
	* disasm.c:
	* fork-child.c:
	* findvar.c:
	* fbsd-nat.h:
	* fbsd-nat.c:
	* f-valprint.c:
	* f-typeprint.c:
	* f-lang.h:
	* f-lang.c:
	* expression.h:
	* expprint.c:
	* exec.h:
	* exec.c:
	* exceptions.h:
	* exceptions.c:
	* event-top.h:
	* event-top.c:
	* event-loop.h:
	* event-loop.c:
	* gdb.c:
	* gdb-stabs.h:
	* gdb-events.h:
	* gdb-events.c:
	* gcore.c:
	* frv-tdep.h:
	* frv-tdep.c:
	* frv-linux-tdep.c:
	* frame.h:
	* frame.c:
	* frame-unwind.h:
	* frame-unwind.c:
	* frame-base.h:
	* frame-base.c:
	* gdb_vfork.h:
	* gdb_thread_db.h:
	* gdb_string.h:
	* gdb_stat.h:
	* gdb_regex.h:
	* gdb_ptrace.h:
	* gdb_proc_service.h:
	* gdb_obstack.h:
	* gdb_locale.h:
	* gdb_dirent.h:
	* gdb_curses.h:
	* gdb_assert.h:
	* gdbarch.sh:
	* gdb.h:
	* hpux-thread.c:
	* hppabsd-nat.c:
	* hppa-tdep.h:
	* hpacc-abi.c:
	* h8300-tdep.c:
	* gregset.h:
	* go32-nat.c:
	* gnu-v3-abi.c:
	* gnu-v2-abi.h:
	* gnu-v2-abi.c:
	* gnu-nat.h:
	* glibc-tdep.c:
	* gdbtypes.h:
	* gdbcore.h:
	* gdbcmd.h:
	* i386nbsd-tdep.c:
	* i386nbsd-nat.c:
	* i386gnu-tdep.c:
	* i386gnu-nat.c:
	* i386fbsd-tdep.c:
	* i386fbsd-nat.c:
	* i386bsd-tdep.c:
	* i386bsd-nat.h:
	* i386bsd-nat.c:
	* i386-tdep.h:
	* i386-sol2-nat.c:
	* i386-nto-tdep.c:
	* i386-nat.c:
	* i386-linux-tdep.h:
	* i386-linux-tdep.c:
	* i386-linux-nat.c:
	* i386-cygwin-tdep.c:
	* inf-ttrace.c:
	* inf-ptrace.h:
	* inf-ptrace.c:
	* inf-loop.h:
	* inf-loop.c:
	* inf-child.h:
	* inf-child.c:
	* ia64-tdep.h:
	* ia64-linux-nat.c:
	* i387-tdep.h:
	* i387-tdep.c:
	* i386v4-nat.c:
	* i386v-nat.c:
	* i386obsd-tdep.c:
	* i386obsd-nat.c:
	* kod.c:
	* jv-valprint.c:
	* jv-typeprint.c:
	* jv-lang.h:
	* jv-lang.c:
	* irix5-nat.c:
	* iq2000-tdep.c:
	* interps.h:
	* interps.c:
	* inftarg.c:
	* inflow.h:
	* inflow.c:
	* inferior.h:
	* infcmd.c:
	* infcall.h:
	* infcall.c:
	* inf-ttrace.h:
	* m32r-tdep.h:
	* m32r-tdep.c:
	* m32r-rom.c:
	* m32r-linux-tdep.c:
	* m32r-linux-nat.c:
	* m2-valprint.c:
	* m2-typeprint.c:
	* m2-lang.h:
	* m2-lang.c:
	* lynx-nat.c:
	* linux-thread-db.c:
	* linux-nat.h:
	* linespec.c:
	* libunwind-frame.h:
	* libunwind-frame.c:
	* language.h:
	* language.c:
	* macroexp.c:
	* macrocmd.c:
	* m88kbsd-nat.c:
	* m88k-tdep.h:
	* m88k-tdep.c:
	* m68klinux-tdep.c:
	* m68klinux-nat.c:
	* m68kbsd-tdep.c:
	* m68kbsd-nat.c:
	* m68k-tdep.h:
	* m68k-tdep.c:
	* mips-linux-nat.c:
	* mips-irix-tdep.c:
	* minsyms.c:
	* memattr.h:
	* memattr.c:
	* mem-break.c:
	* mdebugread.h:
	* main.h:
	* main.c:
	* macrotab.h:
	* macrotab.c:
	* macroscope.h:
	* macroscope.c:
	* macroexp.h:
	* nbsd-tdep.c:
	* mt-tdep.c:
	* monitor.h:
	* monitor.c:
	* mn10300-tdep.h:
	* mn10300-tdep.c:
	* mn10300-linux-tdep.c:
	* mipsv4-nat.c:
	* mipsread.c:
	* mipsnbsd-tdep.h:
	* mipsnbsd-tdep.c:
	* mipsnbsd-nat.c:
	* mips64obsd-tdep.c:
	* mips64obsd-nat.c:
	* mips-tdep.h:
	* mips-mdebug-tdep.c:
	* mips-linux-tdep.c:
	* osabi.h:
	* osabi.c:
	* ocd.h:
	* ocd.c:
	* observer.c:
	* objfiles.h:
	* objfiles.c:
	* objc-lang.h:
	* objc-lang.c:
	* objc-exp.y:
	* nto-tdep.h:
	* nto-tdep.c:
	* nto-procfs.c:
	* nlmread.c:
	* nbsd-tdep.h:
	* ppcobsd-tdep.c:
	* ppcobsd-nat.c:
	* ppcnbsd-tdep.h:
	* ppcnbsd-tdep.c:
	* ppcnbsd-nat.c:
	* ppcbug-rom.c:
	* ppc-tdep.h:
	* ppc-sysv-tdep.c:
	* ppc-linux-tdep.c:
	* ppc-linux-nat.c:
	* ppc-bdm.c:
	* parser-defs.h:
	* parse.c:
	* p-valprint.c:
	* p-typeprint.c:
	* p-lang.h:
	* p-lang.c:
	* remote-fileio.h:
	* remote-fileio.c:
	* remote-est.c:
	* remote-e7000.c:
	* regset.h:
	* regset.c:
	* reggroups.h:
	* reggroups.c:
	* regcache.h:
	* regcache.c:
	* proc-why.c:
	* proc-service.c:
	* proc-events.c:
	* printcmd.c:
	* ppcobsd-tdep.h:
	* sentinel-frame.h:
	* sentinel-frame.c:
	* scm-valprint.c:
	* scm-tags.h:
	* scm-lang.h:
	* scm-lang.c:
	* scm-exp.c:
	* s390-tdep.h:
	* rom68k-rom.c:
	* remote.h:
	* remote-utils.c:
	* remote-st.c:
	* remote-sim.c:
	* remote-sds.c:
	* remote-rdp.c:
	* remote-rdi.c:
	* remote-hms.c:
	* sim-regno.h:
	* shnbsd-tdep.h:
	* shnbsd-tdep.c:
	* shnbsd-nat.c:
	* sh-tdep.h:
	* serial.h:
	* serial.c:
	* ser-unix.h:
	* ser-unix.c:
	* ser-tcp.c:
	* ser-pipe.c:
	* ser-go32.c:
	* ser-e7kpc.c:
	* ser-base.h:
	* ser-base.c:
	* solib.c:
	* solib-svr4.h:
	* solib-svr4.c:
	* solib-sunos.c:
	* solib-som.h:
	* solib-som.c:
	* solib-pa64.h:
	* solib-pa64.c:
	* solib-osf.c:
	* solib-null.c:
	* solib-legacy.c:
	* solib-irix.c:
	* solib-frv.c:
	* solib-aix5.c:
	* sol-thread.c:
	* sparc64-linux-tdep.c:
	* sparc64-linux-nat.c:
	* sparc-tdep.h:
	* sparc-tdep.c:
	* sparc-sol2-tdep.c:
	* sparc-sol2-nat.c:
	* sparc-nat.h:
	* sparc-nat.c:
	* sparc-linux-tdep.c:
	* sparc-linux-nat.c:
	* source.h:
	* source.c:
	* somread.c:
	* solist.h:
	* solib.h:
	* std-regs.c:
	* stack.h:
	* stack.c:
	* stabsread.h:
	* sparcobsd-tdep.c:
	* sparcnbsd-tdep.c:
	* sparcnbsd-nat.c:
	* sparc64obsd-tdep.c:
	* sparc64nbsd-tdep.c:
	* sparc64nbsd-nat.c:
	* sparc64fbsd-tdep.c:
	* sparc64fbsd-nat.c:
	* sparc64-tdep.h:
	* sparc64-tdep.c:
	* sparc64-sol2-tdep.c:
	* sparc64-nat.c:
	* ui-file.c:
	* typeprint.h:
	* typeprint.c:
	* tramp-frame.h:
	* tramp-frame.c:
	* trad-frame.h:
	* trad-frame.c:
	* tracepoint.h:
	* top.c:
	* tobs.inc:
	* thread.c:
	* terminal.h:
	* target.h:
	* symfile.h:
	* stop-gdb.c:
	* vaxbsd-nat.c:
	* vax-tdep.h:
	* vax-tdep.c:
	* vax-nat.c:
	* varobj.h:
	* varobj.c:
	* value.h:
	* value.c:
	* valprint.h:
	* valprint.c:
	* v850-tdep.c:
	* uw-thread.c:
	* user-regs.c:
	* ui-out.h:
	* ui-out.c:
	* ui-file.h:
	* xcoffsolib.h:
	* xcoffsolib.c:
	* wrapper.c:
	* wince.c:
	* wince-stub.h:
	* wince-stub.c:
	* vaxobsd-tdep.c:
	* vaxnbsd-tdep.c:
	* gdb_gcore.sh:
	* copying.c:
	* configure.ac:
	* aclocal.m4:
	* acinclude.m4:
	* reply_mig_hack.awk:
	* observer.sh:
	* gdb_mbuild.sh:
	* arm-linux-tdep.c:
	* blockframe.c:
	* dbug-rom.c:
	* environ.h:
	* dwarf2loc.h:
	* gdb-events.sh:
	* glibc-tdep.h:
	* gdb_wait.h:
	* gdbthread.h:
	* i386-sol2-tdep.c:
	* hppabsd-tdep.c:
	* hppa-linux-nat.c:
	* hppa-hpux-nat.c:
	* ia64-linux-tdep.c:
	* infptrace.c:
	* linespec.h:
	* maint.c:
	* mips-mdebug-tdep.h:
	* remote-m32r-sdi.c:
	* s390-nat.c:
	* rs6000-nat.c:
	* remote-utils.h:
	* sh3-rom.c:
	* sh-linux-tdep.c:
	* top.h:
	* symtab.h:
	* symmisc.c:
	* symfile-mem.c:
	* srec.h:
	* user-regs.h:
	* version.h:
	* valarith.c:
	* xstormy16-tdep.c:
	* wrapper.h:
	* Makefile.in:
	* f-exp.y:
	* cris-tdep.c:
	* cp-name-parser.y:
	* procfs.c:
	* proc-utils.h:
	* proc-flags.c:
	* proc-api.c:
	* p-exp.y:
	* m68hc11-tdep.c:
	* m2-exp.y:
	* kod.h:
	* kod-cisco.c:
	* jv-exp.y:
	* hppa-linux-tdep.c: Add (c) after Copyright.  Update the FSF
	address.
2005-12-17 22:34:03 +00:00
Joel Brobecker e79af960e2 2005-10-03 Joel Brobecker <brobecker@adacore.com>
* language.h (language_defn): New field la_print_array_index.
        (LA_PRINT_ARRAY_INDEX): New macro.
        (default_print_array_index): Add declaration.
        * language.c (default_print_array_index): new function.
        (unknown_language): Add value for new field.
        (auto_language): Likewise.
        (local_language): Likewise.
        * ada-lang.c (ada_print_array_index): New function.
        (ada_language_defn): Add value for new field.
        * c-lang.c (c_language_defn): Likewise.
        (cpluc_language_defn): Likewise.
        (asm_language_defn): Likewise.
        (minimal_language_defn): Likewise.
        * f-lang.c (f_language_defn): Likewise.
        * jv-lang.c (java_language_defn): Likewise.
        * m2-lang.c (m2_language_defn): Likewise.
        * objc-lang.c (objc_language_defn): Likewise.
        * p-lang.c (pascal_language_defn): Likewise.
        * scm-lang.c (scm_language_defn): Likewise.
        * valprint.h (print_array_indexes_p): Add declaration.
        (get_array_low_bound): Add declaration.
        (maybe_print_array_index): Add declaration.
        * valprint.c (print_array_indexes): New static variable.
        (show_print_array_indexes): New function.
        (print_array_indexes_p): New function.
        (get_array_low_bound): New function.
        (maybe_print_array_index): New function.
        (val_print_array_elements): Print the index of each element if
        requested by the user.
        (_initialize_valprint): Add new array-indexes "set/show print" command.
        * ada-valprint.c (print_optional_low_bound): Replace extracted code
        by call to ada_get_array_low_bound_and_type(). Stop printing the low
        bound if indexes will be printed for all elements of the array.
        (val_print_packed_array_elements): Print the index of each element
        of the array if necessary.
2005-10-03 21:21:20 +00:00
Andrew Cagney fc1a4b4705 2005-05-09 Andrew Cagney <cagney@gnu.org>
Use gdb_byte in preference to bfd_byte.
	* gdbarch.sh: Update.
	* gdbarch.h, gdbarch.c: Re-generate.
	* ada-lang.c, ada-lang.h, ada-valprint.c, arch-utils.c: Update.
	* c-lang.c, c-lang.h, c-valprint.c, cp-valprint.c: Update.
	* f-lang.c, f-lang.h, f-valprint.c, gdbcore.h, jv-lang.h: Update.
	* jv-valprint.c, language.c, language.h, m2-lang.c: Update.
	* m2-lang.h, m2-valprint.c, objc-lang.c, p-lang.c: Update.
	* p-lang.h, p-valprint.c, regcache.c, scm-lang.c: Update.
	* scm-lang.h, scm-valprint.c, target.c, target.h: Update.
	* tramp-frame.c, valarith.c, valops.c, valprint.c: Update.
	* valprint.h, value.c, value.h: Update.
2005-05-09 21:20:35 +00:00
Ben Elliston 8470e92791 * c-lang.c (c_create_fundamental_type): Comment fix. 2005-04-19 05:58:24 +00:00
Baurzhan Ismagulov 3d263c1d0a 2005-01-29 Baurzhan Ismagulov <ibr@radix50.net>
* ax-gdb.c, ax-general.c, bcache.c, bfd-target.c, bsd-kvm.c,
	* buildsym.c, c-lang.c, c-typeprint.c, c-valprint.c, charset.c,
	* coff-pe-read.c, coffread.c, complaints.c, copying.c: I18n markup.
2005-01-29 17:53:26 +00:00
Andrew Cagney ce27fb254c 2005-01-28 Andrew Cagney <cagney@gnu.org>
* language.h (struct language_defn): Make la_printstr's buffer
	parameter a const bfd_byte.
	* p-lang.h (pascal_printstr): Update function to match.
	* ada-valprint.c (ada_printstr): Update function to match.
	* scm-lang.c (scm_printstr): Update function to match.
	* p-lang.c (pascal_printstr): Update function to match.
	* ada-lang.h (ada_printstr): Update function to match.
	* m2-lang.c (m2_printstr): Update function to match.
	* objc-lang.c (objc_printstr): Update function to match.
	* c-lang.h (c_printstr): Update function to match.
	* f-lang.c (f_printstr): Update function to match.
	* c-lang.c (c_printstr): Update function to match.
	* language.c (unk_lang_printstr): Update function to match.
2005-01-29 00:11:12 +00:00
Paul N. Hilfinger bb599908a8 * language.c (local_hex_format_custom): Remove.
(local_hex_string): Rename to hex_string, use C format, and move to
utils.c
(local_hex_string_custom): Rename to hex_string_custom and change
interface.  Now uses C format.  Move to utils.c
(local_octal_format_custom): Remove.
(local_decimal_format_custom): Remove.
(unknown_language_defn): Remove language-specific number
formatting entries.
(auto_language_defn): Ditto.
(local_language_defn): Ditto.
* language.h (struct language_format_info): Delete declaration.
(struct language_defn): Remove language_format_info fields
la_binary_format, la_octal_format, la_decimal_format, la_hex_format.
(local_binary_format): Remove macro.
(local_binary_format_prefix): Remove macro.
(local_binary_format_specifier): Remove macro.
(local_binary_format_suffix): Remove macro.
(local_octal_format): Remove macro.
(local_octal_format_prefix): Remove macro.
(local_octal_format_specifier): Remove macro.
(local_octal_format_suffix): Remove macro.
(local_decimal_format): Remove macro.
(local_decimal_format_prefix): Remove macro.
(local_decimal_format_specifier): Remove macro.
(local_decimal_format_suffix): Remove macro.
(local_hex_format): Remove macro.
(local_hex_format_prefix): Remove macro.
(local_hex_format_specifier): Remove macro.
(local_hex_format_suffix): Remove macro.
(local_decimal_format_custom): Remove.
(local_octal_format_custom): Remove.
(local_hex_format_custom): Remove.
(local_hex_string): Rename to hex_string and move to defs.h.
(local_hex_string_custom): Rename to hex_string_custom, change
interface, and move to defs.h.
* utils.c: (int_string): New function.
(hex_string): New function (from language.c).
(hex_string_custom): New function (from language.c).
(octal2str): New function.
(decimal2str): Add width parameter.
(paddr_u): Use new decimal2str interface.
(paddr_d): Ditto.
* defs.h (hex_string): Declare.
(hex_string_custom): Declare.
(int_string): Declare.
* printcmd.c (print_scalar_formatted): Remove localized binary
formatting.
* valprint.c (print_longest): Use int_string.
(print_floating): Use C hex format.
(print_hex_chars): Ditto.
(print_binary_chars): Remove language-specific formatting.
(print_octal_chars): Use C octal format.
(print_decimal_chars): Delocalize format.
(print_decimal): Remove.
* ada-lang.c (ada_language_defn): Remove language-specific number
formatting entries.
* p-lang.c (pascal_language_defn): Ditto.
* c-lang.c (c_language_defn): Ditto.
(cplus_language_defn): Ditto.
(asm_language_defn): Ditto.
(minimal_language_defn): Ditto.
* f-lang.c (f_language_defn): Ditto.
* jv-lang.c (java_language_defn): Ditto.
* m2-lang.c (m2_language_defn): Ditto.
* scm-lang.c (scm_language_defn): Ditto.
* objc-lang.c (objc_language_defn): Ditto.
* memattr.c (mem_info_command): Use renamed hex_string_custom with
new interface.
* pa64solib.c (pa64_sharedlibrary_info_command): Ditto.
* ui-out.c (ui_out_field_core_addr): Ditto.
* breakpoint.c (breakpoint_adjustment_warning): Ditto.
* exec.c (print_section_info): Ditto.
* i387-tdep.c (print_i387_status_word): Ditto.
(print_i387_control_word): Ditto.
(i387_print_float_info): Ditto.
* maint.c (maint_print_section_info): Ditto.
* solib.c (info_sharedlibrary_command): Ditto.
* somsolib.c (som_sharedlibrary_info_command): Ditto.
* symtab.c (print_msymbol_info): Ditto.
* tracepoint.c (tracepoints_info): Ditto.
* solib-frv.c (lm_base): Ditto.
(frv_current_sos): Ditto.
(enable_break2): Ditto.
(enable_break): Ditto.
* dbxread.c (read_dbx_symtab): Use renamed hex_string.
(process_one_symbol): Ditto.
* infcmd.c (program_info): Ditto.
* mdebugread.c (parse_partial_symbols): Ditto.
* symfile.c (add_symbol_file_command): Ditto.
* cli/cli-cmds.c (edit_command): Ditto.
(list_command): Ditto.
* infcall.c (call_function_by_hand): Ditto.
* remote-vx.c (vx_run_files_info): Ditto.
(vx_wait): Ditto.
(vx_attach): Ditto.
(vx_detach): Ditto.
(vx_kill): Ditto.
* aix-thread.c (pdc_symbol_addrs): Ditto.
(pdc_read_regs): Ditto.
(pdc_write_regs): Ditto.
(pdc_read_data): Ditto.
(pdc_write_data): Ditto.
* d10v-tdep.c (display_trace): Ditto.
* rs6000-nat.c (find_toc_address): Ditto.
* aix-thread.c: Don't include language.h.
* buildsym.c: Ditto.
* dbxread.c: Ditto.
* mdebugread.c: Ditto.
* rs6000-nat.c: Ditto.
* buildsym.c (make_blockvector): Use renamed hex_string.
2004-09-11 10:24:53 +00:00
David Lecomber 7ca2d3a371 2004-08-29 David Lecomber <david@streamline-computing.com>
Fix PR gdb/648
	* language.h (enum array_ordering): New enum.
	* language.h (struct language_defn): New la_array_ordering
	attribute.
	* language.c (unknown_language_defn, auto_language_defn)
	(local_language_defn): Ditto.
	* ada-lang.c (ada_language_defn): Ditto.
	* c-lang.c (c_language_defn, cplus_language_defn)
	(asm_language_defn, minimal_language_defn): Ditto.
	* f-lang.c (f_language_defn): Ditto.
	* jv-lang.c (java_language_defn): Ditto.
	* m2-lang.c (f_language_defn): Ditto.
	* objc-lang.c (objc_language_defn): Ditto.
	* p-lang.c (pascal_language_defn): Ditto.
	* scm-lang.c (scm_language_defn): Ditto.
	* eval.c (evaluate_subexp_standard): Assume Fortran arrays are
	oriented large to small in type structure.
	* dwarf2read.c (read_array_order): New function.
	(read_array_type): Use read_array_order to check row/column
	major ordering.
2004-08-29 10:12:24 +00:00
Andrew Cagney e9667a656b 2004-07-28 Andrew Cagney <cagney@gnu.org>
* scm-lang.c (c_builtin_types): Delete extern declaration.
	(scm_language_defn): Replace
	string_char_type and primitive_type_vector with
	la_language_arch_info.
	* jv-lang.c (java_language_defn): Replace
	string_char_type and primitive_type_vector with
	la_language_arch_info.
	* config/i386/i386sco4.mh (NATDEPFILES): Remove reference to
	c_builtin_types in comment.
	* c-lang.h (struct language_arch_info): Declare opaque.
	(c_language_arch_info): Declare.
	(c_builtin_types): Delete declaration.
	* c-lang.c (c_language_arch_info): Set string_char_type to
	builtin_char, not builtin_true_char.  Make global.
	(c_builtin_types): Delete array.
	(asm_language_defn, minimal_language_defn): Replace
	string_char_type and primitive_type_vector with
	la_language_arch_info.
2004-07-28 15:18:08 +00:00
Andrew Cagney 685419e2ae 2004-07-28 Andrew Cagney <cagney@gnu.org>
* gdbtypes.h (struct builtin_type): Rename true_char to
	builtin_true_char.
	* gdbtypes.c (gdbtypes_post_init): Update.
	* c-lang.c (arch_info): New function.
	(enum c_primitive_types): New enum.
	(c_language_defn): Instead of string_char_type and
	primitive_type_vector set la_language_arch_info.
2004-07-28 14:32:19 +00:00
Andrew Cagney f290d38e06 2004-07-27 Andrew Cagney <cagney@gnu.org>
* defs.h (enum language): Add nr_languages.
	* language.h (struct language_arch_info): Define.
	(struct language_defn): Add la_language_arch_info.
	(language_lookup_primative_type_by_name): Declare.
	(language_string_char_type): Declare.
	* language.c (_initialize_language, language_gdbarch_post_init)
	(struct language_gdbarch, language_gdbarch_data): Implement
	per-architecture language information.
	(unknown_language_arch_info, language_string_char_type)
	(language_lookup_primative_type_by_name): New functions.
	(unknown_language_defn, auto_language_defn)
	(local_language_defn): Set la_language_arch_info to
	unknown_language_arch_info.
	(unknown_builtin_types): Delete.
	* gdbtypes.c (lookup_primitive_typename): Use
	language_lookup_primative_type_by_name.
	(create_string_type): Use language_string_char_type.
	* values.c (value_from_string): Use language_string_char_type.
	* scm-lang.c (scm_language_defn): Add NULL la_language_arch_info.
	* p-lang.c (pascal_language_defn): Ditto.
	* m2-lang.c (m2_language_defn): Ditto.
	* jv-lang.c (java_language_defn): Ditto.
	* objc-lang.c (objc_language_defn): Ditto.
	* f-lang.c (f_language_defn): Ditto.
	* c-lang.c (c_language_defn, cplus_language_defn)
	(asm_language_defn, minimal_language_defn): Ditto.
2004-07-28 02:46:24 +00:00
Jeff Johnston 31c27f7773 2004-07-06 Jeff Johnston <jjohnstn@redhat.com>
* language.h (struct_language_defn): Add new function pointer:
        la_class_name_from_physname.  Also add new prototype for
        language_class_name_from_physname.
        * language.c (language_class_name_from_physname): New function.
        (unk_lang_class_name): Ditto.
        (unknown_language_defn, auto_language_defn): Change
        to add unk_lang_class_name function pointer for
        la_class_name_from_physname.
        (local_language_defn): Ditto.
        * dwarf2read.c (guess_structure_name): Change to call
        language_class_name_from_physname.
        (determine_class_name): Ditto.
        * cp-support.c (class_name_from_physname): Renamed.
        (cp_class_name_from_physname): New name of function.
        * cp-support.h: Ditto.
        * c-lang.c (c_language_defn): Change to add NULL
        for class_name_from_physname function pointer.
        (cplus_language_defn): Change to add cp_class_name_from_physname.
        * jv-lang.c (java_class_name_physname): New function.
        (java_find_last_component): New static routine.
        (java_language_defn): Add java_class_name_from_physname pointer.
        * ada-lang.c (ada_language_defn): Change to add NULL
        for class_name_from_physname function pointer.
        * f-lang.c (f_language_defn): Ditto.
        * m2-lang.c (m2_language_defn): Ditto.
        * objc-lang.c (objc_language_defn): Ditto.
        * p-lang.c (pascal_language_defn): Ditto.
        * scm-lang.c (scm_language_defn): Ditto.
2004-07-06 19:29:31 +00:00
Paul N. Hilfinger e85c3284f3 * language.h (language_defn): Add new la_post_parser field.
* parser-defs.h (null_post_parser): New declaration (default for
la_post_parser).

* parse.c (parse_exp_1): Move code to parse_exp_in_context and
insert call to that function.
(parse_exp_in_context): New function, including code formerly in
parse_exp_1.  Calls language-dependent post-parser after
prefixification.
(parse_expression_in_context): New exported function.
(null_post_parser): New definition.
* expression.h (parse_expression_in_context): Add declaration.

* p-lang.c (pascal_language_defn): Add trivial post-parser.
* c-lang.c (c_language_defn): Ditto.
(cplus_language_defn): Ditto.
(asm_language_defn): Ditto.
(minimal_language_defn): Ditto.
* f-lang.c (f_language_defn): Ditto.
* jv-lang.c (java_language_defn): Ditto.
* language.c (unknown_language_defn): Ditto.
(auto_language_defn): Ditto.
(local_language_defn): Ditto.
* m2-lang.c (m2_language_defn): Ditto.
* scm-lang.c (scm_language_defn): Ditto.
* obj-lang.c (objc_language_defn): Ditto.
2004-04-10 22:10:01 +00:00
David Carlton b368761e45 2004-01-23 David Carlton <carlton@kealia.com>
Partial workaround for PR c++/1511:
	* cp-namespace.c: Include frame.h.
	(cp_lookup_transparent_type): New
	(cp_lookup_transparent_type_loop): New.
	* cp-support.h: Declare cp_lookup_transparent_type.
	* symtab.c (basic_lookup_transparent_type): Renamed from
	lookup_transparent_type.
	(lookup_transparent_type): Replace old body by a call to
	current_language->la_lookup_transparent_type.
	* symtab.h: Update copyright.  Declare
	basic_lookup_transparent_type.
	* language.h: Update copyright.
	(struct language_defn): Add la_lookup_transparent_type.
	* language.c: Update copyright.
	(unknown_language_defn): Add basic_lookup_transparent_type.
	(auto_language_defn): Add basic_lookup_transparent_type.
	(local_language_defn): Add basic_lookup_transparent_type.
	* ada-lang.c: Update copyright.
	(ada_language_defn): Add basic_lookup_transparent_type.
	* c-lang.c: Update copyright.
	(c_language_defn): Add basic_lookup_transparent_type.
	(cplus_language_defn): Add basic_lookup_transparent_type.
	(asm_language_defn): Add basic_lookup_transparent_type.
	(minimal_language_defn): Add basic_lookup_transparent_type.
	* f-lang.c: Update copyright.
	(f_language_defn): Add basic_lookup_transparent_type.
	* jv-lang.c: Update copyright.
	(java_language_defn): Add basic_lookup_transparent_type.
	* m2-lang.c: Update copyright.
	(m2_language_defn): Add basic_lookup_transparent_type.
	* objc-lang.c: Update copyright.
	(objc_language_defn): Add basic_lookup_transparent_type.
	* p-lang.c: Update copyright.
	(p_language_defn): Add basic_lookup_transparent_type.
	* scm-lang.c: Update copyright.
	(scm_language_defn): Add basic_lookup_transparent_type.
	* Makefile.in (cp-namespace.o): Depend on frame.h.

2004-01-23  David Carlton  <carlton@kealia.com>

	* gdb.cp/rtti.exp: Don't include full path in ${srcfile}.  Add
	test for cp_lookup_transparent_type.
	* gdb.cp/rtti1.cc: Update copyright.  Add n2::func and refer_to;
	call them.
2004-01-23 23:03:31 +00:00
Joel Brobecker 6084f43ac2 * language.h (language_defn): new field, la_word_break_characters.
* language.c (unknown_language_defn): Set new field to
        default_word_break_characters.
        (auto_language_defn): Likewise.
        (local_language_defn): Likewise.
        * ada-lang.c (ada_language_defn): Likewise.
        * c-lang.c (c_language_defn): Likewise.
        (cplus_language_defn): Likewise.
        (asm_language_defn): Likewise.
        (minimal_language_defn): Likewise.
        * f-lang.c (f_language_defn): Likewise.
        * jv-lang.c (java_language_defn): Likewise.
        * m2-lang.c (m2_language_defn): Likewise.
        * objc-lang.c (objc_language_defn): Likewise.
        * p-lang.c (pascal_language_defn): Likewise.
        * scm-lang.c (scm_language_defn): Likewise.
2003-10-06 22:38:03 +00:00
Paul N. Hilfinger 5f9769d172 * parser-defs.h (struct exp_descriptor): New definition, containing
language-specific info for printing, prefixifying, dumping, and
evaluating expressions.
(exp_descriptor_standard): Declare new variable.
(print_subexp): Make global and declare here (from expprint.c).
(dump_subexp): Ditto.
(dump_subexp_body_standard): Declare.
(operator_length_standard): Declare.
(op_name_standard): Declare.
(print_subexp): Declare.
(print_subexp_standard): Declare.

* language.h (struct language_defn): Add la_exp_desc field to hold
pointer to table for language-specific operators.
Remove evaluate_exp field, which is now in struct exp_descriptor.

* parse.c (operator_length): Move most code to new
operator_length_standard function.  Use language-specific information.
(operator_length_standard): New function taking most code from
operator_length.
(exp_descriptor_standard): New constant.

* expression.h (enum exp_opcode): Add definitions of OP_EXTENDED0
and OP_EXTENDED_LAST.

* expprint.c (print_subexp): Use language-specific print_subexp.
Make global; remove static declaration.
Move most code to print_subexp_standard.
(print_subexp_standard): New function, containing code formerly in
print_subexp.
(op_name): Add expression to argument signature.
Use langauge-specific op_name.
Move most code to op_name_standard.
(op_name_standard): New function, containing code formerly in op_name.
(dump_subexp): 	Use new version of op_name function.
Use language-specific dump_subexp_body, and move most existing code to
dump_subexp_body_standard.
(dump_raw_expression): Use new op_name interface.
(dump_subexp_body): Move most code to dump_subexp_body_standard.
(dump_subexp_body_standard): New function, containing code formerly
in dump_subexp_body.

* language.c (unknown_language): Add default la_exp_desc field and
remove evaluate_exp field.
(auto_language): Ditto.
(local_language): Ditto.
* f-lang.c (f_language_defn): Ditto.
* c-lang.c (c_language_defn): Ditto.
(cplus_language_defn): Ditto.
(asm_language_defn): Ditto.
(minimal_language_defn): Ditto.
* p-lang.c (pascal_language_defn): Ditto.
* m2-lang.c (m2_language_defn): Ditto.
* objc-lang.c (objc_language_defn): Ditto.

* jv-lang.c (exp_descriptor_java): New variable, containing
Java-specific expression evaluator.
(java_language_defn): Add la_exp_desc field and remove evaluate_exp
field.
* scm-lang.c (exp_descriptor_scm): New variable, containing
Scheme-specific expression evaluator.
(scm_language_defn): Add la_exp_desc field and remove evaluate_exp
field.
* objc-lang.c (print_object_command): Take evaluate_exp from the
la_exp_desc field.

* Makefile.in (eval.o): Add dependency on parser-defs.h.

* eval.c: Include parser-defs.h for the full declaration of
la_exp_desc's type.
(evaluate_subexp): Get evaluate_exp out of la_exp_desc field.
2003-09-25 08:40:45 +00:00
Paul N. Hilfinger f86f5ca3f5 2003-09-09 Paul N. Hilfinger <hilfingr@gnat.com>
* p-lang.c: Eliminate "register".
	* c-lang.c: Ditto.
	* expprint.c: Ditto.
	* f-lang.c: Ditto.
	* jv-lang.c: Ditto.
	* language.c: Ditto.
	* m2-lang.c: Ditto.
	* parse.c: Ditto.
	* scm-lang.c: Ditto.
	* objc-lang.c: Ditto.
2003-09-09 08:05:43 +00:00
David Carlton 1fcb515536 2003-05-19 David Carlton <carlton@bactrian.org>
Partial fix for PR c++/827.
	* cp-support.h: Include symtab.h.
	Declare cp_lookup_symbol_nonlocal, cp_lookup_symbol_namespace.
	* cp-namespace.c: Update contributors.
	(cp_lookup_symbol_nonlocal): New.
	(lookup_namespace_scope, cp_lookup_symbol_namespace)
	(lookup_symbol_file): Ditto.
	* c-lang.c (cplus_language_defn): Use cp_lookup_symbol_nonlocal.
	* block.h: Declare block_scope, block_using, block_global_block.
	* block.c (block_scope): New.
	(block_using, block_global_block): Ditto.
	* Makefile.in (cp_support_h): Depend on symtab_h.
	* config/djgpp/fnchange.lst: Add testsuite/gdb.c++/namespace1.cc.

2003-05-19  David Carlton  <carlton@bactrian.org>

	* gdb.c++/namespace.exp: Add namespace scope and anonymous
	namespace tests.
	Bump copyright date.
	* gdb.c++/namespace.cc: Add anonymous namespace and namespace C.
	(main): Call C::D::marker2.
	* gdb.c++/namespace1.cc: New file.
2003-05-20 03:56:29 +00:00
David Carlton 5f9a71c3d7 2003-05-19 David Carlton <carlton@bactrian.org>
* language.h (struct language_defn): Add 'la_value_of_this'
	and 'la_lookup_symbol_nonlocal' members.
	* symtab.h: Declare basic_lookup_symbol_nonlocal,
	lookup_symbol_static, lookup_symbol_global,
	lookup_symbol_aux_block.
	* symtab.c (lookup_symbol_aux): Call language hooks to determine
	if we should search fields of this and how to do static/global
	lookup.
	(lookup_symbol_aux_block): Make extern.
	(basic_lookup_symbol_nonlocal): New.
	(lookup_symbol_static, lookup_symbol_global): Ditto.
	* ada-lang.c (ada_language_defn): Set 'la_value_of_this' and
	'la_lookup_symbol_nonlocal' members.
	* c-lang.c (c_language_defn, cplus_language_defn)
	(asm_language_defn, minimal_language_defn): Ditto.
	* jv-lang.c (java_language_defn): Ditto.
	* language.c (unknown_language_defn, auto_language_defn)
	(local_language_defn): Ditto.
	* m2-lang.c (m2_language_defn): Ditto.
	* objc-lang.c (objc_language_defn): Ditto.
	* scm-lang.c (scm_language_defn): Ditto.
	* f-lang.c (f_language_defn): Ditto, and include value.h as well.
	* p-lang.c (pascal_language_defn): Ditto for both.
	* Makefile.in (f-lang.o): Depend on value_h.
	(p-lang.o): Ditto.
2003-05-20 01:55:18 +00:00
Andrew Cagney 973177d3c5 2003-05-15 Andrew Cagney <cagney@redhat.com>
* c-lang.c (c_printstr): Delete "extern inspect_it" declaration.
	* p-valprint.c (pascal_object_print_value_fields): Ditto.
	* p-lang.c (pascal_printstr): Ditto.
	* objc-lang.c (objc_printstr): Ditto.
	* m2-lang.c (m2_printstr): Ditto.
	* jv-valprint.c (java_print_value_fields): Ditto.
	* f-lang.c (f_printstr): Ditto.
	* cp-valprint.c (cp_print_value_fields): Ditto.  Include "valprint.h".
	* ada-valprint.c (inspect_it, repeat_count_threshold): Ditto, and
	for repeat_count_threshold.
	* Makefile.in (cp-valprint.o): Update dependencies.
2003-05-15 22:18:43 +00:00
Joel Brobecker 20a0e81d7a * defs.h (language): Add language_minimal enum value.
* c-lang.c (minimal_language_defn): New language definition.
        (_initialize_c_language): Add the new minimal language to the list
        of languages known to GDB.
2003-05-08 17:35:21 +00:00
Adam Fedor 9a3d7dfd2e * Makefile.in (c_lang.o, jv_lang.o, language.o): Add $(demangle_h).
* language.h (struct language_defn): Add la_demangle.
(language_demangle): Declare.
* language.c (language_demangle): New function.
(unk_lang_demangle): Likewise.
(unknown_language_defn, auto_language_defn, local_language_defn):
Add ukn_lang_demangle.
* ada-lang.c (ada_language_defn): Add NULL for la_demangle element.
* f-lang.c, m2-lang.c, p-lang.c, scm-lang.c: Likewise.
* c-lang.c (c_language_defn, asm_language_defn): Likewise.
(cplus_language_defn): Add cplus_demangle for la_demangle element.
* jv-lang.c (java_demangle): New function
(java_language_defn): Use it for la_demangle element.
* objc-lang.c (objc_demangle): Add options argument
(objc_language_defn): Use objc_demangle for la_demangle element.
* maint.c (maintenance_demangle): Replace switch with
call to language_demangle.
* utils.c (fprintf_symbol_filtered): Likewise.
2003-04-02 03:02:46 +00:00
Adam Fedor f636b87d5a * Makefile.in (infrun.o): Add $(language_h)
* infrun.c (handle_inferior_event): Use skip_language_trampoline
for language specific trampolines.
* language.h (struct language_defn): Add skip_trampoline.
(skip_language_trampoline): Declare.
* language.c (unk_lang_trampoline, skip_language_trampoline):
New functions.
(unknown_language_defn, auto_language_defn, local_language_defn):
Add ukn_lang_trampoline.
* ada-lang.c (ada_language_defn): Add NULL for language
specific skip_trampoline.
* c-lang.c, f-lang.c, jv-lang.c, m2-lang.c, p-lang.c,
scm-lang.c: Likewise.
* objc-lang.c (objc_skip_trampoline): New function.
(objc_language_defn): Add objc_skip_trampoline.
2003-03-26 03:39:44 +00:00
David Carlton a15ef5f5e3 2002-09-20 David Carlton <carlton@math.stanford.edu>
* c-lang.c: #include "gdb_string.h"
2002-09-20 17:37:11 +00:00
Kevin Buettner 234b45d446 Add support for distinct host and target character sets. 2002-09-20 00:24:01 +00:00
Tom Tromey a741e51424 * c-lang.c (c_emit_char): Don't treat \0 specially unless quoter
is "'".
2002-09-17 17:01:47 +00:00
Andrew Cagney 5ae5f59288 Fix some K&R isms. 2002-07-11 13:50:50 +00:00
Jim Blandy 84f0252a03 Expand preprocessor macros in C expressions.
* c-lang.h: #include "macroexp.h", for macro_lookup_ftype.
(scan_macro_expansion, scanning_macro_expansion,
finished_macro_expansion): New function declarations.
(expression_macro_lookup_func, expression_macro_lookup_baton): New
variable declarations.
* parser-defs.h (expression_context_pc): New declaration.
* parse.c (expression_context_pc): New variable.
(parse_exp_1): Set expression_context_pc, as well as
expression_context_block.
* c-exp.y (yylex): If we're not already reading the result of a
macro expansion, try to macro-expand the next token.  When we're
done scanning a macro expansion, switch back to the mainline text.
Commas and `if's in a macro's expansion don't terminate the input.
* c-lang.c: #include "macroscope.h" and "gdb_assert.h".
(macro_original_text, macro_expanded_text,
expression_macro_lookup_func, expression_macro_lookup_baton): New
variables.
(scan_macro_expansion, scanning_macro_expansion,
finished_macro_expansion, scan_macro_cleanup, null_macro_lookup,
c_preprocess_and_parse): New functions.
(c_language_defn, cplus_language_defn, asm_language_defn): Call
c_preprocess_and_parse, instead of c_parse.
* Makefile.in (c_lang_h): Note that this #includes macroexp.h.
(c-lang.o): Note dependency on macroscope.h and gdb_assert.h.
2002-05-17 17:57:48 +00:00
Daniel Jacobowitz f65ca430eb 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
Fix PR gdb/422.
        * c-lang.c (c_create_fundamental_type): Handle FT_COMPLEX,
        FT_DBL_PREC_COMPLEX, and FT_EXT_PREC_COMPLEX.
        * dwarf2read.c (read_base_type): Set TYPE_TARGET_TYPE for
        complex types.
        * stabsread.c (rs6000_builtin_type): Likewise.
        (read_sun_floating_type): Likewise.
2002-03-21 00:53:44 +00:00
Michael Chastain 6c6ea35e34 2002-02-13 Michael Chastain <mec@shout.net>
* defs.h: Kill CONST_PTR.
	* c-lang.h (c_builtin_types): Change CONST_PTR to simple "const".
	* c-lang.c (c_builtin_types): Likewise.
	* ch-lang.c (ch_builtin_types): Likewise.
	* f-lang.c (f_builtin_types): Likewise.
	* language.c (unknown_builtin_types): Likewise.
	* m2-lang.c (m2_builtin_types): Likewise.
	* p-lang.c (pascal_builtin_types): Likewise.
	* scm-lang.c (c_builtin_types): Likewise.
2002-02-13 18:49:30 +00:00
Jim Blandy ae23c7a369 * c-lang.c (c_emit_char): Print ASCII 11 as '\v', to match
ISO C, and our parser.  Print ASCII 0 as '\0', since that's what
people are used to seeing.
2001-12-19 06:29:18 +00:00
Jim Blandy 78a5120271 * c-lang.c (c_printstr, c_builtin_types, cplus_builtin_types):
Fix indentation.
2001-12-19 03:07:08 +00:00
Fred Fish 6edc140fcf Approved by Jim Blandy:
2001-12-08  Fred Fish  <fnf@redhat.com>
	* c-lang.c (c_create_fundamental_type): For FT_CHAR, pass
	TYPE_FLAG_NOSIGN to init_type() rather than setting it after the
	type is created.
2001-12-09 07:32:21 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Jimmy Guo 63872f9d95 2000-08-10 Jimmy Guo <guo@cup.hp.com>
* 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.
2000-08-11 01:02:35 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Kevin Buettner a14ed312fd PARAMS removal. 2000-05-28 01:12:42 +00:00
Jim Kingdon 745b8ca0fc Clean up compiler warnings:
* bcache.h, bcache.c, c-valprint.c, coffread.c, stabsread.c,
	stack.c, valprint.c: Change variables to unsigned.
	* bcache.c: Rearrange to avoid warnings about variables not being set.
	* c-lang.c, ch-lang.c, f-lang.c, m2-lang.c: Include valprint.h
	rather than declaring print_max and repeat_count_threashold
	ourselves (incorrectly).
	* valprint.h: Do declare repeat_count_threashold.
	* ch-exp.c: Use default case for internal error.
	* findvar.c: Don't omit argument type.
	* symtab.c: Remove unused variable.
2000-02-08 04:39:02 +00:00
Jason Molenda d9fcf2fb1c import gdb-2000-02-01 snapshot 2000-02-02 00:21:19 +00:00
Jason Molenda 2df3850c7b import gdb-1999-10-11 snapshot 1999-10-12 04:37:53 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda 392a587b05 import gdb-1999-05-25 snapshot 1999-05-25 18:09:09 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
David Taylor 65b07ddca8 all remaining *.c *.h files from hp merge. 1998-12-31 21:58:30 +00:00
Stu Grossman 242c0d8180 * c-lang.c (emit_char c_printchar c_printstr), c-lang.h (c_printstr)
ch-lang.c (chill_printstr chill_printchar) c-valprint.c (c_val_print)
	ch-valprint.c (chill_val_print) expprint.c (print_subexp) f-lang.c
	(f_printstr f_printchar emit_char) f-valprint.c (f_val_print) jv-lang.c
	(java_printchar java_emit_char) jv-valprint.c (java_value_print
	java_val_print) language.c (unk_lang_printchar unk_lang_printstr
	unk_lang_emit_char) language.h (struct language_defn LA_PRINT_STRING
	LA_EMIT_CHAR) m2-lang.c (m2_printstr m2_printchar emit_char) printcmd.c
	(print_formatted) scm-lang.c (scm_printstr) valprint.c
	(val_print_string) value.h (val_print_string):  Add emit_char routines
	to language_desc struct to allow finer control over language specific
	character output issues.  Add character width arg to printstr routines
	to allow handling of wchar_t/Unicode strings.  Fix c_printstr to handle
	wide characters.  Supply width argument to LA_PRINT_STRING and
	val_print_string.

	* jv-lang.c (java_object_type dynamics_objfile java_link_class_type
	get_dynamics_objfile get_java_object_type) jv-lang.h
	(get_java_object_type):  Make lots of things static.

	* expprint.c (dump_prefix_expression dump_subexp):  Move opcode name
	printing to common routine (op_name).
	* (dump_subexp):  Add support for OP_SCOPE.
1998-10-05 19:42:04 +00:00
Stu Grossman 8501c74270 * defs.h: Define CONST_PTR as blank if compiling with Microsoft
C, else it's `const'.
	* c-lang.c c-lang.h ch-lang.c f-lang.c language.c m2-lang.c
	scm-lang.c: Microsoft C can't hack const pointers.  Use CONST_PTR
	macro instead.
	* configure configure.in defs.h:  Use AC_C_CONST to figure out if
	the compiler supports const.  Gets rid of some cruft in defs.h.
	* dwarf2read.c:  <string.h> -> "gdb_string.h"
	* remote-sim.c:  Add prototypes.  Fix call to gdbsim_kill.
	* sparcl-tdep.c (download):  Add prototypes to write_routine and
	start_routine args.

	* mswin/gdbwin.c:  Don't include both varargs.h AND stdarg.h.  Get
	rid of varargs.h  Include string.h.
	* (gdbwin_update gdbwin_fputs regs_changed_f bpt_changed_f
	update):  Fix prototypes, fix calls.
	* (update):  Return value for catch_errors.
	* (run_execute_command togdb_command_from_tty togdb_command):
	Cleanup catching of errors from calls to execute_command.  Also,
	dup command string to avoid modifying const strings.
	* (togdb_breakinfo_i_init togdb_breakinfo_i_next):  Use 0 instead
	of NULL when see if b->address isn't set.
	* (bi_disable_bpt bi_enable_bpt bi_delete_all
	bi_delete_breakpoint):  Add arg to calls to update.
	* (gui_command):  Add prototype.
	* (mswin_query):  Fix prototype.
	* (_initialize_gdbwin):  Dup string to avoid modifying const.
	* (info_path togdb_get_info_path):  Remove const from decls cuz
	this can't be const (it points at malloc'ed memory).
	* (togdb_searchpath):  Remove const from path.  Dup string to
	avoid modifying const strings.
	* rindex -> strrchr.
	* (gdbwin_list_symbols):  Regexp param is const.
	* Fix lots of refs to psymtabs to deref correct pointers.
	* (togdb_set_breakpoint_sal):  Call set_breakpoint_sal with sal,
	not &sal.
	* mswin/gdbwin.h (togdb_searchpath togdb_get_info_path
	toget_set_info_path):  Fix prototypes to match reality.
	* mswin/gui.cpp:  Define _beginthreadex and _endthreadex routines
	with proper prototypes.
	* mswin/iface.cpp (gdbwin_fputs):  Define with correct number of args.
	* mswin/ser-win32s.c:  Fix defs of min and max.
	* mswin/serdll32.c (OpenComm16):  Make cbInQueue and cbOutQueue be
	USHORT.
	* (WriteComm16):  Change lpBug from LPVOID to LPCSTR.
	* mswin/serdll32.h:  Fix prototypes for OpenComm16 and WriteComm16.
1996-08-13 00:01:37 +00:00
Fred Fish b607efe714 See gdb ChangeLog entry with header:
Thu Jul 25 19:41:31 1996  Fred Fish  <fnf@cygnus.com>

for a rather huge set of changes.  I was going to put them here, but it
made cvs dump core.  :-(
1996-07-26 03:01:51 +00:00
Per Bothner 5e54886116 * ch-exp.y: Replaced by ...
* ch-exp.c:  New file.  Use recursive-descent.
	Recognize labelled array tuples and powerset ranges.
	* Makefile.in:  Update for no longer using yacc for ch-exp.

	* c-lang.c:  Make various functions non-static.
	* c-lang.h:  Add bunches of prototypes.
	* cp-valprint.c (cp_print_value_fields):  Also take address.
	(cp_print_value):  Likewise.  Use baselcass_offset.
	* stabsread.c (current_symbol):  New static variable.
	(type_synonym_name):  Remove.
	(read_type):  If copying, make copy be a TYPE_CODE_TYPEDEF.
	(read_array_type):  Don't need to handle undefined element type here.
	(cleanup_undefined_types):  Ditto.
	(read_range_type):  Look for Chill ranges.
	* valops.c (value_assign):  Fix case lval_internalvar - don't try
	to assign into old value (which might be too small!).
	(value_coerce_array):  No longer need special VALUE_REPEATED handling.
	(value_arg_coerce):  Cleaner array->pointer decay mechanism.
	(search_struct_field):  Use baseclass_offset rather than
	baseclass_addr.
	(value_slice):  Use get_discrete_bounds.
	* value.h (COERCE_VARYING_ARRAY):  Take type argumnt as well.
	* values.c (baseclass_offset):  Change parameter interface.
	(baseclass_addr):  Removed.
	* c-typeprint.c, c-valprint.c, ch-valprint.c, values.c, valops.c:
	Add check_typedef/CHECK_TYPEDEF as needed.
1995-11-30 03:26:34 +00:00
Fred Fish 6c9638b444 Update FSF address. 1995-08-02 03:41:12 +00:00
Per Bothner 7398958c7d * language.h (struct language_defn): New field evaluate_exp.
* c-lang.c (c_language_defn, cplus_language_defn, asm_langauge_defn),
	f-lang.c (f_language_defn), language.c (unknown_language_defn,
	auto_language_defn, local_language_defn), m2-lang.c (m2_language_defn):
	Set evaluate_exp to evaluate_subexp_standard.
	* ch-lang.c (evaluate_subexp_chill):  New function.  Chill-specific
	support for MULTI_SUBSCRIPT.
	(chill_language_defn):  Set evaluate_exp to evaluate_subexp_chill.
	* eval.c (enum noside):  Move from here ....
	* expression.h (enum noside):  ... to here.
	(evaluate_subexp_standard):  New prototype.
	* eval.c (evaluate_subexp):  Renamed to evaluate_subexp_standard.
	Removed lo-longer-needed test for chill_varying_type.
	(evaluate_subexp):  New.  Calls exp->language_defn->evaluate_exp.
1995-02-12 19:21:04 +00:00
Per Bothner ead95f8ac2 * eval.c (evaluate_subexp): Clean up handling of
OP_UNDETERMINED_ARGLIST (no backtracking, more general).

	* f-valprint.c (f_val_print):  Print TYPE_CODE_STRING using
	LA_PRINT_STRING, and not val_print_string (which reads from inferior).

	* ch-lang.c (chill_is_varying_struct), ch-lang.h:  Remve function
	duplicate function made redundant by chill_varying_type.

	Re-write of f77 string and complex number support:

	* language.h (struct language_defn):  New fields string_lower_bound
	and string_char_type.
	* c-lang.c (c_language_defn, cplus_language_defn, asm_language_defn),
	language.c (unknown_language_defn, auto_language_defn,
	local_language_defn), m2-lang.c (m2_language_defn), f-lang.c
	(f_language_defn), ch-lang.c (chill_language_defn):  Set new fields.
	* gdbtypes.c (create_string_type):  Use new string_char_type field.
	* valops.c (value_string):  Use new string_lower_bound field.

	* defs.h (TARGET_COMPLEX_BIT, TARGET_DOUBLE_COMPLEX_BIT):  Removed.
	* f-lang.c (f_create_fundamental_type, _initialize_f_language),
	m2-lang.c (m2_create_fundamental_type),
	gdbtypes.c (_initialize_gdbtypes):  Set TYPE_TARGET_TYPE of complex
	types.  Set their TYPE_CODEs to TYPE_CODE_COMPLEX.
	* mdebugread.c (mdebug_type_complex, mdebug_type_double_complex):
	Removed.  Use builtin_type_complex and builtin_type_double_complex.

	* gdbtypes.h (enum type_code):  Removed TYPE_CODE_LITERAL_STRING
	and TYPE_CODE_LITERAL_COMPLEX.
	* c-typeprint.c, f-typeprint.c, f-valprint.c, eval.c:  Removed uses of
	TYPE_CODE_LITERAL_STRING and TYPE_CODE_LITERAL_COMPLEX.
	* gdbtypes.c, gdbtypes.h (f77_create_literal_complex_type,
	f77_create_literal_string_type):  Removed.
	* value.h (VALUE_LITERAL_DATA, VALUE_SUBSTRING_MEMADDR,
	VALUE_SUBSTRING_MYADDR):  Removed.

	* expression.h (enum exp_opcode):  Rename OP_F77_LITERAL_COMPLEX to
	OP_COMPLEX.
	* parse.c:  Update accordingly.

	* f-valprint.c (f77_print_cmplx):  Removed.
	(f_val_print case TYPE_CODE_COMPLEX):  Re-write to use print_floating.

	* f-exp.y (STRING_LITERAL):  Use OP_STRING instead of OP_ARRAY.
	* eval.c (evaluate_subexp):  For case OP_ARRAY, don't call
	f77_value_literal_string.
	* valops.c, value.h (f77_value_literal_string, f77_value_substring,
	f77_assign_from_literal_string, f77_assign_from_literal_complex):
	Removed.
	(value_assign):  No longer need to handle literal types.
	* valops.c (f77_value_literal_complex), value.h:  Re-written and
	renamed to value_literal_complex.  Last arg is now a (complex) type.
	* valops.c (f77_cast_into_complex):  Re-written and renamed to
	cast_into_complex.
	* eval.c (evaluate_subexp):  Update accordingly.
1995-02-02 03:37:26 +00:00
Per Bothner acc4efdecd * language.h (struct language_defn): New field c_style_arrays.
* language.c (unknown_language_defn, auto_language_defn,
	local_language_defn), c-lang.c (c_language_defn, cplus_language_defn,
	asm_language_defn):  Set c_style_arrays to true.
	* m2-lang.c (m2_language_defn), ch-lang.c (chill_language_defn),
	f-lang.c (f_language_defn):  Set c_style_arrays to false.
	* valops.c (value_string):  If c_style_array is not set,
	allocate string in gdb (not inferior) using allocate_value.

	* value.h (COERCE_ARRAY), valops.c (value_addr, value_arg_coerce):
	Only call value_coerce_array if current_language->c_style_arrays.
	* values.c:  Add #include "language.h".  (Needed for COERCE_ARRAY.)

	* valops.c (chill_varying_type):  New predicate.
	* valops.c (value_cast):  Support assigning a fixed string or array
	to a variable string/array structure.

	* valarith.c (value_subscripted_rvalue):  Extra parameter lowerbound.
	Check index>=lowerbound, and then add lowerbound to index here,
	instead of in caller.  Generalize to arbitrary lval_types.
	(value_subscript):  Use enhanced value_subscripted_rvalue if
	c_style_arrays is false (and index is in range).
1995-01-26 02:32:25 +00:00
Stan Shebs 043b05b26b * language.h (struct language_defn): Remove unused field
la_longest_float.
	(longest_float): Remove, no longer used.
	* language.c (unknown_language_defn, auto_language_defn,
	local_language_defn): Remove init of la_longest_float field.
	* c-lang.c (c_language_defn, cplus_language_defn,
	asm_language_defn): Ditto.
	* m2-lang.c (m2_language_defn): Ditto.
1994-08-03 19:15:42 +00:00
Peter Schauer cef0333efd * dbxread.c, elfread.c, mipsread.c, nlmread.c, os9kread.c:
Move "no debugging symbols found" test to symfile.c.
	* symfile.c (syms_from_objfile, reread_symbols):  Add
	"no debugging symbols found" test.
	* coffread.c (init_stringtab):  Handle stripped files with a
	stringtab offset of zero gracefully.
	* osfsolib.c (solib_create_inferior_hook):  Use DYNAMIC flag from
	BFD instead of stop_pc heuristic to determine if it is a dynamically
	linked object file.
	* procfs.c (wait_fd):  Handle ENOENT error return from PIOCWSTOP
	ioctl, it indicates that the process has exited.
1994-07-06 08:01:52 +00:00
Peter Schauer 2c06801014 * c-lang.c (asm_language_defn): New definitions for language_asm,
mostly copied from c_language_defn, to avoid warnings when
	switching between c and asm stack frames.
1994-06-21 06:58:41 +00:00
Per Bothner e10cfcaa37 Fix value_print, which used to be ostensibly langauge-indepentdent,
but would print pointers and arrays in C syntax.  Instead, call
	a language-specific function.  See ChangeLog for details.
1994-06-05 01:43:40 +00:00
Jim Kingdon eade0c6ce8 * printcmd.c (decode_format): Don't blithely set the size for
an address to 'w'.  Make it 'g' or 'h', depending on TARGET_PTR_BIT.

	* defs.h: Just typedef CORE_ADDR to bfd_vma.  Include bfd.h.
	If BFD64, make a LONGEST a BFD_HOST_64_BIT.
	* defs.h (longest_to_int): Don't depend on CC_HAS_LONG_LONG; instead
	always just check against INT_MIN and INT_MAX (this also fixes things
	if sizeof (long) > sizeof (int), e.g. Alpha).
	* config/pa/tm-hppa.h, config/i386/sun386.h, config/rs6000/tm-rs6000.h:
	Don't define LONGEST or BUILTIN_TYPE_LONGEST.
	* gdbtypes.h: Remove BUILTIN_TYPE_LONGEST and
	BUILTIN_TYPE_UNSIGNED_LONGEST.
	* language.h, c-lang.c, ch-lang.c, m2-lang.c: Remove longest_int
	and longest_unsigned_int.
	* value.h (struct value): Just align to LONGEST, rather than worrying
	about CC_HAS_LONG_LONG.
	* valarith.c (value_binop, _initialize_valarith): Figure out type
	ourself based on sizeof (LONGEST) rather than relying on
	BUILTIN_TYPE_LONGEST.  The point is that we don't depend on
	CC_HAS_LONG_LONG anymore.
	* valprint.c (val_print_type_code_int): Just call
	extract_unsigned_integer directly, rather than going through
	unpack_long.
	* printcmd.c (decode_format): Remove code which would sometimes
	change 'g' size to 'w' for integers.  print_scalar_formatted handles
	printing huge integers well enough, thank you.
1994-02-03 03:18:58 +00:00
Jim Kingdon dda398c369 * gdbtypes.h: Add TYPE_FLAG_TARGET_STUB.
* gdbtypes.c (check_stub_type): On TYPE_FLAG_TARGET_STUB, do
	what cleanup_undefined_types does for arrays, except we clear
	TYPE_FLAG_TARGET_STUB if we fix up the type.
	* stabsread.c (cleanup_undefined_types): Add comments about how
	doing arrays here is no longer the clean way to do it.
	(read_array_type): Set TYPE_FLAG_TARGET_STUB as well as calling
	add_undefined_type.
	* c-typeprint.c, ch-typeprint.c: Move call to check_stub_type
	outside switch so it happens for all type codes.
	* cp-valprint.c (cp_print_value_fields): Recurse to val_print,
	instead of c_val_print, so that check_stub_type gets called.

	* gdbtypes.h, gdbtypes.c, m2-lang.c, ch-lang.c, c-lang.c: Remove
	TYPE_FLAG_SIGNED.  It was inconsistently set, never checked
	(except in recursive_dump_type), and is pointless.
1993-11-15 20:13:30 +00:00
Jim Kingdon 5576858065 * c-lang.c (c_printstr): Print "" to stream (like all the other
output from this function), not gdb_stdout.
1993-11-05 03:01:47 +00:00
Thomas Lord 199b2450f6 Change the stream argument to _filtered to GDB_FILE *.
Change all references to stdout/stderr to gdb_stdout/gdb_stderr.

Replace all calls to stdio output functions with calls to
corresponding _unfiltered functions (`fprintf_unfiltered')

Replaced calls to fopen for output to gdb_fopen.

Added sufficient goo to utils.c and defs.h to make the above work.

The net effect is that stdio output functions are only directly used
in utils.c.  Elsewhere, the _unfiltered and _filtered functions and
GDB_FILE type are used.

In the near future, GDB_FILE will stop being equivalant to FILE.

The semantics of some commands has changed in a very subtle way:
called in the right context, they may cause new occurences of
prompt_for_continue() behavior.  The testsuite doesn't notice anything
like this, though.

Please respect this change by not reintroducing stdio output
dependencies in the main body of gdb code.  All output from commands
should go to a GDB_FILE.

Target-specific code can still use stdio directly to communicate with
targets.
1993-11-01 22:25:23 +00:00
Jim Kingdon 5573d7d4b1 Tue Sep 28 09:45:38 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* symmisc.c (print_symbol): Use %02x not %2x for LOC_CONST_BYTES.

	Clean up problems with targets and hosts that have 64 bit longs
	and pointers and 32 bit ints.
	* breakpoint.c, buildsym.c, c-lang.c, c-valprint.c, ch-lang.c,
	ch-valprint.c, core.c, cp-valprint.c, dbxread.c, exec.c,
	expprint.c, gdbtypes.c, infcmd.c, language.c, language.h,
	m2-lang.c, maint.c, mips-tdep.c, mipsread.c, partial-stab.h,
	printcmd.c, remote-vx.c, solib.c, source.c, stack.c, symfile.c,
	symmisc.c, symtab.c, valops.c, valprint.c, xcoffexec.c:
	Change all printf formats from %x to %lx if outputting an address.
	Change la_*_format to use long format.
	local_hex_string, local_hex_string_custom now take an unsigned long
	argument, change all callers.
	* coffread.c (read_coff_symtab):  Remove superfluous cast for
	complaint output.
	* dbxread.c (end_psymtab):  Cast MSYMBOL_INFO to long, not int.
	* findvar.c, value.h (write_register):  Change register value to long.
	* gdbtypes.h (struct type):  Change `bitsize' to long as
	TYPE_FIELD_STATIC_PHYSNAME uses this field as a pointer.
	* inferior.h (struct inferior_status):  Change type of stop_pc to
	CORE_ADDR.
	* language.h (local_octal_string, local_octal_string_custom):
	Remove prototype, the functions are neither defined nor used.
	* mipsread.c (parse_symbol):  Use temporary variable for bitsize as
	f->bitsize is a long now.
	* objfiles.c (add_to_objfile_sections, build_objfile_section_table):
	Use unsigned long casts instead of int for abusing sections_end
	pointer as integer.
	* stack.c (parse_frame_specification):  Change type of `args' to
	CORE_ADDR for SETUP_ARBITRARY_FRAME.

	* printcmd.c (make_vasize):  Allow redefinition via MAKEVA_SIZE.
	* mipsread.c (parse_type):  Alpha cc now supports the t->continued
	bit, update algorithm to match the way the compiler uses it.
1993-09-28 17:43:25 +00:00
John Gilmore 961ccde634 Bugfix for length==0 case. 1993-02-18 23:49:40 +00:00
John Gilmore c5c00171a2 * c-lang.c (c_printstr): If a C string ends in a null, don't
print the null.
1993-02-18 12:18:23 +00:00
Fred Fish c4413e2c9b * c-exp.y (exp:STRING): Convert C strings into array-of-char
constants with an explicit null byte terminator.  OP_STRING is
	now used for real string types.
	* c-lang.c (builtin_type_*):  Move declarations to lang.c since
	they are used by all languages.
	* c-lang.c (_initialize_c_language):  Move initializations of
	builtin_type_* to lang.c.
	* c-typeprint.c (c_type_print_varspec_prefix,
	c_type_print_varspec_suffix):  TYPE_CODE_PASCAL_ARRAY renamed
	to TYPE_CODE_STRING.
	* c-valprint.c (c_val_print):  Change the way character arrays
	are printed as strings to be consistent with the way strings
	are printed when pointer-to-char types are dereferenced.
	Remove test of print_max before calling val_print_string, which
	now does it's own test.
	* eval.c (evaluate_subexp):  Add case for OP_ARRAY.
	* expprint.c (print_subexp, dump_expression):  Add case for OP_ARRAY.
	* expression.h (enum exp_opcode):  Add OP_ARRAY and document.
	* gdbtypes.c (builtin_type_*):  Add declarations moved from
	c-lang.c.
	* gdbtypes.c (create_string_type):  New function to create real
	string types.
	* gdbtypes.c (recursive_dump_type):  TYPE_CODE_PASCAL_ARRAY
	renamed to TYPE_CODE_STRING.
	* gdbtypes.c (_initialize_gdbtypes):  Add initializations of
	builtin_type_* types moved from c-lang.c.
	* gdbtypes.h (enum type_code):  TYPE_CODE_PASCAL_ARRAY renamed
	to TYPE_CODE_STRING.
	* gdbtypes.h (builtin_type_string):  Add extern declaration.
	* gdbtypes.h (create_string_type):  Add prototype.
	* m2-lang.c (m2_create_fundamental_type):  TYPE_CODE_PASCAL_ARRAY
	renamed to TYPE_CODE_STRING.
	* m88k-tdep.c (pushed_size):  TYPE_CODE_PASCAL_ARRAY renamed to
	TYPE_CODE_STRING.
	* mipsread.c (_initialize_mipsread):  TYPE_CODE_PASCAL_ARRAY
	renamed to TYPE_CODE_STRING.
	* parse.c (length_of_subexp, prefixify_subexp):  Add case for
	OP_ARRAY.
	* printcmd.c (print_formatted):  Recognize TYPE_CODE_STRING.
	* typeprint.c (print_type_scalar):  TYPE_CODE_PASCAL_ARRAY renamed
	to TYPE_CODE_STRING.
	* valops.c (allocate_space_in_inferior):  New function and
	prototype, using code ripped out of value_string.
	* valops.c (value_string):  Rewritten to use new function
	allocate_space_in_inferior, but temporarily disabled until some
	other support is in place.
	* valops.c (value_array):  New function to create array constants.
	* valprint.c (val_print_string):  Add comment to document use,
	complete rewrite to fix several small buglets.
	* value.h (value_array):  Add prototype.
	* value.h (val_print_string):  Change prototype to match rewrite.
	**** start-sanitize-chill ****
	* ch-valprint.c (chill_val_print):  Add case for TYPE_CODE_STRING.
	* ch-exp.y (match_character_literal):  Disable recognition of
	control sequence form of character literals and document why.
	**** end-sanitize-chill ****
1993-01-16 05:15:58 +00:00
Fred Fish a8a69e6332 * Makefile.in (VERSION): Bump to 4.7.4.
* Makefile.in (SFILES_MAINDIR):  Add typeprint.c, c-typeprint.c,
	  m2-typeprint.c, c-valprint.c cp-valprint.c m2-valprint.c.
	* Makefile.in (HFILES):  Add valprint.h.
	* Makefile.in (OBS):  Add typeprint.o, c-typeprint.o,
	  m2-typeprint.o, c-valprint.o, cp-valprint.o m2-valprint.o.
	* typeprint.c, typeprint.h:  New files for language independent
	  type printing functions.
	* c-typeprint.c, m2-typeprint.c:  New files for language dependent
	  type printing functions and definitions.
	* valprint.h:  New include file for language independent value
	  printing definitions.
	* c-valprint.c, cp-valprint.c, m2-valprint.c:  New files for language
	  dependent value printing functions.
	* c-exp.y (production ptype):  Add range_type variable and use new
	  create_range_type function.
	* c-exp.y (tokentab2, tokentab3), c-lang.c (c_op_print_tab),
	  infcmd.c (path_var_name), language.c (unk_op_print_tab),
	  m2-lang.c (m2_op_print_tab):  Change from ANSI-obsolescent
	  "const static" to ANSI-conformant "static const".
	* c-exp.y (c_create_fundamental_type):  Remove unused nbytes.
	* c-exp.y (c_language_defn, cplus_language_defn):  Add c_print_type,
	  and c_val_print.
	* c-lang.h (c_print_type, c_val_print):  Add prototypes.
	* coffread.c (decode_type):  Add range_type variable and call to
	  new create_range_type function.
	* complaints.c (complain):  Remove unused val variable.
	* complaints.c (_initialize_complaints):  Make it void.
	* convex-tdep.c (value_of_trapped_internalvar):  Add range_type
	  variable and call new create_range_type function.
	* defs.h (enum val_prettyprint):  Move enum from value.h to here
	  so we can avoid having to include value.h just for prototypes that
	  need the enum (thanks ANSI).
	* dwarfread.c (struct_type):  Local anonymous_size variable is
	  only used if !BITS_BIG_ENDIAN.
	* dwarfread.c (decode_subscript_data_item):  Add rangetype
	  variable and call new create_range_type function.
	* elfread.c (elf_symfile_read):  Remove unused dbx and text_sect
	  variables.
	* eval.c (evaluate_subexp):  Remove unused local variable name
	  and the statement with no side effects that initializes it.
	* expprint.c (print_subexp):  Change local_printstr to
	  LA_PRINT_STRING.
	* gdbtypes.c (create_range_type):  New function that creates
	  a range type using code fragments from object file readers as
	  an example of what has to be initialized.
	* gdbtypes.c (create_array_type):  Removed index_type, low_bound,
	  and high_bound parameters, replaced with a single range_type
	  parameter.  Change function body to use passed in range_type
	  rather than handcrafting one.
	* gdbtypes.h (create_range_type):  Add prototype.
	* gdbtypes.h (create_array_type):  Change prototype parameters.
	* infrun.c (normal_stop):  Remove unused local variables tem and c.
	* infrun.c (hook_stop_stub):  Return 0 rather than random value.
	* language.c (unk_lang_print_type, unk_lang_val_print):  Add
	  stub functions that call error if called.
	* language.c (unknown_language_defn, auto_language_defn,
	  local_language_defn):  Add initializers unk_lang_print_type and
	  unk_lang_val_print.
	* language.h (struct language_defn):  Reformat for larger
	  comments, add la_print_type and la_val_print members.  Add
	  LA_PRINT_TYPE and LA_VAL_PRINT macros.  Change local_printchar
	  to LA_PRINT_CHAR and local_printstr to LA_PRINT_STRING.
	* m2-lang.c (m2_create_fundamental_type):  Remove unused local
	  variable nbytes.
	* m2-lang.c (m2_language_defn):  Add initializers m2_print_type
	  and m2_val_print.
	* m2-lang.h (m2_print_type, m2_val_print):  Add prototypes.
	* main.c (execute_command): Remove unused local variable cmdlines.
	* main.c (echo_command), stabsread.c (read_type), printcmd.c
	  (clear_displays), symmisc.c (block_depth), values.c
	  (clear_value_history):
	  Make testing of truth value of assignment result explicit.
	* mipsread.c (upgrade_type):  Update FIXME to include future use
	  of create_range_type.
	* printcmd.c (ptype_command, ptype_eval, whatis_command,
	  whatis_exp, maintenance_print_type):  Move prototypes and functions
	  to new typeprint.c.
	* printcmd.c (_initialize_printcmd):  Move add_com calls for
	  ptype_command and whatis_command to new typeprint.c.
	* ser-bsd.c (serial_open):  Remove unused variable sgttyb.
	* source.c (find_source_lines):  Local variable c only used
	  when LSEEK_NOT_LINEAR is defined.
	* stabsread.c (read_array_type):  Use new create_range_type
	  function.
	* stabsread.c (read_range_type):  Add new index_type variable and
	  call new create_range_type function rather than handcrafting
	  range types.
	* symmisc.c (type_print_1):  Change usages to LA_PRINT_TYPE.
	* symtab.c (typedef_print usages):  Use c_typedef_print, renamed.
	* symtab.c (type_print_base usages):  Use c_type_print_base.
	* symtab.c (type_print_varspec_prefix usages):  Use
	  c_type_print_varspec_prefix.
	* symtab.c (type_print_method_args usages):  Use
	  cp_type_print_method_args.
	* valprint.c:  Completely ripped apart and the fragments used
	  to create c-valprint.c, cp-valprint.c, m2-valprint.c, and
	  valprint.h.  Remaining stuff is language independent.
	* value.h (struct fn_field):  Forward declare for prototypes.
	* value.h (type_print_1):  Remove prototype.
	* value.h (enum val_prettyprint):  Moved to defs.h.
	* value.h (typedef_print):  Prototype renamed to c_typedef_print.
	* value.h (baseclass_offset):  Add prototype.
	**** start-sanitize-chill ****
	* Makefile.in (SFILES_MAINDIR):  Add ch-typeprint.c, ch-valprint.c.
	* Makefile.in (OBS):  Add ch-typeprint.o, ch-valprint.o.
	* ch-typeprint.c:  New file for language dependent type printing.
	* ch-valprint.c:  New file for language dependent value printing.
	* ch-exp.y (parse_number):  Remove prototype and stub function.
	* ch-exp.y (decode_integer_literal):  Removed unused digits and
	  temp variables.
	* ch-exp.y (convert_float):  Completely ifdef out for now.
	* ch-exp.y (tokentab2, tokentab3, tokentab4, tokentab5),
	  ch-lang.c (chill_op_print_tab):
	  Change from ANSI-obsolescent "const static" to ANSI-conformant
	  "static const".
	* ch-exp.y (yylex):  Add unhandled storage class enumeration
	  literals to switch statement for completeness.
	* ch-lang.c (chill_create_fundamental_types):  Remove unused
	  nbytes variable.  Change dummy type to 2 bytes to match int.
	  Handle FT_VOID types gratuituously added to chill DWARF by
	  compiler.  Change FT_CHAR case to generate an TYPE_CODE_CHAR
	  type rather than a one byte TYPE_CODE_INT type.
	* ch-lang.c (chill_language_defn):  Add chill_print_type and
	  chill_val_print.
	* ch-lang.h (chill_print_type, chill_val_print):  Add prototypes.
	**** end-sanitize-chill ****
1992-12-18 20:21:32 +00:00
Fred Fish d62e7a20d8 * c-lang.c (_initialize_c_language): Name changed from
_initialize_c_exp.
	* m2-lang.c (_initialize_m2_language):  Name changed from
	_initialize_m2_exp.
	* m2-lang.c (_initialize_m2_language):  Change malloc to xmalloc since
	it is no longer inside m2-exp.y, where it was remapped by Makefile.
	**** start-sanitize-chill ****
	* ch-lang.c (_initialize_chill_language):  Name changed from
	_initialize_chill_exp.
	**** end-sanitize-chill ****
1992-12-09 07:01:43 +00:00
Fred Fish 22e3975901 * c-exp.y, m2-exp.y: Migrate code that has nothing to do with
expression parsing into c-lang.c and m2-lang.c respectively.
	* c-lang.c, m2-lang.c:  New files, code migrated from c-exp.y and
	m2-exp.y respectively.
	* c-lang.h, m2-lang.h:  New files, internal interfaces between c-*
	and m2-* files respectively.
	* Makefile.in (SFILES_MAINDIR):  Add c-lang.c, m2-lang.c.
	* Makefile.in (HFILES):  Add c-lang.h, m2-lang.h.
	* Makefile.in (OBS):  Add c-lang.o, m2-lang.o.
	* expression.h (struct block):  Forward declaration for prototypes.
	* language.h (struct objfile):  Forward declaration for prototypes.
	**** start-sanitize-chill ****
	* Makefile.in (SFILES_MAINDIR):  Add ch-lang.c.
	* Makefile.in (HFILES):  Add ch-lang.h.
	* Makefile.in (OBS):  Add ch-lang.o.
	* ch-exp.y:  Migrate code that has nothing to do with expression
	parsing into ch-lang.c.
	* ch-lang.c:  New file, code migrated from c-exp.y.
	* ch-lang.h:  New file, internal interface between ch-* files.
	**** end-sanitize-chill ****
1992-12-09 06:50:30 +00:00