summaryrefslogtreecommitdiff
path: root/gdb/c-valprint.c
Commit message (Collapse)AuthorAgeFilesLines
* * defs.h (enum val_prettyformat): Renamed from val_prettyprint.Doug Evans2013-07-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | Enum values rename as well. All uses updated. * valprint.h (value_print_options): Rename member pretty to pretty format. Rename member prettyprint_arrays to prettyformat_arrays. Rename member prettyprint_structs to prettyformat_structs. All uses updated. (get_no_prettyformat_print_options): Renamed from get_raw_print_options. * valprint.c (get_no_prettyformat_print_options): Renamed from get_raw_print_options. All callers updated. (show_prettyformat_structs): Renamed from show_prettyprint_structs. All callers updated. (show_prettyformat_arrays): Renamed from show_prettyprint_arrays. All callers updated. (_initialize_valprint): Improve help text for "set print pretty" and "set print arrays". testsuite/ * gdb.base/default.exp: Update expected output of "show print array" and "show print pretty".
* PR c++/15401:Tom Tromey2013-05-221-12/+12
| | | | | | | | * c-valprint.c (c_value_print): Use value_addr for references. Convert back to reference type with value_ref. gdb/testsuite * gdb.cp/class2.cc (main): New local 'aref'. * gdb.cp/class2.exp: Check printing of 'aref'.
* * minsyms.h (struct bound_minimal_symbol): New.Tom Tromey2013-04-081-7/+7
| | | | | | | | | | | | | | | | | | | | | | | (lookup_minimal_symbol_and_objfile): Return bound_minimal_symbol. Remove objfile argument. (lookup_minimal_symbol_by_pc_section, lookup_minimal_symbol_by_pc): Return bound_minimal_symbol. * minsyms.c (lookup_minimal_symbol_by_pc_1) (lookup_minimal_symbol_by_pc_section, lookup_minimal_symbol_by_pc): Return bound_minimal_symbol. (in_gnu_ifunc_stub): Update. (lookup_minimal_symbol_and_objfile): Return bound_minimal_symbol. Remove 'objfile_p' argument. (lookup_solib_trampoline_symbol_by_pc): Update. * ada-tasks.c, amd64-windows-tdep.c, arm-tdep.c, arm-wince-tdep.c, block.c, blockframe.c, breakpoint.c, btrace.c, c-valprint.c, dwarf2loc.c, elfread.c, frame.c, frv-tdep.c, glibc-tdep.c, gnu-v2-abi.c, gnu-v3-abi.c, hppa-hpux-tdep.c, i386-tdep.c, ia64-tdep.c, infcall.c, infcmd.c, jit.c, linux-fork.c, m32c-tdep.c, m68hc11-tdep.c, maint.c, mips-tdep.c, p-valprint.c, parse.c, ppc-linux-tdep.c, ppc-sysv-tdep.c, printcmd.c, rs6000-tdep.c, sh64-tdep.c, stack.c, symtab.c, tui/tui-disasm.c: Update.
* Update years in copyright notice for the GDB files.Joel Brobecker2013-01-011-2/+1
| | | | | | | Two modifications: 1. The addition of 2013 to the copyright year range for every file; 2. The use of a single year range, instead of potentially multiple year ranges, as approved by the FSF.
* * c-exp.y (block, variable, name_not_typename, lex_one_token,Tom Tromey2012-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | classify_name): Update. * c-valprint.c (c_val_print): Update. * f-exp.y (yylex): Update. * go-exp.y (package_name_p, classify_packaged_name) (classify_name): Update. * jv-exp.y (push_variable): Update. * m2-exp.y (variable): Update. * mi/mi-cmd-stack.c (list_args_or_locals): Update. * p-exp.y (block, variable, yylex): Update. * p-valprint.c (pascal_val_print): Update. * parse.c (write_dollar_variable): Update. * printcmd.c (address_info): Update. * python/py-symbol.c (gdbpy_lookup_symbol): Update. * symtab.c (lookup_symbol_aux, lookup_symbol_in_language) (lookup_symbol): Change type of 'is_a_field_of_this'. (check_field): Add 'is_a_field_of_this' argument. * symtab.h (struct field_of_this_result): New. (lookup_symbol, lookup_symbol_in_language): Update.
* PR gdb/14288Keith Seitz2012-11-101-1/+17
| | | | | | | | | | | | | | | | | | | | | * c-valprint.c (c_val_print): For character arrays with "print null" option on, print ellipses if the output is truncated and the next character is not \000. * valprint.c (MAX_WCHARS): Define. (WCHAR_BUFLEN): Likewise. (WCHAR_BUFLEN_MAX): Likewise. (struct converted_character): New structure. (count_next_character): New function. (print_converted_chars_to_obstack): New function. (generic_printstr): Rewrite using count_next_character and print_converted_chars_to_obstack. * gdb.base/printcmds.c: Add invalid_XXX globals for repeated byte tests. * gdb.base/printcmds.exp (test_repeat_bytes): New procedure. * gdb.base/wchar.c (main): Add and construct a wchar_t array with repeated characters. * gdb.base/wchar.exp: Add repeated character tests.
* 2012-05-18 Sergio Durigan Junior <sergiodj@redhat.com>sergiodj2012-05-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ada-lang.c: * ada-tasks.c: * ada-varobj.c: * amd64-darwin-tdep.c: * arm-symbian-tdep.c: * arm-tdep.c: * avr-tdep.c: * ax-gdb.c: * bfin-linux-tdep.c: * breakpoint.c: * c-valprint.c: * cli/cli-cmds.c: * coffread.c: * cp-support.c: * cris-tdep.c: * dwarf2-frame-tailcall.c: * dwarf2-frame.c: * dwarf2expr.c: * dwarf2loc.c: * dwarf2read.c: * elfread.c: * eval.c: * expprint.c: * f-valprint.c: * frv-tdep.c: * h8300-tdep.c: * hppa-hpux-tdep.c: * hppa-tdep.c: * hppanbsd-tdep.c: * i386-nto-tdep.c: * i386-tdep.c: * i387-tdep.c: * ia64-tdep.c: * jit.c: * linespec.c: * linux-tdep.c: * lm32-tdep.c: * m2-valprint.c: * m32c-tdep.c: * m32r-rom.c: * m32r-tdep.c: * m68k-tdep.c: * m68klinux-tdep.c: * mi/mi-main.c: * microblaze-tdep.c: * mips-linux-tdep.c: * mips-tdep.c: * mn10300-tdep.c: * p-valprint.c: * parse.c: * ppc-linux-tdep.c: * ppc-sysv-tdep.c: * printcmd.c: * python/py-finishbreakpoint.c: * python/py-inferior.c: * python/py-infthread.c: * python/py-type.c: * python/python.c: * remote-fileio.c: * remote-m32r-sdi.c: * remote-mips.c: * reverse.c: * rl78-tdep.c: * rs6000-aix-tdep.c: * rs6000-tdep.c: * s390-tdep.c: * score-tdep.c: * sh64-tdep.c: * skip.c: * solib-darwin.c: * solib-dsbt.c: * solib-frv.c: * sparc-tdep.c: * spu-multiarch.c: * spu-tdep.c: * stack.c: * symfile.c: * symtab.c: * tic6x-tdep.c: * tracepoint.c: * v850-tdep.c: * valarith.c: * valprint.c: * value.c: * xcoffread.c: * xtensa-tdep.c: * ada-lang.c: * ada-tasks.c: * ada-varobj.c: * amd64-darwin-tdep.c: * arm-symbian-tdep.c: * arm-tdep.c: Delete unused variables.
* PR exp/13907:Tom Tromey2012-05-181-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * valprint.h (struct value_print_options) <symbol_print>: New field. * valprint.c (user_print_options): Add default for symbol_print. (show_symbol_print): New function. (generic_val_print): Respect symbol_print. (_initialize_valprint): Add "print symbol" setting. * f-valprint.c (f_val_print): Respect symbol_print. * c-valprint.c (c_val_print): Respect symbol_print. * NEWS: Update. * printcmd.c (print_address_symbolic): Return int. Ignore some zero-size symbols. (print_address_demangle): Return int. * defs.h: (print_address_symbolic): Return int. * value.h (print_address_demangle): Return int. doc * gdb.texinfo (Print Settings): Document 'set print symbol'. testsuite * gdb.mi/mi-var-cmd.exp: Update. * gdb.objc/basicclass.exp (do_objc_tests): Update. * gdb.cp/virtbase.exp: Update. * gdb.cp/classes.exp (test_static_members): Update. * gdb.cp/casts.exp: Update. * gdb.base/pointers.exp: Update. * gdb.base/funcargs.exp (pointer_args): Update. (structs_by_reference): Update. * gdb.base/find.exp: Update. * gdb.base/call-strs.exp: Send "set print symbol off". * gdb.base/call-ar-st.exp: Update. * gdb.ada/fun_addr.exp: Update. * gdb.base/printcmds.exp (test_print_symbol): New proc. Call it. (test_print_repeats_10, test_print_strings) (test_print_char_arrays): Update.
* * valprint.c (val_print_string): Don't print leading space.Tom Tromey2012-05-181-2/+18
| | | | | | | | | | | | | | * p-valprint.c (pascal_val_print) <TYPE_CODE_PTR>: Optionally print space before string or vtbl. * m2-valprint.c (print_unpacked_pointer): Optionally print space before string. * jv-valprint.c (java_value_print): Print space before string. * go-valprint.c (print_go_string): Print space before string. * f-valprint.c (f_val_print) <TYPE_CODE_PTR>: Optionally print space before string. * c-valprint.c (c_val_print) <TYPE_CODE_PTR>: Optionally print space before string or vtbl. * auxv.c (fprint_target_auxv): Print space after address.
* * printcmd.c (print_address_demangle): Add 'opts' argument.Tom Tromey2012-05-181-6/+3
| | | | | | | | | | | | | | | | * p-valprint.c (pascal_val_print): Update. * jv-valprint.c (java_val_print): Update. * value.h: Update. * valprint.c (generic_val_print): Update. (print_function_pointer_address): Add 'options' argument. Remove 'addressprint' argument. Update. * m2-valprint.c (print_unpacked_pointer): Update. * gnu-v3-abi.c (print_one_vtable): Update. (gnuv3_print_method_ptr): Update. * f-valprint.c (f_val_print): Update. * cp-valprint.c (cp_print_value_fields): Update. * valprint.h (print_function_pointer_address): Update. * c-valprint.c (c_val_print): Update.
* * valprint.h (struct generic_val_print_decorations): New.Tom Tromey2012-03-011-241/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (generic_val_print): Declare. * valprint.c (generic_val_print): New function. * p-valprint.c (p_decorations): New global. (pascal_val_print) <TYPE_CODE_REF, TYPE_CODE_ENUM, TYPE_CODE_FLAGS, TYPE_CODE_FUNC, TYPE_CODE_RANGE, TYPE_CODE_INT, TYPE_CODE_FLT, TYPE_CODE_VOID, TYPE_CODE_ERROR, TYPE_CODE_UNDEF, TYPE_CODE_BOOL, TYPE_CODE_CHAR>: Call generic_val_print. * m2-valprint.c (m2_decorations): New global. (m2_val_print) <TYPE_CODE_REF, TYPE_CODE_ENUM, TYPE_CODE_FUNC, TYPE_CODE_BOOL, TYPE_CODE_RANGE, TYPE_CODE_INT, TYPE_CODE_CHAR, TYPE_CODE_FLT, TYPE_CODE_METHOD, TYPE_CODE_VOID, TYPE_CODE_UNDEF, TYPE_CODE_ERROR>: Call generic_val_print. * f-valprint.c (f_decorations): New global. (f_val_print): Use print_function_pointer_address. <TYPE_CODE_REF, TYPE_CODE_FUNC, TYPE_CODE_CHAR, TYPE_CODE_FLAGS, TYPE_CODE_FLT, TYPE_CODE_VOID, TYPE_CODE_ENUM, TYPE_CODE_RANGE, TYPE_CODE_BOOL, TYPE_CODE_COMPLEX, TYPE_CODE_UNDEF>: Call generic_val_print. * c-valprint.c (c_decorations): New global. (c_val_print) <TYPE_CODE_MEMBERPTR, TYPE_CODE_REF, TYPE_CODE_ENUM, TYPE_CODE_FLAGS, TYPE_CODE_FUNC, TYPE_CODE_METHOD, TYPE_CODE_BOOL, TYPE_CODE_RANGE, TYPE_CODE_CHAR, TYPE_CODE_FLT, TYPE_CODE_DECFLOAT, TYPE_CODE_VOID, TYPE_CODE_ERROR, TYPE_CODE_UNDEF, TYPE_CODE_COMPLEX>: Call generic_val_print. * ada-valprint.c (ada_val_print_1) <TYPE_CODE_FLAGS>: Remove case.
* * valprint.c (val_print): Update.Tom Tromey2012-03-011-13/+4
| | | | | | | | | | | | | | | | | | | | | * p-valprint (pascal_val_print): Return void. * p-lang.h (pascal_val_print): Return void. * m2-valprint.c (m2_val_print): Return void. * m2-lang.h (m2_val_print): Return void. * language.h (struct language_defn) <la_val_print>: Return void. * language.c (unk_lang_val_print): Return void. * jv-valprint.c (java_val_print): Return void. * jv-lang.h (java_val_print): Return void. * f-valprint.c (f_val_print): Return void. * f-lang.h (f_val_print): Return void. * d-valprint.c (d_val_print): Return void. (dynamic_array_type): Update. * d-lang.h (d_val_print): Return void. * c-valprint.c (c_val_print): Return void. * c-lang.h (c_val_print): Return void. * ada-valprint.c (ada_vada_val_print, ada_val_print_1): Return void. * ada-lang.h (ada_val_print): Return void.
* * value.h (value_print): Return void.Tom Tromey2012-03-011-14/+16
| | | | | | | | | | | | | | | | | * valprint.c (value_print): Return void. * p-valprint.c (pascal_value_print): Return void. * p-lang.h (pascal_value_print): Return void. * language.h (struct language_defn) <la_value_print>: Return void. * language.c (unk_lang_value_print): Return void. * jv-valprint.c (java_value_print): Return void. * jv-lang.h (java_value_print): Return void. * f-valprint.c (c_value_print): Don't declare. Include c-lang.h. * c-valprint.c (c_value_print): Return void. * c-lang.h (c_value_print): Return void. * ada-valprint.c (ada_value_print): Return void. * ada-lang.h (ada_value_print): Return void.
* * c-valprint.c (print_function_pointer_address): Move...Tom Tromey2012-03-011-25/+0
| | | | | | * valprint.c: ... here. Make non-static. * m2-valprint.c (print_function_pointer_address): Remove. * valprint.h (print_function_pointer_address): Declare.
* gdb/xgsa2012-02-211-13/+4
| | | | | | | | | | | | | | | | | | | * c-valprint.c (c_value_print): Use value_rtti_indirect_type instead of value_rtti_target_type. * eval.c (evaluate_subexp_standard): Use value_rtti_indirect_type instead of value_rtti_target_type. * typeprint.c (whatis_exp): Use value_rtti_indirect_type instead of value_rtti_target_type. * valops.c (value_ind): Extract function readjust_indirect_value_type. (value_rtti_target_type): Rename to ... (value_rtti_indirect_type): ... here and make it indirect. Update function comment. * value.c (readjust_indirect_value_type): New function. (coerce_ref): Support for enclosing type setting for references with readjust_indirect_value_type. * value.h (readjust_value_type): New declaration. (value_rtti_target_type): Rename to ... (value_rtti_indirect_type): ... here.
* gdbTom Tromey2012-01-161-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | PR python/13281: * gdbtypes.h (TYPE_FLAG_ENUM): New macro. (struct main_type) <flag_flag_enum>: New field. * dwarf2read.c (process_enumeration_scope): Detect "flag" enums. * NEWS: Add entries. * c-valprint.c (c_val_print) <TYPE_CODE_ENUM>: Handle "flag" enums. * python/lib/gdb/printing.py (_EnumInstance): New class. (FlagEnumerationPrinter): Likewise. gdb/doc * gdb.texinfo (gdb.printing): Document FlagEnumerationPrinter. gdb/testsuite * gdb.base/printcmds.c (enum flag_enum): New. (three): New global. * gdb.base/printcmds.exp (test_print_enums): Add test for flag enum printing. * gdb.python/py-pp-maint.py (build_pretty_printer): Instantiate FlagEnumerationPrinter. * gdb.python/py-pp-maint.exp: Add tests for FlagEnumerationPrinter. * gdb.python/py-pp-maint.c (enum flag_enum): New. (fval): New global.
* Copyright year update in most files of the GDB Project.Joel Brobecker2012-01-041-3/+2
| | | | | | gdb/ChangeLog: Copyright year update in most files of the GDB Project.
* gdb/Jan Kratochvil2011-10-091-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Display @entry parameter values even for references. * ada-valprint.c (ada_val_print_1) <TYPE_CODE_REF>: Try also coerce_ref_if_computed. * c-valprint.c (c_val_print) <TYPE_CODE_REF>: Likewise. * dwarf2expr.c (dwarf_block_to_dwarf_reg_deref): New function. (execute_stack_op) <DW_OP_GNU_entry_value>: Add -1 deref_size to the existing push_dwarf_reg_entry_value call. Add new detection calling dwarf_block_to_dwarf_reg_deref. Update the error message. (ctx_no_push_dwarf_reg_entry_value): New parameter deref_size. * dwarf2expr.h (struct dwarf_expr_context_funcs) <push_dwarf_reg_entry_value>: Add new parameter deref_size, describe it in the comment. (ctx_no_push_dwarf_reg_entry_value): Add new parameter deref_size. (dwarf_block_to_dwarf_reg_deref): New declaration. * dwarf2loc.c (dwarf_entry_parameter_to_value): Add new parameter deref_size, describe it in the function comment. New variables data_src and size, fetch the alternative block accoring to DEREF_SIZE. (dwarf_expr_push_dwarf_reg_entry_value): Add new parameter deref_size, describe it in the function comment. Fetch the alternative block accoring to DEREF_SIZE. (entry_data_value_coerce_ref, entry_data_value_copy_closure) (entry_data_value_free_closure, entry_data_value_funcs): New. (value_of_dwarf_reg_entry): New variables checked_type, target_type, outer_val, target_val, val and addr. Try to fetch and create also referenced value content. (pieced_value_funcs): NULL value for coerce_ref. (needs_dwarf_reg_entry_value): Add new parameter deref_size. * f-valprint.c (f_val_print) <TYPE_CODE_REF>: Try also coerce_ref_if_computed. * opencl-lang.c (opencl_value_funcs): NULL value for coerce_ref. * p-valprint.c (pascal_val_print) <TYPE_CODE_REF>: Likewise. * stack.c (read_frame_arg): Compare also dereferenced values. * value.c (value_computed_funcs): Make the parameter v const, use value_lval_const for it. (value_lval_const, coerce_ref_if_computed): New function. (coerce_ref): New variable retval. Call also coerce_ref_if_computed. * value.h (struct lval_funcs): New field coerce_ref. (value_computed_funcs): Make the parameter v const. (value_lval_const, coerce_ref_if_computed): New declarations. gdb/testsuite/ Display @entry parameter values even for references. * gdb.arch/amd64-entry-value.cc (reference, datap, datap_input): New functions. (main): New variables regvar, nodatavarp, stackvar1, stackvar2. Call reference and datap_input. * gdb.arch/amd64-entry-value.exp (reference, breakhere_reference): New breakpoints. (continue to breakpoint: entry_reference: reference) (entry_reference: bt at entry) (continue to breakpoint: entry_reference: breakhere_reference) (entry_reference: bt, entry_reference: ptype regparam) (entry_reference: p regparam, entry_reference: ptype regparam@entry) (entry_reference: p regparam@entry, entry_reference: p &regparam@entry) (entry_reference: p regcopy, entry_reference: p nodataparam) (entry_reference: p nodataparam@entry): New tests.
* * c-valprint.c (c_val_print): Add embedded_offset to addressPierre Muller2011-02-181-1/+1
| | | | | for arrays of unspecified length. * p-valprint.c (pascal_val_print): Likewise.
* gdb/testsuite/Pedro Alves2011-02-141-23/+27
| | | | | | | | | | | | | | * gdb.trace/unavailable.cc (struct Virtual): New. (virtualp): New global pointer. * gdb.trace/unavailable.exp (gdb_collect_globals_test): Test printing a pointer to an object whose type has a vtable, with print object on. gdb/ * value.h (value_entirely_available): Declare. * value.c (value_entirely_available): New function. * c-valprint.c (c_value_print): Don't try fetching the pointer's real type if the pointer is unavailable.
* gdb/Pedro Alves2011-02-141-0/+2
| | | | | * c-valprint.c (c_val_print): Print a string with unavailable contents as an array.
* * valprint.c (val_print): Extend comment.Pedro Alves2011-02-071-7/+3
| | | | | | | | | | | | | * ada-valprint.c (ada_valprint): Rewrite comment deferring interface explanation to val_print. (ada_val_print_array): Adjust comment to current interface. (print_field_values): Adjust comment to current interface. * c-valprint.c (c_val_print): Rewrite comment deferring interface explanation to val_print. * f-valprint.c (f_val_print): Ditto. * jv-valprint.c (java_val_print): Ditto. * m2-valprint.c (m2_val_print): Ditto. * p-valprint.c (pascal_val_print): Ditto.
* gdb/Pedro Alves2011-02-021-2/+1
| | | | | | | | | | | | | * c-valprint.c (c_value_print): When doing virtual base pointer adjustment, create a new value with adjusted contents rather than changing the contents of the value being printed (and getting it wrong). gdb/testsuite/ * gdb.cp/virtbase.cc (VirtualBase, VirtualMiddleA, VirtualMiddleB) (Virtual): New structs. (virtual_o, virtual_middle_b): New globals. * gdb.cp/virtbase.exp: New tests.
* * printcmd.c (print_formatted): Use val_print_scalar_formattedPedro Alves2011-01-251-27/+29
| | | | | | | | | | | | | | | | instead of print_scalar_formatted. (print_scalar_formatted): Don't handle 's' format strings here, and add an assertion that we never see such format here. * valprint.h (val_print_scalar_formatted): Declare. * valprint.c (val_print_scalar_formatted): New. * c-valprint.c (c_val_print): Use val_print_scalar_formatted instead of print_scalar_formatted. * jv-valprint.c (java_val_print): Ditto. * p-valprint.c (pascal_val_print): Ditto. * ada-valprint.c (ada_val_print_1): Ditto. * f-valprint.c (f_val_print): Ditto. * infcmd.c (registers_info): Ditto. * m2-valprint.c (m2_val_print): Ditto.
* 2011-01-24 Pedro Alves <pedro@codesourcery.com>Pedro Alves2011-01-241-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't lose embedded_offset in printing routines throughout. gdb/ * valprint.h (val_print_array_elements): Change prototype. * valprint.c (val_print_array_elements): Add `embedded_offset' parameter, and adjust to pass it down to val_print, while passing `valaddr' or `address' unmodified. Take embedded_offset into account when checking repetitions. * c-valprint.c (c_val_print): Pass embedded_offset to val_print_array_elements instead of adjusting `valaddr' and `address'. * m2-valprint.c (m2_print_array_contents, m2_val_print): Pass embedded_offset to val_print_array_elements instead of adjusting `valaddr'. * p-lang.h (pascal_object_print_value_fields): Adjust prototype. * p-valprint.c (pascal_val_print): Pass embedded_offset to val_print_array_elements and pascal_object_print_value_fields instead of adjusting `valaddr'. (pascal_object_print_value_fields): Add `offset' parameter, and adjust to use it. (pascal_object_print_value): Add `offset' parameter, and adjust to use it. (pascal_object_print_static_field): Use value_contents_for_printing/value_embedded_offset, rather than value_contents. * ada-valprint.c (val_print_packed_array_elements): Add `offset' parameter, and adjust to use it. Use value_contents_for_printing/value_embedded_offset, rather than value_contents. (ada_val_print): Rename `valaddr0' parameter to `valaddr'. (ada_val_print_array): Add `offset' parameter, and adjust to use it. (ada_val_print_1): Rename `valaddr0' parameter to `valaddr', and `embedded_offset' to `offset'. Don't re-adjust `valaddr'. Instead work with offsets. Use value_contents_for_printing/value_embedded_offset, rather than value_contents. Change `defer_val_int' local type to CORE_ADDR, and use value_from_pointer to extract a target pointer, rather than value_from_longest. (print_variant_part): Add `offset' parameter. Replace `outer_valaddr' parameter by a new `outer_offset' parameter. Don't re-adjust `valaddr'. Instead pass down adjusted offsets. (ada_value_print): Use value_contents_for_printing/value_embedded_offset, rather than value_contents. (print_record): Add `offset' parameter, and adjust to pass it down. (print_field_values): Add `offset' parameter. Replace `outer_valaddr' parameter by a new `outer_offset' parameter. Don't re-adjust `valaddr'. Instead pass down adjusted offsets. Use value_contents_for_printing/value_embedded_offset, rather than value_contents. * d-valprint.c (dynamic_array_type): Use value_contents_for_printing/value_embedded_offset, rather than value_contents. * jv-valprint.c (java_print_value_fields): Add `offset' parameter. Don't re-adjust `valaddr'. Instead pass down adjusted offsets. (java_print_value_fields): Take `offset' into account. Don't re-adjust `valaddr'. Instead pass down adjusted offsets. (java_val_print): Take `embedded_offset' into account. Pass it to java_print_value_fields. * f-valprint.c (f77_print_array_1): Add `embedded_offset' parameter. Don't re-adjust `valaddr' or `address'. Instead pass down adjusted offsets. (f77_print_array): Add `embedded_offset' parameter. Pass it down. (f_val_print): Take `embedded_offset' into account. gdb/testsuite/ * gdb.base/printcmds.c (some_struct): New struct and instance. * gdb.base/printcmds.exp (test_print_repeats_embedded_array): New procedure. <global scope>: Call it.
* Fix printing of Wide_Character & Wide_Wide_Character entities.Joel Brobecker2011-01-141-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wide_Characters and Wide_Wide_Characters are incorrectly printed. Consider for instance: Medium : Wide_Character := Wide_Character'Val(16#dead#); Trying to print the value of this variable yields: (gdb) p medium $1 = 57005 '["ad"]' The integer value is correct (57005 = 0xdead), but the character representation is not, it should be: $1 = 57005 '["dead"]' Same for Wide_Wide_Characters. There were two issues: (a) The first issue was in ada-valprint, where we were assuming that character types were 1 byte long; (b) The second problem was in c-valprint, where we were down-casting the integer value of the character to type `unsigned char', causing use to lose all but the lowest byte. gdb/ChangeLog: * ada-valprint. (ada_printchar): Use the correct type length in call to ada_emit_char. * c-valprint.c (c_val_print): Remove cast in call to LA_PRINT_CHAR.
* 2011-01-07 Michael Snyder <msnyder@vmware.com>Michael Snyder2011-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ada-lang.c: Comment cleanup, mostly periods and spaces. * ada-lang.h: Ditto. * ada-tasks.c: Ditto. * ada-valprint.c: Ditto. * aix-threads.c: Ditto. * alpha-linux-nat.c: Ditto. * alpha-linux-tdep.c: Ditto. * alpha-mdebug-tdep.c: Ditto. * alpha-nat.c: Ditto. * alpha-osf1-tdep.c: Ditto. * alpha-tdep.c: Ditto. * alphabsd-nat.c: Ditto. * alphabsd-tdep.c: Ditto. * amd64-darwin-tdep.c: Ditto. * amd64-linux-nat.c: Ditto. * amd64-linux-tdep.c: Ditto. * amd64-sol2-tdep.c: Ditto. * amd64-tdep.c: Ditto. * amd64-fbsd-tdep.c: Ditto. * amd64-nbsd-tdep.c: Ditto. * amd64-obsd-tdep.c: Ditto. * amd64-linux-nat.c: Ditto. * amd64-linux-tdep.c: Ditto. * arm-tdep.c: Ditto. * arm-tdep.h: Ditto. * armnbsd-nat.c: Ditto. * avr-tdep.c: Ditto. * bfin-tdep.c: Ditto. * bsd-kvm.c: Ditto. * c-typeprintc: Ditto. * c-valprint.c: Ditto. * coff-pe-read.h: Ditto. * coffreead.c: Ditto. * cris-tdep.c: Ditto. * d-lang.c: Ditto. * darwin-nat-info.c: Ditto. * darwin-nat.c: Ditto. * dbug-rom.c: Ditto. * dbxread.c: Ditto. * dcache.c: Ditto. * dcache.h: Ditto. * dec-thread.c: Ditto. * defs.h: Ditto. * demangle.c: Ditto. * dicos-tdep.c: Ditto. * dictionary.c: Ditto. * dictionary.h: Ditto. * dink32-rom.c: Ditto. * disasm.c: Ditto. * doublest.c: Ditto. * dsrec.c: Ditto. * dummy-frame.c: Ditto. * dwarf2-frame.c: Ditto. * dwarf2expr.c: Ditto. * dwarf2loc.c: Ditto. * dwarf2read.c: Ditto. * elfread.c: Ditto. * environ.c: Ditto. * eval.c: Ditto. * event-top.h: Ditto. * exceptions.c: Ditto. * exceptions.h: Ditto. * exec.c: Ditto. * expprint.c: Ditto. * expression.h: Ditto. * f-exp.y: Ditto. * f-lang.c: Ditto. * f-lang.h: Ditto. * f-typeprint.c: Ditto. * f-valprint.c: Ditto. * fbsd-nat.c: Ditto. * findvar.c: Ditto. * fork-child.c: Ditto. * frame.c: Ditto. * frame.h: Ditto. * frv-linux-tdep.c: Ditto. * frv-tdep.c: Ditto. * gcore.c: Ditto. * gdb-stabs.h: Ditto. * gdb_assert.h: Ditto. * gdb_string.h: Ditto. * gdb_thread_db.h: Ditto. * gdb_wait.h: Ditto. * gdbarch.sh: Ditto. * gdbcore.h: Ditto. * gdbthread.h: Ditto. * gdbtypes.c: Ditto. * gdbtypes.h: Ditto. * gnu-nat.c: Ditto. * gnu-nat.h: Ditto. * gnu-v2-abi.c: Ditto. * gnu-v3-abi.c: Ditto. * go32-nat.c: Ditto. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate.
* run copyright.sh for 2011.Joel Brobecker2011-01-011-1/+1
|
* 2010-12-31 Michael Snyder <msnyder@vmware.com>Michael Snyder2010-12-311-86/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* gdb:kwerner2010-11-031-1/+6
| | | | | | | | | | | | | | | | | | | | * dwarf2read.c (read_array_type): Read the DW_AT_byte_size from the DIE and set the length of the type. * gdbtypes.h (get_array_bounds): Move here from valprint.h. * gdbtypes.c (get_array_bounds): Move here from valprint.c and return 0 if the corresponding bounds of the type are undefined. * valprint.h (get_array_bounds): Move declaration to gdbtypes.h. * valprint.c (get_array_bounds): Move implementation to gdbtypes.c. (val_print_array_elements): Use get_array_bounds to compute the number of array elements instead of dividing the length of the array by the length of the element types. * valarith.c (vector_binop): Likewise. * valops.c (value_cast): Likewise. * c-valprint.c (c_val_print): Likewise. * c-typeprint.c (c_type_print_varspec_suffix): Likewise. gdb/testsuite: * gdb.base/gnu_vector.exp: Adjust expect messages.
* PR python/11948:Tom Tromey2010-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | | * varobj.c (value_get_print_value): Use val_print_string to print lazy strings. * python/py-prettyprint.c (print_string_repr): Use val_print_string to print lazy strings. Fix cleanup logic. (print_children): Likewise. * python/python-internal.h (gdbpy_extract_lazy_string): Update. * python/py-lazy-string.c (gdbpy_extract_lazy_string): Rewrite. Change return type to 'void', add 'addr' argument. * value.h (val_print_string): Update. * valprint.c (val_print_string): Add 'encoding' argument. * printcmd.c (print_formatted): Update. * p-valprint.c (pascal_val_print): Update. * m2-valprint.c (print_unpacked_pointer): Update. (m2_print_array_contents): Likewise. * jv-valprint.c (java_value_print): Update. * f-valprint.c (f_val_print): Update. * c-valprint.c (c_val_print): Update. * auxv.c (fprint_target_auxv): Update.
* gdb:kwerner2010-10-061-2/+1
| | | | | | | | | | | | | | | | | * gdbtypes.h (struct main_type): Remove flag_nottext. (enum type_flag_value): Remove TYPE_FLAG_NOTTEXT. (enum type_instance_flag_value): Add TYPE_INSTANCE_FLAG_NOTTEXT. (TYPE_NOTTEXT): Use TYPE_INSTANCE_FLAG_NOTTEXT instead of flag_nottext. * gdbtypes.c (make_vector_type): Use TYPE_INSTANCE_FLAG_NOTTEXT instead of TYPE_FLAG_NOTTEXT. (init_type): Remove the initialization of the flag_nottext field. (gdbtypes_post_init): Use TYPE_INSTANCE_FLAG_NOTTEXT instead of TYPE_FLAG_NOTTEXT. * c-valprint.c (c_val_print): Remove TYPE_VECTOR check. gdb/testsuite: * gdb.base/gnu_vector.c: Add variable c4. * gdb.base/gnu_vector.exp: Add tests for character vector printing. * gdb.arch/altivec-abi.exp: Fix expect pattern of character vectors.
* 2010-07-13 Emmanuel Thomé <Emmanuel.Thome@gmail.com>Tom Tromey2010-07-141-1/+2
| | | | | | | | | | | * c-valprint.c (c_val_print): Add embedded_offset to address in call to val_print_array_elements. 2010-07-13 Tom Tromey <tromey@redhat.com> * gdb.python/py-prettyprint.c (struct arraystruct): New struct. (main): Use it. * gdb.python/py-prettyprint.exp (run_lang_tests): Add test.
* 2010-07-02 Ken Werner <ken.werner@de.ibm.com>Tom Tromey2010-07-021-1/+2
| | | | | | | gdb * c-valprint.c (c_val_print): Fix printing of character vectors. gdb/testsuite * gdb.arch/altivec-abi.exp: Fix expect pattern of character vectors.
* * p-valprint.c (pascal_val_print): Use TYPE_ERROR_NAME.Tom Tromey2010-06-211-1/+1
| | | | | | | | | | | | * p-typeprint.c (pascal_type_print_base): Use TYPE_ERROR_NAME. * m2-valprint.c (m2_val_print): Use TYPE_ERROR_NAME. * gdbtypes.h (TYPE_ERROR_NAME): New macro. * f-valprint.c (f_val_print): Use TYPE_ERROR_NAME. * f-typeprint.c (f_type_print_base): Use TYPE_ERROR_NAME. * dwarf2read.c (tag_type_to_type): Create a new error type on failure. * c-valprint.c (c_val_print): Use TYPE_ERROR_NAME. * c-typeprint.c (c_type_print_base): Use TYPE_ERROR_NAME.
* gdbTom Tromey2010-06-111-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR gdb/9977, PR exp/11636: * value.h (value_offset): Update. (struct lval_funcs) <check_validity>: New field. <copy_closure>: Make argument const. (value_computed_closure): Update. (value_contents_for_printing): Declare. (value_bits_valid): Likewise. (val_print): Likewise. (set_value_component_location): Update. (value_entirely_optimized_out): Declare. * value.c (value_offset): Argument now const. (require_not_optimized_out): New function. (value_contents_for_printing): New function. (value_contents_all): Call require_not_optimized_out. (value_contents): Likewise. (value_bits_valid): New function. (value_computed_closure): Argument now const. (set_value_component_location): Make 'whole' argument const. (value_entirely_optimized_out): New function. (value_bitsize): Argument now 'const'. (value_bitpos): Likewise. (value_type): Likewise. * valprint.h (val_print_array_elements): Update. * valprint.c (val_print): Add 'val' argument. Use valprint_check_validity. (valprint_check_validity): New function. (value_check_printable): Use value_entirely_optimized_out. (common_val_print): Update. (value_print): Likewise. (val_print_array_elements): Add 'val' argument. * valops.c (value_fetch_lazy): Use value_contents_for_printing, value_bits_valid. Reinit frame cache for lval_computed. * sh64-tdep.c (sh64_do_register): Update. * scm-valprint.c (scm_val_print): Add 'val' argument. * scm-lang.h (scm_val_print): Update. * python/python.h (apply_val_pretty_printer): Update. * python/py-prettyprint.c (apply_val_pretty_printer): Add 'val' argument. Call set_value_component_location. * printcmd.c (print_scalar_formatted): Update. * p-valprint.c (pascal_val_print): Add 'val' argument. (pascal_object_print_value_fields): Likewise. (pascal_object_print_value): Likewise. (pascal_object_print_static_field): Update. * p-lang.h (pascal_val_print): Update. (pascal_object_print_value_fields): Update. * mt-tdep.c (mt_registers_info): Update. * mi/mi-main.c (get_register): Update. (mi_cmd_data_evaluate_expression): Use common_val_print. * m2-valprint.c (m2_print_array_contents): Add 'val' argument. (m2_print_unbounded_array): Likewise. (m2_val_print): Likewise. * m2-lang.h (m2_val_print): Update. * language.h (struct language_defn) <la_val_print>: Add 'val' argument. (LA_VAL_PRINT): Likewise. * language.c (unk_lang_val_print): Add 'val' argument. * jv-valprint.c (java_print_value_fields): Add 'val' argument. (java_val_print): Likewise. * jv-lang.h (java_val_print): Add 'val' argument. * infcmd.c (default_print_registers_info): Update. * f-valprint.c (f77_print_array_1): Add 'val' argument. (f77_print_array): Likewise. (f_val_print): Likewise. * f-lang.h (f_val_print): Add 'val' argument. * dwarf2loc.c (read_pieced_value): Use value_bitsize and value_bitpos. <DWARF_VALUE_OPTIMIZED_OUT>: Don't print warning. Call set_value_optimized_out. (write_pieced_value): Use value_bitsize and value_bitpos. <default>: Don't exit loop. (check_pieced_value_validity): New function. (pieced_value_funcs): Reference check_pieced_value_validity, check_pieced_value_invalid. (copy_pieced_value_closure): Update. (check_pieced_value_bits): New function. (check_pieced_value_invalid): New function. * d-valprint.c (dynamic_array_type): Add 'val' argument. (d_val_print): Likewise. * d-lang.h (d_val_print): Update. * cp-valprint.c (cp_print_value_fields): Add 'val' argument. (cp_print_value_fields_rtti): Likewise. (cp_print_value): Likewise. (cp_print_static_field): Update. * c-valprint.c (c_val_print): Add 'val' argument. (c_value_print): Update. * c-lang.h (c_val_print): Update. (cp_print_value_fields): Likewise. (cp_print_value_fields_rtti): Likewise. * ada-valprint.c (struct ada_val_print_args): Remove. (val_print_packed_array_elements): Add 'val' argument. (ada_val_print): Likewise. Rewrite. (ada_val_print_stub): Remove. (ada_val_print_array): Add 'val' argument. (ada_val_print_1): Likewise. (print_variant_part): Likewise. (ada_value_print): Update. (print_record): Add 'val' argument. (print_field_values): Likewise. * ada-lang.h (ada_val_print): Update. gdb/testsuite PR gdb/9977, PR exp/11636:: * gdb.dwarf2/pieces.exp (pieces_test_f3): Remove kfail. (pieces_test_f6): Update expected output.
* 2010-05-13 Michael Snyder <msnyder@vmware.com>Michael Snyder2010-05-131-3/+7
| | | | | | | | | | | | | | | | | * 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.
* gdbTom Tromey2010-02-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | PR c++/11226, PR c++/9629, PR c++/9688, PR c++/8890: * valops.c (search_struct_field): Compute nbases after calling CHECK_TYPEDEF. (check_field): Call CHECK_TYPEDEF. * cp-valprint.c (cp_print_value): Pass correct address to baseclass_offset. Fix check for virtual base past the end of the object. Don't offset address passed to cp_print_value_fields or apply_val_pretty_printer. (cp_print_value_fields): Fix call to val_print. (cp_print_value_fields_rtti): New function. * c-valprint.c (c_val_print): Use cp_print_value_fields_rtti. * p-valprint.c (pascal_object_print_value_fields): Fix call to val_print. * python/py-prettyprint.c (apply_val_pretty_printer): Add embedded offset to address. * language.h (struct language_defn) <la_val_print>: Document. * c-lang.h (cp_print_value_fields_rtti): Declare. gdb/testsuite PR c++/11226, PR c++/9629, PR c++/9688, PR c++/8890: * gdb.cp/virtbase.cc: New file. * gdb.cp/virtbase.exp: New file. * gdb.cp/userdef.exp: Allow 'struct' or 'class'.
* gdbTom Tromey2010-01-251-1/+1
| | | | | | | | | | PR gdb/11049: * c-valprint.c (c_val_print): Fix test of extract_unsigned_integer result. gdb/testsuite PR gdb/11049: * gdb.base/printcmds.exp (test_print_typedef_arrays): Add test with "set print null-stop on".
* 2010-01-13 Phil Muldoon <pmuldoon@redhat.com>pmuldoon2010-01-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update copyright year in most headers.Joel Brobecker2010-01-011-1/+1
| | | | Automatic update by copyright.sh.
* ARI fix: OP eol rule.Pierre Muller2009-10-061-9/+9
| | | | | | | | | | | | | | * blockframe.c (find_pc_partial_function): Avoid operator at end of line. * buildsym.c (find_symbol_in_list): Idem. (start_subfile, patch_subfile_names): Idem. * c-exp.y (variable, yylex): Idem. * c-typeprint.c (c_print_type, c_type_print_base): Idem. * c-valprint.c (c_val_print): Idem. * coffread.c (patch_opaque_types, process_coff_symbol): Idem. * corelow.c (core_open): Idem. * cris-tdep.c (move_reg_to_mem_movem_op): Idem. * cli/cli-decode.c (help_cmd_list, find_command_name_length): Idem.
* * defs.h (extract_signed_integer, extract_unsigned_integer,Ulrich Weigand2009-07-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * defs.h (strlen_paddr, paddr, paddr_nz): Remove.Ulrich Weigand2009-07-021-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (paddress): Add GDBARCH parameter. * utils.c (strlen_paddr, paddr, paddr_nz): Remove. (paddress): Add GDBARCH parameter, use it instead of current_gdbarch. * ui-out.h (ui_out_field_core_addr): Add GDBARCH parameter. * ui-out.c (ui_out_field_core_addr): Add GDBARCH parameter, use it instead of current_gdbarch. Update calls to ui_out_field_core_addr to pass architecture: * ada-lang.c (print_one_exception): Update. * breakpoint.c (print_one_breakpoint_location, print_one_exception_catchpoint): Update. * disasm.c (dump_insns): Update. * darwin-nat-info.c (darwin_debug_regions_recurse): Update. * mi/mi-main.c (mi_cmd_data_read_memory): Update. * mi/mi-symbol-cmds.c: Include "objfiles.h". (mi_cmd_symbol_list_lines): Update. * stack.c (print_frame_info, print_frame): Update. Update callers of paddress to pass architecture: * ada-tasks.c (info_task): Update. * ada-valprint.c (ada_val_print_1): Update. * annotate.c (annotate_source, annotate_frame_begin): Update. * breakpoint.c (insert_bp_location, describe_other_breakpoints, mention): Update. * cli/cli-cmds.c (edit_command, list_command, print_disassembly): Update. * corefile.c (memory_error): Update. * c-valprint.c (print_function_pointer_address, c_val_print): Update. * disasm.c (dis_asm_print_address): Update. * exec.c (print_section_info): Update. * f-valprint.c (f_val_print): Update. * infcmd.c: Include "arch-utils.h". (jump_command, program_info): Update. * linux-fork.c: Include "arch-utils.h". (info_forks_command): Update. * m2-valprint.c (print_function_pointer_address, print_unpacked_pointer, print_variable_at_address, m2_val_print): Update. * m32r-rom.c (m32r_load_section, m32r_load, m32r_upload_command): Update. * printcmd.c (print_address, print_address_demangle, address_info): Update. * p-valprint.c (pascal_val_print): Update. * source.c: Include "arch-utils.h". (line_info): Update. * stack.c (frame_info, print_block_frame_labels): Update. * symfile.c (add_symbol_file_command, list_overlays_command): Update. * symmisc.c (dump_msymbols, dump_psymtab, dump_symtab_1, print_symbol, print_partial_symbols, maintenance_info_psymtabs, maintenance_check_symtabs): Update. * symtab.c (find_pc_sect_symtab): Update. * target.c (deprecated_debug_xfer_memory): Update. * tracepoint.c (scope_info): Update. * tui/tui-stack.c (tui_make_status_line): Update. * valprint.c (val_print_string): Update. Update callers of paddr_nz to use paddress instead (keeping user-visible output identical): * alpha-tdep.c (alpha_heuristic_proc_start): Update. * amd64-tdep.c (fixup_riprel, amd64_displaced_step_copy_insn, amd64_displaced_step_fixup): Update. * arch-utils.c (simple_displaced_step_copy_insn): Update. * auxv.c (fprint_target_auxv): Update. * breakpoint.c (insert_single_step_breakpoint): Update. * buildsym.c (finish_block): Update. * cli/cli-dump.c (restore_section_callback): Update. * fbsd-nat.c (fbsd_find_memory_regions): Update. * frame.c (frame_unwind_register_value): Update. * gcore.c (gcore_create_callback): Update. * hppa-tdep.c (hppa_frame_cache, hppa_skip_trampoline_code): Update. * i386-tdep.c (i386_displaced_step_fixup, i386_record_modrm, i386_record_lea_modrm_addr, i386_record_lea_modrm, i386_process_record): Update. * ia64-tdep.c (ia64_frame_this_id, ia64_sigtramp_frame_this_id, ia64_libunwind_frame_this_id, ia64_libunwind_sigtramp_frame_this_id, ia64_dummy_id, ia64_access_reg, ia64_access_rse_reg): Update. * infrun.c (displaced_step_prepare, displaced_step_fixup, handle_inferior_event, insert_step_resume_breakpoint_at_sal, insert_longjmp_resume_breakpoint): Update. * linux-nat.c (linux_nat_find_memory_regions): Update. * linux-record.c (record_linux_system_call): Update. * mips-tdep.c (heuristic_proc_start, mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call, mips_o32_push_dummy_call, mips_o64_push_dummy_call): Update. * monitor.c (monitor_error, monitor_remove_breakpoint): Update. * record.c (record_arch_list_add_mem, record_wait, record_xfer_partial): Update. * remote-mips.c (mips_fetch_word, mips_check_lsi_error, mips_common_breakpoint): Update. * remote-sim.c (gdbsim_xfer_inferior_memory): Update. * rs6000-tdep.c (ppc_displaced_step_fixup): Update. * solib-som.c (som_current_sos): Update. * symfile.c (load_progress, generic_load): Update. * symfile-mem.c (add_vsyscall_page): Update. * valops.c (value_fetch_lazy): Update. * windows-tdep.c (windows_xfer_shared_library): Update. Update callers of paddr_nz to use paddress instead (changing user-visible output to make it more correct): * dwarf2loc.c (locexpr_describe_location): Update. * ia64-tdep.c (ia64_memory_insert_breakpoint, ia64_memory_remove_breakpoint): Update. * jv-valprint.c (java_value_print): Update. * m32c-tdep.c (m32c_m16c_address_to_pointer): Update. * monitor.c (monitor_read_memory): Update. Update callers of paddr to use paddress instead (changing user-visible output to make it more correct): * arm-tdep.c (arm_push_dummy_call): Update. * breakpoint.c (insert_bp_location, create_thread_event_breakpoint, create_breakpoint): Update. * darwin-nat-info.c (darwin_debug_regions): Update. * dcache.c (dcache_info): Update. * dsrec.c (load_srec, make_srec): Update. * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program, dwarf2_frame_cache): Update. * gcore.c (gcore_copy_callback): Update. * gnu-nat.c (gnu_xfer_memory): Update. * mips-linux-nat.c (mips_show_dr): Update. * monitor.c (monitor_write_memory, monitor_insert_breakpoint, monitor_remove_breakpoint): Update. * remote.c (compare_sections_command): Update. * remote-m32r-sdi.c (m32r_xfer_memory, m32r_insert_breakpoint, m32r_remove_breakpoint, m32r_insert_watchpoint, m32r_remove_watchpoint): Update. * sol-thread.c (info_cb): Update. * symfile.c (load_progress): Update. Update callers of paddress or paddr_nz to use hex_string instead (changes output of internal/error/debug messages only): * dwarf2read.c (dump_die_shallow): Update. * frame.c (fprint_field, fprint_frame, frame_pc_unwind, get_frame_func, create_new_frame): Update. * hppa-tdep.c (find_unwind_entry, unwind_command): Update. * ia64-tdep.c (get_kernel_table, ia64_find_proc_info_x, ia64_get_dyn_info_list): Update. * maint.c (maintenance_translate_address): Update. * mi/mi-cmd-var.c (mi_cmd_var_create): Update. * target.c (target_flash_erase): Update. Update callers of paddr/paddr_nz to use phex/phex_nz instead, using an appropriate address size. Remove use of strlen_paddr. * exec.c (exec_files_info): Update. * i386-nat.c (i386_show_dr): Update. * remote.c (remote_flash_erase): Update. * m32r-rom.c (m32r_load_section): Update. * monitor.c (monitor_vsprintf, monitor_store_register): Update. * remote.c (remote_check_symbols, remote_search_memory): Update. * remote-mips.c (mips_request, mips_common_breakpoint): Update. * scm-valprint.c (scm_ipruk, scm_scmval_print): Update. * sh64-tdep.c (sh64_show_media_regs, sh64_show_compact_regs): Update. * sh-tdep.c (sh_generic_show_regs, sh3_show_regs, sh2e_show_regs, sh2a_show_regs, sh2a_nofpu_show_regs, sh3e_show_regs, sh3_dsp_show_regs, sh4_show_regs, sh4_nofpu_show_regs, sh_dsp_show_regs): Update. * xcoffsolib.c (sharedlibrary_command): Update. * maint.c (maint_print_section_info): Add ADDR_SIZE parameter. Use hex_string_custom instead of paddr. (print_bfd_section_info): Pass address size. (print_objfile_section_info): Likewise. * annotate.h (annotate_source): Add GDBARCH parameter. (annotate_frame_begin): Likewise. * annotate.c (annotate_source): Add GDBARCH parameter. (annotate_frame_begin): Likewise. * source.c (identify_source_line): Update call to annotate_source. * stack.c (print_frame_info, print_frame): Update call to annotate_frame_begin. * breakpoint.c (describe_other_breakpoints): Add GDBARCH parameter. (create_breakpoint, create_ada_exception_breakpoint): Update call. * stack.c (print_block_frame_labels): Add GDBARCH parameter. (print_frame_label_vars): Update call. * symmisc.c (print_partial_symbols): Add GDBARCH parameter. (dump_psymtab): Update call to print_partial_symbols. (struct print_symbol_args): Add GDBARCH member. (dump_symtab_1): Set print_symbol_args architecture member. (print_symbol): Use it. * windows-tdep.h (windows_xfer_shared_library): Add GDBARCH parameter. * windows-tdep.c (windows_xfer_shared_library): Likewise. * i386-cygwin-tdep.c (struct cpms_data): Add GDBARCH member. (core_process_module_section): Pass architecture from cpms_data to windows_xfer_shared_library. (windows_core_xfer_shared_libraries): Initialize cmps_data architecture member. * windows-nat.c (windows_xfer_shared_libraries): Pass architecture to windows_xfer_shared_library. * defs.h (print_address): Add GDBARCH parameter. * printcmd.c (print_address): Add GDBARCH parameter. (print_scalar_formatted, do_examine): Update call. * findcmd.c (find_command): Update call. * tracepoint.c: Include "arch-utils.h". (trace_find_line_command): Update call. * tui/tui-disasm.c (tui_disassemble): Update call. * value.h (print_address_demangle): Add GDBARCH parameter. * printcmd.c (print_address_demangle): Add GDBARCH parameter. * c-valprint.c (print_function_pointer_address, c_val_print): Update call. * f-valprint.c (f_val_print): Update call. * gnu-v3-abi.c (gnuv3_print_method_ptr): Update call. * jv-valprint.c (java_val_print): Update call. * m2-valprint.c (print_function_pointer_address, m2_val_print): Update call. * p-valprint.c (pascal_val_print): Update call. * disasm.c (gdb_disassemble_info): Install architecture into di.application_data field. testsuite/ChangeLog: * gdb.threads/tls-shared.exp: Update to locexpr_describe_location change to prefix TLS offset in hex with 0x. doc/ChangeLog: * gdbint.texinfo (Item Output Functions): Update signature for ui_out_field_core_addr.
* * gdbtypes.c (make_pointer_type, make_reference_type,Ulrich Weigand2009-07-021-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | smash_to_memberptr_type, lookup_array_range_type, check_stub_method): Use type architecture instead of current_gdbarch. * gdbtypes.h (address_space_name_to_int, address_space_int_to_name): Add GDBARCH paramter. * gdbtypes.c (address_space_name_to_int, address_space_int_to_name): Add GDBARCH parameter. Use it instead of current_gdbarch. * c-typeprint.c (c_type_print_modifier): Update call. * parse.c (push_type_address_space): Likewise. * findvar.c (extract_typed_address, store_typed_address): Use type architecture instead of current_gdbarch. * value.c (value_as_address, unpack_field_as_long): Use type architecture instead of current_gdbarch. * doublest.c (floatformat_from_length): Add GDBARCH argument. Use it instead of current_gdbarch. (floatformat_from_type): Pass type architecture. * infcall.c (find_function_addr): Use type architecture instead of current_gdbarch. * valarith.c (value_bitstring_subscript, value_x_binop, value_neg, value_bit_index): Use type architecture instead of current_gdbarch. * valops.c (value_cast, value_slice): Likewise. * value.h (modify_field): Add TYPE argument. * value.c (modify_field): Add TYPE argument. Use type architecture instead of current_gdbarch. (set_internalvar_component): Likewise. * eval.c (evaluate_struct_tuple): Update call. * valops.c (value_assign): Likewise. * ada-lang.c (modify_general_field): Likewise. Add TYPE argument. (make_array_descriptor): Update calls. (move_bits): Add BITS_BIG_ENDIAN_P argument. Use it instead of current_gdbarch. (ada_value_assign, value_assign_to_component): Update calls. (decode_packed_array, ada_value_primitive_packed_val, ada_value_assign, value_assign_to_component): Use type arch instead of current_gdbarch. * printcmd.c (float_type_from_length): Remove GDBARCH argument, use type architecture instead. (print_scalar_formatted, printf_command): Update calls. Use type architecture instead of current_gdbarch. * valprint.c (val_print_type_code_int): Use type architecture instead of current_gdbarch. * varobj.c (value_get_print_value): Likewise. * python/python-prettyprint.c (print_string_repr): Add GDBARCH argument. Use it instead of current_gdbarch. (apply_val_pretty_printer): Update call. * ada-valprint.c (ada_val_print_1): Use type architecture instead of current_gdbarch. * c-valprint.c (print_function_pointer_address): Add GDBARCH argument. Use it instead of current_gdbarch. (c_val_print): Update calls passing type architecture. * f-valprint.c (f_val_print): Use type architecture instead of current_gdbarch. * jv-valprint (java_value_print): Likewise. * m2-valprint.c (print_function_pointer_address): Add GDBARCH argument. Use it instead of current_gdbarch. (print_unpacked_pointer): Update calls passing type architecture. * scm-valprint.c (scm_scmval_print): Use type architecture instead of current_gdbarch. * gnu-v3-abi.c (get_class_arch): Remove. (gnuv3_rtti_type): Use get_type_arch instead of get_class_arch. Remove special-case check for Java classes. (gnuv3_virtual_fn_field, gnuv3_baseclass_offset, gnuv3_print_method_ptr, gnuv3_method_ptr_size, gnuv3_make_method_ptr, gnuv3_method_ptr_to_value): Use get_type_arch instead of get_class_arch.
* gdbTom Tromey2009-06-231-6/+25
| | | | | | | | | | | 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-05-27 Tom Tromey <tromey@redhat.com>Tom Tromey2009-05-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Paul Pluzhnikov <ppluzhnikov@google.com> * mi/mi-main.c (mi_cmd_data_evaluate_expression): Use value_address. * cli/cli-dump.c (dump_value_to_file): Use value_address. * valprint.c (common_val_print): Likewise. * v850-tdep.c (v850_push_dummy_call): Use value_address. * tracepoint.c (encode_actions): Use value_address. * printcmd.c (print_formatted): Use value_address. (x_command): Likewise. * p-valprint.c (pascal_object_print_static_field): Use value_address. * mn10300-tdep.c (mn10300_push_dummy_call): Use value_address. * mips-tdep.c (mips_eabi_push_dummy_call): Use value_address. * m32r-tdep.c (m32r_push_dummy_call): Use value_address. * jv-valprint.c (java_value_print): Use value_address. * infcall.c (find_function_addr): Use value_address. * gnu-v3-abi.c (gnuv3_rtti_type): Use value_address. * gnu-v2-abi.c (gnuv2_value_rtti_type): Use value_address. * frv-tdep.c (frv_push_dummy_call): Use value_address. * frame.c (frame_register_unwind): Use value_address. (frame_unwind_register_value): Likewise. * darwin-nat-info.c (info_mach_region_command): Use value_address. * cp-valprint.c (cp_print_static_field): Use value_address. * c-valprint.c (c_value_print): Use value_address. * breakpoint.c (update_watchpoint): Use value_address. (can_use_hardware_watchpoint): Likewise. * ada-valprint.c (ada_val_print_1): Use value_address. (ada_value_print): Likewise. * ada-tasks.c (read_fat_string_value): Use value_address. * jv-lang.c (java_link_class_type): Use set_value_address. (java_link_class_type): Likewise. (get_java_utf8_name): Use value_address. (type_from_class): Likewise. (java_link_class_type): Likewise. * findvar.c (value_of_register): Use set_value_address. (read_var_value): Likewise. (read_var_value): Likewise. * eval.c (evaluate_subexp_standard): Use set_value_address. (evaluate_subexp_standard): Use value_address. * dwarf2loc.c (dwarf2_evaluate_loc_desc): Use set_value_address. * ada-lang.c (coerce_unspec_val_to_type): Use set_value_address. (ada_value_primitive_packed_val): Likewise. (ensure_lval): Likewise. (thin_data_pntr): Use value_address. (desc_bounds): Likewise. (ada_value_primitive_packed_val): Likewise. (value_assign_to_component): Likewise. (ensure_lval): Likewise. (make_array_descriptor): Likewise. (ada_to_fixed_value): Likewise. (unwrap_value): Likewise. * value.c (deprecated_value_address_hack): Remove. (value_address): New function. (value_raw_address): Likewise. (set_value_address): Likewise. (value_fn_field): Use set_value_address. (value_from_contents_and_address): Likewise. (value_fn_field): Likewise. (allocate_value_lazy): Don't use VALUE_ADDRESS. (value_as_address): Use value_address. (value_static_field): Likewise. * valops.c (search_struct_field): Use set_value_address. (value_at): Likewise. (value_at_lazy): Likewise. (value_repeat): Likewise. (value_cast_structs): Use value_address. (value_cast): Likewise. (value_fetch_lazy): Likewise. (value_assign): Likewise. (value_repeat): Likewise. (address_of_variable): Likewise. (value_coerce_array): Likewise. (value_coerce_function): Likewise. (value_addr): Likewise. (search_struct_field): Likewise. (search_struct_method): Likewise. (find_method_list): Likewise. (value_struct_elt_for_reference): Likewise. (value_full_object): Likewise. * jv-valprint.c (java_value_print): Use set_value_address. * value.h (deprecated_value_address_hack): Remove. (VALUE_ADDRESS): Remove. (value_address): Declare. (value_raw_address): Declare. (set_value_address): Declare.
* gdb:Tom Tromey2009-03-201-25/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Updated copyright notices for most files.Joel Brobecker2009-01-031-1/+1
|
* gdbTom Tromey2008-10-281-74/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.