summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-11-04 00:25:38 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-11-04 00:25:38 +0000
commit8e5d13c34ab3a45f0f78cf1aaae0ddab4a284e66 (patch)
tree123bda9e89bef26bcd354fa25e57b3141e2cb981
parentb4be33d4f4bea78bc6e0758a8bfee8dd36a3e304 (diff)
downloadgdb-8e5d13c34ab3a45f0f78cf1aaae0ddab4a284e66.tar.gz
merge from mainline
-rw-r--r--gdb/ChangeLog830
-rw-r--r--gdb/MAINTAINERS6
-rw-r--r--gdb/Makefile.in29
-rw-r--r--gdb/NEWS14
-rw-r--r--gdb/ada-lang.c6
-rw-r--r--gdb/arm-tdep.c2
-rw-r--r--gdb/blockframe.c64
-rw-r--r--gdb/breakpoint.c21
-rw-r--r--gdb/buildsym.c14
-rw-r--r--gdb/c-exp.y17
-rw-r--r--gdb/c-lang.h3
-rw-r--r--gdb/c-typeprint.c32
-rw-r--r--gdb/coffread.c22
-rw-r--r--gdb/complaints.c2
-rw-r--r--gdb/complaints.h18
-rwxr-xr-xgdb/configure863
-rw-r--r--gdb/configure.in2
-rw-r--r--gdb/configure.tgt10
-rw-r--r--gdb/corefile.c8
-rw-r--r--gdb/cp-valprint.c16
-rw-r--r--gdb/cris-tdep.c8
-rw-r--r--gdb/d10v-tdep.c2
-rw-r--r--gdb/dbxread.c22
-rw-r--r--gdb/defs.h7
-rw-r--r--gdb/demangle.c31
-rw-r--r--gdb/dwarf2cfi.c149
-rw-r--r--gdb/dwarf2cfi.h36
-rw-r--r--gdb/dwarf2read.c374
-rw-r--r--gdb/dwarfread.c44
-rw-r--r--gdb/elfread.c8
-rw-r--r--gdb/event-top.c7
-rw-r--r--gdb/expression.h21
-rw-r--r--gdb/f-valprint.c12
-rw-r--r--gdb/findvar.c27
-rw-r--r--gdb/frame.c36
-rw-r--r--gdb/frame.h30
-rwxr-xr-xgdb/gdb_indent.sh2
-rw-r--r--gdb/gdbarch.c242
-rw-r--r--gdb/gdbarch.h128
-rwxr-xr-xgdb/gdbarch.sh11
-rw-r--r--gdb/gdbcore.h7
-rw-r--r--gdb/gdbtypes.c47
-rw-r--r--gdb/gdbtypes.h16
-rw-r--r--gdb/gnu-v3-abi.c3
-rw-r--r--gdb/h8300-tdep.c84
-rw-r--r--gdb/h8500-tdep.c115
-rw-r--r--gdb/hppa-tdep.c7
-rw-r--r--gdb/hpread.c26
-rw-r--r--gdb/i386-interix-nat.c190
-rw-r--r--gdb/i386-interix-tdep.c365
-rw-r--r--gdb/i386-linux-tdep.c16
-rw-r--r--gdb/i386-tdep.c32
-rw-r--r--gdb/i386bsd-nat.c11
-rw-r--r--gdb/i386obsd-nat.c8
-rw-r--r--gdb/i386obsd-tdep.c122
-rw-r--r--gdb/i386v-nat.c2
-rw-r--r--gdb/i387-tdep.c47
-rw-r--r--gdb/ia64-tdep.c4
-rw-r--r--gdb/infcmd.c36
-rw-r--r--gdb/inferior.h10
-rw-r--r--gdb/infrun.c36
-rw-r--r--gdb/jv-exp.y16
-rw-r--r--gdb/language.c7
-rw-r--r--gdb/language.h3
-rw-r--r--gdb/lin-lwp.c7
-rw-r--r--gdb/linespec.c12
-rw-r--r--gdb/m32r-stub.c12
-rw-r--r--gdb/m68hc11-tdep.c4
-rw-r--r--gdb/macrotab.c8
-rw-r--r--gdb/mdebugread.c62
-rw-r--r--gdb/mi/ChangeLog49
-rw-r--r--gdb/mi/gdbmi.texinfo42
-rw-r--r--gdb/mi/mi-cmd-stack.c26
-rw-r--r--gdb/mi/mi-cmd-var.c40
-rw-r--r--gdb/mi/mi-main.c133
-rw-r--r--gdb/mi/mi-out.c30
-rw-r--r--gdb/mips-linux-nat.c4
-rw-r--r--gdb/mips-tdep.c70
-rw-r--r--gdb/mn10300-tdep.c2
-rw-r--r--gdb/objc-exp.y25
-rw-r--r--gdb/objc-lang.c69
-rw-r--r--gdb/objc-lang.h2
-rw-r--r--gdb/p-exp.y3
-rw-r--r--gdb/parse.c18
-rw-r--r--gdb/ppc-sysv-tdep.c1
-rw-r--r--gdb/printcmd.c14
-rw-r--r--gdb/regcache.c99
-rw-r--r--gdb/regcache.h20
-rw-r--r--gdb/reggroups.c268
-rw-r--r--gdb/reggroups.h61
-rw-r--r--gdb/remote-rdi.c2
-rw-r--r--gdb/remote-rdp.c2
-rw-r--r--gdb/remote-sds.c1
-rw-r--r--gdb/remote-sim.c2
-rw-r--r--gdb/remote-vx.c2
-rw-r--r--gdb/remote-vx68.c2
-rw-r--r--gdb/remote-vxmips.c2
-rw-r--r--gdb/remote-vxsparc.c2
-rw-r--r--gdb/rs6000-tdep.c13
-rw-r--r--gdb/s390-tdep.c8
-rw-r--r--gdb/sh-tdep.c19
-rw-r--r--gdb/solib-sunos.c8
-rw-r--r--gdb/solib-svr4.c71
-rw-r--r--gdb/solib-svr4.h4
-rw-r--r--gdb/source.c7
-rw-r--r--gdb/sparc-tdep.c36
-rw-r--r--gdb/stabsread.c107
-rw-r--r--gdb/stabsread.h4
-rw-r--r--gdb/stack.c23
-rw-r--r--gdb/symfile.c7
-rw-r--r--gdb/symfile.h6
-rw-r--r--gdb/symtab.c163
-rw-r--r--gdb/symtab.h107
-rw-r--r--gdb/target.c2
-rw-r--r--gdb/testsuite/ChangeLog38
-rw-r--r--gdb/testsuite/gdb.mi/ChangeLog24
-rw-r--r--gdb/testsuite/gdb.mi/mi-return.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-stack.exp6
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-block.exp8
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-child.exp30
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-cmd.exp50
-rw-r--r--gdb/testsuite/gdb.mi/mi1-pthreads.exp220
-rw-r--r--gdb/thread-db.c2
-rw-r--r--gdb/tracepoint.c4
-rw-r--r--gdb/ui-out.c17
-rw-r--r--gdb/ui-out.h4
-rw-r--r--gdb/utils.c63
-rw-r--r--gdb/v850ice.c6
-rw-r--r--gdb/valops.c36
-rw-r--r--gdb/value.h2
-rw-r--r--gdb/varobj.c16
-rw-r--r--gdb/version.in2
-rw-r--r--gdb/win32-nat.c2
-rw-r--r--gdb/wince.c2
-rw-r--r--gdb/x86-64-linux-nat.c2
-rw-r--r--gdb/x86-64-linux-tdep.c76
-rw-r--r--gdb/x86-64-tdep.c383
-rw-r--r--gdb/x86-64-tdep.h5
-rw-r--r--gdb/xcoffread.c24
-rw-r--r--gdb/xstormy16-tdep.c6
-rw-r--r--gdb/z8k-tdep.c112
141 files changed, 5317 insertions, 1892 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6e1fe6ed0ae..0dd7b517777 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -195,6 +195,815 @@
(mi_execute_command): Don't print the prompt if the command return
is MI_CMD_QUIET.
+2002-11-03 Mark Kettenis <kettenis@gnu.org>
+
+ * i387-tdep.c (i387_print_float_info): Call fputs_filtered instead
+ of puts_filtered.
+
+ * i387-tdep.c (i387_print_float_info): Replace calls to
+ register_read and deprecated_read_register_gen with calls to
+ frame_register_read, and make the necessary adjustments to the
+ surrounding code.
+
+2002-11-02 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (register_reggroup_p): Allow default value.
+ * gdbarch.h, gdbarch.c: Regenerate.
+
+2002-11-02 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.h: Add coment indicating replacements for deprecated
+ functions.
+
+2002-11-02 Andrew Cagney <cagney@redhat.com>
+
+ * reggroups.h, reggroups.c: New files.
+ * regcache.c: Include "reggroups.h".
+ (enum regcache_dump_what): Add `regcache_dump_groups'.
+ (regcache_dump): Contract size of the "Type" column. When
+ specified, dump the register's groups.
+ (maintenance_print_register_groups): New function.
+ (_initialize_regcache): Add command `maint print register-groups'.
+ * Makefile.in (COMMON_OBS): Add reggroups.o
+ (SFILES): Add reggroups.c.
+ (reggroups_h): Define.
+ (regcache.o, gdbarch.o): Update dependencies.
+ (reggroups.o): Specify dependencies.
+ * gdbarch.sh (register_reggroup_p): Add pure multi-arch method.
+ Add opaque declaration for `struct reggroup' in generated .h file.
+ Include "reggroups.h" in generated .c file.
+ gdbarch.h, gdbarch.c: Re-generate.
+
+2002-11-02 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.h (deprecated_read_register_gen): Rename
+ read_register_gen.
+ (deprecated_write_register_gen): Rename write_register_gen.
+ * i387-tdep.c: Update.
+ * x86-64-linux-nat.c: Update
+ * wince.c: Update.
+ * thread-db.c: Update.
+ * win32-nat.c: Update.
+ * mips-tdep.c: Update.
+ * d10v-tdep.c: Update.
+ * cris-tdep.c: Update.
+ * remote-sim.c: Update.
+ * remote-rdi.c: Update.
+ * remote-rdp.c: Update.
+ * frame.c: Update.
+ * target.c: Update.
+ * blockframe.c: Update.
+ * x86-64-tdep.c: Update.
+ * xstormy16-tdep.c: Update.
+ * sh-tdep.c: Update.
+ * s390-tdep.c: Update.
+ * rs6000-tdep.c: Update.
+ * sparc-tdep.c: Update.
+ * i386-tdep.c: Update.
+ * dwarf2cfi.c: Update.
+ * regcache.c: Update.
+
+2002-11-01 Joel Brobecker <brobecker@gnat.com>
+
+ New interix-specific files:
+ * config/i386/nm-interix.h: New file.
+ * config/i386/interix.mh: New file.
+ * config/i386/interix.mt: New file.
+ * i386-interix-nat.c: New file.
+ * i386-interix-tdep.c: New file.
+
+2002-11-01 Andrew Cagney <cagney@redhat.com>
+
+ * frame.h (deprecated_generic_get_saved_register): Rename
+ generic_get_saved_register.
+ * blockframe.c (deprecated_generic_get_saved_register): Update.
+ * xstormy16-tdep.c (xstormy16_get_saved_register): Update.
+ (xstormy16_frame_saved_register): Update.
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+ * ia64-tdep.c (ia64_get_saved_register): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * config/m32r/tm-m32r.h (GET_SAVED_REGISTER): Update.
+ * arm-tdep.c (arm_gdbarch_init): Update.
+
+2002-10-31 Daniel Jacobowitz <drow@mvista.com>
+
+ * lin-lwp.c (lin_lwp_resume): Remove resume_all test for !step.
+
+2002-10-31 Daniel Jacobowitz <drow@mvista.com>
+
+ * i386-linux-tdep.c (i386_linux_pc_in_sigtramp): Check for
+ trampolines in sigaction.
+
+2002-10-31 Andrew Cagney <cagney@redhat.com>
+
+ * h8300-tdep.c: Include "gdb_assert.h".
+ (h8300_print_register): Add gdbarch, file and frame parameters.
+ Use frame_read_unsigned_register to read the register's value.
+ Use fprintf_filtered to display output.
+ (h8300_print_registers_info): Replace h8300_do_registers_info.
+ (h8300_gdbarch_init): Set print_registers_info.
+
+2002-10-31 Andrew Cagney <cagney@redhat.com>
+
+ * frame.c (frame_read_unsigned_register): New function.
+ (frame_read_signed_register): New function.
+ * frame.h (frame_read_unsigned_register): Declare.
+ (frame_read_signed_register): Declare.
+
+2002-10-31 Andrew Cagney <cagney@redhat.com>
+
+ * h8500-tdep.c (h8500_print_registers_info): New static function,
+ clone of infcmd.c's default_print_registers_info.
+ (h8500_do_registers_info): New funtion.
+ (h8500_print_register_hook): Rename print_register_hook, make
+ static.
+
+ * config/h8500/tm-h8500.h: Update copyright.
+ (DEPRECATED_DO_REGISTERS_INFO): Define.
+ (h8500_do_registers_info: Declare.
+ (PRINT_REGISTER_HOOK): Delete macro.
+ (print_register_hook): Delete function.
+
+2002-10-31 Andrew Cagney <cagney@redhat.com>
+
+ * z8k-tdep.c (z8k_print_register_hook): Make static.
+ (z8k_print_registers_info): New static function, clone of
+ infcmd.c's default_print_registers_info.
+ (z8k_do_registers_info): New function. Wrap
+ z8k_print_registers_info.
+ * config/z8k/tm-z8k.h: Update copyright.
+ (PRINT_REGISTER_HOOK): Delete macro.
+ (z8k_print_register_hook): Delete declaration.
+ (DEPRECATED_DO_REGISTERS_INFO): Define.
+ (z8k_do_registers_info): Declare.
+
+2002-10-30 Joel Brobecker <brobecker@gnat.com>
+
+ * hppa-tdep.c (find_function_in_inferior): Remove this extern,
+ as this is already provided by value.h, and was actually causing
+ a compilation error because of a conflict in parameter type
+ declaration due to a missing const keyword.
+ (low_text_segment_addres): Fix a compilation warning.
+
+2002-10-29 Daniel Jacobowitz <drow@mvista.com>
+
+ * mips-linux-nat.c (mips_linux_cannot_fetch_register): Don't fetch
+ registers without a name.
+ (mips_linux_cannot_store_register): Don't store registers without
+ a name.
+
+2002-10-28 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.c (find_addr_symbol): Delete. (It was already commented
+ out.)
+ * symtab.h: Delete prototype for find_addr_symbol.
+
+2002-10-26 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_DO_REGISTERS_INFO): Rename
+ DO_REGISTERS_INFO.
+ gdbarch.h, gdbarch.c: Re-generate.
+ * infcmd.c (default_print_registers_info): Update reference.
+ * mips-tdep.c (mips_gdbarch_init): Set deprecated_do_registers_info.
+ (mips_dump_tdep): Do not print DO_REGISTERS_INFO.
+ * sh-tdep.c (sh_gdbarch_init): Ditto.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
+ * h8300-tdep.c (h8300_gdbarch_init): Ditto.
+
+2002-10-26 Mark Kettenis <kettenis@gnu.org>
+
+ * x86-64-tdep.c (x86_64_init_abi): Set init_extra_frame_info to
+ cfi_init_extra_frame_info.
+ * x86-64-tdep.h (x86_64_init_extra_frame_info): Remove prototype.
+ * x86-64-linux-tdep.c (x86_64_init_extra_frame_info): Remove function.
+
+ * x86-64-tdep.c (x86_64_init_abi): Add calls to override the i386
+ target where necessary. Add more comments and remove the ones
+ that don't provide any useful information.
+
+ * i386-tdep.c (i386_frame_saved_pc): Replace call to
+ deprecated_read_register_dummy with
+ frame_unwind_unsigned_register.
+
+ * i386-tdep.c (i386_extract_struct_value_address): Use
+ regcache_raw_read_unsigned instead of
+ regcache_cooked_read_unsigned since we know that the register
+ we're reading isn't a pseudo register. Rename variable 'val' into
+ the more descriptive 'addr'.
+
+ * x86-64-tdep.c: Fix some formatting problems, mostly in comments.
+ (x86_64_push_return_address): Add comment.
+ (x86_64_pop_frame): Make static.
+ (examine_argument): Clarify comment.
+ (x86_64_skip_prologue): Make prolog_expact variable static.
+
+ * dwarf2cfi.c: Fix some formatting problems.
+ (context_cpy, read_encoded_pointer): Clarify comments.
+
+ * x86-64-tdep.c (x86_64_breakpoint_from_pc): Constify.
+ (x86_64_init_abi): Move set_gdbarch_* calls that overlap with the
+ i386 target back into x86_64_gdbarch_init. Add some comments and
+ remove meaningless ones.
+
+2002-10-25 Andrew Cagney <cagney@redhat.com>
+
+ * complaints.h (struct deprecated_complaint): Rename `struct
+ complaint'.
+ * complaints.c (complain): Update.
+ * remote-vx68.c, remote-vxmips.c, remote-vxsparc.c: Delete
+ incorrect comment indicating that "symfile.h" was being included
+ for the `struct complaint' definition.
+ * remote-vx.c: Update.
+ * objc-lang.c: Update.
+ * xcoffread.c: Update.
+ * hpread.c: Update.
+ * mdebugread.c: Update.
+ * stabsread.c: Update.
+ * dwarf2read.c: Update.
+ * dwarfread.c: Update.
+ * elfread.c: Update.
+ * coffread.c: Update.
+ * stabsread.h: Update.
+ * dbxread.c: Update.
+ * buildsym.c: Update.
+ * gdbtypes.c: Update.
+ * macrotab.c: Update.
+
+2002-10-25 Mark Kettenis <kettenis@gnu.org>
+
+ * x86-64-tdep.c (x86_64_gdbarch_init): Make a bit more similar to
+ the version in i386-tdep.c. Move set_gdbarch_* calls out into...
+ (x86_64_init_abi): ...new function.
+
+ * Makefile.in (i386v-nat.o): Add $(i386_tdep_h).
+ * i386v-nat.c: Include "i386-tdep.h".
+
+2002-10-25 Andrew Cagney <cagney@redhat.com>
+
+ * gdbtypes.c (address_space_name_to_int): Update.
+ (address_space_int_to_name): Update.
+ * gdbarch.sh (address_class_type_flags_to_name): Change to a pure
+ multi-arch predicate.
+ (address_class_name_to_type_flags): Ditto.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+ * MAINTAINERS: Check all warnings when h8300hms and alpha-elf.
+
+2002-10-24 Martin M. Hunt <hunt@redhat.com>
+
+ * utils.c (string_to_core_addr): Revert patch from 11 Oct.
+
+2002-10-24 Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.h (INIT_SAL): Delete macro.
+ (init_sal): Export.
+ * symtab.c (init_sal): New function.
+
+ * ada-lang.c (ada_finish_decode_line_1): Change INIT_SAL macro
+ to init_sal function call.
+ (find_sal_from_funcs_and_line): Ditto.
+ (all_sals_for_line): Ditto.
+ * breakpoint.c (create_internal_breakpoint): Ditto.
+ (create_fork_vfork_event_catchpoint): Ditto.
+ (create_exec_event_catchpoint): Ditto.
+ (parse_breakpoint_sals): Ditto.
+ (watch_command_1): Ditto.
+ (handle_gnu_4_16_catch_command): Ditto.
+ (clear_command): Ditto.
+ * hppa-tdep.c (child_enable_exception_callback): Ditto.
+ * infcmd.c (run_stack_dummy): Ditto.
+ * infrun.c (process_event_stop_test): Ditto.
+ (check_sigtramp2): Ditto.
+ (step_over_function): Ditto.
+ * linespec.c (decode_line_2): Ditto.
+ (decode_line_1): Ditto.
+ * source.c (line_info): Ditto.
+ * symtab.c (find_pc_sect_line): Ditto.
+
+2002-10-24 Michal Ludvig <mludvig@suse.cz>
+
+ * dwarf2cfi.c (struct context)
+ (struct context_reg): Moved to dwarf2cfi.h
+ (context_alloc, frame_state_alloc, context_cpy):
+ Made extern instead of static, removed prototypes.
+ * dwarf2cfi.h (struct context)
+ (struct context_reg): New, moved from dwarf2cfi.c
+ (context_alloc, frame_state_alloc, context_cpy):
+ New prototypes.
+ * x86-64-linux-tdep.c (x86_64_linux_sigtramp_saved_pc):
+ Changed from static to extern.
+ (LINUX_SIGINFO_SIZE, LINUX_SIGCONTEXT_PC_OFFSET)
+ (LINUX_SIGCONTEXT_FP_OFFSET)
+ (LINUX_UCONTEXT_SIGCONTEXT_OFFSET): Adjusted.
+ (x86_64_linux_in_sigtramp, x86_64_linux_frame_chain)
+ (x86_64_init_frame_pc, x86_64_init_extra_frame_info): New.
+ * x86-64-tdep.c (x86_64_gdbarch_init): Several
+ set_gdbarch_*() calls now use x86-64 specific functions
+ instead of DWARF2 CFI ones.
+ * x86-64-tdep.h (x86_64_linux_in_sigtramp)
+ (x86_64_linux_frame_chain, x86_64_init_frame_pc)
+ (x86_64_init_extra_frame_info): New prototypes.
+
+2002-10-23 David Carlton <carlton@math.stanford.edu>
+
+ * linespec.c: #include "parser-defs.h".
+ Delete prototype for find_template_name_end.
+ * Makefile.in (linespec.o): Depend on $(parser_defs_h).
+
+2002-10-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * NEWS: add recent mi fixes.
+ * varobj.c (struct varobj): Add new "updated" flag.
+ (new_variable): Default "updated" flag to 0.
+ (varobj_set_value): Set "updated" flag to 1 if value
+ changes.
+ (varobj_update): Check varobj "updated" flag before
+ comparing old and refreshed values. Fix for
+ PR gdb/702.
+
+2002-10-23 David Carlton <carlton@math.stanford.edu>
+
+ * parse.c (parse_exp_1): Use BLOCK_START.
+ * x86-64-tdep.c (x86_64_skip_prologue): Use BLOCK_END,
+ SYMBOL_BLOCK_VALUE.
+ * objc-lang.c (find_methods): Use BLOCK_START, BLOCK_END.
+
+2002-10-23 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.c: Delete cplusplus_hint.
+ Delete prototype for find_template_name_end.
+
+2002-10-23 Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.h: Update comment.
+
+2002-10-23 Michael Snyder <msnyder@redhat.com>
+
+ * printcmd.c (address_info): Restore quotes in output.
+ * valops.c (value_of_local): Restore quotes in error message.
+
+2002-10-23 Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.c (symbol_demangled_name): New function.
+ * symtab.h (SYMBOL_DEMANGLED_NAME): Simplify macro, by
+ turning most of it into a function.
+ (symbol_demangled_name): Export.
+
+2002-10-23 Michael Snyder <msnyder@redhat.com>
+
+ * valops.c (value_of_local): Restore quotes in error message.
+
+2002-10-23 Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.c (symbol_init_language_specific): New function.
+ * symtab.h (SYMBOL_INIT_LANGUAGE_SPECIFIC): Simplify macro, by
+ turning most of it into a function.
+ (symbol_init_language_specific): Export.
+
+2002-10-23 David Carlton <carlton@math.stanford.edu>
+
+ * dwarf2read.c (dwarf_tag_name): Add DWARF 3 names.
+ (dwarf_attr_name): Ditto.
+ (dwarf_type_encoding_name): Ditto.
+ (scan_partial_symbols): Descend into DW_TAG_namespace entries.
+ (process_die): Handle DW_TAG_namespace,
+ DW_TAG_imported_declaration, DW_TAG_imported_module.
+ (read_namespace): New function.
+
+2002-10-22 Joel Brobecker <brobecker@gnat.com>
+
+ * configure.in: Define NEW_PROC_API on Interix too.
+ * configure: Regenerate.
+
+2002-10-21 Joel Brobecker <brobecker@gnat.com>
+
+ * configure: Regenerate using the proper version of autoconf.
+
+2002-10-21 Elena Zannoni <ezannoni@redhat.com>
+
+ * findvar.c (read_var_value): Temporarily disable TLS code, until
+ complete TLS support is added.
+
+2002-10-21 Jim Blandy <jimb@redhat.com>
+ Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.h (address_class): Re-add LOC_THREAD_LOCAL_STATIC
+ for thread local storage locations.
+ (struct symbol): Add objfile field.
+ (SYMBOL_OBJFILE): Define.
+ * dwarf2read.c (is_thread_local): New static variable.
+ (new_symbol): If variable is in thread local fill in address class
+ and objfile appropriately.
+ (decode_locdesc): Recognize and handle DW_OP_GNU_push_tls_address
+ stack operation.
+ * printcmd.c (address_info): Print the information for thread
+ local storage variable.
+ * findvar.c (read_var_value): In case of thread local variable,
+ defer to the target vector code to compute address.
+
+2002-10-21 Elena Zannoni <ezannoni@redhat.com>
+
+ * solib-svr4.c (svr4_fetch_objfile_link_map): New function.
+ * solib-svr4.h (svr4_fetch_objfile_link_map): Export.
+
+2002-10-21 Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.h (address_class): Rename
+ LOC_THREAD_LOCAL_STATIC to LOC_HP_THREAD_LOCAL_STATIC.
+ * hpread.c (hpread_process_one_debug_symbol): Ditto.
+ * printcmd.c (address_info): Ditto.
+ * findvar.c (symbol_read_needs_frame, read_var_value): Ditto.
+
+2002-10-20 Mark Kettenis <kettenis@gnu.org>
+
+ * i386bsd-nat.c (i386bsd_dr_set, i386bsd_dr_get_status): Use
+ DBREG_DRX macro to acces debug registers.
+
+ * Makefile.in (i386obsd-tdep.o): New target.
+
+ * solib-sunos.c: Include "bcache.h" and "regcache.h".
+ * Makefile.in (solib-sunos.o): Add $(bcache_h) and $(regcache_h).
+
+ * configure.tgt (i[3456]86-*-openbsd*): Set gdb_target to obds.
+ * config/i386/obsd.mt: New file.
+ * i386bsd-nat.c (_initialize_i386bsd_nat): Introduce
+ i386obsd_sc_pc_offset and i386obsd_sc_sp_offset;
+ * i386obsd-nat.c (_initialize_i386obsd_nat): Set
+ i386obsd_sigtramp_start and i386obsd_sigtramp_end instead of
+ i386nbsd_sigtramp_start and i386nbsd_sigtramp_end.
+ * i386obsd-tdep.c: New file.
+
+2002-10-19 Adam Fedor <fedor@gnu.org>
+
+ * objc-exp.y (name_not_typename): Fix invalid comment.
+
+2002-10-20 Mark Kettenis <kettenis@gnu.org>
+
+ * solib-sunos.c (allocate_rt_common_objfile): Use bcache_xmalloc
+ to allocate partial syms and macro byte caches.
+
+2002-10-18 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.h: Delete 'struct source' and 'struct sourcevector'.
+
+2002-10-18 Adam Fedor <fedor@gnu.org>
+
+ * stabsread.c (find_name_end): New function.
+ (define_symbol): Use it.
+
+2002-10-18 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/alpha/nm-fbsd.h (CANNOT_STEP_BREAKPOINT): Define to 1.
+ * config/alpha/nm-linux.h (CANNOT_STEP_BREAKPOINT): Define to 1.
+ * config/alpha/nm-nbsd.h (CANNOT_STEP_BREAKPOINT): Define to 1.
+ * config/alpha/nm-osf.h (CANNOT_STEP_BREAKPOINT): Define to 1.
+
+2002-10-17 David Carlton <carlton@math.stanford.edu>
+
+ * symfile.h: Add opaque declaration for struct obstack.
+ Declare obsavestring to take a const char *.
+ * symfile.c (obsavestring): Make first argument a const char *.
+
+2002-10-16 Adam Fedor <fedor@gnu.org>
+
+ * breakpoint.c (parse_breakpoint_sals): Ignore ObjC method
+ names when matching breakpoints in current file.
+
+2002-10-16 Kevin Buettner <kevinb@redhat.com>
+
+ * dwarf2read.c (dwarf2_invalid_pointer_size): New complaint.
+ (read_tag_pointer_type): Add address class support.
+ * gdbarch.sh (ADDRESS_CLASS_TYPE_FLAGS)
+ (ADDRESS_CLASS_TYPE_FLAGS_TO_NAME, ADDRESS_CLASS_NAME_TO_TYPE_FLAGS):
+ New methods.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * gdbtypes.c (address_space_name_to_int, address_space_int_to_name)
+ (make_type_with_address_space, recursive_type_dump): Add address
+ class support.
+ * gdbtypes.h (TYPE_FLAG_ADDRESS_CLASS_1, TYPE_FLAG_ADDRESS_CLASS_2)
+ (TYPE_FLAG_ADDRESS_CLASS_ALL, TYPE_ADDRESS_CLASS_1)
+ (TYPE_ADDRESS_CLASS_2, TYPE_ADDRESS_CLASS_ALL): New defines
+
+2002-10-16 Klee Dienes <kdienes@apple.com>
+
+ * stabsread.c (read_tilde_fields): Use name[sizeof(vptr_name)-2]
+ to get the last character of a char[] buffer, not
+ name[sizeof(vptr_name)-1].
+
+2002-10-14 Adam Fedor <fedor@gnu.org>
+
+ * symtab.h: New objc_specific struct.
+ (SYMBOL_INIT_LANGUAGE_SPECIFIC): Handle ObjC.
+ (SYMBOL_DEMANGLED_NAME): Likewise.
+
+2002-10-14 Adam Fedor <fedor@gnu.org>
+
+ * symfile.c (init_filename_language_table): Add ObjC file extension.
+
+2002-10-14 Adam Fedor <fedor@gnu.org>
+
+ * utils.c (puts_filtered_tabular): New function.
+ (fprintf_symbol_filtered): Get ObjC demangled name.
+ * defs.h (puts_filtered_tabular): Declared.
+
+2002-10-14 Kevin Buettner <kevinb@redhat.com>
+
+ * c-lang.h (c_type_print_varspec_prefix): Delete.
+ * c-typeprint.c (c_type_print_varspec_prefix): Make static. Add
+ ``need_post_space'' parameter. Adjust all callers.
+
+2002-10-14 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/mips/nm-irix4.h (HAVE_NONSTEPPABLE_WATCHPOINT): Define to 1.
+ * config/mips/nm-irix5.h (HAVE_NONSTEPPABLE_WATCHPOINT): Likewise.
+ * config/mips/tm-embed.h (HAVE_NONSTEPPABLE_WATCHPOINT): Likewise.
+ * config/pa/nm-hppah.h (HAVE_NONSTEPPABLE_WATCHPOINT): Likewise.
+
+2002-10-13 Adam Fedor <fedor@gnu.org>
+
+ * source.c (print_source_lines): Update comments.
+
+2002-10-13 Adam Fedor <fedor@gnu.org>
+
+ * valops.c (value_of_local): New function.
+ (value_of_this): Use it.
+ * value.h (value_of_local): Declared.
+
+2002-10-13 Adam Fedor <fedor@gnu.org>
+
+ * parse.c: (length_of_subexp, prefixify_subexp): Handle
+ OP_MSGCALL, OP_SELECTOR, OP_NSSTRING, and OP_SELF.
+
+2002-10-12 Adam Fedor <fedor@gnu.org>
+
+ * language.c (binop_result_type): Add language_objc to case.
+ (integral_type): Likewise.
+ (character_type): Likewise.
+ (string_type): Likewise.
+ (boolean_type): Likewise.
+ (structured_type): Likewise.
+ (binop_type_check): Likewise.
+
+2002-10-11 Adam Fedor <fedor@gnu.org>
+
+ * printcmd.c (address_info): Print 'self' for ObjC.
+
+2002-10-11 Adam Fedor <fedor@gnu.org>
+
+ * expression.h: New ops OP_NSSTRING, OP_SELECTOR, OP_MSGCALL, and
+ OP_SELF.
+
+2002-10-11 Adam Fedor <fedor@gnu.org>
+
+ * language.h (CAST_IS_CONVERSION): Add language_objc.
+
+2002-10-11 Adam Fedor <fedor@gnu.org>
+
+ * defs.h (enum language): Add language_objc.
+
+2002-10-11 Klee Dienes <kdienes@apple.com>
+
+ * findvar.c (read_memory_typed_address): New function.
+ * gdbcore.h (read_memory_typed_address): Add prototype.
+ * blockframe.c (sigtramp_saved_pc): Use read_memory_typed_address
+ to read a value destined for a CORE_ADDR, not read_memory_integer.
+ * f-valprint.c (f77_get_dynamic_upperbound): Ditto.
+ (f77_get_dynamic_lowerbound): Ditto.
+
+2002-10-11 Martin M. Hunt <hunt@redhat.com>
+
+ * utils.c (string_to_core_addr): After turning string into
+ a number, convert to a CORE_ADDR using INTEGER_TO_ADDRESS
+ which will do necessary sign-extension, etc.
+
+2002-10-11 Daniel Jacobowitz <drow@mvista.com>
+
+ * c-exp.y (THIS): Delete token and grammar rule.
+ (yylex): Don't return THIS.
+ * cp-valprint.c (vtbl_ptr_name_old): Delete.
+ (cp_is_vtbl_ptr_type): Don't check vtbl_ptr_name_old.
+ * demangle.c (cplus_markers): Update comment. Put '$'
+ first. Remove CPLUS_MARKER.
+ (_initialize_demangler): Don't call set_cplus_marker_for_demangling.
+ * jv-exp.y (THIS): Delete token and grammar rule.
+ (yylex): Don't return THIS.
+ * mips-tdep.c (mips_dump_tdep): Don't dump CPLUS_MARKER.
+ * objc-exp.y (THIS): Delete token and grammar rule.
+ (yylex): Don't return THIS.
+ * p-exp.y (yylex): Remove reference to CPLUS_MARKER.
+ * stabsread.c (vptr_name, vb_name): Replace CPLUS_MARKER with '$'.
+ (read_member_functions): Likewise for opname.
+ (read_tilde_fields): Use is_cplus_marker.
+
+ * defs.h (CPLUS_MARKER): Don't define.
+ * config/tm-sysv4.h (CPLUS_MARKER): Likewise.
+ * config/i386/xm-i386sco.h (CPLUS_MARKER): Likewise.
+ * config/mips/tm-irix3.h (CPLUS_MARKER): Likewise.
+ * config/mips/tm-irix6.h (CPLUS_MARKER): Likewise.
+ * config/rs6000/tm-rs6000.h (CPLUS_MARKER): Likewise.
+
+ * config/i386/tm-i386v4.h: Delete file.
+ * config/djgpp/fnchange.lst: Delete tm-i386v4.h.
+ * config/i386/tm-i386sol2.h: Include "i386/tm-i386.h" instead.
+ * config/i386/tm-i386v42mp.h: Include "i386/tm-i386.h" instead.
+ * config/i386/tm-ptx.h: Include "i386/tm-i386.h" instead.
+ * config/i386/i386gnu.mt (TM_FILE): Use tm-i386.h.
+ * config/i386/i386sco5.mt (TM_FILE): Likewise.
+ * config/i386/i386v4.mt (TM_FILE): Likewise.
+ * config/i386/ncr3000.mt (TM_FILE): Likewise.
+
+2002-10-10 Marko Mlinar <markom@opencores.org>
+
+ * infrun.c (resume): Convert #ifdef HAVE_NONSTEPPABLE_WATCHPOINT into C,
+ accidentially not commited 2002-10-09
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2002-10-09 Marko Mlinar <markom@opencores.org>
+
+ * infrun.c (resume): Convert #ifdef HAVE_NONSTEPPABLE_WATCHPOINT into C.
+ * gdbarch.sh (HAVE_NONSTEPPABLE_WATCHPOINT): Add.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2002-10-08 Petr Sorfa <petrs@caldera.com>
+
+ Revised and re-submitted by John Wolfe <jlw@caldera.com>
+
+ Move the Dwarf 2 abbrev table to a per-compilation-unit structure,
+ so we can work on more than one compilation unit at a time. This
+ helps prepare GDB to handle inter-CU die references.
+ * dwarf2read.c (ABBREV_HASH_SIZE): moved definition forward in
+ the code to be defined before struct comp_unit_head.
+ (comp_unit_head): Added new members - offset, cu_head,
+ begin_die, next and dwarf2_abbrevs.
+ (dwarf2_abbrevs): Removed single static var; now member of
+ struct comp_unit_head.
+ dwarf2_build_psymtabs_hard): Complete new struct comp_unit_head
+ members.
+ (psymtab_to_symtab_1): Changed to work with the new
+ struct comp_unit_head.
+ (dwarf2_read_abbrevs): Now accepts a cu_header parameter and
+ constructs the dwarf2_abbrevs[] inside the cu_header.
+ (dwarf2_empty_abbrev_table): Now expects a ptr to a
+ dwarf2_abbrev table to clean up.
+ (dwarf2_lookup_abbrev): Now accepts a cu_header parameter and
+ handling of dwarf2_abbrevs inside the cu_header.
+ (read_partial_die): Now supports the call to the new
+ dwarf2_lookup_abbrev.
+ (read_full_die): Now supports the call to the new
+ dwarf2_lookup_abbrev.
+
+2002-10-06 Christopher Faylor <cgf@redhat.com>
+
+ * Makefile.in (install-gdbtk): Add missing continuation backslash to
+ insure that shell variables, such as "transformed_name" are propagated
+ to later shell statements in rule.
+
+2002-10-06 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/nm-i386sco.h: Add protection against
+ multiple-inclusion. Include "i386/nm-i386v.h".
+ (REGISTER_U_ADDR): Remove define.
+ (i386_register_u_addr): Remove prototype.
+
+2002-10-04 Michael Snyder <msnyder@redhat.com>
+
+ * m32r-stub.c (handle_exception): Make sure exception is "trap"
+ before treating it as a single-step event.
+
+2002-10-03 Adam Fedor <fedor@gnu.org>
+
+ * objc-lang.c: ARI fixes. Change string.h to gdb_string.h.
+ (objc_demangle): Remove assignment in if statements, Replace
+ free with xfree.
+ (add_msglist): Likewise.
+ (end_msglist): Likewise.
+ (complare_selectors): Likewise.
+ (selectors_info): Likewise.
+ (compare_classes): Likewise.
+ (classes_info): Likewise.
+ (print_object_command): Likewise.
+ (find_objc_msgcall_submethod): Replace PTR with void *.
+ * objc-lang.h: Remove check for __STDC__.
+
+2002-10-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * ui-out.h (ui_out_field_fmt_int): New prototype.
+ * ui-out.c (ui_out_field_fmt_int): New function allowing specification
+ of field width and alignment.
+ * stack.c (print_frame_info_base): When printing frame level, use
+ ui_out_field_fmt_int with a width of 2 and left alignment. Fix for
+ PR gdb/192
+
+2002-10-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * MAINTAINERS: Add self to Write After Approval list.
+
+2002-10-02 Elena Zannoni <ezannoni@redhat.com>
+
+ * infcmd.c (interrupt_target_command_wrapper): Delete.
+ (interrupt_target_command): Make non static.
+ (nofp_registers_info): Make static.
+ * stack.c (return_command_wrapper): Delete.
+ (return_command): Make non static.
+
+2002-10-02 Elena Zannoni <ezannoni@redhat.com>
+
+ * event-top.c (gdb_setup_readline): New function. Code moved from
+ _initialize_event_loop().
+ (_initialize_event_loop): Call gdb_setup_readline().
+
+2002-10-02 Andrew Cagney <ac131313@redhat.com>
+
+ * infrun.c (resume): Convert #ifdef CANNOT_STEP_BREAKPOINT into C.
+ * gdbarch.sh (CANNOT_STEP_BREAKPOINT): Add.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2002-10-02 Daniel Jacobowitz <drow@mvista.com>
+
+ Fix PR gdb/778
+ * gdbtypes.c (fill_in_vptr_fieldno): Call check_typedef
+ before recursing.
+ * gnu-v3-abi.c (gnuv3_virtual_fn_field): Check return value
+ of fill_in_vptr_fieldno.
+
+2002-10-02 Elena Zannoni <ezannoni@redhat.com>
+
+ * inferior.h (registers_info, stepi_command, nexti_command,
+ continue_command, interrupt_target_command): Export from infcmd.c.
+ * frame.h (args_info, selected_frame_level_changed_hook,
+ return_command): Export from stack.c.
+ * v850ice.c (stepi_command, nexti_command, continue_command): use
+ prototypes from inferior.h.
+ * tracepoint.c (registers_info, args_info, locals_info): Use
+ prototypes from frame.h and inferior.h.
+ * Makefile.in (mi-main.o): Add dependency on frame.h.
+
+2002-10-02 Andrew Cagney <ac131313@redhat.com>
+
+ * rs6000-tdep.c (rs6000_store_struct_return): Store struct_return
+ value in register 3 adjusted by ppc_gp0_regnum.
+
+ * rs6000-tdep.c (skip_prologue): Bias alloca_reg by ppc_gp0_regnum.
+
+2002-10-02 Marko Mlinar <markom@opencores.org>
+
+ * MAINTAINERS: Add myself to the Write After Approval list.
+
+2002-10-01 Alexandre Oliva <aoliva@redhat.com>
+
+ * mips-tdep.c (mips_find_abi_section): .mdebug.abi64 is the name
+ of the section for the N64 ABI, fixed.
+
+ * config/mips/tm-irix6.h: Include solib.h.
+
+2002-10-01 Elena Zannoni <ezannoni@redhat.com>
+
+ * dwarf2read.c (dwarf_stack_op_name): Recognize more dwarf3 and
+ GNU operators.
+
+2002-10-01 Andrew Cagney <ac131313@redhat.com>
+
+ * NEWS: Mention that MI syntax, selected by "mi" changed to "mi2"
+ and that "mi0" syntax has been removed.
+
+2002-09-30 David Carlton <carlton@math.stanford.edu>
+
+ * Makefile.in (ppc-sysv-tdep.o): Depend on gdb_string_h.
+ * ppc-sysv-tdep.c: #include "gdb_string.h".
+ * remote-sds.c (getmessage): Add semicolon after 'retry' label to
+ pacify GCC.
+
+2002-10-01 Andrew Cagney <ac131313@redhat.com>
+
+ * rs6000-tdep.c (rs6000_gdbarch_init): For powerpc:7400, fix
+ "vrsave"'s register number.
+
+2002-09-30 Andrew Cagney <ac131313@redhat.com>
+
+ * mips-tdep.c (mips_frame_saved_pc): When a generic dummy frame,
+ use frame_unwind_signed_register to obtain the PC.
+ (mips_frame_chain): Handle a generic dummy frame.
+ (mips_init_extra_frame_info): When a generic dummy frame, don't
+ re-compute the frame base.
+ (mips_pop_frame): Handle generic dummy frames.
+ (mips_gdbarch_init): When generic dummy frames, set
+ use_generic_dummy_frames, push_dummy_frame to
+ generic_push_dummy_frame, pc_in_call_dummy to
+ generic_pc_in_call_dummy, and save_dummy_frame_top_of_stack to
+ generic_save_dummy_frame_tos.
+
+2002-09-30 Andrew Cagney <ac131313@redhat.com>
+
+ * blockframe.c (generic_find_dummy_frame): Rewrite. Only test
+ against TOP when TOP was explictly set.
+ (generic_push_dummy_frame): Set TOP to zero.
+
+2002-09-30 Elena Zannoni <ezannoni@redhat.com>
+
+ * event-loop.c (start_event_loop): Rename variable 'result' to
+ 'gdb_result', to avoid conflicts with upcoming intepreters changes.
+
2002-09-30 Keith Seitz <keiths@redhat.com>
* gdb-events.sh (selected_thread_changed): New event.
@@ -207,17 +1016,18 @@
2002-09-30 Fernando Nasser <fnasser@redhat.com>
- * disasm.c: New file.
- * disasm.h: New file.
+ * disasm.c: New file.
+ * disasm.h: New file.
* mi/mi-cmd-disas.c (gdb_dis_asm_read_memory): Moved to disasm.c.
(compare_lines): Ditto.
(dump_insns): Ditto.
- (do_mixed_source_and_assembly): Moved to disasm.c. Added uiout argument.
+ (do_mixed_source_and_assembly): Moved to disasm.c. Added uiout
+ argument.
(do_assembly_only): Ditto.
- (do_disassembly): Renamed to gdb_disassembly and moved to disasm.c.
- Sdded uiout argument.
- * Makefile.in: Add new files. Reorder SFILES list. Update dependencies.
- Include libgdb.a later in the insight executable.
+ (do_disassembly): Renamed to gdb_disassembly and moved to
+ disasm.c. Sdded uiout argument.
+ * Makefile.in: Add new files. Reorder SFILES list. Update
+ dependencies. Include libgdb.a later in the insight executable.
2002-09-29 Andrew Cagney <ac131313@redhat.com>
@@ -371,7 +1181,7 @@
2002-09-22 Fernando Nasser <fnasser@redhat.com>
- * source.c (get_current__or_default_source_symtab_and_line): Initialize
+ * source.c (get_current_or_default_source_symtab_and_line): Initialize
sal.pc and sal.end fields.
(get_current_or_default_source_symtab_and_line): Ditto.
* breakpoint.c (parse_breakpoint_sals): Use correct accessor function
@@ -10460,9 +11270,9 @@ Wed Apr 24 14:22:21 2002 Andrew Cagney <cagney@redhat.com>
* breakpoint.c (break_at_finish_command): Export.
(break_at_finish_at_depth_command): Export.
(tbreak_at_finish_command): Export.
- (_initialize_breakpoint): Delete "xbreak" and "tbreak" commands.
+ (_initialize_breakpoint): Delete "xbreak" and "txbreak" commands.
* hppa-tdep.c (_initialize_hppa_tdep): Add "xbreak" and
- "tbreak" commands, which are HPPA specific.
+ "txbreak" commands, which are HPPA specific.
* printcmd.c (disassemble_command): Remove an ancient
artifact of an old merge.
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index cb667800664..07a6a027237 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -56,7 +56,7 @@ maintainer works with the native maintainer when resolving API issues.
a29k Deleted.
- alpha --target=alpha-elf -Werror
+ alpha --target=alpha-elf ,-Werror
Maintenance only
arc (--target=arc-elf OBSOLETE)
@@ -80,7 +80,7 @@ maintainer works with the native maintainer when resolving API issues.
fr30 (--target=fr30-elf OBSOLETE)
- h8300 --target=h8300hms -Werror
+ h8300 --target=h8300hms ,-Werror
Maintenance only
h8500 --target=h8500hms -Werror
@@ -391,6 +391,7 @@ Martin Hunt hunt@redhat.com
Jim Ingham jingham@apple.com
Daniel Jacobowitz dan@debian.org
Andreas Jaeger aj@suse.de
+Jeff Johnston jjohnstn@redhat.com
Geoff Keating geoffk@redhat.com
Mark Kettenis kettenis@gnu.org
Jim Kingdon jkingdon@engr.sgi.com ++
@@ -403,6 +404,7 @@ Glen McCready gkm@redhat.com
Greg McGary greg@mcgary.org
Jason Merrill jason@redhat.com
David S. Miller davem@redhat.com
+Marko Mlinar markom@opencores.org
Alan Modra amodra@bigpond.net.au
Jason Molenda jmolenda@apple.com
Pierre Muller muller@sources.redhat.com
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 9eb2df530d8..d319ab0eca4 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -550,7 +550,7 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
nlmread.c \
objfiles.c osabi.c \
p-exp.y p-lang.c p-typeprint.c p-valprint.c parse.c printcmd.c \
- regcache.c remote.c \
+ regcache.c reggroups.c remote.c \
scm-exp.c scm-lang.c scm-valprint.c serial.c ser-unix.c source.c \
stabsread.c stack.c std-regs.c symfile.c symmisc.c symtab.c \
target.c thread.c top.c tracepoint.c typeprint.c \
@@ -699,6 +699,7 @@ ppc_tdep_h = ppc-tdep.h $(osabi_h)
ppcnbsd_tdep_h = ppcnbsd-tdep.h
proc_utils_h = proc-utils.h
regcache_h = regcache.h
+reggroups_h = reggroups.h
remote_utils_h = remote-utils.h $(target_h)
remote_h = remote.h
scm_lang_h = scm-lang.h $(scm_tags_h)
@@ -855,7 +856,8 @@ COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o regcache.o \
nlmread.o serial.o mdebugread.o top.o utils.o \
ui-file.o \
frame.o doublest.o \
- gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o cp-abi.o cp-support.o
+ gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o cp-abi.o cp-support.o \
+ reggroups.o
OBS = $(COMMON_OBS) $(ANNOTATE_OBS)
@@ -1686,7 +1688,7 @@ gdbarch.o: gdbarch.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) $(inferior_h) \
$(gdb_string_h) $(symtab_h) $(frame_h) $(inferior_h) $(breakpoint_h) \
$(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(gdbthread_h) \
$(annotate_h) $(symfile_h) $(value_h) $(symcat_h) $(floatformat_h) \
- $(gdb_assert_h) $(gdb_string_h) $(gdb_events_h)
+ $(gdb_assert_h) $(gdb_string_h) $(gdb_events_h) $(reggroups_h)
gdbtypes.o: gdbtypes.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \
$(symfile_h) $(objfiles_h) $(gdbtypes_h) $(expression_h) \
$(language_h) $(target_h) $(value_h) $(demangle_h) $(complaints_h) \
@@ -1763,8 +1765,10 @@ i386nbsd-tdep.o: i386nbsd-tdep.c $(defs_h) $(gdbtypes_h) $(gdbcore_h) \
$(regcache_h) $(arch_utils_h) $(i386_tdep_h) $(i387_tdep_h) \
$(nbsd_tdep_h) $(solib_svr4_h)
i386obsd-nat.o: i386obsd-nat.c $(defs_h)
+i386obsd-tdep.o: i386obsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \
+ $(regcache_h) $(i386_tdep_h) $(i387_tdep_h)
i386v-nat.o: i386v-nat.c $(defs_h) $(frame_h) $(inferior_h) $(language_h) \
- $(gdbcore_h) $(gdb_stat_h) $(floatformat_h) $(target_h)
+ $(gdbcore_h) $(gdb_stat_h) $(floatformat_h) $(target_h) $(i386_tdep_h)
i386v4-nat.o: i386v4-nat.c $(defs_h) $(value_h) $(inferior_h) $(regcache_h) \
$(i386_tdep_h) $(i387_tdep_h) $(gregset_h)
i387-tdep.o: i387-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(language_h) \
@@ -1825,7 +1829,7 @@ lin-lwp.o: lin-lwp.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) \
$(gdbthread_h) $(inferior_h) $(target_h) $(regcache_h) $(gdbcmd_h)
linespec.o: linespec.c $(defs_h) $(symtab_h) $(frame_h) $(command_h) \
$(symfile_h) $(objfiles_h) $(demangle_h) $(value_h) $(completer_h) \
- $(cp_abi_h) $(source_h)
+ $(cp_abi_h) $(source_h) $(parser_defs_h)
linux-proc.o: linux-proc.c $(defs_h) $(inferior_h) $(regcache_h) \
$(gregset_h) $(gdbcore_h) $(gdbthread_h) $(elf_bfd_h) \
$(cli_decode_h) $(gdb_string_h)
@@ -1979,7 +1983,7 @@ ppc-linux-tdep.o: ppc-linux-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
$(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \
$(objfiles_h) $(regcache_h) $(value_h) $(solib_svr4_h) $(ppc_tdep_h)
ppc-sysv-tdep.o: ppc-sysv-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
- $(regcache_h) $(value_h) $(ppc_tdep_h)
+ $(regcache_h) $(value_h) $(gdb_string_h) $(ppc_tdep_h)
ppcbug-rom.o: ppcbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(regcache_h)
ppcnbsd-nat.o: ppcnbsd-nat.c $(defs_h) $(inferior_h) $(ppc_tdep_h) \
@@ -2004,8 +2008,10 @@ procfs.o: procfs.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
ptx4-nat.o: ptx4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h) \
$(gregset_h)
regcache.o: regcache.c $(defs_h) $(inferior_h) $(target_h) $(gdbarch_h) \
- $(gdbcmd_h) $(regcache_h) $(gdb_assert_h) $(gdb_string_h) \
- $(gdbcmd_h)
+ $(gdbcmd_h) $(regcache_h) $(reggroups_h) $(gdb_assert_h) \
+ $(gdb_string_h) $(gdbcmd_h)
+reggroups.o: reggroups.c $(defs_h) $(reggroups_h) $(gdbtypes_h) \
+ $(gdb_assert_h) $(regcache_h) $(command_h) $(gdbcmd_h)
remote-array.o: remote-array.c $(defs_h) $(gdbcore_h) $(target_h) \
$(gdb_string_h) $(command_h) $(serial_h) $(monitor_h) \
$(remote_utils_h) $(inferior_h) $(version_h) $(regcache_h)
@@ -2132,7 +2138,8 @@ solib-legacy.o: solib-legacy.c $(defs_h) $(gdbcore_h) $(solib_svr4_h)
solib-osf.o: solib-osf.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \
$(symfile_h) $(objfiles_h) $(target_h) $(inferior_h) $(solist_h)
solib-sunos.o: solib-sunos.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \
- $(symfile_h) $(objfiles_h) $(gdbcore_h) $(inferior_h) $(solist_h)
+ $(symfile_h) $(objfiles_h) $(gdbcore_h) $(inferior_h) $(solist_h) \
+ $(bcache_h) $(regcache_h)
solib-svr4.o: solib-svr4.c $(defs_h) $(elf_external_h) $(elf_common_h) \
$(elf_mips_h) $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) \
$(gdbcore_h) $(target_h) $(inferior_h) $(solist_h) $(solib_svr4_h)
@@ -2347,7 +2354,7 @@ install-gdbtk:
else \
true ; \
fi ; \
- $(SHELL) $(srcdir)/../mkinstalldirs $(bindir)
+ $(SHELL) $(srcdir)/../mkinstalldirs $(bindir); \
$(INSTALL_PROGRAM) insight$(EXEEXT) $(bindir)/$$transformed_name$(EXEEXT) ; \
$(SHELL) $(srcdir)/../mkinstalldirs $(GDBTK_LIBRARY) ; \
$(SHELL) $(srcdir)/../mkinstalldirs $(libdir)/insight$(GDBTK_VERSION) ; \
@@ -2506,7 +2513,7 @@ mi-main.o: $(srcdir)/mi/mi-main.c $(defs_h) $(target_h) $(inferior_h) \
$(gdb_string_h) $(top_h) $(gdbthread_h) $(mi_cmds_h) $(mi_parse_h) \
$(mi_getopt_h) $(mi_console_h) $(ui_out_h) $(mi_out_h) \
$(event_loop_h) $(event_top_h) $(gdbcore_h) $(value_h) $(regcache_h) \
- $(gdb_h)
+ $(gdb_h) $(frame_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-main.c
mi-out.o: $(srcdir)/mi/mi-out.c $(defs_h) $(ui_out_h) $(mi_out_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-out.c
diff --git a/gdb/NEWS b/gdb/NEWS
index 8dfa54ce5da..0ba805d88d5 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,6 +3,20 @@
*** Changes since GDB 5.3:
+* Default MI syntax changed to "mi2".
+
+The default MI (machine interface) syntax, enabled by the command line
+option "-i=mi", has been changed to "mi2". The previous MI syntax,
+"mi1", can be enabled by sepcifying the option "-i=mi1".
+
+Support for the original "mi0" syntax (included in GDB 5.0) has been
+removed.
+
+Fix for gdb/192: removed extraneous space when displaying frame level.
+Fix for gdb/672: update changelist is now output in mi list format.
+Fix for gdb/702: a -var-assign that updates the value now shows up
+ in a subsequent -var-update.
+
* REMOVED configurations and files
V850EA ISA
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 2838df7e68c..2fb691c2591 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -4395,7 +4395,7 @@ ada_finish_decode_line_1 (char **spec, struct symtab *file_table,
#endif
struct minimal_symbol *msymbol;
- INIT_SAL (&val);
+ init_sal (&val);
msymbol = NULL;
if (lower_name != NULL)
@@ -4537,7 +4537,7 @@ done:
sals.nelts = 1;
sals.sals = (struct symtab_and_line *) xmalloc (sizeof (sals.sals[0]));
- INIT_SAL (&sals.sals[0]);
+ init_sal (&sals.sals[0]);
sals.sals[0].line = best_linetable->item[best_index].line;
sals.sals[0].pc = best_linetable->item[best_index].pc;
@@ -4856,7 +4856,7 @@ all_sals_for_line (const char *filename, int line_num, char ***canonical)
break;
GROW_VECT (result.sals, len, result.nelts + 1);
- INIT_SAL (&result.sals[result.nelts]);
+ init_sal (&result.sals[result.nelts]);
result.sals[result.nelts].line = LINETABLE (s)->item[ind].line;
result.sals[result.nelts].pc = LINETABLE (s)->item[ind].pc;
result.sals[result.nelts].symtab = s;
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 82444d1c594..3d73ccca493 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -2858,7 +2858,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_push_return_address (gdbarch, arm_push_return_address);
#endif
- set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+ set_gdbarch_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
set_gdbarch_push_arguments (gdbarch, arm_push_arguments);
set_gdbarch_coerce_float_to_double (gdbarch,
standard_coerce_float_to_double);
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index 674285d7074..2b789e6dbb1 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -1035,19 +1035,17 @@ sigtramp_saved_pc (struct frame_info *frame)
buf = alloca (ptrbytes);
/* Get sigcontext address, it is the third parameter on the stack. */
if (frame->next)
- sigcontext_addr = read_memory_integer (FRAME_ARGS_ADDRESS (frame->next)
- + FRAME_ARGS_SKIP
- + sigcontext_offs,
- ptrbytes);
+ sigcontext_addr = read_memory_typed_address
+ (FRAME_ARGS_ADDRESS (frame->next) + FRAME_ARGS_SKIP + sigcontext_offs,
+ builtin_type_void_data_ptr);
else
- sigcontext_addr = read_memory_integer (read_register (SP_REGNUM)
- + sigcontext_offs,
- ptrbytes);
+ sigcontext_addr = read_memory_typed_address
+ (read_register (SP_REGNUM) + sigcontext_offs, builtin_type_void_data_ptr);
/* Don't cause a memory_error when accessing sigcontext in case the stack
layout has changed or the stack is corrupt. */
target_read_memory (sigcontext_addr + SIGCONTEXT_PC_OFFSET, buf, ptrbytes);
- return extract_unsigned_integer (buf, ptrbytes);
+ return extract_typed_address (buf, builtin_type_void_data_ptr);
}
#endif /* SIGCONTEXT_PC_OFFSET */
@@ -1151,8 +1149,8 @@ static struct dummy_frame *dummy_frame_stack = NULL;
/* Function: find_dummy_frame(pc, fp, sp)
- Search the stack of dummy frames for one matching the given PC, FP
- and SP. Unlike PC_IN_CALL_DUMMY, this function doesn't need to
+ Search the stack of dummy frames for one matching the given PC and
+ FP/SP. Unlike PC_IN_CALL_DUMMY, this function doesn't need to
adjust for DECR_PC_AFTER_BREAK. This is because it is only legal
to call this function after the PC has been adjusted. */
@@ -1163,12 +1161,37 @@ generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp)
for (dummyframe = dummy_frame_stack; dummyframe != NULL;
dummyframe = dummyframe->next)
- if ((pc >= dummyframe->call_lo && pc < dummyframe->call_hi)
- && (fp == dummyframe->fp
- || fp == dummyframe->sp
- || fp == dummyframe->top))
- /* The frame in question lies between the saved fp and sp, inclusive */
+ {
+ /* Does the PC fall within the dummy frame's breakpoint
+ instruction. If not, discard this one. */
+ if (!(pc >= dummyframe->call_lo && pc < dummyframe->call_hi))
+ continue;
+ /* Does the FP match? */
+ if (dummyframe->top != 0)
+ {
+ /* If the target architecture explicitly saved the
+ top-of-stack before the inferior function call, assume
+ that that same architecture will always pass in an FP
+ (frame base) value that eactly matches that saved TOS.
+ Don't check the saved SP and SP as they can lead to false
+ hits. */
+ if (fp != dummyframe->top)
+ continue;
+ }
+ else
+ {
+ /* An older target that hasn't explicitly or implicitly
+ saved the dummy frame's top-of-stack. Try matching the
+ FP against the saved SP and FP. NOTE: If you're trying
+ to fix a problem with GDB not correctly finding a dummy
+ frame, check the comments that go with FRAME_ALIGN() and
+ SAVE_DUMMY_FRAME_TOS(). */
+ if (fp != dummyframe->fp && fp != dummyframe->sp)
+ continue;
+ }
+ /* The FP matches this dummy frame. */
return dummyframe->regcache;
+ }
return 0;
}
@@ -1265,7 +1288,7 @@ generic_push_dummy_frame (void)
dummy_frame->pc = read_pc ();
dummy_frame->sp = read_sp ();
- dummy_frame->top = dummy_frame->sp;
+ dummy_frame->top = 0;
dummy_frame->fp = fp;
regcache_cpy (dummy_frame->regcache, current_regcache);
dummy_frame->next = dummy_frame_stack;
@@ -1527,9 +1550,10 @@ frame_saved_regs_register_unwind (struct frame_info *frame, void **cache,
The argument RAW_BUFFER must point to aligned memory. */
void
-generic_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
- struct frame_info *frame, int regnum,
- enum lval_type *lval)
+deprecated_generic_get_saved_register (char *raw_buffer, int *optimized,
+ CORE_ADDR *addrp,
+ struct frame_info *frame, int regnum,
+ enum lval_type *lval)
{
if (!target_has_registers)
error ("No registers.");
@@ -1595,7 +1619,7 @@ generic_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
if (addrp)
*addrp = REGISTER_BYTE (regnum);
if (raw_buffer)
- read_register_gen (regnum, raw_buffer);
+ deprecated_read_register_gen (regnum, raw_buffer);
}
void
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 153f1c50078..a6606d23d96 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -3884,7 +3884,7 @@ create_internal_breakpoint (CORE_ADDR address, enum bptype type)
struct symtab_and_line sal;
struct breakpoint *b;
- INIT_SAL (&sal); /* initialize to zeroes */
+ init_sal (&sal); /* initialize to zeroes */
sal.pc = address;
sal.section = find_pc_overlay (sal.pc);
@@ -4206,7 +4206,7 @@ create_fork_vfork_event_catchpoint (int tempflag, char *cond_string,
struct breakpoint *b;
int thread = -1; /* All threads. */
- INIT_SAL (&sal);
+ init_sal (&sal);
sal.pc = 0;
sal.symtab = NULL;
sal.line = 0;
@@ -4246,7 +4246,7 @@ create_exec_event_catchpoint (int tempflag, char *cond_string)
struct breakpoint *b;
int thread = -1; /* All threads. */
- INIT_SAL (&sal);
+ init_sal (&sal);
sal.pc = 0;
sal.symtab = NULL;
sal.line = 0;
@@ -4597,7 +4597,7 @@ parse_breakpoint_sals (char **address,
if (default_breakpoint_valid)
{
struct symtab_and_line sal;
- INIT_SAL (&sal); /* initialize to zeroes */
+ init_sal (&sal); /* initialize to zeroes */
sals->sals = (struct symtab_and_line *)
xmalloc (sizeof (struct symtab_and_line));
sal.pc = default_breakpoint_address;
@@ -4615,13 +4615,16 @@ parse_breakpoint_sals (char **address,
/* Force almost all breakpoints to be in terms of the
current_source_symtab (which is decode_line_1's default). This
should produce the results we want almost all of the time while
- leaving default_breakpoint_* alone. */
+ leaving default_breakpoint_* alone.
+ ObjC: However, don't match an Objective-C method name which
+ may have a '+' or '-' succeeded by a '[' */
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
if (default_breakpoint_valid
&& (!cursal.symtab
- || (strchr ("+-", (*address)[0]) != NULL)))
+ || ((strchr ("+-", (*address)[0]) != NULL)
+ && ((*address)[1] != '['))))
*sals = decode_line_1 (address, 1, default_breakpoint_symtab,
default_breakpoint_line, addr_string);
else
@@ -5290,7 +5293,7 @@ watch_command_1 (char *arg, int accessflag, int from_tty)
enum bptype bp_type;
int mem_cnt = 0;
- INIT_SAL (&sal); /* initialize to zeroes */
+ init_sal (&sal); /* initialize to zeroes */
/* Parse arguments. */
innermost_block = NULL;
@@ -6260,7 +6263,7 @@ handle_gnu_4_16_catch_command (char *arg, int tempflag, int from_tty)
char *save_arg;
int i;
- INIT_SAL (&sal); /* initialize to zeroes */
+ init_sal (&sal); /* initialize to zeroes */
/* If no arg given, or if first arg is 'if ', all active catch clauses
are breakpointed. */
@@ -6533,7 +6536,7 @@ clear_command (char *arg, int from_tty)
sals.sals = (struct symtab_and_line *)
xmalloc (sizeof (struct symtab_and_line));
make_cleanup (xfree, sals.sals);
- INIT_SAL (&sal); /* initialize to zeroes */
+ init_sal (&sal); /* initialize to zeroes */
sal.line = default_breakpoint_line;
sal.symtab = default_breakpoint_symtab;
sal.pc = default_breakpoint_address;
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 9d9b4f74482..09e81228aea 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -30,7 +30,7 @@
#include "bfd.h"
#include "gdb_obstack.h"
#include "symtab.h"
-#include "symfile.h" /* Needed for "struct complaint" */
+#include "symfile.h"
#include "objfiles.h"
#include "gdbtypes.h"
#include "complaints.h"
@@ -74,19 +74,19 @@ static int compare_line_numbers (const void *ln1p, const void *ln2p);
/* Complaints about the symbols we have encountered. */
-struct complaint block_end_complaint =
+struct deprecated_complaint block_end_complaint =
{"block end address less than block start address in %s (patched it)", 0, 0};
-struct complaint anon_block_end_complaint =
+struct deprecated_complaint anon_block_end_complaint =
{"block end address 0x%lx less than block start address 0x%lx (patched it)", 0, 0};
-struct complaint innerblock_complaint =
+struct deprecated_complaint innerblock_complaint =
{"inner block not inside outer block in %s", 0, 0};
-struct complaint innerblock_anon_complaint =
+struct deprecated_complaint innerblock_anon_complaint =
{"inner block (0x%lx-0x%lx) not inside outer block (0x%lx-0x%lx)", 0, 0};
-struct complaint blockvector_complaint =
+struct deprecated_complaint blockvector_complaint =
{"block at %s out of order", 0, 0};
/* maintain the lists of symbols and blocks */
@@ -869,7 +869,7 @@ end_symtab (CORE_ADDR end_addr, struct objfile *objfile, int section)
same. FIXME: Find out why it is happening. This is not
believed to happen in most cases (even for coffread.c);
it used to be an abort(). */
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Context stack not empty in end_symtab", 0, 0};
complain (&msg);
context_stack_depth = 0;
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 376f6d56370..1f344c47b7b 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -199,7 +199,6 @@ static int parse_number (char *, int, int, YYSTYPE *);
%token <opcode> ASSIGN_MODIFY
/* C++ */
-%token THIS
%token TRUEKEYWORD
%token FALSEKEYWORD
@@ -532,11 +531,6 @@ exp : STRING
;
/* C++. */
-exp : THIS
- { write_exp_elt_opcode (OP_THIS);
- write_exp_elt_opcode (OP_THIS); }
- ;
-
exp : TRUEKEYWORD
{ write_exp_elt_opcode (OP_LONG);
write_exp_elt_type (builtin_type_bool);
@@ -1615,17 +1609,6 @@ yylex ()
{
if (STREQN (tokstart, "true", 4))
return TRUEKEYWORD;
-
- if (STREQN (tokstart, "this", 4))
- {
- static const char this_name[] =
- { CPLUS_MARKER, 't', 'h', 'i', 's', '\0' };
-
- if (lookup_symbol (this_name, expression_context_block,
- VAR_NAMESPACE, (int *) NULL,
- (struct symtab **) NULL))
- return THIS;
- }
}
break;
case 3:
diff --git a/gdb/c-lang.h b/gdb/c-lang.h
index e64d4c69e90..7d7cd03a557 100644
--- a/gdb/c-lang.h
+++ b/gdb/c-lang.h
@@ -65,9 +65,6 @@ extern struct type **const (c_builtin_types[]);
extern void c_type_print_base (struct type *, struct ui_file *, int, int);
-extern void c_type_print_varspec_prefix (struct type *, struct ui_file *,
- int, int);
-
/* These are in cp-valprint.c */
extern int vtblprint; /* Controls printing of vtbl's */
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index bede1948211..6c5e815e2af 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -49,8 +49,8 @@ static void c_type_print_args (struct type *, struct ui_file *);
static void cp_type_print_derivation_info (struct ui_file *, struct type *);
-void c_type_print_varspec_prefix (struct type *, struct ui_file *, int,
- int);
+static void c_type_print_varspec_prefix (struct type *, struct ui_file *, int,
+ int, int);
/* Print "const", "volatile", or address space modifiers. */
static void c_type_print_modifier (struct type *, struct ui_file *,
@@ -67,6 +67,7 @@ c_print_type (struct type *type, char *varstring, struct ui_file *stream,
{
register enum type_code code;
int demangled_args;
+ int need_post_space;
if (show > 0)
CHECK_TYPEDEF (type);
@@ -85,7 +86,8 @@ c_print_type (struct type *type, char *varstring, struct ui_file *stream,
|| code == TYPE_CODE_MEMBER
|| code == TYPE_CODE_REF)))
fputs_filtered (" ", stream);
- c_type_print_varspec_prefix (type, stream, show, 0);
+ need_post_space = (varstring != NULL && strcmp (varstring, "") != 0);
+ c_type_print_varspec_prefix (type, stream, show, 0, need_post_space);
if (varstring != NULL)
{
@@ -192,11 +194,15 @@ cp_type_print_method_args (struct type *mtype, char *prefix, char *varstring,
On outermost call, pass 0 for PASSED_A_PTR.
On outermost call, SHOW > 0 means should ignore
any typename for TYPE and show its details.
- SHOW is always zero on recursive calls. */
+ SHOW is always zero on recursive calls.
+
+ NEED_POST_SPACE is non-zero when a space will be be needed
+ between a trailing qualifier and a field, variable, or function
+ name. */
void
c_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
- int show, int passed_a_ptr)
+ int show, int passed_a_ptr, int need_post_space)
{
char *name;
if (type == 0)
@@ -210,15 +216,15 @@ c_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
switch (TYPE_CODE (type))
{
case TYPE_CODE_PTR:
- c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 1);
+ c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 1, 1);
fprintf_filtered (stream, "*");
- c_type_print_modifier (type, stream, 1, 0);
+ c_type_print_modifier (type, stream, 1, need_post_space);
break;
case TYPE_CODE_MEMBER:
if (passed_a_ptr)
fprintf_filtered (stream, "(");
- c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0);
+ c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
fprintf_filtered (stream, " ");
name = type_name_no_tag (TYPE_DOMAIN_TYPE (type));
if (name)
@@ -231,7 +237,7 @@ c_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
case TYPE_CODE_METHOD:
if (passed_a_ptr)
fprintf_filtered (stream, "(");
- c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0);
+ c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
if (passed_a_ptr)
{
fprintf_filtered (stream, " ");
@@ -241,19 +247,19 @@ c_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
break;
case TYPE_CODE_REF:
- c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 1);
+ c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 1, 0);
fprintf_filtered (stream, "&");
- c_type_print_modifier (type, stream, 1, 0);
+ c_type_print_modifier (type, stream, 1, need_post_space);
break;
case TYPE_CODE_FUNC:
- c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0);
+ c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
if (passed_a_ptr)
fprintf_filtered (stream, "(");
break;
case TYPE_CODE_ARRAY:
- c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0);
+ c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
if (passed_a_ptr)
fprintf_filtered (stream, "(");
break;
diff --git a/gdb/coffread.c b/gdb/coffread.c
index d794a7d382a..e511a4ceab5 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -124,37 +124,37 @@ static struct symbol *opaque_type_chain[HASHSIZE];
/* Complaints about various problems in the file being read */
-struct complaint ef_complaint =
+struct deprecated_complaint ef_complaint =
{"Unmatched .ef symbol(s) ignored starting at symnum %d", 0, 0};
-struct complaint ef_stack_complaint =
+struct deprecated_complaint ef_stack_complaint =
{"`.ef' symbol without matching `.bf' symbol ignored starting at symnum %d", 0, 0};
-struct complaint eb_stack_complaint =
+struct deprecated_complaint eb_stack_complaint =
{"`.eb' symbol without matching `.bb' symbol ignored starting at symnum %d", 0, 0};
-struct complaint bf_no_aux_complaint =
+struct deprecated_complaint bf_no_aux_complaint =
{"`.bf' symbol %d has no aux entry", 0, 0};
-struct complaint ef_no_aux_complaint =
+struct deprecated_complaint ef_no_aux_complaint =
{"`.ef' symbol %d has no aux entry", 0, 0};
-struct complaint lineno_complaint =
+struct deprecated_complaint lineno_complaint =
{"Line number pointer %d lower than start of line numbers", 0, 0};
-struct complaint unexpected_type_complaint =
+struct deprecated_complaint unexpected_type_complaint =
{"Unexpected type for symbol %s", 0, 0};
-struct complaint bad_sclass_complaint =
+struct deprecated_complaint bad_sclass_complaint =
{"Bad n_sclass for symbol %s", 0, 0};
-struct complaint misordered_blocks_complaint =
+struct deprecated_complaint misordered_blocks_complaint =
{"Blocks out of order at address %x", 0, 0};
-struct complaint tagndx_bad_complaint =
+struct deprecated_complaint tagndx_bad_complaint =
{"Symbol table entry for %s has bad tagndx value", 0, 0};
-struct complaint eb_complaint =
+struct deprecated_complaint eb_complaint =
{"Mismatched .eb symbol ignored starting at symnum %d", 0, 0};
/* Simplified internal version of coff symbol table information */
diff --git a/gdb/complaints.c b/gdb/complaints.c
index 84cf6a2e303..b4c55dab7df 100644
--- a/gdb/complaints.c
+++ b/gdb/complaints.c
@@ -250,7 +250,7 @@ internal_complaint (struct complaints **complaints, const char *file,
}
void
-complain (struct complaint *complaint, ...)
+complain (struct deprecated_complaint *complaint, ...)
{
va_list args;
va_start (args, complaint);
diff --git a/gdb/complaints.h b/gdb/complaints.h
index c176b190588..159dcd13bce 100644
--- a/gdb/complaints.h
+++ b/gdb/complaints.h
@@ -50,9 +50,15 @@ extern void clear_complaints (struct complaints **complaints,
int less_verbose, int noisy);
-/* Legacy interfaces to keep the old code working (until it is all
- converted to the above). While the structure below contains a
- number of fields, all but .message are ignored.
+/* Deprecated interfaces to keep the old code working (until it is all
+ converted to the above). Existing code such as:
+
+ struct deprecated_complaint msg = { "msg", 0, 0 };
+ complaint (&msg);
+
+ should be replaced by:
+
+ complaint (&symtab_complaints, __FILE__, __LINE__, "msg");
Support for complaining about things in the symbol file that aren't
catastrophic.
@@ -61,13 +67,13 @@ extern void clear_complaints (struct complaints **complaints,
during a symbol read, we report it. At the end of symbol reading,
if verbose, we report how many of each problem we had. */
-struct complaint
+struct deprecated_complaint
{
const char *message;
unsigned counter_ignored;
- struct complaint *next_ignored;
+ struct deprecated_complaint *next_ignored;
};
-extern void complain (struct complaint *, ...);
+extern void complain (struct deprecated_complaint *, ...);
#endif /* !defined (COMPLAINTS_H) */
diff --git a/gdb/configure b/gdb/configure
index e8a83ab0547..64370a83118 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -81,6 +81,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -195,6 +196,7 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
+ --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -365,6 +367,11 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
+ -site-file | --site-file | --site-fil | --site-fi | --site-f)
+ ac_prev=sitefile ;;
+ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+ sitefile="$ac_optarg" ;;
+
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -530,12 +537,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+if test -z "$sitefile"; then
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
fi
+else
+ CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -576,7 +587,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:580: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:591: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
@@ -602,7 +613,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:606: checking for $ac_word" >&5
+echo "configure:617: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -632,7 +643,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:636: checking for $ac_word" >&5
+echo "configure:647: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -683,7 +694,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:687: checking for $ac_word" >&5
+echo "configure:698: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -715,7 +726,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:719: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:730: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -726,12 +737,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 730 "configure"
+#line 741 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -757,12 +768,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:761: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:772: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:766: checking whether we are using GNU C" >&5
+echo "configure:777: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -771,7 +782,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -790,7 +801,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:794: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:805: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -822,7 +833,7 @@ else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:826: checking how to run the C preprocessor" >&5
+echo "configure:837: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -837,13 +848,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 841 "configure"
+#line 852 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -854,13 +865,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 858 "configure"
+#line 869 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -871,13 +882,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 875 "configure"
+#line 886 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -902,9 +913,9 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:906: checking for AIX" >&5
+echo "configure:917: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
-#line 908 "configure"
+#line 919 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
@@ -926,7 +937,7 @@ rm -f conftest*
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:930: checking for POSIXized ISC" >&5
+echo "configure:941: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
@@ -950,7 +961,7 @@ fi
echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
-echo "configure:954: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:965: checking for ${CC-cc} option to accept ANSI C" >&5
if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -967,7 +978,7 @@ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIO
do
CC="$ac_save_CC $ac_arg"
cat > conftest.$ac_ext <<EOF
-#line 971 "configure"
+#line 982 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
@@ -1004,7 +1015,7 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
; return 0; }
EOF
-if { (eval echo configure:1008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_prog_cc_stdc="$ac_arg"; break
else
@@ -1075,7 +1086,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1079: checking host system type" >&5
+echo "configure:1090: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -1096,7 +1107,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1100: checking target system type" >&5
+echo "configure:1111: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -1114,7 +1125,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1118: checking build system type" >&5
+echo "configure:1129: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -1139,7 +1150,7 @@ test "$host_alias" != "$target_alias" &&
ALL_LINGUAS=
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1143: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1154: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1168,7 +1179,7 @@ fi
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1172: checking for $ac_word" >&5
+echo "configure:1183: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1196,12 +1207,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1200: checking for ANSI C header files" >&5
+echo "configure:1211: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1205 "configure"
+#line 1216 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1209,7 +1220,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1226,7 +1237,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1230 "configure"
+#line 1241 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1244,7 +1255,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1248 "configure"
+#line 1259 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1265,7 +1276,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1269 "configure"
+#line 1280 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1276,7 +1287,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1300,12 +1311,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1304: checking for working const" >&5
+echo "configure:1315: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1309 "configure"
+#line 1320 "configure"
#include "confdefs.h"
int main() {
@@ -1354,7 +1365,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:1358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1375,21 +1386,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1379: checking for inline" >&5
+echo "configure:1390: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 1386 "configure"
+#line 1397 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -1415,12 +1426,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1419: checking for off_t" >&5
+echo "configure:1430: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1424 "configure"
+#line 1435 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1448,12 +1459,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1452: checking for size_t" >&5
+echo "configure:1463: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1457 "configure"
+#line 1468 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1483,19 +1494,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1487: checking for working alloca.h" >&5
+echo "configure:1498: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1492 "configure"
+#line 1503 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -1516,12 +1527,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1520: checking for alloca" >&5
+echo "configure:1531: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1525 "configure"
+#line 1536 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -1549,7 +1560,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -1581,12 +1592,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1585: checking whether alloca needs Cray hooks" >&5
+echo "configure:1596: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1590 "configure"
+#line 1601 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -1611,12 +1622,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1615: checking for $ac_func" >&5
+echo "configure:1626: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1620 "configure"
+#line 1631 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1639,7 +1650,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1666,7 +1677,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1670: checking stack direction for C alloca" >&5
+echo "configure:1681: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1674,7 +1685,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1678 "configure"
+#line 1689 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -1693,7 +1704,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -1714,21 +1725,21 @@ EOF
fi
-for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
+for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1722: checking for $ac_hdr" >&5
+echo "configure:1733: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1727 "configure"
+#line 1738 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1757,12 +1768,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1761: checking for $ac_func" >&5
+echo "configure:1772: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1766 "configure"
+#line 1777 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1785,7 +1796,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1810,7 +1821,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1814: checking for working mmap" >&5
+echo "configure:1825: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1818,7 +1829,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 1822 "configure"
+#line 1833 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -1846,24 +1857,11 @@ else
#include <fcntl.h>
#include <sys/mman.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
/* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H
@@ -1971,7 +1969,7 @@ main()
}
EOF
-if { (eval echo configure:1975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -1999,17 +1997,17 @@ unistd.h values.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2003: checking for $ac_hdr" >&5
+echo "configure:2001: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2008 "configure"
+#line 2006 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2039,12 +2037,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2043: checking for $ac_func" >&5
+echo "configure:2041: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2048 "configure"
+#line 2046 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2067,7 +2065,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2096,12 +2094,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2100: checking for $ac_func" >&5
+echo "configure:2098: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2105 "configure"
+#line 2103 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2124,7 +2122,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2158,19 +2156,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2162: checking for LC_MESSAGES" >&5
+echo "configure:2160: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2167 "configure"
+#line 2165 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:2174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
@@ -2191,7 +2189,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2195: checking whether NLS is requested" >&5
+echo "configure:2193: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
@@ -2211,7 +2209,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2215: checking whether included gettext is requested" >&5
+echo "configure:2213: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
@@ -2230,17 +2228,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2234: checking for libintl.h" >&5
+echo "configure:2232: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2239 "configure"
+#line 2237 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2257,19 +2255,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:2261: checking for gettext in libc" >&5
+echo "configure:2259: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2266 "configure"
+#line 2264 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
@@ -2285,7 +2283,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2289: checking for bindtextdomain in -lintl" >&5
+echo "configure:2287: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2293,7 +2291,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2297 "configure"
+#line 2295 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2304,7 +2302,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:2308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2320,19 +2318,19 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:2324: checking for gettext in libintl" >&5
+echo "configure:2322: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2329 "configure"
+#line 2327 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
@@ -2360,7 +2358,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2364: checking for $ac_word" >&5
+echo "configure:2362: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2394,12 +2392,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2398: checking for $ac_func" >&5
+echo "configure:2396: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2403 "configure"
+#line 2401 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2422,7 +2420,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2449,7 +2447,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2453: checking for $ac_word" >&5
+echo "configure:2451: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2485,7 +2483,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2489: checking for $ac_word" >&5
+echo "configure:2487: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2517,7 +2515,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 2521 "configure"
+#line 2519 "configure"
#include "confdefs.h"
int main() {
@@ -2525,7 +2523,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:2529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -2557,7 +2555,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2561: checking for $ac_word" >&5
+echo "configure:2559: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2591,7 +2589,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2595: checking for $ac_word" >&5
+echo "configure:2593: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2627,7 +2625,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2631: checking for $ac_word" >&5
+echo "configure:2629: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2717,7 +2715,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2721: checking for catalogs to be installed" >&5
+echo "configure:2719: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -2745,17 +2743,17 @@ echo "configure:2721: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:2749: checking for linux/version.h" >&5
+echo "configure:2747: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2754 "configure"
+#line 2752 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2879,12 +2877,12 @@ EOF
fi
-for ac_prog in gawk mawk nawk awk
+for ac_prog in mawk gawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2888: checking for $ac_word" >&5
+echo "configure:2886: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2925,7 +2923,7 @@ done
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2929: checking for a BSD compatible install" >&5
+echo "configure:2927: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2986,7 +2984,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2990: checking for $ac_word" >&5
+echo "configure:2988: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3018,7 +3016,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3022: checking for $ac_word" >&5
+echo "configure:3020: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3050,7 +3048,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3054: checking for $ac_word" >&5
+echo "configure:3052: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3085,7 +3083,7 @@ fi
# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ac_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3089: checking for $ac_word" >&5
+echo "configure:3087: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3117,7 +3115,7 @@ fi
# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
set dummy ${ac_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3121: checking for $ac_word" >&5
+echo "configure:3119: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3151,7 +3149,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3155: checking for $ac_word" >&5
+echo "configure:3153: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3185,7 +3183,7 @@ test -n "$YACC" || YACC="yacc"
# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
set dummy ${ac_tool_prefix}mig; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3189: checking for $ac_word" >&5
+echo "configure:3187: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3236,12 +3234,12 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3240: checking return type of signal handlers" >&5
+echo "configure:3238: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3245 "configure"
+#line 3243 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -3258,7 +3256,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:3262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -3278,12 +3276,12 @@ EOF
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3282: checking for ANSI C header files" >&5
+echo "configure:3280: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3287 "configure"
+#line 3285 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -3291,7 +3289,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3308,7 +3306,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 3312 "configure"
+#line 3310 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -3326,7 +3324,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 3330 "configure"
+#line 3328 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -3347,7 +3345,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 3351 "configure"
+#line 3349 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3358,7 +3356,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:3362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -3402,17 +3400,17 @@ for ac_hdr in ctype.h nlist.h link.h thread_db.h proc_service.h \
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3406: checking for $ac_hdr" >&5
+echo "configure:3404: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3411 "configure"
+#line 3409 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3439,12 +3437,12 @@ fi
done
echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:3443: checking whether stat file-mode macros are broken" >&5
+echo "configure:3441: checking whether stat file-mode macros are broken" >&5
if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3448 "configure"
+#line 3446 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -3496,12 +3494,12 @@ fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:3500: checking for working const" >&5
+echo "configure:3498: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3505 "configure"
+#line 3503 "configure"
#include "confdefs.h"
int main() {
@@ -3550,7 +3548,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:3554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -3571,21 +3569,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:3575: checking for inline" >&5
+echo "configure:3573: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 3582 "configure"
+#line 3580 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:3589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -3615,12 +3613,12 @@ for ac_func in bcopy btowc bzero canonicalize_file_name isascii poll \
realpath sbrk setpgid setpgrp sigaction sigprocmask sigsetmask
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3619: checking for $ac_func" >&5
+echo "configure:3617: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3624 "configure"
+#line 3622 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3643,7 +3641,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3670,19 +3668,19 @@ done
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:3674: checking for working alloca.h" >&5
+echo "configure:3672: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3679 "configure"
+#line 3677 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:3686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -3703,12 +3701,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3707: checking for alloca" >&5
+echo "configure:3705: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3712 "configure"
+#line 3710 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -3736,7 +3734,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:3740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -3768,12 +3766,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3772: checking whether alloca needs Cray hooks" >&5
+echo "configure:3770: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3777 "configure"
+#line 3775 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -3798,12 +3796,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3802: checking for $ac_func" >&5
+echo "configure:3800: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3807 "configure"
+#line 3805 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3826,7 +3824,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3853,7 +3851,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3857: checking stack direction for C alloca" >&5
+echo "configure:3855: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3861,7 +3859,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 3865 "configure"
+#line 3863 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -3880,7 +3878,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -3902,12 +3900,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3906: checking for pid_t" >&5
+echo "configure:3904: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3911 "configure"
+#line 3909 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3936,17 +3934,17 @@ fi
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:3940: checking for vfork.h" >&5
+echo "configure:3938: checking for vfork.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3945 "configure"
+#line 3943 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3971,18 +3969,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:3975: checking for working vfork" >&5
+echo "configure:3973: checking for working vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:3981: checking for vfork" >&5
+echo "configure:3979: checking for vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3986 "configure"
+#line 3984 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -4005,7 +4003,7 @@ vfork();
; return 0; }
EOF
-if { (eval echo configure:4009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vfork=yes"
else
@@ -4027,7 +4025,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
-#line 4031 "configure"
+#line 4029 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -4122,7 +4120,7 @@ main() {
}
}
EOF
-if { (eval echo configure:4126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_vfork_works=yes
else
@@ -4146,7 +4144,7 @@ fi
if test "$cross_compiling" = no; then
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:4150: checking whether setpgrp takes no argument" >&5
+echo "configure:4148: checking whether setpgrp takes no argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4154,7 +4152,7 @@ else
{ echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 4158 "configure"
+#line 4156 "configure"
#include "confdefs.h"
#ifdef HAVE_UNISTD_H
@@ -4174,7 +4172,7 @@ main()
}
EOF
-if { (eval echo configure:4178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_setpgrp_void=no
else
@@ -4199,12 +4197,12 @@ fi
else
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:4203: checking whether setpgrp takes no argument" >&5
+echo "configure:4201: checking whether setpgrp takes no argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4208 "configure"
+#line 4206 "configure"
#include "confdefs.h"
#include <unistd.h>
@@ -4218,7 +4216,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_func_setpgrp_void=no
else
@@ -4242,12 +4240,12 @@ fi
# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
# since sigsetjmp might only be defined as a macro.
echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:4246: checking for sigsetjmp" >&5
+echo "configure:4244: checking for sigsetjmp" >&5
if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4251 "configure"
+#line 4249 "configure"
#include "confdefs.h"
#include <setjmp.h>
@@ -4256,7 +4254,7 @@ int main() {
sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
; return 0; }
EOF
-if { (eval echo configure:4260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_func_sigsetjmp=yes
else
@@ -4279,19 +4277,19 @@ fi
# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
-echo "configure:4283: checking for r_fs in struct reg" >&5
+echo "configure:4281: checking for r_fs in struct reg" >&5
if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4288 "configure"
+#line 4286 "configure"
#include "confdefs.h"
#include <machine/reg.h>
int main() {
struct reg r; r.r_fs;
; return 0; }
EOF
-if { (eval echo configure:4295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_struct_reg_r_fs=yes
else
@@ -4311,19 +4309,19 @@ EOF
fi
echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
-echo "configure:4315: checking for r_gs in struct reg" >&5
+echo "configure:4313: checking for r_gs in struct reg" >&5
if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4320 "configure"
+#line 4318 "configure"
#include "confdefs.h"
#include <machine/reg.h>
int main() {
struct reg r; r.r_gs;
; return 0; }
EOF
-if { (eval echo configure:4327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_struct_reg_r_gs=yes
else
@@ -4345,19 +4343,19 @@ fi
# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
-echo "configure:4349: checking for PTRACE_GETREGS" >&5
+echo "configure:4347: checking for PTRACE_GETREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4354 "configure"
+#line 4352 "configure"
#include "confdefs.h"
#include <sys/ptrace.h>
int main() {
PTRACE_GETREGS;
; return 0; }
EOF
-if { (eval echo configure:4361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_ptrace_getregs=yes
else
@@ -4379,19 +4377,19 @@ fi
# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
-echo "configure:4383: checking for PTRACE_GETFPXREGS" >&5
+echo "configure:4381: checking for PTRACE_GETFPXREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4388 "configure"
+#line 4386 "configure"
#include "confdefs.h"
#include <sys/ptrace.h>
int main() {
PTRACE_GETFPXREGS;
; return 0; }
EOF
-if { (eval echo configure:4395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_ptrace_getfpxregs=yes
else
@@ -4413,12 +4411,12 @@ fi
# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
-echo "configure:4417: checking for PT_GETDBREGS" >&5
+echo "configure:4415: checking for PT_GETDBREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4422 "configure"
+#line 4420 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ptrace.h>
@@ -4426,7 +4424,7 @@ int main() {
PT_GETDBREGS;
; return 0; }
EOF
-if { (eval echo configure:4430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_pt_getdbregs=yes
else
@@ -4448,12 +4446,12 @@ fi
# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
-echo "configure:4452: checking for PT_GETXMMREGS" >&5
+echo "configure:4450: checking for PT_GETXMMREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4457 "configure"
+#line 4455 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ptrace.h>
@@ -4461,7 +4459,7 @@ int main() {
PT_GETXMMREGS;
; return 0; }
EOF
-if { (eval echo configure:4465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_pt_getxmmregs=yes
else
@@ -4483,7 +4481,7 @@ fi
echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6
-echo "configure:4487: checking for socketpair in -lsocket" >&5
+echo "configure:4485: checking for socketpair in -lsocket" >&5
ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4491,7 +4489,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4495 "configure"
+#line 4493 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4502,7 +4500,7 @@ int main() {
socketpair()
; return 0; }
EOF
-if { (eval echo configure:4506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4532,12 +4530,12 @@ fi
for ac_func in socketpair
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4536: checking for $ac_func" >&5
+echo "configure:4534: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4541 "configure"
+#line 4539 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4560,7 +4558,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4587,12 +4585,12 @@ done
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:4591: checking whether malloc must be declared" >&5
+echo "configure:4589: checking whether malloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4596 "configure"
+#line 4594 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4613,7 +4611,7 @@ int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:4617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_malloc=no
else
@@ -4634,12 +4632,12 @@ EOF
fi
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:4638: checking whether realloc must be declared" >&5
+echo "configure:4636: checking whether realloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4643 "configure"
+#line 4641 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4660,7 +4658,7 @@ int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:4664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_realloc=no
else
@@ -4681,12 +4679,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:4685: checking whether free must be declared" >&5
+echo "configure:4683: checking whether free must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4690 "configure"
+#line 4688 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4707,7 +4705,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:4711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -4728,12 +4726,12 @@ EOF
fi
echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
-echo "configure:4732: checking whether strerror must be declared" >&5
+echo "configure:4730: checking whether strerror must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4737 "configure"
+#line 4735 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4754,7 +4752,7 @@ int main() {
char *(*pfn) = (char *(*)) strerror
; return 0; }
EOF
-if { (eval echo configure:4758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strerror=no
else
@@ -4775,12 +4773,12 @@ EOF
fi
echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
-echo "configure:4779: checking whether strdup must be declared" >&5
+echo "configure:4777: checking whether strdup must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4784 "configure"
+#line 4782 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4801,7 +4799,7 @@ int main() {
char *(*pfn) = (char *(*)) strdup
; return 0; }
EOF
-if { (eval echo configure:4805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strdup=no
else
@@ -4822,12 +4820,12 @@ EOF
fi
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:4826: checking whether strstr must be declared" >&5
+echo "configure:4824: checking whether strstr must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4831 "configure"
+#line 4829 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4848,7 +4846,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:4852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -4869,12 +4867,12 @@ EOF
fi
echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
-echo "configure:4873: checking whether canonicalize_file_name must be declared" >&5
+echo "configure:4871: checking whether canonicalize_file_name must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4878 "configure"
+#line 4876 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4895,7 +4893,7 @@ int main() {
char *(*pfn) = (char *(*)) canonicalize_file_name
; return 0; }
EOF
-if { (eval echo configure:4899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_canonicalize_file_name=no
else
@@ -4921,9 +4919,9 @@ fi
# could be expunged. --jsm 1999-03-22
echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
-echo "configure:4925: checking for HPUX save_state structure" >&5
+echo "configure:4923: checking for HPUX save_state structure" >&5
cat > conftest.$ac_ext <<EOF
-#line 4927 "configure"
+#line 4925 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -4938,7 +4936,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 4942 "configure"
+#line 4940 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -4991,7 +4989,7 @@ EOF
EOF
;;
- *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*)
+ *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
cat >> confdefs.h <<\EOF
#define NEW_PROC_API 1
EOF
@@ -5008,12 +5006,12 @@ fi
if test "$ac_cv_header_sys_procfs_h" = yes; then
echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5012: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:5010: checking for pstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5017 "configure"
+#line 5015 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5022,7 +5020,7 @@ int main() {
pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
@@ -5044,12 +5042,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5048: checking for prrun_t in sys/procfs.h" >&5
+echo "configure:5046: checking for prrun_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5053 "configure"
+#line 5051 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5058,7 +5056,7 @@ int main() {
prrun_t avar
; return 0; }
EOF
-if { (eval echo configure:5062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prrun_t=yes
else
@@ -5080,12 +5078,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5084: checking for gregset_t in sys/procfs.h" >&5
+echo "configure:5082: checking for gregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5089 "configure"
+#line 5087 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5094,7 +5092,7 @@ int main() {
gregset_t avar
; return 0; }
EOF
-if { (eval echo configure:5098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_gregset_t=yes
else
@@ -5116,12 +5114,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5120: checking for fpregset_t in sys/procfs.h" >&5
+echo "configure:5118: checking for fpregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5125 "configure"
+#line 5123 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5130,7 +5128,7 @@ int main() {
fpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:5134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_fpregset_t=yes
else
@@ -5152,12 +5150,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5156: checking for prgregset_t in sys/procfs.h" >&5
+echo "configure:5154: checking for prgregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5161 "configure"
+#line 5159 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5166,7 +5164,7 @@ int main() {
prgregset_t avar
; return 0; }
EOF
-if { (eval echo configure:5170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prgregset_t=yes
else
@@ -5188,12 +5186,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5192: checking for prfpregset_t in sys/procfs.h" >&5
+echo "configure:5190: checking for prfpregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5197 "configure"
+#line 5195 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5202,7 +5200,7 @@ int main() {
prfpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:5206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prfpregset_t=yes
else
@@ -5224,12 +5222,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5228: checking for prgregset32_t in sys/procfs.h" >&5
+echo "configure:5226: checking for prgregset32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5233 "configure"
+#line 5231 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5238,7 +5236,7 @@ int main() {
prgregset32_t avar
; return 0; }
EOF
-if { (eval echo configure:5242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prgregset32_t=yes
else
@@ -5260,12 +5258,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5264: checking for prfpregset32_t in sys/procfs.h" >&5
+echo "configure:5262: checking for prfpregset32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5269 "configure"
+#line 5267 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5274,7 +5272,7 @@ int main() {
prfpregset32_t avar
; return 0; }
EOF
-if { (eval echo configure:5278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
else
@@ -5296,12 +5294,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5300: checking for lwpid_t in sys/procfs.h" >&5
+echo "configure:5298: checking for lwpid_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5305 "configure"
+#line 5303 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5310,7 +5308,7 @@ int main() {
lwpid_t avar
; return 0; }
EOF
-if { (eval echo configure:5314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpid_t=yes
else
@@ -5332,12 +5330,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5336: checking for psaddr_t in sys/procfs.h" >&5
+echo "configure:5334: checking for psaddr_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5341 "configure"
+#line 5339 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5346,7 +5344,7 @@ int main() {
psaddr_t avar
; return 0; }
EOF
-if { (eval echo configure:5350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psaddr_t=yes
else
@@ -5368,12 +5366,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5372: checking for prsysent_t in sys/procfs.h" >&5
+echo "configure:5370: checking for prsysent_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5377 "configure"
+#line 5375 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5382,7 +5380,7 @@ int main() {
prsysent_t avar
; return 0; }
EOF
-if { (eval echo configure:5386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prsysent_t=yes
else
@@ -5404,12 +5402,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5408: checking for pr_sigset_t in sys/procfs.h" >&5
+echo "configure:5406: checking for pr_sigset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5413 "configure"
+#line 5411 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5418,7 +5416,7 @@ int main() {
pr_sigset_t avar
; return 0; }
EOF
-if { (eval echo configure:5422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
else
@@ -5440,12 +5438,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5444: checking for pr_sigaction64_t in sys/procfs.h" >&5
+echo "configure:5442: checking for pr_sigaction64_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5449 "configure"
+#line 5447 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5454,7 +5452,7 @@ int main() {
pr_sigaction64_t avar
; return 0; }
EOF
-if { (eval echo configure:5458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
else
@@ -5476,12 +5474,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5480: checking for pr_siginfo64_t in sys/procfs.h" >&5
+echo "configure:5478: checking for pr_siginfo64_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5485 "configure"
+#line 5483 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5490,7 +5488,7 @@ int main() {
pr_siginfo64_t avar
; return 0; }
EOF
-if { (eval echo configure:5494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
else
@@ -5517,7 +5515,7 @@ EOF
if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
-echo "configure:5521: checking whether prfpregset_t type is broken" >&5
+echo "configure:5519: checking whether prfpregset_t type is broken" >&5
if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5525,7 +5523,7 @@ else
gdb_cv_prfpregset_t_broken=yes
else
cat > conftest.$ac_ext <<EOF
-#line 5529 "configure"
+#line 5527 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main ()
@@ -5535,7 +5533,7 @@ else
return 0;
}
EOF
-if { (eval echo configure:5539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_prfpregset_t_broken=no
else
@@ -5560,12 +5558,12 @@ EOF
echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5564: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
+echo "configure:5562: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5569 "configure"
+#line 5567 "configure"
#include "confdefs.h"
#include <unistd.h>
#include <sys/types.h>
@@ -5578,7 +5576,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:5582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_procfs_piocset=yes
else
@@ -5602,19 +5600,19 @@ fi
if test ${host} = ${target} ; then
echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:5606: checking for member l_addr in struct link_map" >&5
+echo "configure:5604: checking for member l_addr in struct link_map" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5611 "configure"
+#line 5609 "configure"
#include "confdefs.h"
#include <link.h>
int main() {
struct link_map lm; (void) lm.l_addr;
; return 0; }
EOF
-if { (eval echo configure:5618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map_with_l_members=yes
else
@@ -5636,12 +5634,12 @@ EOF
echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:5640: checking for member lm_addr in struct link_map" >&5
+echo "configure:5638: checking for member lm_addr in struct link_map" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5645 "configure"
+#line 5643 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <link.h>
@@ -5649,7 +5647,7 @@ int main() {
struct link_map lm; (void) lm.lm_addr;
; return 0; }
EOF
-if { (eval echo configure:5653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map_with_lm_members=yes
else
@@ -5671,12 +5669,12 @@ EOF
echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
-echo "configure:5675: checking for member som_addr in struct so_map" >&5
+echo "configure:5673: checking for member som_addr in struct so_map" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5680 "configure"
+#line 5678 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_NLIST_H
@@ -5687,7 +5685,7 @@ int main() {
struct so_map lm; (void) lm.som_addr;
; return 0; }
EOF
-if { (eval echo configure:5691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_so_map_with_som_members=yes
else
@@ -5709,12 +5707,12 @@ EOF
echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
-echo "configure:5713: checking for struct link_map32 in sys/link.h" >&5
+echo "configure:5711: checking for struct link_map32 in sys/link.h" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5718 "configure"
+#line 5716 "configure"
#include "confdefs.h"
#define _SYSCALL32
#include <sys/link.h>
@@ -5722,7 +5720,7 @@ int main() {
struct link_map32 l;
; return 0; }
EOF
-if { (eval echo configure:5726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map32=yes
else
@@ -5748,7 +5746,7 @@ EOF
fi
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:5752: checking for main in -lm" >&5
+echo "configure:5750: checking for main in -lm" >&5
ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5756,14 +5754,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5760 "configure"
+#line 5758 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5792,7 +5790,7 @@ fi
echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
-echo "configure:5796: checking for wctype in -lc" >&5
+echo "configure:5794: checking for wctype in -lc" >&5
ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5800,7 +5798,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5804 "configure"
+#line 5802 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5811,7 +5809,7 @@ int main() {
wctype()
; return 0; }
EOF
-if { (eval echo configure:5815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5830,7 +5828,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
-echo "configure:5834: checking for wctype in -lw" >&5
+echo "configure:5832: checking for wctype in -lw" >&5
ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5838,7 +5836,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lw $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5842 "configure"
+#line 5840 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5849,7 +5847,7 @@ int main() {
wctype()
; return 0; }
EOF
-if { (eval echo configure:5853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5881,12 +5879,12 @@ fi
echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
-echo "configure:5885: checking for long long support in compiler" >&5
+echo "configure:5883: checking for long long support in compiler" >&5
if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5890 "configure"
+#line 5888 "configure"
#include "confdefs.h"
int main() {
@@ -5896,7 +5894,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:5900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_c_long_long=yes
else
@@ -5918,7 +5916,7 @@ fi
echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
-echo "configure:5922: checking for long long support in printf" >&5
+echo "configure:5920: checking for long long support in printf" >&5
if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5926,7 +5924,7 @@ else
gdb_cv_printf_has_long_long=no
else
cat > conftest.$ac_ext <<EOF
-#line 5930 "configure"
+#line 5928 "configure"
#include "confdefs.h"
int main () {
@@ -5940,7 +5938,7 @@ int main () {
return (strcmp ("0x0123456789abcdef", buf));
}
EOF
-if { (eval echo configure:5944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_printf_has_long_long=yes
else
@@ -5964,19 +5962,19 @@ echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
-echo "configure:5968: checking for long double support in compiler" >&5
+echo "configure:5966: checking for long double support in compiler" >&5
if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5973 "configure"
+#line 5971 "configure"
#include "confdefs.h"
int main() {
long double foo;
; return 0; }
EOF
-if { (eval echo configure:5980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_long_double=yes
else
@@ -5998,7 +5996,7 @@ fi
echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
-echo "configure:6002: checking for long double support in printf" >&5
+echo "configure:6000: checking for long double support in printf" >&5
if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6006,7 +6004,7 @@ else
gdb_cv_printf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 6010 "configure"
+#line 6008 "configure"
#include "confdefs.h"
int main () {
@@ -6016,7 +6014,7 @@ int main () {
return (strncmp ("3.14159", buf, 7));
}
EOF
-if { (eval echo configure:6020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_printf_has_long_double=yes
else
@@ -6040,7 +6038,7 @@ echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
-echo "configure:6044: checking for long double support in scanf" >&5
+echo "configure:6042: checking for long double support in scanf" >&5
if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6048,7 +6046,7 @@ else
gdb_cv_scanf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 6052 "configure"
+#line 6050 "configure"
#include "confdefs.h"
int main () {
@@ -6058,7 +6056,7 @@ int main () {
return !(f > 3.14159 && f < 3.14160);
}
EOF
-if { (eval echo configure:6062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_scanf_has_long_double=yes
else
@@ -6080,21 +6078,21 @@ EOF
fi
echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
-for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
+for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6088: checking for $ac_hdr" >&5
+echo "configure:6086: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6093 "configure"
+#line 6091 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -6123,12 +6121,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6127: checking for $ac_func" >&5
+echo "configure:6125: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6132 "configure"
+#line 6130 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6151,7 +6149,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6176,7 +6174,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6180: checking for working mmap" >&5
+echo "configure:6178: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6184,7 +6182,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 6188 "configure"
+#line 6186 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6212,24 +6210,11 @@ else
#include <fcntl.h>
#include <sys/mman.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
/* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H
@@ -6337,7 +6322,7 @@ main()
}
EOF
-if { (eval echo configure:6341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -6363,7 +6348,7 @@ fi
case ${host_os} in
aix*)
echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
-echo "configure:6367: checking for -bbigtoc option" >&5
+echo "configure:6352: checking for -bbigtoc option" >&5
if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6377,14 +6362,14 @@ else
LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
cat > conftest.$ac_ext <<EOF
-#line 6381 "configure"
+#line 6366 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:6388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
:
else
echo "configure: failed program was:" >&5
@@ -6407,7 +6392,7 @@ if test ${build} = ${host} -a ${host} = ${target} ; then
case ${host_os} in
hpux*)
echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
-echo "configure:6411: checking for HPUX/OSF thread support" >&5
+echo "configure:6396: checking for HPUX/OSF thread support" >&5
if test -f /usr/include/dce/cma_config.h ; then
if test "$GCC" = "yes" ; then
echo "$ac_t""yes" 1>&6
@@ -6426,7 +6411,7 @@ EOF
;;
solaris*)
echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
-echo "configure:6430: checking for Solaris thread debugging library" >&5
+echo "configure:6415: checking for Solaris thread debugging library" >&5
if test -f /usr/lib/libthread_db.so.1 ; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
@@ -6436,7 +6421,7 @@ EOF
CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:6440: checking for dlopen in -ldl" >&5
+echo "configure:6425: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6444,7 +6429,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6448 "configure"
+#line 6433 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6455,7 +6440,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:6459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -6487,17 +6472,17 @@ fi
# all symbols visible in the dynamic symbol table.
hold_ldflags=$LDFLAGS
echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
-echo "configure:6491: checking for the ld -export-dynamic flag" >&5
+echo "configure:6476: checking for the ld -export-dynamic flag" >&5
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
cat > conftest.$ac_ext <<EOF
-#line 6494 "configure"
+#line 6479 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:6501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
found=yes
else
@@ -6516,13 +6501,13 @@ rm -f conftest*
# Sun randomly tweaked the prototypes in <proc_service.h>
# at one point.
echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
-echo "configure:6520: checking if <proc_service.h> is old" >&5
+echo "configure:6505: checking if <proc_service.h> is old" >&5
if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6526 "configure"
+#line 6511 "configure"
#include "confdefs.h"
#include <proc_service.h>
@@ -6533,7 +6518,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:6537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_proc_service_is_old=no
else
@@ -6752,7 +6737,7 @@ WERROR_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes
then
echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
-echo "configure:6756: checking compiler warning flags" >&5
+echo "configure:6741: checking compiler warning flags" >&5
# Separate out the -Werror flag as some files just cannot be
# compiled with it enabled.
for w in ${build_warnings}; do
@@ -6762,14 +6747,14 @@ echo "configure:6756: checking compiler warning flags" >&5
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $w"
cat > conftest.$ac_ext <<EOF
-#line 6766 "configure"
+#line 6751 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:6773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
WARN_CFLAGS="${WARN_CFLAGS} $w"
else
@@ -6829,12 +6814,12 @@ fi
if test $want_included_regex = false; then
echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
-echo "configure:6833: checking for GNU regex" >&5
+echo "configure:6818: checking for GNU regex" >&5
if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6838 "configure"
+#line 6823 "configure"
#include "confdefs.h"
#include <gnu-versions.h>
#include <sys/types.h>
@@ -6846,7 +6831,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:6850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_gnu_regex=yes
else
@@ -6875,12 +6860,12 @@ fi
# In the Cygwin environment, we need some additional flags.
echo $ac_n "checking for cygwin""... $ac_c" 1>&6
-echo "configure:6879: checking for cygwin" >&5
+echo "configure:6864: checking for cygwin" >&5
if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6884 "configure"
+#line 6869 "configure"
#include "confdefs.h"
#if defined (__CYGWIN__) || defined (__CYGWIN32__)
@@ -6918,7 +6903,7 @@ if test x$gdb_cv_os_cygwin = xyes; then
else
TERM_LIB=
echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:6922: checking for tgetent in -lncurses" >&5
+echo "configure:6907: checking for tgetent in -lncurses" >&5
ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6926,7 +6911,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6930 "configure"
+#line 6915 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6937,7 +6922,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:6941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -6956,7 +6941,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
-echo "configure:6960: checking for tgetent in -lHcurses" >&5
+echo "configure:6945: checking for tgetent in -lHcurses" >&5
ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6964,7 +6949,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lHcurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6968 "configure"
+#line 6953 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6975,7 +6960,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:6979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -6994,7 +6979,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
-echo "configure:6998: checking for tgetent in -ltermlib" >&5
+echo "configure:6983: checking for tgetent in -ltermlib" >&5
ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7002,7 +6987,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltermlib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7006 "configure"
+#line 6991 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7013,7 +6998,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:7017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7032,7 +7017,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:7036: checking for tgetent in -ltermcap" >&5
+echo "configure:7021: checking for tgetent in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7040,7 +7025,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltermcap $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7044 "configure"
+#line 7029 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7051,7 +7036,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:7055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7070,7 +7055,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:7074: checking for tgetent in -lcurses" >&5
+echo "configure:7059: checking for tgetent in -lcurses" >&5
ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7078,7 +7063,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7082 "configure"
+#line 7067 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7089,7 +7074,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:7093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7108,7 +7093,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
-echo "configure:7112: checking for tgetent in -lterminfo" >&5
+echo "configure:7097: checking for tgetent in -lterminfo" >&5
ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7116,7 +7101,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lterminfo $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7120 "configure"
+#line 7105 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7127,7 +7112,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:7131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7292,7 +7277,7 @@ if test "${with_tclconfig+set}" = set; then
fi
echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:7296: checking for Tcl configuration" >&5
+echo "configure:7281: checking for Tcl configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7400,7 +7385,7 @@ if test "${with_tkconfig+set}" = set; then
fi
echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:7404: checking for Tk configuration" >&5
+echo "configure:7389: checking for Tk configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7509,7 +7494,7 @@ fi
no_tcl=true
echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
-echo "configure:7513: checking for Tcl private headers. dir=${configdir}" >&5
+echo "configure:7498: checking for Tcl private headers. dir=${configdir}" >&5
# Check whether --with-tclinclude or --without-tclinclude was given.
if test "${with_tclinclude+set}" = set; then
withval="$with_tclinclude"
@@ -7575,17 +7560,17 @@ fi
if test x"${ac_cv_c_tclh}" = x ; then
ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
-echo "configure:7579: checking for tclInt.h" >&5
+echo "configure:7564: checking for tclInt.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7584 "configure"
+#line 7569 "configure"
#include "confdefs.h"
#include <tclInt.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -7645,7 +7630,7 @@ fi
#
no_tk=true
echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
-echo "configure:7649: checking for Tk private headers" >&5
+echo "configure:7634: checking for Tk private headers" >&5
# Check whether --with-tkinclude or --without-tkinclude was given.
if test "${with_tkinclude+set}" = set; then
withval="$with_tkinclude"
@@ -7711,17 +7696,17 @@ fi
if test x"${ac_cv_c_tkh}" = x ; then
ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tk.h""... $ac_c" 1>&6
-echo "configure:7715: checking for tk.h" >&5
+echo "configure:7700: checking for tk.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7720 "configure"
+#line 7705 "configure"
#include "confdefs.h"
#include <tk.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -7767,7 +7752,7 @@ fi
echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7771: checking for Itcl private headers. srcdir=${srcdir}" >&5
+echo "configure:7756: checking for Itcl private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_itclh}" = x ; then
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
if test -f $i/generic/itcl.h ; then
@@ -7790,7 +7775,7 @@ fi
echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7794: checking for Itk private headers. srcdir=${srcdir}" >&5
+echo "configure:7779: checking for Itk private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_itkh}" = x ; then
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
if test -f $i/generic/itk.h ; then
@@ -7813,7 +7798,7 @@ fi
echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7817: checking for Tix private headers. srcdir=${srcdir}" >&5
+echo "configure:7802: checking for Tix private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_tixh}" = x ; then
for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
if test -f $i/generic/tix.h ; then
@@ -7865,7 +7850,7 @@ if test "${with_itclconfig+set}" = set; then
fi
echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
-echo "configure:7869: checking for Itcl configuration" >&5
+echo "configure:7854: checking for Itcl configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7968,7 +7953,7 @@ if test "${with_itkconfig+set}" = set; then
fi
echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
-echo "configure:7972: checking for Itk configuration" >&5
+echo "configure:7957: checking for Itk configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8071,7 +8056,7 @@ if test "${with_tixconfig+set}" = set; then
fi
echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6
-echo "configure:8075: checking for Tix configuration" >&5
+echo "configure:8060: checking for Tix configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8217,7 +8202,7 @@ fi
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:8221: checking for X" >&5
+echo "configure:8206: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -8279,12 +8264,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 8283 "configure"
+#line 8268 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -8353,14 +8338,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 8357 "configure"
+#line 8342 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:8364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@@ -8652,7 +8637,7 @@ fi
# ``gdbserver'' can only be built in a native configuration.
if test x"${target}" = x"${host}"; then
echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
-echo "configure:8656: checking whether gdbserver is supported on this host" >&5
+echo "configure:8641: checking whether gdbserver is supported on this host" >&5
if test x"${build_gdbserver}" = xyes ; then
configdirs="${configdirs} gdbserver"
SUBDIRS="${SUBDIRS} gdbserver"
@@ -8714,7 +8699,7 @@ fi
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:8718: checking whether ln -s works" >&5
+echo "configure:8703: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8738,12 +8723,12 @@ fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:8742: checking for Cygwin environment" >&5
+echo "configure:8727: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8747 "configure"
+#line 8732 "configure"
#include "confdefs.h"
int main() {
@@ -8754,7 +8739,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:8758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -8771,19 +8756,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:8775: checking for mingw32 environment" >&5
+echo "configure:8760: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8780 "configure"
+#line 8765 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:8787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -8802,7 +8787,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:8806: checking for executable suffix" >&5
+echo "configure:8791: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8812,10 +8797,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:8816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:8801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj) ;;
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -8854,7 +8839,7 @@ fi
echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:8858: checking for iconv" >&5
+echo "configure:8843: checking for iconv" >&5
if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8862,7 +8847,7 @@ else
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
cat > conftest.$ac_ext <<EOF
-#line 8866 "configure"
+#line 8851 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -8872,7 +8857,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:8876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_func_iconv=yes
else
@@ -8884,7 +8869,7 @@ rm -f conftest*
am_save_LIBS="$LIBS"
LIBS="$LIBS -liconv"
cat > conftest.$ac_ext <<EOF
-#line 8888 "configure"
+#line 8873 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -8894,7 +8879,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:8898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
@@ -8915,13 +8900,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6
EOF
echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:8919: checking for iconv declaration" >&5
+echo "configure:8904: checking for iconv declaration" >&5
if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8925 "configure"
+#line 8910 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -8940,7 +8925,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:8944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_proto_iconv_arg1=""
else
diff --git a/gdb/configure.in b/gdb/configure.in
index 7bb455e39fd..8628e80d59a 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -279,7 +279,7 @@ if test "${target}" = "${host}"; then
ia64-*-aix*)
AC_DEFINE(NEW_PROC_API)
;;
- *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*)
+ *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
AC_DEFINE(NEW_PROC_API)
;;
*-*-solaris2.[[678]])
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index 896fbb18cb3..d272950a845 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -38,9 +38,11 @@ esac
case "${target}" in
+*-*-freebsd*) gdb_target=fbsd
+ ;;
+
alpha*-*-osf*) gdb_target=alpha-osf1 ;;
alpha*-*-linux*) gdb_target=alpha-linux ;;
-alpha*-*-freebsd*) gdb_target=fbsd ;;
alpha*-*-netbsd*) gdb_target=nbsd ;;
alpha*-*-*) gdb_target=alpha ;;
@@ -91,9 +93,8 @@ i[3456]86-sequent-sysv*) gdb_target=ptx ;;
i[3456]86-ncr-*) gdb_target=ncr3000 ;;
# OBSOLETE i[3456]86-*-aix*) gdb_target=i386aix ;;
i[3456]86-*-bsd*) gdb_target=i386bsd ;;
-i[3456]86-*-freebsd*) gdb_target=fbsd ;;
i[3456]86-*-netbsd*) gdb_target=nbsd ;;
-i[3456]86-*-openbsd*) gdb_target=nbsd ;; # FIXME: needs its own target
+i[3456]86-*-openbsd*) gdb_target=obsd ;;
# OBSOLETE i[3456]86-*-os9k) gdb_target=i386os9k ;;
i[3456]86-*-go32*) gdb_target=i386aout ;;
i[3456]86-*-msdosdjgpp*) gdb_target=go32 ;;
@@ -268,8 +269,6 @@ sparc86x-*-*) gdb_target=sparclite ;;
# regs (some of which are usable in v8plus) so sp64sol.mt hasn't been
# deleted though presumably it should be eventually.
#sparc64-*-solaris2*) gdb_target=sp64sol2 ;;
-sparc64-*-freebsd*|ultrasparc-*-freebsd*|sparcv9-*-freebsd*)
- gdb_target=fbsd ;;
sparc64-*-linux*) gdb_target=sp64linux ;;
sparc64-*-netbsd*) gdb_target=nbsd64 ;;
sparcv9-*-* | sparc64-*-*) gdb_target=sp64 ;;
@@ -293,7 +292,6 @@ x86_64-*-linux*) gdb_target=x86-64linux
build_gdbserver=yes
;;
-
z8k-*-coff*) gdb_target=z8k ;;
esac
diff --git a/gdb/corefile.c b/gdb/corefile.c
index 4f6eef2ce72..be0ecf0e3b0 100644
--- a/gdb/corefile.c
+++ b/gdb/corefile.c
@@ -356,6 +356,14 @@ read_memory_string (CORE_ADDR memaddr, char *buffer, int max_len)
}
}
+CORE_ADDR
+read_memory_typed_address (CORE_ADDR addr, struct type *type)
+{
+ char *buf = alloca (TYPE_LENGTH (type));
+ read_memory (addr, buf, TYPE_LENGTH (type));
+ return extract_typed_address (buf, type);
+}
+
/* Same as target_write_memory, but report an error if can't write. */
void
write_memory (CORE_ADDR memaddr, char *myaddr, int len)
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
index 28dc0259c24..f362d847536 100644
--- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c
@@ -161,21 +161,13 @@ cp_print_class_method (char *valaddr,
}
}
-/* This was what it was for gcc 2.4.5 and earlier. */
-static const char vtbl_ptr_name_old[] =
-{
- CPLUS_MARKER, 'v', 't', 'b', 'l', '_', 'p', 't', 'r', '_',
- 't', 'y', 'p', 'e', 0
-};
-
-/* It was changed to this after 2.4.5. */
+/* GCC versions after 2.4.5 use this. */
const char vtbl_ptr_name[] = "__vtbl_ptr_type";
-/* HP aCC uses different names */
+/* HP aCC uses different names. */
const char hpacc_vtbl_ptr_name[] = "__vfp";
const char hpacc_vtbl_ptr_type_name[] = "__vftyp";
-
/* Return truth value for assertion that TYPE is of the type
"pointer to virtual function". */
@@ -184,9 +176,7 @@ cp_is_vtbl_ptr_type (struct type *type)
{
char *typename = type_name_no_tag (type);
- return (typename != NULL
- && (STREQ (typename, vtbl_ptr_name)
- || STREQ (typename, vtbl_ptr_name_old)));
+ return (typename != NULL && !strcmp (typename, vtbl_ptr_name));
}
/* Return truth value for the assertion that TYPE is of the type
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 5d64d43f1f6..860286eb48e 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -3706,8 +3706,8 @@ cris_fpless_backtrace (char *noargs, int from_tty)
function (since there's no push srp in that case). */
int innermost_frame = 1;
- read_register_gen (PC_REGNUM, (char *) &pc);
- read_register_gen (SP_REGNUM, (char *) &sp);
+ deprecated_read_register_gen (PC_REGNUM, (char *) &pc);
+ deprecated_read_register_gen (SP_REGNUM, (char *) &sp);
/* We make an explicit return when we can't find an outer frame. */
while (1)
@@ -3846,7 +3846,7 @@ cris_fpless_backtrace (char *noargs, int from_tty)
/* We couldn't find a push srp in the prologue, so this must be
a leaf function, and thus we use the srp register directly.
This should happen at most once, for the innermost function. */
- read_register_gen (SRP_REGNUM, (char *) &pc);
+ deprecated_read_register_gen (SRP_REGNUM, (char *) &pc);
}
else
{
@@ -4289,7 +4289,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
- set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+ set_gdbarch_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
/* No register requires conversion from raw format to virtual format. */
set_gdbarch_register_convertible (gdbarch, generic_register_convertible_not);
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index d338ff47810..42ac50516f0 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -977,7 +977,7 @@ show_regs (char *args, int from_tty)
char num[MAX_REGISTER_RAW_SIZE];
int i;
printf_filtered (" ");
- read_register_gen (a, (char *) &num);
+ deprecated_read_register_gen (a, (char *) &num);
for (i = 0; i < MAX_REGISTER_RAW_SIZE; i++)
{
printf_filtered ("%02x", (num[i] & 0xff));
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 6592b74338b..0cf70919972 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -167,34 +167,34 @@ static int has_line_numbers;
/* Complaints about the symbols we have encountered. */
-struct complaint lbrac_complaint =
+struct deprecated_complaint lbrac_complaint =
{"bad block start address patched", 0, 0};
-struct complaint string_table_offset_complaint =
+struct deprecated_complaint string_table_offset_complaint =
{"bad string table offset in symbol %d", 0, 0};
-struct complaint unknown_symtype_complaint =
+struct deprecated_complaint unknown_symtype_complaint =
{"unknown symbol type %s", 0, 0};
-struct complaint unknown_symchar_complaint =
+struct deprecated_complaint unknown_symchar_complaint =
{"unknown symbol descriptor `%c'", 0, 0};
-struct complaint lbrac_rbrac_complaint =
+struct deprecated_complaint lbrac_rbrac_complaint =
{"block start larger than block end", 0, 0};
-struct complaint lbrac_unmatched_complaint =
+struct deprecated_complaint lbrac_unmatched_complaint =
{"unmatched N_LBRAC before symtab pos %d", 0, 0};
-struct complaint lbrac_mismatch_complaint =
+struct deprecated_complaint lbrac_mismatch_complaint =
{"N_LBRAC/N_RBRAC symbol mismatch at symtab pos %d", 0, 0};
-struct complaint repeated_header_complaint =
+struct deprecated_complaint repeated_header_complaint =
{"\"repeated\" header file %s not previously seen, at symtab pos %d", 0, 0};
-struct complaint unclaimed_bincl_complaint =
+struct deprecated_complaint unclaimed_bincl_complaint =
{"N_BINCL %s not in entries for any file, at symtab pos %d", 0, 0};
-struct complaint discarding_local_symbols_complaint =
+struct deprecated_complaint discarding_local_symbols_complaint =
{"misplaced N_LBRAC entry; discarding local symbols which have no enclosing block", 0, 0};
/* find_text_range --- find start and end of loadable code sections
@@ -1360,7 +1360,7 @@ read_dbx_symtab (struct objfile *objfile)
switch (nlist.n_type)
{
- static struct complaint function_outside_compilation_unit = {
+ static struct deprecated_complaint function_outside_compilation_unit = {
"function `%s' appears to be defined outside of all compilation units", 0, 0
};
char *p;
diff --git a/gdb/defs.h b/gdb/defs.h
index 2416bcd1a50..e34c7ee0556 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -157,10 +157,6 @@ typedef bfd_vma CORE_ADDR;
#define STREQ(a,b) (*(a) == *(b) ? !strcmp ((a), (b)) : 0)
#define STREQN(a,b,c) (*(a) == *(b) ? !strncmp ((a), (b), (c)) : 0)
-/* The character GNU C++ uses to build identifiers that must be unique from
- the program's identifiers (such as $this and $$vptr). */
-#define CPLUS_MARKER '$' /* May be overridden to '.' for SysV */
-
/* Check if a character is one of the commonly used C++ marker characters. */
extern int is_cplus_marker (int);
@@ -209,6 +205,7 @@ enum language
language_auto, /* Placeholder for automatic setting */
language_c, /* C */
language_cplus, /* C++ */
+ language_objc, /* Objective-C */
language_java, /* Java */
/* OBSOLETE language_chill, */ /* Chill */
language_fortran, /* Fortran */
@@ -446,6 +443,8 @@ extern void puts_filtered (const char *);
extern void puts_unfiltered (const char *);
+extern void puts_filtered_tabular (char *string, int width, int right);
+
extern void puts_debug (char *prefix, char *string, char *suffix);
extern void vprintf_filtered (const char *, va_list) ATTR_FORMAT (printf, 1, 0);
diff --git a/gdb/demangle.c b/gdb/demangle.c
index 1fd69be4c58..2b9579bc59c 100644
--- a/gdb/demangle.c
+++ b/gdb/demangle.c
@@ -150,24 +150,18 @@ set_demangling_style (char *style)
set_demangling_command ((char *) NULL, 0, (struct cmd_list_element *) NULL);
}
-/* In order to allow a single demangler executable to demangle strings
- using various common values of CPLUS_MARKER, as well as any specific
- one set at compile time, we maintain a string containing all the
- commonly used ones, and check to see if the marker we are looking for
- is in that string. CPLUS_MARKER is usually '$' on systems where the
- assembler can deal with that. Where the assembler can't, it's usually
- '.' (but on many systems '.' is used for other things). We put the
- current defined CPLUS_MARKER first (which defaults to '$'), followed
- by the next most common value, followed by an explicit '$' in case
- the value of CPLUS_MARKER is not '$'.
-
- We could avoid this if we could just get g++ to tell us what the actual
- cplus marker character is as part of the debug information, perhaps by
- ensuring that it is the character that terminates the gcc<n>_compiled
- marker symbol (FIXME). */
-
-static char cplus_markers[] =
-{CPLUS_MARKER, '.', '$', '\0'};
+/* G++ uses a special character to indicate certain internal names. Which
+ character it is depends on the platform:
+ - Usually '$' on systems where the assembler will accept that
+ - Usually '.' otherwise (this includes most sysv4-like systems and most
+ ELF targets)
+ - Occasionally '_' if neither of the above is usable
+
+ We check '$' first because it is the safest, and '.' often has another
+ meaning. We don't currently try to handle '_' because the precise forms
+ of the names are different on those targets. */
+
+static char cplus_markers[] = {'$', '.', '\0'};
int
is_cplus_marker (int c)
@@ -204,5 +198,4 @@ Use `set demangle-style' without arguments for a list of demangling styles.",
/* Set the default demangling style chosen at compilation time. */
set_demangling_style (DEFAULT_DEMANGLING_STYLE);
- set_cplus_marker_for_demangling (CPLUS_MARKER);
}
diff --git a/gdb/dwarf2cfi.c b/gdb/dwarf2cfi.c
index 18782b16dc8..83cfddca9ca 100644
--- a/gdb/dwarf2cfi.c
+++ b/gdb/dwarf2cfi.c
@@ -90,37 +90,6 @@ struct fde_array
int array_size;
};
-struct context_reg
-{
- union
- {
- unsigned int reg;
- long offset;
- CORE_ADDR addr;
- }
- loc;
- enum
- {
- REG_CTX_UNSAVED,
- REG_CTX_SAVED_OFFSET,
- REG_CTX_SAVED_REG,
- REG_CTX_SAVED_ADDR,
- REG_CTX_VALUE,
- }
- how;
-};
-
-/* This is the register and unwind state for a particular frame. */
-struct context
-{
- struct context_reg *reg;
-
- CORE_ADDR cfa;
- CORE_ADDR ra;
- void *lsda;
- int args_size;
-};
-
struct frame_state_reg
{
union
@@ -208,30 +177,27 @@ static struct fde_unit *fde_unit_alloc (void);
static struct cie_unit *cie_unit_alloc (void);
static void fde_chunks_need_space ();
-static struct context *context_alloc ();
-static struct frame_state *frame_state_alloc ();
static void unwind_tmp_obstack_init ();
static void unwind_tmp_obstack_free ();
-static void context_cpy (struct context *dst, struct context *src);
-
-static unsigned int read_1u (bfd * abfd, char **p);
-static int read_1s (bfd * abfd, char **p);
-static unsigned int read_2u (bfd * abfd, char **p);
-static int read_2s (bfd * abfd, char **p);
-static unsigned int read_4u (bfd * abfd, char **p);
-static int read_4s (bfd * abfd, char **p);
-static ULONGEST read_8u (bfd * abfd, char **p);
-static LONGEST read_8s (bfd * abfd, char **p);
-
-static ULONGEST read_uleb128 (bfd * abfd, char **p);
-static LONGEST read_sleb128 (bfd * abfd, char **p);
-static CORE_ADDR read_pointer (bfd * abfd, char **p);
-static CORE_ADDR read_encoded_pointer (bfd * abfd, char **p,
+
+static unsigned int read_1u (bfd *abfd, char **p);
+static int read_1s (bfd *abfd, char **p);
+static unsigned int read_2u (bfd *abfd, char **p);
+static int read_2s (bfd *abfd, char **p);
+static unsigned int read_4u (bfd *abfd, char **p);
+static int read_4s (bfd *abfd, char **p);
+static ULONGEST read_8u (bfd *abfd, char **p);
+static LONGEST read_8s (bfd *abfd, char **p);
+
+static ULONGEST read_uleb128 (bfd *abfd, char **p);
+static LONGEST read_sleb128 (bfd *abfd, char **p);
+static CORE_ADDR read_pointer (bfd *abfd, char **p);
+static CORE_ADDR read_encoded_pointer (bfd *abfd, char **p,
unsigned char encoding);
static enum ptr_encoding pointer_encoding (unsigned char encoding);
-static LONGEST read_initial_length (bfd * abfd, char *buf, int *bytes_read);
-static ULONGEST read_length (bfd * abfd, char *buf, int *bytes_read,
+static LONGEST read_initial_length (bfd *abfd, char *buf, int *bytes_read);
+static ULONGEST read_length (bfd *abfd, char *buf, int *bytes_read,
int dwarf64);
static int is_cie (ULONGEST cie_id, int dwarf64);
@@ -286,7 +252,7 @@ fde_chunks_need_space (void)
}
/* Alocate a new `struct context' on temporary obstack. */
-static struct context *
+struct context *
context_alloc (void)
{
struct context *context;
@@ -303,7 +269,7 @@ context_alloc (void)
}
/* Alocate a new `struct frame_state' on temporary obstack. */
-static struct frame_state *
+struct frame_state *
frame_state_alloc (void)
{
struct frame_state *fs;
@@ -332,32 +298,23 @@ unwind_tmp_obstack_free (void)
unwind_tmp_obstack_init ();
}
-static void
+void
context_cpy (struct context *dst, struct context *src)
{
int regs_size = sizeof (struct context_reg) * NUM_REGS;
struct context_reg *dreg;
- /* Structure dst contains a pointer to an array of
- * registers of a given frame as well as src does. This
- * array was already allocated before dst was passed to
- * context_cpy but the pointer to it was overriden by
- * '*dst = *src' and the array was lost. This led to the
- * situation, that we've had a copy of src placed in dst,
- * but both of them pointed to the same regs array and
- * thus we've sometimes blindly rewritten it. Now we save
- * the pointer before copying src to dst, return it back
- * after that and copy the registers into their new place
- * finally. --- mludvig@suse.cz */
+ /* Since `struct context' contains a pointer to an array with
+ register values, make sure we end up with a copy of that array,
+ and not with a copy of the pointer to that array. */
dreg = dst->reg;
*dst = *src;
dst->reg = dreg;
-
memcpy (dst->reg, src->reg, regs_size);
}
static unsigned int
-read_1u (bfd * abfd, char **p)
+read_1u (bfd *abfd, char **p)
{
unsigned ret;
@@ -367,7 +324,7 @@ read_1u (bfd * abfd, char **p)
}
static int
-read_1s (bfd * abfd, char **p)
+read_1s (bfd *abfd, char **p)
{
int ret;
@@ -377,7 +334,7 @@ read_1s (bfd * abfd, char **p)
}
static unsigned int
-read_2u (bfd * abfd, char **p)
+read_2u (bfd *abfd, char **p)
{
unsigned ret;
@@ -387,7 +344,7 @@ read_2u (bfd * abfd, char **p)
}
static int
-read_2s (bfd * abfd, char **p)
+read_2s (bfd *abfd, char **p)
{
int ret;
@@ -397,7 +354,7 @@ read_2s (bfd * abfd, char **p)
}
static unsigned int
-read_4u (bfd * abfd, char **p)
+read_4u (bfd *abfd, char **p)
{
unsigned int ret;
@@ -407,7 +364,7 @@ read_4u (bfd * abfd, char **p)
}
static int
-read_4s (bfd * abfd, char **p)
+read_4s (bfd *abfd, char **p)
{
int ret;
@@ -417,7 +374,7 @@ read_4s (bfd * abfd, char **p)
}
static ULONGEST
-read_8u (bfd * abfd, char **p)
+read_8u (bfd *abfd, char **p)
{
ULONGEST ret;
@@ -427,7 +384,7 @@ read_8u (bfd * abfd, char **p)
}
static LONGEST
-read_8s (bfd * abfd, char **p)
+read_8s (bfd *abfd, char **p)
{
LONGEST ret;
@@ -437,7 +394,7 @@ read_8s (bfd * abfd, char **p)
}
static ULONGEST
-read_uleb128 (bfd * abfd, char **p)
+read_uleb128 (bfd *abfd, char **p)
{
ULONGEST ret;
int i, shift;
@@ -461,7 +418,7 @@ read_uleb128 (bfd * abfd, char **p)
}
static LONGEST
-read_sleb128 (bfd * abfd, char **p)
+read_sleb128 (bfd *abfd, char **p)
{
LONGEST ret;
int i, shift, size, num_read;
@@ -491,7 +448,7 @@ read_sleb128 (bfd * abfd, char **p)
}
static CORE_ADDR
-read_pointer (bfd * abfd, char **p)
+read_pointer (bfd *abfd, char **p)
{
switch (TARGET_ADDR_BIT / TARGET_CHAR_BIT)
{
@@ -504,11 +461,11 @@ read_pointer (bfd * abfd, char **p)
}
}
-/* This functions only reads appropriate amount of data from *p
- * and returns the resulting value. Calling function must handle
- * different encoding possibilities itself! */
+/* Read the appropriate amount of data from *P and return the
+ resulting value based on ENCODING, which the calling function must
+ provide. */
static CORE_ADDR
-read_encoded_pointer (bfd * abfd, char **p, unsigned char encoding)
+read_encoded_pointer (bfd *abfd, char **p, unsigned char encoding)
{
CORE_ADDR ret;
@@ -553,10 +510,10 @@ read_encoded_pointer (bfd * abfd, char **p, unsigned char encoding)
return ret;
}
-/* Variable 'encoding' carries 3 different flags:
- * - encoding & 0x0f : size of the address (handled in read_encoded_pointer())
- * - encoding & 0x70 : type (absolute, relative, ...)
- * - encoding & 0x80 : indirect flag (DW_EH_PE_indirect == 0x80). */
+/* The variable 'encoding' carries three different flags:
+ - encoding & 0x0f : size of the address (handled in read_encoded_pointer())
+ - encoding & 0x70 : type (absolute, relative, ...)
+ - encoding & 0x80 : indirect flag (DW_EH_PE_indirect == 0x80). */
enum ptr_encoding
pointer_encoding (unsigned char encoding)
{
@@ -581,7 +538,7 @@ pointer_encoding (unsigned char encoding)
}
static LONGEST
-read_initial_length (bfd * abfd, char *buf, int *bytes_read)
+read_initial_length (bfd *abfd, char *buf, int *bytes_read)
{
LONGEST ret = 0;
@@ -601,7 +558,7 @@ read_initial_length (bfd * abfd, char *buf, int *bytes_read)
}
static ULONGEST
-read_length (bfd * abfd, char *buf, int *bytes_read, int dwarf64)
+read_length (bfd *abfd, char *buf, int *bytes_read, int dwarf64)
{
if (dwarf64)
{
@@ -848,13 +805,13 @@ frame_state_for (struct context *context, struct frame_state *fs)
gdb_assert (fde->cie_ptr != NULL);
cie = fde->cie_ptr;
-
+
fs->code_align = cie->code_align;
fs->data_align = cie->data_align;
fs->retaddr_column = cie->ra;
fs->addr_encoding = cie->addr_encoding;
fs->objfile = cie->objfile;
-
+
execute_cfa_program (cie->objfile, cie->data,
cie->data + cie->data_length, context, fs);
execute_cfa_program (cie->objfile, fde->data,
@@ -867,14 +824,14 @@ get_reg (char *reg, struct context *context, int regnum)
switch (context->reg[regnum].how)
{
case REG_CTX_UNSAVED:
- read_register_gen (regnum, reg);
+ deprecated_read_register_gen (regnum, reg);
break;
case REG_CTX_SAVED_OFFSET:
target_read_memory (context->cfa + context->reg[regnum].loc.offset,
reg, REGISTER_RAW_SIZE (regnum));
break;
case REG_CTX_SAVED_REG:
- read_register_gen (context->reg[regnum].loc.reg, reg);
+ deprecated_read_register_gen (context->reg[regnum].loc.reg, reg);
break;
case REG_CTX_SAVED_ADDR:
target_read_memory (context->reg[regnum].loc.addr,
@@ -1128,7 +1085,7 @@ execute_stack_op (struct objfile *objfile,
case DW_OP_deref_size:
{
int len = *op_ptr++;
- if (len != 1 && len != 2 && len != 4 && len !=8)
+ if (len != 1 && len != 2 && len != 4 && len != 8)
internal_error (__FILE__, __LINE__,
"execute_stack_op error");
result = read_memory_unsigned_integer (result, len);
@@ -1731,7 +1688,7 @@ cfi_write_fp (CORE_ADDR val)
if (fs->cfa_how == CFA_REG_OFFSET)
{
val -= fs->cfa_offset;
- write_register_gen (fs->cfa_reg, (char *) &val);
+ deprecated_write_register_gen (fs->cfa_reg, (char *) &val);
}
else
warning ("Can't write fp.");
@@ -1862,7 +1819,7 @@ cfi_get_saved_register (char *raw_buffer,
if (!frame->next)
{
- read_register_gen (regnum, raw_buffer);
+ deprecated_read_register_gen (regnum, raw_buffer);
if (lval != NULL)
*lval = lval_register;
if (addrp != NULL)
@@ -1874,7 +1831,7 @@ cfi_get_saved_register (char *raw_buffer,
switch (UNWIND_CONTEXT (frame)->reg[regnum].how)
{
case REG_CTX_UNSAVED:
- read_register_gen (regnum, raw_buffer);
+ deprecated_read_register_gen (regnum, raw_buffer);
if (lval != NULL)
*lval = not_lval;
if (optimized != NULL)
@@ -1892,8 +1849,8 @@ cfi_get_saved_register (char *raw_buffer,
UNWIND_CONTEXT (frame)->reg[regnum].loc.offset;
break;
case REG_CTX_SAVED_REG:
- read_register_gen (UNWIND_CONTEXT (frame)->reg[regnum].loc.reg,
- raw_buffer);
+ deprecated_read_register_gen (UNWIND_CONTEXT (frame)->reg[regnum].loc.reg,
+ raw_buffer);
if (lval != NULL)
*lval = lval_register;
if (addrp != NULL)
diff --git a/gdb/dwarf2cfi.h b/gdb/dwarf2cfi.h
index f4c675aca7b..a1cc39cb581 100644
--- a/gdb/dwarf2cfi.h
+++ b/gdb/dwarf2cfi.h
@@ -22,6 +22,37 @@
#ifndef DWARF2CFI_H
#define DWARF2CFI_H
+struct context_reg
+{
+ union
+ {
+ unsigned int reg;
+ long offset;
+ CORE_ADDR addr;
+ }
+ loc;
+ enum
+ {
+ REG_CTX_UNSAVED,
+ REG_CTX_SAVED_OFFSET,
+ REG_CTX_SAVED_REG,
+ REG_CTX_SAVED_ADDR,
+ REG_CTX_VALUE,
+ }
+ how;
+};
+
+/* This is the register and unwind state for a particular frame. */
+struct context
+{
+ struct context_reg *reg;
+
+ CORE_ADDR cfa;
+ CORE_ADDR ra;
+ void *lsda;
+ int args_size;
+};
+
/* Return the frame address. */
CORE_ADDR cfi_read_fp ();
@@ -53,7 +84,7 @@ CORE_ADDR cfi_get_ra (struct frame_info *fi);
The argument RAW_BUFFER must point to aligned memory. */
void cfi_get_saved_register (char *raw_buffer,
int *optimized,
- CORE_ADDR * addrp,
+ CORE_ADDR *addrp,
struct frame_info *frame,
int regnum, enum lval_type *lval);
@@ -63,4 +94,7 @@ void cfi_get_saved_register (char *raw_buffer,
void cfi_virtual_frame_pointer (CORE_ADDR pc, int *frame_regnum,
LONGEST * frame_offset);
+struct context *context_alloc ();
+void context_cpy (struct context *dst, struct context *src);
+struct frame_state *frame_state_alloc ();
#endif
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 4ef683c13dc..7ede81b71f1 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -162,6 +162,11 @@ unsigned int dwarf_eh_frame_size;
/* local data types */
+/* We hold several abbreviation tables in memory at the same time. */
+#ifndef ABBREV_HASH_SIZE
+#define ABBREV_HASH_SIZE 121
+#endif
+
/* The data in a compilation unit header, after target2host
translation, looks like this. */
struct comp_unit_head
@@ -174,6 +179,29 @@ struct comp_unit_head
unsigned int offset_size; /* size of file offsets; either 4 or 8 */
unsigned int initial_length_size; /* size of the length field; either
4 or 12 */
+
+ /* Offset to the first byte of this compilation unit header in the
+ * .debug_info section, for resolving relative reference dies. */
+
+ unsigned int offset;
+
+ /* Pointer to this compilation unit header in the .debug_info
+ * section */
+
+ char *cu_head_ptr;
+
+ /* Pointer to the first die of this compilatio unit. This will
+ * be the first byte following the compilation unit header. */
+
+ char *first_die_ptr;
+
+ /* Pointer to the next compilation unit header in the program. */
+
+ struct comp_unit_head *next;
+
+ /* DWARF abbreviation table associated with this compilation unit */
+
+ struct abbrev_info *dwarf2_abbrevs[ABBREV_HASH_SIZE];
};
/* The line number information for a compilation unit (found in the
@@ -312,17 +340,10 @@ struct dwarf_block
char *data;
};
-/* We only hold one compilation unit's abbrevs in
- memory at any one time. */
-#ifndef ABBREV_HASH_SIZE
-#define ABBREV_HASH_SIZE 121
-#endif
#ifndef ATTR_ALLOC_CHUNK
#define ATTR_ALLOC_CHUNK 4
#endif
-static struct abbrev_info *dwarf2_abbrevs[ABBREV_HASH_SIZE];
-
/* A hash table of die offsets for following references. */
#ifndef REF_HASH_SIZE
#define REF_HASH_SIZE 1021
@@ -389,6 +410,12 @@ static int islocal; /* Variable is at the returned offset
this function, so we can't say
which register it's relative to;
use LOC_LOCAL. */
+static int is_thread_local; /* Variable is at a constant offset in the
+ thread-local storage block for the
+ current thread and the dynamic linker
+ module containing this expression.
+ decode_locdesc returns the offset from
+ that base. */
/* DW_AT_frame_base values for the current function.
frame_base_reg is -1 if DW_AT_frame_base is missing, otherwise it
@@ -534,134 +561,138 @@ struct field_info
/* Various complaints about symbol reading that don't abort the process */
-static struct complaint dwarf2_const_ignored =
+static struct deprecated_complaint dwarf2_const_ignored =
{
"type qualifier 'const' ignored", 0, 0
};
-static struct complaint dwarf2_volatile_ignored =
+static struct deprecated_complaint dwarf2_volatile_ignored =
{
"type qualifier 'volatile' ignored", 0, 0
};
-static struct complaint dwarf2_non_const_array_bound_ignored =
+static struct deprecated_complaint dwarf2_non_const_array_bound_ignored =
{
"non-constant array bounds form '%s' ignored", 0, 0
};
-static struct complaint dwarf2_missing_line_number_section =
+static struct deprecated_complaint dwarf2_missing_line_number_section =
{
"missing .debug_line section", 0, 0
};
-static struct complaint dwarf2_statement_list_fits_in_line_number_section =
+static struct deprecated_complaint dwarf2_statement_list_fits_in_line_number_section =
{
"statement list doesn't fit in .debug_line section", 0, 0
};
-static struct complaint dwarf2_mangled_line_number_section =
+static struct deprecated_complaint dwarf2_mangled_line_number_section =
{
"mangled .debug_line section", 0, 0
};
-static struct complaint dwarf2_unsupported_die_ref_attr =
+static struct deprecated_complaint dwarf2_unsupported_die_ref_attr =
{
"unsupported die ref attribute form: '%s'", 0, 0
};
-static struct complaint dwarf2_unsupported_stack_op =
+static struct deprecated_complaint dwarf2_unsupported_stack_op =
{
"unsupported stack op: '%s'", 0, 0
};
-static struct complaint dwarf2_complex_location_expr =
+static struct deprecated_complaint dwarf2_complex_location_expr =
{
"location expression too complex", 0, 0
};
-static struct complaint dwarf2_unsupported_tag =
+static struct deprecated_complaint dwarf2_unsupported_tag =
{
"unsupported tag: '%s'", 0, 0
};
-static struct complaint dwarf2_unsupported_at_encoding =
+static struct deprecated_complaint dwarf2_unsupported_at_encoding =
{
"unsupported DW_AT_encoding: '%s'", 0, 0
};
-static struct complaint dwarf2_unsupported_at_frame_base =
+static struct deprecated_complaint dwarf2_unsupported_at_frame_base =
{
"unsupported DW_AT_frame_base for function '%s'", 0, 0
};
-static struct complaint dwarf2_unexpected_tag =
+static struct deprecated_complaint dwarf2_unexpected_tag =
{
"unexepected tag in read_type_die: '%s'", 0, 0
};
-static struct complaint dwarf2_missing_at_frame_base =
+static struct deprecated_complaint dwarf2_missing_at_frame_base =
{
"DW_AT_frame_base missing for DW_OP_fbreg", 0, 0
};
-static struct complaint dwarf2_bad_static_member_name =
+static struct deprecated_complaint dwarf2_bad_static_member_name =
{
"unrecognized static data member name '%s'", 0, 0
};
-static struct complaint dwarf2_unsupported_accessibility =
+static struct deprecated_complaint dwarf2_unsupported_accessibility =
{
"unsupported accessibility %d", 0, 0
};
-static struct complaint dwarf2_bad_member_name_complaint =
+static struct deprecated_complaint dwarf2_bad_member_name_complaint =
{
"cannot extract member name from '%s'", 0, 0
};
-static struct complaint dwarf2_missing_member_fn_type_complaint =
+static struct deprecated_complaint dwarf2_missing_member_fn_type_complaint =
{
"member function type missing for '%s'", 0, 0
};
-static struct complaint dwarf2_vtbl_not_found_complaint =
+static struct deprecated_complaint dwarf2_vtbl_not_found_complaint =
{
"virtual function table pointer not found when defining class '%s'", 0, 0
};
-static struct complaint dwarf2_absolute_sibling_complaint =
+static struct deprecated_complaint dwarf2_absolute_sibling_complaint =
{
"ignoring absolute DW_AT_sibling", 0, 0
};
-static struct complaint dwarf2_const_value_length_mismatch =
+static struct deprecated_complaint dwarf2_const_value_length_mismatch =
{
"const value length mismatch for '%s', got %d, expected %d", 0, 0
};
-static struct complaint dwarf2_unsupported_const_value_attr =
+static struct deprecated_complaint dwarf2_unsupported_const_value_attr =
{
"unsupported const value attribute form: '%s'", 0, 0
};
-static struct complaint dwarf2_misplaced_line_number =
+static struct deprecated_complaint dwarf2_misplaced_line_number =
{
"misplaced first line number at 0x%lx for '%s'", 0, 0
};
-static struct complaint dwarf2_line_header_too_long =
+static struct deprecated_complaint dwarf2_line_header_too_long =
{
"line number info header doesn't fit in `.debug_line' section", 0, 0
};
-static struct complaint dwarf2_missing_macinfo_section =
+static struct deprecated_complaint dwarf2_missing_macinfo_section =
{
"missing .debug_macinfo section", 0, 0
};
-static struct complaint dwarf2_macros_too_long =
+static struct deprecated_complaint dwarf2_macros_too_long =
{
"macro info runs off end of `.debug_macinfo' section", 0, 0
};
-static struct complaint dwarf2_macros_not_terminated =
+static struct deprecated_complaint dwarf2_macros_not_terminated =
{
"no terminating 0-type entry for macros in `.debug_macinfo' section", 0, 0
};
-static struct complaint dwarf2_macro_outside_file =
+static struct deprecated_complaint dwarf2_macro_outside_file =
{
"debug info gives macro %s outside of any file: %s", 0, 0
};
-static struct complaint dwarf2_macro_unmatched_end_file =
+static struct deprecated_complaint dwarf2_macro_unmatched_end_file =
{
"macro debug info has an unmatched `close_file' directive", 0, 0
};
-static struct complaint dwarf2_macro_malformed_definition =
+static struct deprecated_complaint dwarf2_macro_malformed_definition =
{
"macro debug info contains a malformed macro definition:\n`%s'", 0, 0
};
-static struct complaint dwarf2_macro_spaces_in_definition =
+static struct deprecated_complaint dwarf2_macro_spaces_in_definition =
{
"macro definition contains spaces in formal argument list:\n`%s'", 0, 0
};
-static struct complaint dwarf2_invalid_attrib_class =
+static struct deprecated_complaint dwarf2_invalid_attrib_class =
{
"invalid attribute class or form for '%s' in '%s'", 0, 0
};
+static struct deprecated_complaint dwarf2_invalid_pointer_size =
+{
+ "invalid pointer size %d", 0, 0
+};
/* local function prototypes */
@@ -686,11 +717,12 @@ static void psymtab_to_symtab_1 (struct partial_symtab *);
char *dwarf2_read_section (struct objfile *, file_ptr, unsigned int);
-static void dwarf2_read_abbrevs (bfd *, unsigned int);
+static void dwarf2_read_abbrevs (bfd *abfd, struct comp_unit_head *cu_header);
static void dwarf2_empty_abbrev_table (PTR);
-static struct abbrev_info *dwarf2_lookup_abbrev (unsigned int);
+static struct abbrev_info *dwarf2_lookup_abbrev (unsigned int,
+ const struct comp_unit_head *cu_header);
static char *read_partial_die (struct partial_die_info *,
bfd *, char *,
@@ -816,6 +848,9 @@ static void read_structure_scope (struct die_info *, struct objfile *,
static void read_common_block (struct die_info *, struct objfile *,
const struct comp_unit_head *);
+static void read_namespace (struct die_info *die, struct objfile *objfile,
+ const struct comp_unit_head *cu_header);
+
static void read_enumeration (struct die_info *, struct objfile *,
const struct comp_unit_head *);
@@ -1211,9 +1246,14 @@ dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline)
(long) (beg_of_comp_unit - dwarf_info_buffer));
return;
}
+ /* Complete the cu_header */
+ cu_header.offset = beg_of_comp_unit - dwarf_info_buffer;
+ cu_header.first_die_ptr = info_ptr;
+ cu_header.cu_head_ptr = beg_of_comp_unit;
+
/* Read the abbrevs for this compilation unit into a table */
- dwarf2_read_abbrevs (abfd, cu_header.abbrev_offset);
- make_cleanup (dwarf2_empty_abbrev_table, NULL);
+ dwarf2_read_abbrevs (abfd, &cu_header);
+ make_cleanup (dwarf2_empty_abbrev_table, cu_header.dwarf2_abbrevs);
/* Read the compilation unit die */
info_ptr = read_partial_die (&comp_unit_die, abfd, info_ptr,
@@ -1301,6 +1341,17 @@ scan_partial_symbols (char *info_ptr, struct objfile *objfile,
int nesting_level = 1;
+ /* We only want to read in symbols corresponding to variables or
+ other similar objects that are global or static. Normally, these
+ are all children of the DW_TAG_compile_unit die, so are all at
+ level 1. But C++ namespaces give ries to DW_TAG_namespace dies
+ whose children are global objects. So we keep track of what
+ level we currently think of as referring to file scope; this
+ should always equal 1 plus the number of namespaces that we are
+ currently nested within. */
+
+ int file_scope_level = 1;
+
*lowpc = ((CORE_ADDR) -1);
*highpc = ((CORE_ADDR) 0);
@@ -1323,7 +1374,7 @@ scan_partial_symbols (char *info_ptr, struct objfile *objfile,
{
*highpc = pdi.highpc;
}
- if ((pdi.is_external || nesting_level == 1)
+ if ((pdi.is_external || nesting_level == file_scope_level)
&& !pdi.is_declaration)
{
add_partial_symbol (&pdi, objfile, cu_header);
@@ -1336,46 +1387,65 @@ scan_partial_symbols (char *info_ptr, struct objfile *objfile,
case DW_TAG_structure_type:
case DW_TAG_union_type:
case DW_TAG_enumeration_type:
- if ((pdi.is_external || nesting_level == 1)
+ if ((pdi.is_external || nesting_level == file_scope_level)
&& !pdi.is_declaration)
{
add_partial_symbol (&pdi, objfile, cu_header);
}
break;
case DW_TAG_enumerator:
- /* File scope enumerators are added to the partial symbol
- table. */
- if (nesting_level == 2)
+ /* File scope enumerators are added to the partial
+ symbol table. They're children of the enumeration
+ type die, so they occur at a level one higher than we
+ normally look for. */
+ if (nesting_level == file_scope_level + 1)
add_partial_symbol (&pdi, objfile, cu_header);
break;
case DW_TAG_base_type:
/* File scope base type definitions are added to the partial
symbol table. */
- if (nesting_level == 1)
+ if (nesting_level == file_scope_level)
add_partial_symbol (&pdi, objfile, cu_header);
break;
+ case DW_TAG_namespace:
+ /* FIXME: carlton/2002-10-16: we're not yet doing
+ anything useful with this, but for now make sure that
+ these tags at least don't cause us to miss any
+ important symbols. */
+ if (pdi.has_children)
+ file_scope_level++;
default:
break;
}
}
- /* If the die has a sibling, skip to the sibling.
- Do not skip enumeration types, we want to record their
- enumerators. */
- if (pdi.sibling && pdi.tag != DW_TAG_enumeration_type)
+ /* If the die has a sibling, skip to the sibling. Do not skip
+ enumeration types, we want to record their enumerators. Do
+ not skip namespaces, we want to record symbols inside
+ them. */
+ if (pdi.sibling
+ && pdi.tag != DW_TAG_enumeration_type
+ && pdi.tag != DW_TAG_namespace)
{
info_ptr = pdi.sibling;
}
else if (pdi.has_children)
{
- /* Die has children, but the optional DW_AT_sibling attribute
- is missing. */
+ /* Die has children, but either the optional DW_AT_sibling
+ attribute is missing or we want to look at them. */
nesting_level++;
}
if (pdi.tag == 0)
{
nesting_level--;
+ /* If this is the end of a DW_TAG_namespace entry, then
+ decrease the file_scope_level, too. */
+ if (nesting_level < file_scope_level)
+ {
+ file_scope_level--;
+ gdb_assert (nesting_level == file_scope_level);
+ }
}
}
@@ -1560,8 +1630,8 @@ psymtab_to_symtab_1 (struct partial_symtab *pst)
info_ptr = read_comp_unit_head (&cu_header, info_ptr, abfd);
/* Read the abbrevs for this compilation unit */
- dwarf2_read_abbrevs (abfd, cu_header.abbrev_offset);
- make_cleanup (dwarf2_empty_abbrev_table, NULL);
+ dwarf2_read_abbrevs (abfd, &cu_header);
+ make_cleanup (dwarf2_empty_abbrev_table, cu_header.dwarf2_abbrevs);
dies = read_comp_unit (info_ptr, abfd, &cu_header);
@@ -1675,6 +1745,19 @@ process_die (struct die_info *die, struct objfile *objfile,
break;
case DW_TAG_common_inclusion:
break;
+ case DW_TAG_namespace:
+ read_namespace (die, objfile, cu_header);
+ break;
+ case DW_TAG_imported_declaration:
+ case DW_TAG_imported_module:
+ /* FIXME: carlton/2002-10-16: Eventually, we should use the
+ information contained in these. DW_TAG_imported_declaration
+ dies shouldn't have children; DW_TAG_imported_module dies
+ shouldn't in the C++ case, but conceivably could in the
+ Fortran case, so we'll have to replace this gdb_assert if
+ Fortran compilers start generating that info. */
+ gdb_assert (!die->has_children);
+ break;
default:
new_symbol (die, NULL, objfile, cu_header);
break;
@@ -2890,6 +2973,27 @@ read_common_block (struct die_info *die, struct objfile *objfile,
}
}
+/* Read a C++ namespace. */
+
+/* FIXME: carlton/2002-10-16: For now, we don't actually do anything
+ useful with the namespace data: we just process its children. */
+
+static void
+read_namespace (struct die_info *die, struct objfile *objfile,
+ const struct comp_unit_head *cu_header)
+{
+ if (die->has_children)
+ {
+ struct die_info *child_die = die->next;
+
+ while (child_die && child_die->tag)
+ {
+ process_die (child_die, objfile, cu_header);
+ child_die = sibling_die (child_die);
+ }
+ }
+}
+
/* Extract all information from a DW_TAG_pointer_type DIE and add to
the user defined type vector. */
@@ -2898,7 +3002,9 @@ read_tag_pointer_type (struct die_info *die, struct objfile *objfile,
const struct comp_unit_head *cu_header)
{
struct type *type;
- struct attribute *attr;
+ struct attribute *attr_byte_size;
+ struct attribute *attr_address_class;
+ int byte_size, addr_class;
if (die->type)
{
@@ -2906,15 +3012,42 @@ read_tag_pointer_type (struct die_info *die, struct objfile *objfile,
}
type = lookup_pointer_type (die_type (die, objfile, cu_header));
- attr = dwarf_attr (die, DW_AT_byte_size);
- if (attr)
- {
- TYPE_LENGTH (type) = DW_UNSND (attr);
- }
+
+ attr_byte_size = dwarf_attr (die, DW_AT_byte_size);
+ if (attr_byte_size)
+ byte_size = DW_UNSND (attr_byte_size);
+ else
+ byte_size = cu_header->addr_size;
+
+ attr_address_class = dwarf_attr (die, DW_AT_address_class);
+ if (attr_address_class)
+ addr_class = DW_UNSND (attr_address_class);
else
+ addr_class = DW_ADDR_none;
+
+ /* If the pointer size or address class is different than the
+ default, create a type variant marked as such and set the
+ length accordingly. */
+ if (TYPE_LENGTH (type) != byte_size || addr_class != DW_ADDR_none)
{
- TYPE_LENGTH (type) = cu_header->addr_size;
+ if (ADDRESS_CLASS_TYPE_FLAGS_P ())
+ {
+ int type_flags;
+
+ type_flags = ADDRESS_CLASS_TYPE_FLAGS (byte_size, addr_class);
+ gdb_assert ((type_flags & ~TYPE_FLAG_ADDRESS_CLASS_ALL) == 0);
+ type = make_type_with_address_space (type, type_flags);
+ }
+ else if (TYPE_LENGTH (type) != byte_size)
+ {
+ complain (&dwarf2_invalid_pointer_size, byte_size);
+ }
+ else {
+ /* Should we also complain about unhandled address classes? */
+ }
}
+
+ TYPE_LENGTH (type) = byte_size;
die->type = type;
}
@@ -3345,17 +3478,18 @@ dwarf2_read_section (struct objfile *objfile, file_ptr offset,
in a hash table. */
static void
-dwarf2_read_abbrevs (bfd *abfd, unsigned int offset)
+dwarf2_read_abbrevs (bfd *abfd, struct comp_unit_head *cu_header)
{
char *abbrev_ptr;
struct abbrev_info *cur_abbrev;
unsigned int abbrev_number, bytes_read, abbrev_name;
unsigned int abbrev_form, hash_number;
- /* empty the table */
- dwarf2_empty_abbrev_table (NULL);
+ /* Initialize dwarf2 abbrevs */
+ memset (cu_header->dwarf2_abbrevs, 0,
+ ABBREV_HASH_SIZE*sizeof (struct abbrev_info *));
- abbrev_ptr = dwarf_abbrev_buffer + offset;
+ abbrev_ptr = dwarf_abbrev_buffer + cu_header->abbrev_offset;
abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
abbrev_ptr += bytes_read;
@@ -3394,8 +3528,8 @@ dwarf2_read_abbrevs (bfd *abfd, unsigned int offset)
}
hash_number = abbrev_number % ABBREV_HASH_SIZE;
- cur_abbrev->next = dwarf2_abbrevs[hash_number];
- dwarf2_abbrevs[hash_number] = cur_abbrev;
+ cur_abbrev->next = cu_header->dwarf2_abbrevs[hash_number];
+ cu_header->dwarf2_abbrevs[hash_number] = cur_abbrev;
/* Get next abbreviation.
Under Irix6 the abbreviations for a compilation unit are not
@@ -3409,7 +3543,7 @@ dwarf2_read_abbrevs (bfd *abfd, unsigned int offset)
break;
abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
abbrev_ptr += bytes_read;
- if (dwarf2_lookup_abbrev (abbrev_number) != NULL)
+ if (dwarf2_lookup_abbrev (abbrev_number, cu_header) != NULL)
break;
}
}
@@ -3418,15 +3552,18 @@ dwarf2_read_abbrevs (bfd *abfd, unsigned int offset)
/* ARGSUSED */
static void
-dwarf2_empty_abbrev_table (PTR ignore)
+dwarf2_empty_abbrev_table (PTR ptr_to_abbrevs_table)
{
int i;
struct abbrev_info *abbrev, *next;
+ struct abbrev_info **abbrevs;
+
+ abbrevs = (struct abbrev_info **)ptr_to_abbrevs_table;
for (i = 0; i < ABBREV_HASH_SIZE; ++i)
{
next = NULL;
- abbrev = dwarf2_abbrevs[i];
+ abbrev = abbrevs[i];
while (abbrev)
{
next = abbrev->next;
@@ -3434,20 +3571,20 @@ dwarf2_empty_abbrev_table (PTR ignore)
xfree (abbrev);
abbrev = next;
}
- dwarf2_abbrevs[i] = NULL;
+ abbrevs[i] = NULL;
}
}
/* Lookup an abbrev_info structure in the abbrev hash table. */
static struct abbrev_info *
-dwarf2_lookup_abbrev (unsigned int number)
+dwarf2_lookup_abbrev (unsigned int number, const struct comp_unit_head *cu_header)
{
unsigned int hash_number;
struct abbrev_info *abbrev;
hash_number = number % ABBREV_HASH_SIZE;
- abbrev = dwarf2_abbrevs[hash_number];
+ abbrev = cu_header->dwarf2_abbrevs[hash_number];
while (abbrev)
{
@@ -3479,7 +3616,7 @@ read_partial_die (struct partial_die_info *part_die, bfd *abfd,
if (!abbrev_number)
return info_ptr;
- abbrev = dwarf2_lookup_abbrev (abbrev_number);
+ abbrev = dwarf2_lookup_abbrev (abbrev_number, cu_header);
if (!abbrev)
{
error ("Dwarf Error: Could not find abbrev number %d.", abbrev_number);
@@ -3623,7 +3760,7 @@ read_full_die (struct die_info **diep, bfd *abfd, char *info_ptr,
return info_ptr;
}
- abbrev = dwarf2_lookup_abbrev (abbrev_number);
+ abbrev = dwarf2_lookup_abbrev (abbrev_number, cu_header);
if (!abbrev)
{
error ("Dwarf Error: could not find abbrev number %d.", abbrev_number);
@@ -4724,6 +4861,14 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile,
"external variable");
}
add_symbol_to_list (sym, &global_symbols);
+ if (is_thread_local)
+ {
+ /* SYMBOL_VALUE_ADDRESS contains at this point the
+ offset of the variable within the thread local
+ storage. */
+ SYMBOL_CLASS (sym) = LOC_THREAD_LOCAL_STATIC;
+ SYMBOL_OBJFILE (sym) = objfile;
+ }
/* In shared libraries the address of the variable
in the location descriptor might still be relocatable,
@@ -4732,7 +4877,7 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile,
value is zero, the address of the variable will then
be determined from the minimal symbol table whenever
the variable is referenced. */
- if (SYMBOL_VALUE_ADDRESS (sym))
+ else if (SYMBOL_VALUE_ADDRESS (sym))
{
fixup_symbol_section (sym, objfile);
SYMBOL_VALUE_ADDRESS (sym) +=
@@ -4782,6 +4927,11 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile,
{
SYMBOL_CLASS (sym) = LOC_LOCAL;
}
+ else if (is_thread_local)
+ {
+ SYMBOL_CLASS (sym) = LOC_THREAD_LOCAL_STATIC;
+ SYMBOL_OBJFILE (sym) = objfile;
+ }
else
{
fixup_symbol_section (sym, objfile);
@@ -5429,6 +5579,22 @@ dwarf_tag_name (register unsigned tag)
return "DW_TAG_variable";
case DW_TAG_volatile_type:
return "DW_TAG_volatile_type";
+ case DW_TAG_dwarf_procedure:
+ return "DW_TAG_dwarf_procedure";
+ case DW_TAG_restrict_type:
+ return "DW_TAG_restrict_type";
+ case DW_TAG_interface_type:
+ return "DW_TAG_interface_type";
+ case DW_TAG_namespace:
+ return "DW_TAG_namespace";
+ case DW_TAG_imported_module:
+ return "DW_TAG_imported_module";
+ case DW_TAG_unspecified_type:
+ return "DW_TAG_unspecified_type";
+ case DW_TAG_partial_unit:
+ return "DW_TAG_partial_unit";
+ case DW_TAG_imported_unit:
+ return "DW_TAG_imported_unit";
case DW_TAG_MIPS_loop:
return "DW_TAG_MIPS_loop";
case DW_TAG_format_label:
@@ -5573,7 +5739,30 @@ dwarf_attr_name (register unsigned attr)
return "DW_AT_virtuality";
case DW_AT_vtable_elem_location:
return "DW_AT_vtable_elem_location";
-
+ case DW_AT_allocated:
+ return "DW_AT_allocated";
+ case DW_AT_associated:
+ return "DW_AT_associated";
+ case DW_AT_data_location:
+ return "DW_AT_data_location";
+ case DW_AT_stride:
+ return "DW_AT_stride";
+ case DW_AT_entry_pc:
+ return "DW_AT_entry_pc";
+ case DW_AT_use_UTF8:
+ return "DW_AT_use_UTF8";
+ case DW_AT_extension:
+ return "DW_AT_extension";
+ case DW_AT_ranges:
+ return "DW_AT_ranges";
+ case DW_AT_trampoline:
+ return "DW_AT_trampoline";
+ case DW_AT_call_column:
+ return "DW_AT_call_column";
+ case DW_AT_call_file:
+ return "DW_AT_call_file";
+ case DW_AT_call_line:
+ return "DW_AT_call_line";
#ifdef MIPS
case DW_AT_MIPS_fde:
return "DW_AT_MIPS_fde";
@@ -5961,6 +6150,18 @@ dwarf_stack_op_name (register unsigned op)
return "DW_OP_xderef_size";
case DW_OP_nop:
return "DW_OP_nop";
+ /* DWARF 3 extensions. */
+ case DW_OP_push_object_address:
+ return "DW_OP_push_object_address";
+ case DW_OP_call2:
+ return "DW_OP_call2";
+ case DW_OP_call4:
+ return "DW_OP_call4";
+ case DW_OP_call_ref:
+ return "DW_OP_call_ref";
+ /* GNU extensions. */
+ case DW_OP_GNU_push_tls_address:
+ return "DW_OP_GNU_push_tls_address";
default:
return "OP_<unknown>";
}
@@ -5998,6 +6199,8 @@ dwarf_type_encoding_name (register unsigned enc)
return "DW_ATE_unsigned";
case DW_ATE_unsigned_char:
return "DW_ATE_unsigned_char";
+ case DW_ATE_imaginary_float:
+ return "DW_ATE_imaginary_float";
default:
return "DW_ATE_<unknown>";
}
@@ -6282,6 +6485,7 @@ decode_locdesc (struct dwarf_block *blk, struct objfile *objfile,
offreg = 0;
isderef = 0;
islocal = 0;
+ is_thread_local = 0;
optimized_out = 1;
while (i < size)
@@ -6505,6 +6709,16 @@ decode_locdesc (struct dwarf_block *blk, struct objfile *objfile,
complain (&dwarf2_complex_location_expr);
break;
+ case DW_OP_GNU_push_tls_address:
+ is_thread_local = 1;
+ /* The top of the stack has the offset from the beginning
+ of the thread control block at which the variable is located. */
+ /* Nothing should follow this operator, so the top of stack would
+ be returned. */
+ if (i < size)
+ complain (&dwarf2_complex_location_expr);
+ break;
+
default:
complain (&dwarf2_unsupported_stack_op, dwarf_stack_op_name (op));
return (stack[stacki]);
diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c
index 9c4201de1c3..dc8be381f26 100644
--- a/gdb/dwarfread.c
+++ b/gdb/dwarfread.c
@@ -62,112 +62,112 @@
/* Complaints that can be issued during DWARF debug info reading. */
-struct complaint no_bfd_get_N =
+struct deprecated_complaint no_bfd_get_N =
{
"DIE @ 0x%x \"%s\", no bfd support for %d byte data object", 0, 0
};
-struct complaint malformed_die =
+struct deprecated_complaint malformed_die =
{
"DIE @ 0x%x \"%s\", malformed DIE, bad length (%d bytes)", 0, 0
};
-struct complaint bad_die_ref =
+struct deprecated_complaint bad_die_ref =
{
"DIE @ 0x%x \"%s\", reference to DIE (0x%x) outside compilation unit", 0, 0
};
-struct complaint unknown_attribute_form =
+struct deprecated_complaint unknown_attribute_form =
{
"DIE @ 0x%x \"%s\", unknown attribute form (0x%x)", 0, 0
};
-struct complaint unknown_attribute_length =
+struct deprecated_complaint unknown_attribute_length =
{
"DIE @ 0x%x \"%s\", unknown attribute length, skipped remaining attributes", 0, 0
};
-struct complaint unexpected_fund_type =
+struct deprecated_complaint unexpected_fund_type =
{
"DIE @ 0x%x \"%s\", unexpected fundamental type 0x%x", 0, 0
};
-struct complaint unknown_type_modifier =
+struct deprecated_complaint unknown_type_modifier =
{
"DIE @ 0x%x \"%s\", unknown type modifier %u", 0, 0
};
-struct complaint volatile_ignored =
+struct deprecated_complaint volatile_ignored =
{
"DIE @ 0x%x \"%s\", type modifier 'volatile' ignored", 0, 0
};
-struct complaint const_ignored =
+struct deprecated_complaint const_ignored =
{
"DIE @ 0x%x \"%s\", type modifier 'const' ignored", 0, 0
};
-struct complaint botched_modified_type =
+struct deprecated_complaint botched_modified_type =
{
"DIE @ 0x%x \"%s\", botched modified type decoding (mtype 0x%x)", 0, 0
};
-struct complaint op_deref2 =
+struct deprecated_complaint op_deref2 =
{
"DIE @ 0x%x \"%s\", OP_DEREF2 address 0x%x not handled", 0, 0
};
-struct complaint op_deref4 =
+struct deprecated_complaint op_deref4 =
{
"DIE @ 0x%x \"%s\", OP_DEREF4 address 0x%x not handled", 0, 0
};
-struct complaint basereg_not_handled =
+struct deprecated_complaint basereg_not_handled =
{
"DIE @ 0x%x \"%s\", BASEREG %d not handled", 0, 0
};
-struct complaint dup_user_type_allocation =
+struct deprecated_complaint dup_user_type_allocation =
{
"DIE @ 0x%x \"%s\", internal error: duplicate user type allocation", 0, 0
};
-struct complaint dup_user_type_definition =
+struct deprecated_complaint dup_user_type_definition =
{
"DIE @ 0x%x \"%s\", internal error: duplicate user type definition", 0, 0
};
-struct complaint missing_tag =
+struct deprecated_complaint missing_tag =
{
"DIE @ 0x%x \"%s\", missing class, structure, or union tag", 0, 0
};
-struct complaint bad_array_element_type =
+struct deprecated_complaint bad_array_element_type =
{
"DIE @ 0x%x \"%s\", bad array element type attribute 0x%x", 0, 0
};
-struct complaint subscript_data_items =
+struct deprecated_complaint subscript_data_items =
{
"DIE @ 0x%x \"%s\", can't decode subscript data items", 0, 0
};
-struct complaint unhandled_array_subscript_format =
+struct deprecated_complaint unhandled_array_subscript_format =
{
"DIE @ 0x%x \"%s\", array subscript format 0x%x not handled yet", 0, 0
};
-struct complaint unknown_array_subscript_format =
+struct deprecated_complaint unknown_array_subscript_format =
{
"DIE @ 0x%x \"%s\", unknown array subscript format %x", 0, 0
};
-struct complaint not_row_major =
+struct deprecated_complaint not_row_major =
{
"DIE @ 0x%x \"%s\", array not row major; not handled correctly", 0, 0
};
-struct complaint missing_at_name =
+struct deprecated_complaint missing_at_name =
{
"DIE @ 0x%x, AT_name tag missing", 0, 0
};
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 7d37297c5f4..a29a71b544d 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -54,16 +54,16 @@ struct elfinfo
/* Various things we might complain about... */
-struct complaint section_info_complaint =
+struct deprecated_complaint section_info_complaint =
{"elf/stab section information %s without a preceding file symbol", 0, 0};
-struct complaint section_info_dup_complaint =
+struct deprecated_complaint section_info_dup_complaint =
{"duplicated elf/stab section information for %s", 0, 0};
-struct complaint stab_info_mismatch_complaint =
+struct deprecated_complaint stab_info_mismatch_complaint =
{"elf/stab section information missing for %s", 0, 0};
-struct complaint stab_info_questionable_complaint =
+struct deprecated_complaint stab_info_questionable_complaint =
{"elf/stab section information questionable for %s", 0, 0};
static void free_elfinfo (void *);
diff --git a/gdb/event-top.c b/gdb/event-top.c
index 3594a4deae9..591e0be7b43 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -1128,9 +1128,10 @@ _initialize_event_loop (void)
void
gdb_setup_readline (void)
{
- /* This function is a noop for the async case. The assumption is that
- the async setup is ALL done in gdb_init, and we would only mess it up
- here. The async stuff should really go away over time. */
+
+ /* This function is a noop for the sync case. The assumption is that
+ the sync setup is ALL done in gdb_init, and we would only mess it up
+ here. The sync stuff should really go away over time. */
if (event_loop_p)
{
diff --git a/gdb/expression.h b/gdb/expression.h
index 34e002f3a28..e7f9d4863e6 100644
--- a/gdb/expression.h
+++ b/gdb/expression.h
@@ -181,6 +181,12 @@ enum exp_opcode
making three exp_elements. */
OP_FUNCALL,
+ /* OP_MSGCALL is followed by a string in the next exp_element and then an
+ integer. The string is the selector string. The integer is the number
+ of arguments to the message call. That many plus one values are used,
+ the first one being the object pointer. This is an Objective C message */
+ OP_MSGCALL,
+
/* This is EXACTLY like OP_FUNCALL but is semantically different.
In F77, array subscript expressions, substring expressions
and function calls are all exactly the same syntactically. They may
@@ -273,11 +279,17 @@ enum exp_opcode
STRUCTOP_STRUCT,
STRUCTOP_PTR,
- /* C++ */
- /* OP_THIS is just a placeholder for the class instance variable.
+ /* C++: OP_THIS is just a placeholder for the class instance variable.
It just comes in a tight (OP_THIS, OP_THIS) pair. */
OP_THIS,
+ /* Objective-C: OP_SELF is just a placeholder for the class instance
+ variable. It just comes in a tight (OP_SELF, OP_SELF) pair. */
+ OP_SELF,
+
+ /* Objective C: "@selector" pseudo-operator */
+ OP_SELECTOR,
+
/* OP_SCOPE surrounds a type name and a field name. The type
name is encoded as one element, but the field name stays as
a string, which, of course, is variable length. */
@@ -305,7 +317,10 @@ enum exp_opcode
OP_NAME,
/* An unparsed expression. Used for Scheme (for now at least) */
- OP_EXPRSTRING
+ OP_EXPRSTRING,
+
+ /* An Objective C Foundation Class NSString constant */
+ OP_NSSTRING,
};
union exp_element
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index 48c511377e8..4bd01cc9ab2 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -102,9 +102,9 @@ f77_get_dynamic_lowerbound (struct type *type, int *lower_bound)
if (current_frame_addr > 0)
{
ptr_to_lower_bound =
- read_memory_integer (current_frame_addr +
- TYPE_ARRAY_LOWER_BOUND_VALUE (type),
- 4);
+ read_memory_typed_address (current_frame_addr +
+ TYPE_ARRAY_LOWER_BOUND_VALUE (type),
+ builtin_type_void_data_ptr);
*lower_bound = read_memory_integer (ptr_to_lower_bound, 4);
}
else
@@ -165,9 +165,9 @@ f77_get_dynamic_upperbound (struct type *type, int *upper_bound)
if (current_frame_addr > 0)
{
ptr_to_upper_bound =
- read_memory_integer (current_frame_addr +
- TYPE_ARRAY_UPPER_BOUND_VALUE (type),
- 4);
+ read_memory_typed_address (current_frame_addr +
+ TYPE_ARRAY_UPPER_BOUND_VALUE (type),
+ builtin_type_void_data_ptr);
*upper_bound = read_memory_integer (ptr_to_upper_bound, 4);
}
else
diff --git a/gdb/findvar.c b/gdb/findvar.c
index d2591321d75..dd3061b8b35 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -391,7 +391,7 @@ symbol_read_needs_frame (struct symbol *sym)
case LOC_LOCAL_ARG:
case LOC_BASEREG:
case LOC_BASEREG_ARG:
- case LOC_THREAD_LOCAL_STATIC:
+ case LOC_HP_THREAD_LOCAL_STATIC:
return 1;
case LOC_UNDEF:
@@ -529,7 +529,7 @@ addresses have not been bound by the dynamic loader. Try again when executable i
case LOC_BASEREG:
case LOC_BASEREG_ARG:
- case LOC_THREAD_LOCAL_STATIC:
+ case LOC_HP_THREAD_LOCAL_STATIC:
{
struct value *regval;
@@ -542,6 +542,29 @@ addresses have not been bound by the dynamic loader. Try again when executable i
break;
}
+ case LOC_THREAD_LOCAL_STATIC:
+ {
+#if 0
+ /* FIXME: ezannoni 2002-10-21: Temporarly disable the code
+ below, until the rest of the TLS support code is checked
+ in. */
+
+ /* We want to let the target / ABI-specific code construct
+ this value for us, so we need to dispose of the value
+ allocated for us above. */
+ if (target_get_thread_local_address_p ())
+ addr = target_get_thread_local_address (inferior_ptid,
+ SYMBOL_OBJFILE (var),
+ SYMBOL_VALUE_ADDRESS (var));
+ /* It wouldn't be wrong here to try a gdbarch method, too;
+ finding TLS is an ABI-specific thing. But we don't do that
+ yet. */
+ else
+#endif
+ error ("Cannot find thread-local variables on this target");
+ break;
+ }
+
case LOC_TYPEDEF:
error ("Cannot look up value of a typedef");
break;
diff --git a/gdb/frame.c b/gdb/frame.c
index 1ad3b09f3bd..d7d7f0a302f 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -115,7 +115,7 @@ frame_register_unwind (struct frame_info *frame, int regnum,
available? */
*realnump = regnum;
if (bufferp)
- read_register_gen (regnum, bufferp);
+ deprecated_read_register_gen (regnum, bufferp);
return;
}
@@ -153,6 +153,40 @@ frame_unwind_unsigned_register (struct frame_info *frame, int regnum,
}
void
+frame_read_unsigned_register (struct frame_info *frame, int regnum,
+ ULONGEST *val)
+{
+ /* NOTE: cagney/2002-10-31: There is a bit of dogma here - there is
+ always a frame. Both this, and the equivalent
+ frame_read_signed_register() function, can only be called with a
+ valid frame. If, for some reason, this function is called
+ without a frame then the problem isn't here, but rather in the
+ caller. It should of first created a frame and then passed that
+ in. */
+ /* NOTE: cagney/2002-10-31: As a side bar, keep in mind that the
+ ``current_frame'' should not be treated as a special case. While
+ ``get_next_frame (current_frame) == NULL'' currently holds, it
+ should, as far as possible, not be relied upon. In the future,
+ ``get_next_frame (current_frame)'' may instead simply return a
+ normal frame object that simply always gets register values from
+ the register cache. Consequently, frame code should try to avoid
+ tests like ``if get_next_frame() == NULL'' and instead just rely
+ on recursive frame calls (like the below code) when manipulating
+ a frame chain. */
+ gdb_assert (frame != NULL);
+ frame_unwind_unsigned_register (get_next_frame (frame), regnum, val);
+}
+
+void
+frame_read_signed_register (struct frame_info *frame, int regnum,
+ LONGEST *val)
+{
+ /* See note in frame_read_unsigned_register(). */
+ gdb_assert (frame != NULL);
+ frame_unwind_signed_register (get_next_frame (frame), regnum, val);
+}
+
+void
generic_unwind_get_saved_register (char *raw_buffer,
int *optimizedp,
CORE_ADDR *addrp,
diff --git a/gdb/frame.h b/gdb/frame.h
index 79bb3d95a6f..89a148e10c7 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -325,9 +325,14 @@ extern void generic_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun,
int nargs, struct value **args,
struct type *type, int gcc_p);
-extern void generic_get_saved_register (char *, int *, CORE_ADDR *,
- struct frame_info *, int,
- enum lval_type *);
+/* The function generic_get_saved_register() has been made obsolete.
+ GET_SAVED_REGISTER now defaults to the recursive equivalent -
+ generic_unwind_get_saved_register() - so there is no need to even
+ set GET_SAVED_REGISTER. Architectures that need to override the
+ register unwind mechanism should modify frame->unwind(). */
+extern void deprecated_generic_get_saved_register (char *, int *, CORE_ADDR *,
+ struct frame_info *, int,
+ enum lval_type *);
extern void generic_unwind_get_saved_register (char *raw_buffer,
int *optimized,
@@ -366,6 +371,16 @@ extern void get_saved_register (char *raw_buffer, int *optimized,
extern int frame_register_read (struct frame_info *frame, int regnum,
void *buf);
+/* Return the value of register REGNUM that belongs to FRAME. The
+ value is obtained by unwinding the register from the next / more
+ inner frame. */
+/* NOTE: cagney/2002-09-13: Return void as one day these functions may
+ be changed to return an indication that the read succeeded. */
+extern void frame_read_signed_register (struct frame_info *frame,
+ int regnum, LONGEST *val);
+extern void frame_read_unsigned_register (struct frame_info *frame,
+ int regnum, ULONGEST *val);
+
/* Map between a frame register number and its name. A frame register
space is a superset of the cooked register space --- it also
includes builtin registers. */
@@ -373,4 +388,13 @@ extern int frame_register_read (struct frame_info *frame, int regnum,
extern int frame_map_name_to_regnum (const char *name, int strlen);
extern const char *frame_map_regnum_to_name (int regnum);
+/* From stack.c. */
+extern void args_info (char *, int);
+
+extern void locals_info (char *, int);
+
+extern void (*selected_frame_level_changed_hook) (int);
+
+extern void return_command (char *, int);
+
#endif /* !defined (FRAME_H) */
diff --git a/gdb/gdb_indent.sh b/gdb/gdb_indent.sh
index 0d0829a4a13..c47ef95828d 100755
--- a/gdb/gdb_indent.sh
+++ b/gdb/gdb_indent.sh
@@ -37,7 +37,7 @@ fi
# Different indent versions give different indentation.
case `${indent} --version 2>/dev/null < /dev/null` in
- GNU*2.2.6 ) ;;
+ GNU*2.2* ) ;;
*GNU* ) echo "Incorrect version of GNU indent" 1>&2 ;;
* ) echo "Indent is not GNU" 1>&2 ;;
esac
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index bc27aaeef6a..eaa7c47b25c 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -64,6 +64,7 @@
#include "gdb_assert.h"
#include "gdb_string.h"
#include "gdb-events.h"
+#include "reggroups.h"
/* Static function declarations */
@@ -171,7 +172,7 @@ struct gdbarch
gdbarch_register_virtual_size_ftype *register_virtual_size;
int max_register_virtual_size;
gdbarch_register_virtual_type_ftype *register_virtual_type;
- gdbarch_do_registers_info_ftype *do_registers_info;
+ gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
gdbarch_print_registers_info_ftype *print_registers_info;
gdbarch_print_float_info_ftype *print_float_info;
gdbarch_print_vector_info_ftype *print_vector_info;
@@ -269,6 +270,12 @@ struct gdbarch
gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
const char * name_of_malloc;
+ int cannot_step_breakpoint;
+ int have_nonsteppable_watchpoint;
+ gdbarch_address_class_type_flags_ftype *address_class_type_flags;
+ gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
+ gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
+ gdbarch_register_reggroup_p_ftype *register_reggroup_p;
};
@@ -427,6 +434,12 @@ struct gdbarch startup_gdbarch =
0,
0,
"malloc",
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ default_register_reggroup_p,
/* startup_gdbarch() */
};
@@ -558,6 +571,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
current_gdbarch->name_of_malloc = "malloc";
+ current_gdbarch->register_reggroup_p = default_register_reggroup_p;
/* gdbarch_alloc() */
return current_gdbarch;
@@ -654,7 +668,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
&& (gdbarch->register_virtual_type == 0))
fprintf_unfiltered (log, "\n\tregister_virtual_type");
- /* Skip verify of do_registers_info, has predicate */
+ /* Skip verify of deprecated_do_registers_info, has predicate */
/* Skip verify of print_registers_info, invalid_p == 0 */
/* Skip verify of print_float_info, has predicate */
/* Skip verify of print_vector_info, has predicate */
@@ -804,6 +818,12 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
/* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
/* Skip verify of name_of_malloc, invalid_p == 0 */
+ /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
+ /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
+ /* Skip verify of address_class_type_flags, has predicate */
+ /* Skip verify of address_class_type_flags_to_name, has predicate */
+ /* Skip verify of address_class_name_to_type_flags, has predicate */
+ /* Skip verify of register_reggroup_p, invalid_p == 0 */
buf = ui_file_xstrdup (log, &dummy);
make_cleanup (xfree, buf);
if (strlen (buf) > 0)
@@ -838,12 +858,35 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->in_function_epilogue_p);
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
+ "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
+ (long) current_gdbarch->register_reggroup_p);
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
"gdbarch_dump: pseudo_register_read = 0x%08lx\n",
(long) current_gdbarch->pseudo_register_read);
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
"gdbarch_dump: pseudo_register_write = 0x%08lx\n",
(long) current_gdbarch->pseudo_register_write);
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
+ (long) current_gdbarch->address_class_name_to_type_flags);
+#ifdef ADDRESS_CLASS_TYPE_FLAGS
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
+ XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = 0x%08lx\n",
+ (long) current_gdbarch->address_class_type_flags
+ /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
+#endif
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
+ (long) current_gdbarch->address_class_type_flags_to_name);
#ifdef ADDRESS_TO_POINTER
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
@@ -993,6 +1036,14 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->cannot_fetch_register
/*CANNOT_FETCH_REGISTER ()*/);
#endif
+#ifdef CANNOT_STEP_BREAKPOINT
+ fprintf_unfiltered (file,
+ "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
+ XSTRING (CANNOT_STEP_BREAKPOINT));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
+ CANNOT_STEP_BREAKPOINT);
+#endif
#ifdef CANNOT_STORE_REGISTER
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -1063,6 +1114,20 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
(long) DECR_PC_AFTER_BREAK);
#endif
+#ifdef DEPRECATED_DO_REGISTERS_INFO
+#if GDB_MULTI_ARCH
+ /* Macro might contain `[{}]' when not multi-arch */
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
+ XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
+#endif
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = 0x%08lx\n",
+ (long) current_gdbarch->deprecated_do_registers_info
+ /*DEPRECATED_DO_REGISTERS_INFO ()*/);
+#endif
#ifdef DEPRECATED_EXTRACT_RETURN_VALUE
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
@@ -1102,20 +1167,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->deprecated_store_return_value
/*DEPRECATED_STORE_RETURN_VALUE ()*/);
#endif
-#ifdef DO_REGISTERS_INFO
-#if GDB_MULTI_ARCH
- /* Macro might contain `[{}]' when not multi-arch */
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DO_REGISTERS_INFO(reg_nr, fpregs)",
- XSTRING (DO_REGISTERS_INFO (reg_nr, fpregs)));
-#endif
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
- (long) current_gdbarch->do_registers_info
- /*DO_REGISTERS_INFO ()*/);
-#endif
#ifdef DWARF2_BUILD_FRAME_INFO
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
@@ -1372,6 +1423,14 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->get_saved_register
/*GET_SAVED_REGISTER ()*/);
#endif
+#ifdef HAVE_NONSTEPPABLE_WATCHPOINT
+ fprintf_unfiltered (file,
+ "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
+ XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
+ HAVE_NONSTEPPABLE_WATCHPOINT);
+#endif
#ifdef INIT_EXTRA_FRAME_INFO
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
@@ -3063,29 +3122,29 @@ set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
}
int
-gdbarch_do_registers_info_p (struct gdbarch *gdbarch)
+gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->do_registers_info != 0;
+ return gdbarch->deprecated_do_registers_info != 0;
}
void
-gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
+gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->do_registers_info == 0)
+ if (gdbarch->deprecated_do_registers_info == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_do_registers_info invalid");
+ "gdbarch: gdbarch_deprecated_do_registers_info invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_do_registers_info called\n");
- gdbarch->do_registers_info (reg_nr, fpregs);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
+ gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
}
void
-set_gdbarch_do_registers_info (struct gdbarch *gdbarch,
- gdbarch_do_registers_info_ftype do_registers_info)
+set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
+ gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
{
- gdbarch->do_registers_info = do_registers_info;
+ gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
}
void
@@ -5024,6 +5083,137 @@ set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
gdbarch->name_of_malloc = name_of_malloc;
}
+int
+gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
+ return gdbarch->cannot_step_breakpoint;
+}
+
+void
+set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
+ int cannot_step_breakpoint)
+{
+ gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
+}
+
+int
+gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
+ return gdbarch->have_nonsteppable_watchpoint;
+}
+
+void
+set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
+ int have_nonsteppable_watchpoint)
+{
+ gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
+}
+
+int
+gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->address_class_type_flags != 0;
+}
+
+int
+gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->address_class_type_flags == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_address_class_type_flags invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
+ return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
+}
+
+void
+set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
+ gdbarch_address_class_type_flags_ftype address_class_type_flags)
+{
+ gdbarch->address_class_type_flags = address_class_type_flags;
+}
+
+int
+gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->address_class_type_flags_to_name != 0;
+}
+
+char *
+gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->address_class_type_flags_to_name == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
+ return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
+}
+
+void
+set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
+ gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
+{
+ gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
+}
+
+int
+gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->address_class_name_to_type_flags != 0;
+}
+
+int
+gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, char *name, int *type_flags_ptr)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->address_class_name_to_type_flags == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
+ return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
+}
+
+void
+set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
+ gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
+{
+ gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
+}
+
+int
+gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->register_reggroup_p == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_register_reggroup_p invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
+ return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
+}
+
+void
+set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
+ gdbarch_register_reggroup_p_ftype register_reggroup_p)
+{
+ gdbarch->register_reggroup_p = register_reggroup_p;
+}
+
/* Keep a registry of per-architecture data-pointers required by GDB
modules. */
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 2f26cba9a13..3add874d337 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -47,6 +47,7 @@ struct value;
struct objfile;
struct minimal_symbol;
struct regcache;
+struct reggroup;
extern struct gdbarch *current_gdbarch;
@@ -778,40 +779,40 @@ extern void set_gdbarch_register_virtual_type (struct gdbarch *gdbarch, gdbarch_
#endif
#endif
-#if defined (DO_REGISTERS_INFO)
-/* Legacy for systems yet to multi-arch DO_REGISTERS_INFO */
-#if !defined (DO_REGISTERS_INFO_P)
-#define DO_REGISTERS_INFO_P() (1)
+#if defined (DEPRECATED_DO_REGISTERS_INFO)
+/* Legacy for systems yet to multi-arch DEPRECATED_DO_REGISTERS_INFO */
+#if !defined (DEPRECATED_DO_REGISTERS_INFO_P)
+#define DEPRECATED_DO_REGISTERS_INFO_P() (1)
#endif
#endif
/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (DO_REGISTERS_INFO_P)
-#define DO_REGISTERS_INFO_P() (0)
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DO_REGISTERS_INFO_P)
+#define DEPRECATED_DO_REGISTERS_INFO_P() (0)
#endif
-extern int gdbarch_do_registers_info_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DO_REGISTERS_INFO_P)
-#error "Non multi-arch definition of DO_REGISTERS_INFO"
+extern int gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO_P)
+#error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO"
#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DO_REGISTERS_INFO_P)
-#define DO_REGISTERS_INFO_P() (gdbarch_do_registers_info_p (current_gdbarch))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DO_REGISTERS_INFO_P)
+#define DEPRECATED_DO_REGISTERS_INFO_P() (gdbarch_deprecated_do_registers_info_p (current_gdbarch))
#endif
/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (DO_REGISTERS_INFO)
-#define DO_REGISTERS_INFO(reg_nr, fpregs) (internal_error (__FILE__, __LINE__, "DO_REGISTERS_INFO"), 0)
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DO_REGISTERS_INFO)
+#define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (internal_error (__FILE__, __LINE__, "DEPRECATED_DO_REGISTERS_INFO"), 0)
#endif
-typedef void (gdbarch_do_registers_info_ftype) (int reg_nr, int fpregs);
-extern void gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs);
-extern void set_gdbarch_do_registers_info (struct gdbarch *gdbarch, gdbarch_do_registers_info_ftype *do_registers_info);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DO_REGISTERS_INFO)
-#error "Non multi-arch definition of DO_REGISTERS_INFO"
+typedef void (gdbarch_deprecated_do_registers_info_ftype) (int reg_nr, int fpregs);
+extern void gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs);
+extern void set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO)
+#error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO"
#endif
#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DO_REGISTERS_INFO)
-#define DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_do_registers_info (current_gdbarch, reg_nr, fpregs))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DO_REGISTERS_INFO)
+#define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_deprecated_do_registers_info (current_gdbarch, reg_nr, fpregs))
#endif
#endif
@@ -2579,6 +2580,93 @@ extern void set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, const char * na
#endif
#endif
+/* Default (value) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (CANNOT_STEP_BREAKPOINT)
+#define CANNOT_STEP_BREAKPOINT (0)
+#endif
+
+extern int gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch);
+extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int cannot_step_breakpoint);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STEP_BREAKPOINT)
+#error "Non multi-arch definition of CANNOT_STEP_BREAKPOINT"
+#endif
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CANNOT_STEP_BREAKPOINT)
+#define CANNOT_STEP_BREAKPOINT (gdbarch_cannot_step_breakpoint (current_gdbarch))
+#endif
+#endif
+
+/* Default (value) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
+#define HAVE_NONSTEPPABLE_WATCHPOINT (0)
+#endif
+
+extern int gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch);
+extern void set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, int have_nonsteppable_watchpoint);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (HAVE_NONSTEPPABLE_WATCHPOINT)
+#error "Non multi-arch definition of HAVE_NONSTEPPABLE_WATCHPOINT"
+#endif
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
+#define HAVE_NONSTEPPABLE_WATCHPOINT (gdbarch_have_nonsteppable_watchpoint (current_gdbarch))
+#endif
+#endif
+
+#if defined (ADDRESS_CLASS_TYPE_FLAGS)
+/* Legacy for systems yet to multi-arch ADDRESS_CLASS_TYPE_FLAGS */
+#if !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
+#define ADDRESS_CLASS_TYPE_FLAGS_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
+#define ADDRESS_CLASS_TYPE_FLAGS_P() (0)
+#endif
+
+extern int gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS_P)
+#error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
+#define ADDRESS_CLASS_TYPE_FLAGS_P() (gdbarch_address_class_type_flags_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS)
+#define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (internal_error (__FILE__, __LINE__, "ADDRESS_CLASS_TYPE_FLAGS"), 0)
+#endif
+
+typedef int (gdbarch_address_class_type_flags_ftype) (int byte_size, int dwarf2_addr_class);
+extern int gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class);
+extern void set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_ftype *address_class_type_flags);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS)
+#error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS"
+#endif
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_TYPE_FLAGS)
+#define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (gdbarch_address_class_type_flags (current_gdbarch, byte_size, dwarf2_addr_class))
+#endif
+#endif
+
+extern int gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch);
+
+typedef char * (gdbarch_address_class_type_flags_to_name_ftype) (struct gdbarch *gdbarch, int type_flags);
+extern char * gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags);
+extern void set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name);
+
+extern int gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch);
+
+typedef int (gdbarch_address_class_name_to_type_flags_ftype) (struct gdbarch *gdbarch, char *name, int *type_flags_ptr);
+extern int gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, char *name, int *type_flags_ptr);
+extern void set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags);
+
+/* Is a register in a group */
+
+typedef int (gdbarch_register_reggroup_p_ftype) (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup);
+extern int gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup);
+extern void set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype *register_reggroup_p);
+
extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 0ee74df6f44..4ed80c35724 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -468,7 +468,7 @@ f:2:REGISTER_VIRTUAL_SIZE:int:register_virtual_size:int reg_nr:reg_nr::generic_r
v:2:MAX_REGISTER_VIRTUAL_SIZE:int:max_register_virtual_size::::0:-1
f:2:REGISTER_VIRTUAL_TYPE:struct type *:register_virtual_type:int reg_nr:reg_nr::0:0
#
-F:2:DO_REGISTERS_INFO:void:do_registers_info:int reg_nr, int fpregs:reg_nr, fpregs
+F:2:DEPRECATED_DO_REGISTERS_INFO:void:deprecated_do_registers_info:int reg_nr, int fpregs:reg_nr, fpregs
m:2:PRINT_REGISTERS_INFO:void:print_registers_info:struct ui_file *file, struct frame_info *frame, int regnum, int all:file, frame, regnum, all:::default_print_registers_info::0
M:2:PRINT_FLOAT_INFO:void:print_float_info:struct ui_file *file, struct frame_info *frame, const char *args:file, frame, args
M:2:PRINT_VECTOR_INFO:void:print_vector_info:struct ui_file *file, struct frame_info *frame, const char *args:file, frame, args
@@ -662,6 +662,13 @@ F:2:DWARF2_BUILD_FRAME_INFO:void:dwarf2_build_frame_info:struct objfile *objfile
f:2:ELF_MAKE_MSYMBOL_SPECIAL:void:elf_make_msymbol_special:asymbol *sym, struct minimal_symbol *msym:sym, msym:::default_elf_make_msymbol_special::0
f:2:COFF_MAKE_MSYMBOL_SPECIAL:void:coff_make_msymbol_special:int val, struct minimal_symbol *msym:val, msym:::default_coff_make_msymbol_special::0
v::NAME_OF_MALLOC:const char *:name_of_malloc::::"malloc":"malloc"::0
+v::CANNOT_STEP_BREAKPOINT:int:cannot_step_breakpoint::::0:0::0
+v::HAVE_NONSTEPPABLE_WATCHPOINT:int:have_nonsteppable_watchpoint::::0:0::0
+F:2:ADDRESS_CLASS_TYPE_FLAGS:int:address_class_type_flags:int byte_size, int dwarf2_addr_class:byte_size, dwarf2_addr_class
+M:2:ADDRESS_CLASS_TYPE_FLAGS_TO_NAME:char *:address_class_type_flags_to_name:int type_flags:type_flags:
+M:2:ADDRESS_CLASS_NAME_TO_TYPE_FLAGS:int:address_class_name_to_type_flags:char *name, int *type_flags_ptr:name, type_flags_ptr
+# Is a register in a group
+m:::int:register_reggroup_p:int regnum, struct reggroup *reggroup:regnum, reggroup:::default_register_reggroup_p::0
EOF
}
@@ -773,6 +780,7 @@ struct value;
struct objfile;
struct minimal_symbol;
struct regcache;
+struct reggroup;
extern struct gdbarch *current_gdbarch;
@@ -1248,6 +1256,7 @@ cat <<EOF
#include "gdb_assert.h"
#include "gdb_string.h"
#include "gdb-events.h"
+#include "reggroups.h"
/* Static function declarations */
diff --git a/gdb/gdbcore.h b/gdb/gdbcore.h
index 88594554080..5c10c589e50 100644
--- a/gdb/gdbcore.h
+++ b/gdb/gdbcore.h
@@ -64,8 +64,15 @@ extern ULONGEST read_memory_unsigned_integer (CORE_ADDR memaddr, int len);
/* Read a null-terminated string from the debuggee's memory, given address,
* a buffer into which to place the string, and the maximum available space */
+
extern void read_memory_string (CORE_ADDR, char *, int);
+/* Read the pointer of type TYPE at ADDR, and return the address it
+ represents. */
+
+CORE_ADDR
+read_memory_typed_address (CORE_ADDR addr, struct type *type);
+
/* This takes a char *, not void *. This is probably right, because
passing in an int * or whatever is wrong with respect to
byteswapping, alignment, different sizes for host vs. target types,
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 40223943b7c..c9cae4cda8d 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -397,11 +397,18 @@ lookup_function_type (struct type *type)
extern int
address_space_name_to_int (char *space_identifier)
{
+ struct gdbarch *gdbarch = current_gdbarch;
+ int type_flags;
/* Check for known address space delimiters. */
if (!strcmp (space_identifier, "code"))
return TYPE_FLAG_CODE_SPACE;
else if (!strcmp (space_identifier, "data"))
return TYPE_FLAG_DATA_SPACE;
+ else if (gdbarch_address_class_name_to_type_flags_p (gdbarch)
+ && gdbarch_address_class_name_to_type_flags (gdbarch,
+ space_identifier,
+ &type_flags))
+ return type_flags;
else
error ("Unknown address space specifier: \"%s\"", space_identifier);
}
@@ -412,10 +419,14 @@ address_space_name_to_int (char *space_identifier)
extern char *
address_space_int_to_name (int space_flag)
{
+ struct gdbarch *gdbarch = current_gdbarch;
if (space_flag & TYPE_FLAG_CODE_SPACE)
return "code";
else if (space_flag & TYPE_FLAG_DATA_SPACE)
return "data";
+ else if ((space_flag & TYPE_FLAG_ADDRESS_CLASS_ALL)
+ && gdbarch_address_class_type_flags_to_name_p (gdbarch))
+ return gdbarch_address_class_type_flags_to_name (gdbarch, space_flag);
else
return NULL;
}
@@ -465,14 +476,17 @@ make_qualified_type (struct type *type, int new_flags,
is identical to the one supplied except that it has an address
space attribute attached to it (such as "code" or "data").
- This is for Harvard architectures. */
+ The space attributes "code" and "data" are for Harvard architectures.
+ The address space attributes are for architectures which have
+ alternately sized pointers or pointers with alternate representations. */
struct type *
make_type_with_address_space (struct type *type, int space_flag)
{
struct type *ntype;
int new_flags = ((TYPE_INSTANCE_FLAGS (type)
- & ~(TYPE_FLAG_CODE_SPACE | TYPE_FLAG_DATA_SPACE))
+ & ~(TYPE_FLAG_CODE_SPACE | TYPE_FLAG_DATA_SPACE
+ | TYPE_FLAG_ADDRESS_CLASS_ALL))
| space_flag);
return make_qualified_type (type, new_flags, NULL);
@@ -1276,13 +1290,12 @@ fill_in_vptr_fieldno (struct type *type)
virtual (and hence we cannot share the table pointer). */
for (i = 0; i < TYPE_N_BASECLASSES (type); i++)
{
- fill_in_vptr_fieldno (TYPE_BASECLASS (type, i));
- if (TYPE_VPTR_FIELDNO (TYPE_BASECLASS (type, i)) >= 0)
+ struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
+ fill_in_vptr_fieldno (baseclass);
+ if (TYPE_VPTR_FIELDNO (baseclass) >= 0)
{
- TYPE_VPTR_FIELDNO (type)
- = TYPE_VPTR_FIELDNO (TYPE_BASECLASS (type, i));
- TYPE_VPTR_BASETYPE (type)
- = TYPE_VPTR_BASETYPE (TYPE_BASECLASS (type, i));
+ TYPE_VPTR_FIELDNO (type) = TYPE_VPTR_FIELDNO (baseclass);
+ TYPE_VPTR_BASETYPE (type) = TYPE_VPTR_BASETYPE (baseclass);
break;
}
}
@@ -1328,7 +1341,7 @@ get_destructor_fn_field (struct type *t, int *method_indexp, int *field_indexp)
This used to be coded as a macro, but I don't think it is called
often enough to merit such treatment. */
-struct complaint stub_noname_complaint =
+struct deprecated_complaint stub_noname_complaint =
{"stub type has NULL name", 0, 0};
struct type *
@@ -1499,7 +1512,7 @@ add_mangled_type (struct extra *pextras, struct type *t)
default:
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Bad int type code length x%x\n", 0, 0};
complain (&msg, tlen);
@@ -1521,7 +1534,7 @@ add_mangled_type (struct extra *pextras, struct type *t)
break;
default:
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Bad float type code length x%x\n", 0, 0};
complain (&msg, tlen);
}
@@ -1537,7 +1550,7 @@ add_mangled_type (struct extra *pextras, struct type *t)
break;
case TYPE_CODE_TYPEDEF:
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Typedefs in overloaded functions not yet supported\n", 0, 0};
complain (&msg);
}
@@ -1577,7 +1590,7 @@ add_mangled_type (struct extra *pextras, struct type *t)
case TYPE_CODE_ERROR:
default:
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Unknown type code x%x\n", 0, 0};
complain (&msg, tcode);
}
@@ -3141,6 +3154,14 @@ recursive_dump_type (struct type *type, int spaces)
{
puts_filtered (" TYPE_FLAG_DATA_SPACE");
}
+ if (TYPE_ADDRESS_CLASS_1 (type))
+ {
+ puts_filtered (" TYPE_FLAG_ADDRESS_CLASS_1");
+ }
+ if (TYPE_ADDRESS_CLASS_2 (type))
+ {
+ puts_filtered (" TYPE_FLAG_ADDRESS_CLASS_2");
+ }
puts_filtered ("\n");
printfi_filtered (spaces, "flags 0x%x", TYPE_FLAGS (type));
if (TYPE_UNSIGNED (type))
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index a0b754aa928..d4d9afedec6 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -253,6 +253,22 @@ enum type_code
#define TYPE_FLAG_VECTOR (1 << 12)
#define TYPE_VECTOR(t) (TYPE_FLAGS (t) & TYPE_FLAG_VECTOR)
+/* Address class flags. Some environments provide for pointers whose
+ size is different from that of a normal pointer or address types
+ where the bits are interpreted differently than normal addresses. The
+ TYPE_FLAG_ADDRESS_CLASS_n flags may be used in target specific
+ ways to represent these different types of address classes. */
+#define TYPE_FLAG_ADDRESS_CLASS_1 (1 << 13)
+#define TYPE_ADDRESS_CLASS_1(t) (TYPE_INSTANCE_FLAGS(t) \
+ & TYPE_FLAG_ADDRESS_CLASS_1)
+#define TYPE_FLAG_ADDRESS_CLASS_2 (1 << 14)
+#define TYPE_ADDRESS_CLASS_2(t) (TYPE_INSTANCE_FLAGS(t) \
+ & TYPE_FLAG_ADDRESS_CLASS_2)
+#define TYPE_FLAG_ADDRESS_CLASS_ALL (TYPE_FLAG_ADDRESS_CLASS_1 \
+ | TYPE_FLAG_ADDRESS_CLASS_2)
+#define TYPE_ADDRESS_CLASS_ALL(t) (TYPE_INSTANCE_FLAGS(t) \
+ & TYPE_FLAG_ADDRESS_CLASS_ALL)
+
struct main_type
{
/* Code for kind of type */
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c
index fbab8af0a18..2b4e01a78a4 100644
--- a/gdb/gnu-v3-abi.c
+++ b/gdb/gnu-v3-abi.c
@@ -324,6 +324,9 @@ gnuv3_virtual_fn_field (struct value **value_p,
type now. */
if (TYPE_VPTR_FIELDNO (vfn_base) < 0)
fill_in_vptr_fieldno (vfn_base);
+ if (TYPE_VPTR_FIELDNO (vfn_base) < 0)
+ error ("Could not find virtual table pointer for class \"%s\".",
+ TYPE_TAG_NAME (vfn_base) ? TYPE_TAG_NAME (vfn_base) : "<unknown>");
/* Now that we know which base class is defining our virtual
function, cast our value to that baseclass. This takes care of
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index affd8dd58ec..0b0578c5fe7 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -34,6 +34,7 @@
#include "gdbcore.h"
#include "objfiles.h"
#include "gdbcmd.h"
+#include "gdb_assert.h"
/* Extra info which is saved in each frame_info. */
struct frame_extra_info
@@ -864,28 +865,38 @@ h8300_register_name (int regno)
}
static void
-h8300_print_register (int regno)
+h8300_print_register (struct gdbarch *gdbarch, struct ui_file *file,
+ struct frame_info *frame, int regno)
{
- long val = read_register (regno);
+ ULONGEST rval;
+ long val;
const char *name = h8300_register_name (regno);
if (!name || !*name)
return;
- printf_filtered ("%-14s ", name);
+ /* FIXME: cagney/2002-10-22: The code below assumes that VAL is at
+ least 4 bytes (32 bits) in size and hence is large enough to hold
+ the largest h8300 register. Should instead be using ULONGEST and
+ the phex() functions. */
+ gdb_assert (sizeof (val) >= 4);
+ frame_read_unsigned_register (frame, regno, &rval);
+ val = rval;
+
+ fprintf_filtered (file, "%-14s ", name);
if (h8300hmode)
{
if (val)
- printf_filtered ("0x%08lx %-8ld", val, val);
+ fprintf_filtered (file, "0x%08lx %-8ld", val, val);
else
- printf_filtered ("0x%-8lx %-8ld", val, val);
+ fprintf_filtered (file, "0x%-8lx %-8ld", val, val);
}
else
{
if (val)
- printf_filtered ("0x%04lx %-4ld", val, val);
+ fprintf_filtered (file, "0x%04lx %-4ld", val, val);
else
- printf_filtered ("0x%-4lx %-4ld", val, val);
+ fprintf_filtered (file, "0x%-4lx %-4ld", val, val);
}
if (regno == E_CCR_REGNUM)
{
@@ -895,39 +906,39 @@ h8300_print_register (int regno)
unsigned char l;
frame_register_read (selected_frame, regno, b);
l = b[REGISTER_VIRTUAL_SIZE (E_CCR_REGNUM) - 1];
- printf_unfiltered ("\t");
- printf_unfiltered ("I-%d ", (l & 0x80) != 0);
- printf_unfiltered ("UI-%d ", (l & 0x40) != 0);
- printf_unfiltered ("H-%d ", (l & 0x20) != 0);
- printf_unfiltered ("U-%d ", (l & 0x10) != 0);
+ fprintf_filtered (file, "\t");
+ fprintf_filtered (file, "I-%d ", (l & 0x80) != 0);
+ fprintf_filtered (file, "UI-%d ", (l & 0x40) != 0);
+ fprintf_filtered (file, "H-%d ", (l & 0x20) != 0);
+ fprintf_filtered (file, "U-%d ", (l & 0x10) != 0);
N = (l & 0x8) != 0;
Z = (l & 0x4) != 0;
V = (l & 0x2) != 0;
C = (l & 0x1) != 0;
- printf_unfiltered ("N-%d ", N);
- printf_unfiltered ("Z-%d ", Z);
- printf_unfiltered ("V-%d ", V);
- printf_unfiltered ("C-%d ", C);
+ fprintf_filtered (file, "N-%d ", N);
+ fprintf_filtered (file, "Z-%d ", Z);
+ fprintf_filtered (file, "V-%d ", V);
+ fprintf_filtered (file, "C-%d ", C);
if ((C | Z) == 0)
- printf_unfiltered ("u> ");
+ fprintf_filtered (file, "u> ");
if ((C | Z) == 1)
- printf_unfiltered ("u<= ");
+ fprintf_filtered (file, "u<= ");
if ((C == 0))
- printf_unfiltered ("u>= ");
+ fprintf_filtered (file, "u>= ");
if (C == 1)
- printf_unfiltered ("u< ");
+ fprintf_filtered (file, "u< ");
if (Z == 0)
- printf_unfiltered ("!= ");
+ fprintf_filtered (file, "!= ");
if (Z == 1)
- printf_unfiltered ("== ");
+ fprintf_filtered (file, "== ");
if ((N ^ V) == 0)
- printf_unfiltered (">= ");
+ fprintf_filtered (file, ">= ");
if ((N ^ V) == 1)
- printf_unfiltered ("< ");
+ fprintf_filtered (file, "< ");
if ((Z | (N ^ V)) == 0)
- printf_unfiltered ("> ");
+ fprintf_filtered (file, "> ");
if ((Z | (N ^ V)) == 1)
- printf_unfiltered ("<= ");
+ fprintf_filtered (file, "<= ");
}
else if (regno == E_EXR_REGNUM && h8300smode)
{
@@ -936,23 +947,24 @@ h8300_print_register (int regno)
unsigned char l;
frame_register_read (selected_frame, regno, b);
l = b[REGISTER_VIRTUAL_SIZE (E_EXR_REGNUM) - 1];
- printf_unfiltered ("\t");
- printf_unfiltered ("T-%d - - - ", (l & 0x80) != 0);
- printf_unfiltered ("I2-%d ", (l & 4) != 0);
- printf_unfiltered ("I1-%d ", (l & 2) != 0);
- printf_unfiltered ("I0-%d", (l & 1) != 0);
+ fprintf_filtered (file, "\t");
+ fprintf_filtered (file, "T-%d - - - ", (l & 0x80) != 0);
+ fprintf_filtered (file, "I2-%d ", (l & 4) != 0);
+ fprintf_filtered (file, "I1-%d ", (l & 2) != 0);
+ fprintf_filtered (file, "I0-%d", (l & 1) != 0);
}
- printf_filtered ("\n");
+ fprintf_filtered (file, "\n");
}
static void
-h8300_do_registers_info (int regno, int cpregs)
+h8300_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
+ struct frame_info *frame, int regno, int cpregs)
{
if (regno < 0)
for (regno = 0; regno < E_NUM_REGS; ++regno)
- h8300_print_register (regno);
+ h8300_print_register (gdbarch, file, frame, regno);
else
- h8300_print_register (regno);
+ h8300_print_register (gdbarch, file, frame, regno);
}
static CORE_ADDR
@@ -1085,7 +1097,7 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_virtual_size (gdbarch, h8300_register_raw_size);
set_gdbarch_max_register_virtual_size (gdbarch, h8300h_reg_size);
set_gdbarch_register_virtual_type (gdbarch, h8300_register_virtual_type);
- set_gdbarch_do_registers_info (gdbarch, h8300_do_registers_info);
+ set_gdbarch_print_registers_info (gdbarch, h8300_print_registers_info);
set_gdbarch_print_float_info (gdbarch, h8300_print_float_info);
/*
diff --git a/gdb/h8500-tdep.c b/gdb/h8500-tdep.c
index 0696c4ea540..0bfae7a7624 100644
--- a/gdb/h8500-tdep.c
+++ b/gdb/h8500-tdep.c
@@ -175,8 +175,8 @@ h8500_pop_frame (void)
}
}
-void
-print_register_hook (int regno)
+static void
+h8500_print_register_hook (int regno)
{
if (regno == CCR_REGNUM)
{
@@ -221,6 +221,117 @@ print_register_hook (int regno)
}
}
+static void
+h8500_print_registers_info (struct gdbarch *gdbarch,
+ struct ui_file *file,
+ struct frame_info *frame,
+ int regnum, int print_all)
+{
+ int i;
+ const int numregs = NUM_REGS + NUM_PSEUDO_REGS;
+ char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
+ char *virtual_buffer = alloca (MAX_REGISTER_VIRTUAL_SIZE);
+
+ for (i = 0; i < numregs; i++)
+ {
+ /* Decide between printing all regs, non-float / vector regs, or
+ specific reg. */
+ if (regnum == -1)
+ {
+ if (!print_all)
+ {
+ if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
+ continue;
+ if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)))
+ continue;
+ }
+ }
+ else
+ {
+ if (i != regnum)
+ continue;
+ }
+
+ /* If the register name is empty, it is undefined for this
+ processor, so don't display anything. */
+ if (REGISTER_NAME (i) == NULL || *(REGISTER_NAME (i)) == '\0')
+ continue;
+
+ fputs_filtered (REGISTER_NAME (i), file);
+ print_spaces_filtered (15 - strlen (REGISTER_NAME (i)), file);
+
+ /* Get the data in raw format. */
+ if (! frame_register_read (frame, i, raw_buffer))
+ {
+ fprintf_filtered (file, "*value not available*\n");
+ continue;
+ }
+
+ /* FIXME: cagney/2002-08-03: This code shouldn't be necessary.
+ The function frame_register_read() should have returned the
+ pre-cooked register so no conversion is necessary. */
+ /* Convert raw data to virtual format if necessary. */
+ if (REGISTER_CONVERTIBLE (i))
+ {
+ REGISTER_CONVERT_TO_VIRTUAL (i, REGISTER_VIRTUAL_TYPE (i),
+ raw_buffer, virtual_buffer);
+ }
+ else
+ {
+ memcpy (virtual_buffer, raw_buffer,
+ REGISTER_VIRTUAL_SIZE (i));
+ }
+
+ /* If virtual format is floating, print it that way, and in raw
+ hex. */
+ if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
+ {
+ int j;
+
+ val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
+ file, 0, 1, 0, Val_pretty_default);
+
+ fprintf_filtered (file, "\t(raw 0x");
+ for (j = 0; j < REGISTER_RAW_SIZE (i); j++)
+ {
+ int idx;
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ idx = j;
+ else
+ idx = REGISTER_RAW_SIZE (i) - 1 - j;
+ fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[idx]);
+ }
+ fprintf_filtered (file, ")");
+ }
+ else
+ {
+ /* Print the register in hex. */
+ val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
+ file, 'x', 1, 0, Val_pretty_default);
+ /* If not a vector register, print it also according to its
+ natural format. */
+ if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)) == 0)
+ {
+ fprintf_filtered (file, "\t");
+ val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
+ file, 0, 1, 0, Val_pretty_default);
+ }
+ }
+
+ /* Some h8500 specific info. */
+ h8500_print_register_hook (i);
+
+ fprintf_filtered (file, "\n");
+ }
+}
+
+void
+h8500_do_registers_info (int regnum, int all)
+{
+ h8500_print_registers_info (current_gdbarch, gdb_stdout, selected_frame,
+ regnum, all);
+}
+
int
h8500_register_size (int regno)
{
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 3890fc2f773..59f88731172 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -149,9 +149,6 @@ extern int hp_som_som_object_present;
/* In breakpoint.c */
extern int exception_catchpoints_are_fragile;
-/* This is defined in valops.c. */
-extern struct value *find_function_in_inferior (char *);
-
/* Should call_function allocate stack space for a struct return? */
int
hppa_use_struct_convention (int gcc_p, struct type *type)
@@ -300,7 +297,7 @@ static CORE_ADDR low_text_segment_address;
static void
record_text_segment_lowaddr (bfd *abfd, asection *section, void *ignored)
{
- if ((section->flags & (SEC_ALLOC | SEC_LOAD | SEC_READONLY)
+ if (((section->flags & (SEC_ALLOC | SEC_LOAD | SEC_READONLY))
== (SEC_ALLOC | SEC_LOAD | SEC_READONLY))
&& section->vma < low_text_segment_address)
low_text_segment_address = section->vma;
@@ -4426,7 +4423,7 @@ child_enable_exception_callback (enum exception_event_kind kind, int enable)
{
break_callback_sal = (struct symtab_and_line *) xmalloc (sizeof (struct symtab_and_line));
}
- INIT_SAL (break_callback_sal);
+ init_sal (break_callback_sal);
break_callback_sal->symtab = NULL;
break_callback_sal->pc = eh_break_addr;
break_callback_sal->line = 0;
diff --git a/gdb/hpread.c b/gdb/hpread.c
index 4cc5f18c477..08aa426270e 100644
--- a/gdb/hpread.c
+++ b/gdb/hpread.c
@@ -129,52 +129,52 @@ struct symloc
/* FIXME: Shouldn't this stuff be in a .h file somewhere? */
/* Complaints about the symbols we have encountered. */
-extern struct complaint string_table_offset_complaint;
-extern struct complaint lbrac_unmatched_complaint;
-extern struct complaint lbrac_mismatch_complaint;
+extern struct deprecated_complaint string_table_offset_complaint;
+extern struct deprecated_complaint lbrac_unmatched_complaint;
+extern struct deprecated_complaint lbrac_mismatch_complaint;
-static struct complaint hpread_unhandled_end_common_complaint =
+static struct deprecated_complaint hpread_unhandled_end_common_complaint =
{
"unhandled symbol in hp-symtab-read.c: DNTT_TYPE_COMMON/DNTT_TYPE_END.\n", 0, 0
};
-static struct complaint hpread_unhandled_type_complaint =
+static struct deprecated_complaint hpread_unhandled_type_complaint =
{
"hpread_type_translate: unhandled type code.", 0, 0
};
-static struct complaint hpread_struct_complaint =
+static struct deprecated_complaint hpread_struct_complaint =
{
"hpread_read_struct_type: expected SVAR type...", 0, 0
};
-static struct complaint hpread_array_complaint =
+static struct deprecated_complaint hpread_array_complaint =
{
"error in hpread_array_type.", 0, 0
};
-static struct complaint hpread_type_lookup_complaint =
+static struct deprecated_complaint hpread_type_lookup_complaint =
{
"error in hpread_type_lookup().", 0, 0
};
-static struct complaint hpread_unexpected_end_complaint =
+static struct deprecated_complaint hpread_unexpected_end_complaint =
{
"internal error in hp-symtab-read.c: Unexpected DNTT_TYPE_END kind.", 0, 0
};
-static struct complaint hpread_tagdef_complaint =
+static struct deprecated_complaint hpread_tagdef_complaint =
{
"error processing class tagdef", 0, 0
};
-static struct complaint hpread_unhandled_common_complaint =
+static struct deprecated_complaint hpread_unhandled_common_complaint =
{
"unhandled symbol in hp-symtab-read.c: DNTT_TYPE_COMMON.", 0, 0
};
-static struct complaint hpread_unhandled_blockdata_complaint =
+static struct deprecated_complaint hpread_unhandled_blockdata_complaint =
{
"unhandled symbol in hp-symtab-read.c: DNTT_TYPE_BLOCKDATA.", 0, 0
};
@@ -5742,7 +5742,7 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name,
{
/* Thread-local variable.
*/
- SYMBOL_CLASS (sym) = LOC_THREAD_LOCAL_STATIC;
+ SYMBOL_CLASS (sym) = LOC_HP_THREAD_LOCAL_STATIC;
SYMBOL_BASEREG (sym) = CR27_REGNUM;
if (objfile->flags & OBJF_SHARED)
diff --git a/gdb/i386-interix-nat.c b/gdb/i386-interix-nat.c
new file mode 100644
index 00000000000..9c4daeda422
--- /dev/null
+++ b/gdb/i386-interix-nat.c
@@ -0,0 +1,190 @@
+/* Native-dependent code for Interix running on i386's, for GDB.
+ Copyright 2002 Free Software Foundation, Inc.
+
+This file is part of GDB.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "defs.h"
+
+#include <sys/procfs.h>
+#include <inferior.h>
+#include <fcntl.h>
+
+#include <i386-tdep.h>
+#include "gdb_string.h"
+#include "gdbcore.h"
+#include "gregset.h"
+#include "regcache.h"
+
+typedef unsigned long greg_t;
+
+/* This is a duplicate of the table in i386-linux-nat.c. */
+
+static int regmap[] = {
+ EAX, ECX, EDX, EBX,
+ UESP, EBP, ESI, EDI,
+ EIP, EFL, CS, SS,
+ DS, ES, FS, GS,
+};
+
+/* Forward declarations. */
+extern void _initialize_core_interix (void);
+extern initialize_file_ftype _initialize_core_interix;
+
+/* Given a pointer to a general register set in /proc format (gregset_t *),
+ unpack the register contents and supply them as gdb's idea of the current
+ register values. */
+
+void
+supply_gregset (gregset_t *gregsetp)
+{
+ int regi;
+ greg_t *regp = (greg_t *) & gregsetp->gregs;
+
+ for (regi = 0; regi < I386_NUM_GREGS; regi++)
+ {
+ supply_register (regi, (char *) (regp + regmap[regi]));
+ }
+}
+
+/* Store GDB's value for REGNO in *GREGSETP. If REGNO is -1, do all
+ of them. */
+
+void
+fill_gregset (gregset_t *gregsetp, int regno)
+{
+ int regi;
+ greg_t *regp = (greg_t *) gregsetp->gregs;
+
+ for (regi = 0; regi < I386_NUM_GREGS; regi++)
+ if (regno == -1 || regi == regno)
+ regcache_collect (regi, (void *) (regp + regmap[regi]));
+}
+
+/* Fill GDB's register file with the floating-point register values in
+ *FPREGSETP. */
+
+void
+supply_fpregset (fpregset_t *fpregsetp)
+{
+ i387_supply_fsave ((char *) fpregsetp);
+}
+
+/* Given a pointer to a floating point register set in (fpregset_t *)
+ format, update all of the registers from gdb's idea of the current
+ floating point register set. */
+
+void
+fill_fpregset (fpregset_t *fpregsetp, int regno)
+{
+ i387_fill_fsave ((char *) fpregsetp, regno);
+}
+
+/* Read the values of either the general register set (WHICH equals 0)
+ or the floating point register set (WHICH equals 2) from the core
+ file data (pointed to by CORE_REG_SECT), and update gdb's idea of
+ their current values. The CORE_REG_SIZE parameter is compared to
+ the size of the gregset or fpgregset structures (as appropriate) to
+ validate the size of the structure from the core file. The
+ REG_ADDR parameter is ignored. */
+
+static void
+fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
+ CORE_ADDR reg_addr)
+{
+ gdb_gregset_t gregset;
+ gdb_fpregset_t fpregset;
+
+ if (which == 0)
+ {
+ if (core_reg_size != sizeof (gregset))
+ {
+ warning ("wrong size gregset struct in core file");
+ }
+ else
+ {
+ memcpy ((char *) &gregset, core_reg_sect, sizeof (gregset));
+ supply_gregset (&gregset);
+ }
+ }
+ else if (which == 2)
+ {
+ if (core_reg_size != sizeof (fpregset))
+ {
+ warning ("wrong size fpregset struct in core file");
+ }
+ else
+ {
+ memcpy ((char *) &fpregset, core_reg_sect, sizeof (fpregset));
+ supply_fpregset (&fpregset);
+ }
+ }
+}
+
+#include <setjmp.h>
+
+static struct core_fns interix_core_fns =
+{
+ bfd_target_coff_flavour, /* core_flavour (more or less) */
+ default_check_format, /* check_format */
+ default_core_sniffer, /* core_sniffer */
+ fetch_core_registers, /* core_read_registers */
+ NULL /* next */
+};
+
+void
+_initialize_core_interix (void)
+{
+ add_core_fns (&interix_core_fns);
+}
+
+/* We don't have a /proc/pid/file or /proc/pid/exe to read a link from,
+ so read it from the same place ps gets the name. */
+
+char *
+child_pid_to_exec_file (int pid)
+{
+ char *path;
+ char *buf;
+ int fd, c;
+ char *p;
+
+ xasprintf (&path, "/proc/%d/stat", pid);
+ buf = xcalloc (MAXPATHLEN + 1, sizeof (char));
+ make_cleanup (xfree, path);
+ make_cleanup (xfree, buf);
+
+ fd = open (path, O_RDONLY);
+
+ if (fd < 0)
+ return NULL;
+
+ /* Skip over "Argv0\t". */
+ lseek (fd, 6, SEEK_SET);
+
+ c = read (fd, buf, MAXPATHLEN);
+ close (fd);
+
+ if (c < 0)
+ return NULL;
+
+ buf[c] = '\0'; /* Ensure null termination. */
+ p = strchr (buf, '\n');
+ if (p != NULL)
+ *p = '\0';
+
+ return buf;
+}
diff --git a/gdb/i386-interix-tdep.c b/gdb/i386-interix-tdep.c
new file mode 100644
index 00000000000..ff310ecad35
--- /dev/null
+++ b/gdb/i386-interix-tdep.c
@@ -0,0 +1,365 @@
+/* Target-dependent code for Interix running on i386's, for GDB.
+ Copyright 2002 Free Software Foundation, Inc.
+
+This file is part of GDB.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "defs.h"
+#include "arch-utils.h"
+
+#include "frame.h"
+#include "gdb_string.h"
+#include "gdb-stabs.h"
+#include "gdbcore.h"
+#include "gdbtypes.h"
+#include "i386-tdep.h"
+#include "inferior.h"
+#include "libbfd.h"
+#include "objfiles.h"
+#include "osabi.h"
+#include "regcache.h"
+
+/* offsetof (mcontext_t, gregs.gregs[EBP]) */
+static const int mcontext_EBP_greg_offset = 180;
+
+/* offsetof (mcontext_t, gregs.gregs[EIP]) */
+static const int mcontext_EIP_greg_offset = 184;
+
+/* offsetof (mcontext_t, gregs.gregs[UESP]) */
+static const int mcontext_UESP_greg_offset = 196;
+
+/* offsetof (mcontext_t, gregs.reserved[1]) */
+static const int mcontext_syscall_greg_offset = 4;
+
+/* offsetof (_JUMP_BUFFER, Eip) */
+static const int jump_buffer_Eip_offset = 20;
+
+/* See procfs.c and *interix*.h in config/[alpha,i386]. */
+/* ??? These should be static, but this needs a bit of work before this
+ can be done. */
+CORE_ADDR tramp_start;
+CORE_ADDR tramp_end;
+CORE_ADDR null_start;
+CORE_ADDR null_end;
+int winver; /* Windows NT version number */
+
+/* Forward declarations. */
+extern void _initialize_i386_interix_tdep (void);
+extern initialize_file_ftype _initialize_i386_interix_tdep;
+
+/* Adjust the section offsets in an objfile structure so that it's correct
+ for the type of symbols being read (or undo it with the _restore
+ arguments).
+
+ If main programs ever start showing up at other than the default Image
+ Base, this is where that would likely be applied. */
+
+void
+pei_adjust_objfile_offsets (struct objfile *objfile,
+ enum objfile_adjusts type)
+{
+ int i;
+ CORE_ADDR symbols_offset;
+
+ switch (type)
+ {
+ case adjust_for_symtab:
+ symbols_offset = NONZERO_LINK_BASE (objfile->obfd);
+ break;
+ case adjust_for_symtab_restore:
+ symbols_offset = -NONZERO_LINK_BASE (objfile->obfd);
+ break;
+ case adjust_for_stabs:
+ case adjust_for_stabs_restore:
+ case adjust_for_dwarf:
+ case adjust_for_dwarf_restore:
+ default:
+ return;
+ }
+
+ for (i = 0; i < SECT_OFF_MAX; i++)
+ {
+ (objfile->section_offsets)->offsets[i] += symbols_offset;
+ }
+}
+
+static int
+i386_interix_pc_in_sigtramp (CORE_ADDR pc, char *name)
+{
+ /* This is sufficient, where used, but is NOT a complete test; There
+ is more in INIT_EXTRA_FRAME_INFO (a.k.a. interix_back_one_frame). */
+ return ((pc >= tramp_start && pc < tramp_end)
+ || (pc >= null_start && pc < null_end));
+}
+
+static int
+i386_interix_in_solib_call_trampoline (CORE_ADDR pc, char *name)
+{
+ return i386_pe_skip_trampoline_code (pc, name);
+}
+
+static CORE_ADDR
+i386_interix_skip_trampoline_code (CORE_ADDR pc)
+{
+ return i386_pe_skip_trampoline_code (pc, 0);
+}
+
+static void
+i386_interix_init_frame_pc (int fromleaf, struct frame_info *prev)
+{
+ /* Nothing to do on Interix. */
+}
+
+static int
+i386_interix_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
+{
+ /* In the context where this is used, we get the saved PC before we've
+ successfully unwound far enough to be sure what we've got (it may
+ be a signal handler caller). If we're dealing with a signal
+ handler caller, this will return valid, which is fine. If not,
+ it'll make the correct test. */
+ return (thisframe->signal_handler_caller
+ || (chain != 0
+ && !inside_entry_file (read_memory_integer
+ (thisframe->frame + 4, 4))));
+}
+
+/* We want to find the previous frame, which on Interix is tricky when signals
+ are involved; set frame->frame appropriately, and also get the pc
+ and tweak signal_handler_caller; this replaces a boatload of nested
+ macros, as well. */
+static void
+i386_interix_back_one_frame (int fromleaf, struct frame_info *frame)
+{
+ CORE_ADDR ra;
+ CORE_ADDR fm;
+ CORE_ADDR context;
+ long t;
+
+ if (frame == NULL)
+ internal_error (__FILE__, __LINE__, "unexpected NULL frame");
+
+ if (fromleaf)
+ {
+ frame->pc = SAVED_PC_AFTER_CALL (frame->next);
+ return;
+ }
+
+ if (!frame->next)
+ {
+ frame->pc = read_pc ();
+
+ /* Part of the signal stuff... See below. */
+ if (stopped_by_random_signal)
+ {
+ /* We know we're in a system call mini-frame; was it
+ NullApi or something else? */
+ ra = SAVED_PC_AFTER_CALL (frame);
+ if (ra >= null_start && ra < null_end)
+ frame->signal_handler_caller = 1;
+ /* There might also be an indirect call to the mini-frame,
+ putting one more return address on the stack. (XP only,
+ I think?) This can't (reasonably) return the address of the
+ signal handler caller unless it's that situation, so this
+ is safe. */
+ ra = read_memory_unsigned_integer (read_register (SP_REGNUM) + 4, 4);
+ if (ra >= null_start && ra < null_end)
+ frame->signal_handler_caller = 1;
+ }
+ return;
+ }
+
+ if (!frame->next->signal_handler_caller)
+ {
+ frame->pc = read_memory_integer (frame->next->frame + 4, 4);
+ return;
+ }
+
+ /* This is messy (actually AWFUL)... The "trampoline" might be 2, 3
+ or all 5 entities on the frame.
+
+ Chunk 1 will be present when we're actually in a signal handler.
+ Chunk 2 will be present when an asynchronous signal (one that
+ didn't come in with a system call) is present.
+ We may not (yet) be in the handler, if we're just returning
+ from the call.
+ When we're actually in a handler taken from an asynchronous
+ signal, both will be present.
+
+ Chunk 1:
+ PdxSignalDeliverer's frame
+ + Context struct -- not accounted for in any frame
+
+ Chunk 2:
+ + PdxNullPosixApi's frame
+ + PdxNullApiCaller's frame
+ + Context struct = 0x230 not accounted for in any frame
+
+ The symbol names come from examining objdumps of psxdll.dll;
+ they don't appear in the runtime image.
+
+ For gdb's purposes, we can pile all this into one frame. */
+
+ ra = frame->next->pc;
+ /* Are we already pointing at PdxNullPosixApi? We are if
+ this is a signal frame, we're at next-to-top, and were stopped
+ by a random signal (if it wasn't the right address under
+ these circumstances, we wouldn't be here at all by tests above
+ on the prior frame). */
+ if (frame->next->next == NULL && stopped_by_random_signal)
+ {
+ /* We're pointing at the frame FOR PdxNullApi. */
+ fm = frame->frame;
+ }
+ else
+ {
+ /* No... We must be pointing at the frame that was called
+ by PdxSignalDeliverer; back up across the whole mess. */
+
+ /* Extract the frame for PdxSignalDeliverer.
+ Note: FRAME_CHAIN used the "old" frame pointer because we were
+ a deliverer. Get the address of the context record that's on
+ here frameless. */
+ context = read_memory_integer (frame->frame, 4); /* an Arg */
+
+ /* Now extract the frame pointer contained in the context. */
+ fm = read_memory_integer (context + mcontext_EBP_greg_offset, 4);
+
+ ra = read_memory_integer (context + mcontext_EIP_greg_offset, 4);
+
+ /* We need to know if we're in a system call because we'll be
+ in a syscall mini-frame, if so, and the rules are different. */
+ t = (long) read_memory_integer (context + mcontext_syscall_greg_offset,
+ 4);
+ /* t contains 0 if running free, 1 if blocked on a system call,
+ and 2 if blocked on an exception message (e.g. a trap);
+ we don't expect to get here with a 2. */
+ if (t != 1)
+ {
+ /* Not at a system call, therefore it can't be NullApi. */
+ frame->pc = ra;
+ frame->frame = fm;
+ return;
+ }
+
+ /* It's a system call... Mini frame, then look for NullApi. */
+ /* Get the RA (on the stack) associated with this... It's
+ a system call mini-frame. */
+ ra = read_memory_integer (context + mcontext_UESP_greg_offset, 4);
+
+ if (winver >= 51)
+ {
+ /* Newer versions of Windows NT interpose another return
+ address (but no other "stack frame" stuff) that we need
+ to simply ignore here. */
+ ra += 4;
+ }
+
+ ra = read_memory_integer (ra, 4);
+
+ if (!(ra >= null_start && ra < null_end))
+ {
+ /* No Null API present; we're done. */
+ frame->pc = ra;
+ frame->frame = fm;
+ return;
+ }
+ }
+
+ /* At this point, we're looking at the frame for PdxNullPosixApi,
+ in either case.
+
+ PdxNullPosixApi is called by PdxNullApiCaller (which in turn
+ is called by _PdxNullApiCaller (note the _).)
+ PdxNullPosixApiCaller (no _) is a frameless function.
+
+ The saved frame pointer is as fm, but it's not of interest
+ to us because it skips us over the saved context, which is
+ the wrong thing to do, because it skips the interrrupted
+ routine! PdxNullApiCaller takes as its only argument the
+ address of the context of the interrupded function (which
+ is really in no frame, but jammed on the stack by the system)
+
+ So: fm+0: saved bp
+ fm+4: return address to _PdxNullApiCaller
+ fm+8: arg to PdxNullApiCaller pushed by _Pdx... */
+
+ fm = read_memory_integer (fm + 0x8, 4);
+
+ /* Extract the second context record. */
+
+ ra = read_memory_integer (fm + mcontext_EIP_greg_offset, 4);
+ fm = read_memory_integer (fm + mcontext_EBP_greg_offset, 4);
+
+ frame->frame = fm;
+ frame->pc = ra;
+
+ return;
+}
+
+static CORE_ADDR
+i386_interix_frame_saved_pc (struct frame_info *fi)
+{
+ /* Assume that we've already unwound enough to have the caller's address
+ if we're dealing with a signal handler caller (And if that fails,
+ return 0). */
+ if (fi->signal_handler_caller)
+ return fi->next ? fi->next->pc : 0;
+ else
+ return read_memory_integer (fi->frame + 4, 4);
+}
+
+static void
+i386_interix_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ tdep->struct_return = reg_struct_return;
+ tdep->jb_pc_offset = jump_buffer_Eip_offset;
+
+ set_gdbarch_decr_pc_after_break (gdbarch, 0);
+ set_gdbarch_pc_in_sigtramp (gdbarch, i386_interix_pc_in_sigtramp);
+ set_gdbarch_in_solib_call_trampoline (gdbarch,
+ i386_interix_in_solib_call_trampoline);
+ set_gdbarch_skip_trampoline_code (gdbarch,
+ i386_interix_skip_trampoline_code);
+ set_gdbarch_init_extra_frame_info (gdbarch, i386_interix_back_one_frame);
+ set_gdbarch_init_frame_pc (gdbarch, i386_interix_init_frame_pc);
+ set_gdbarch_frame_chain_valid (gdbarch, i386_interix_frame_chain_valid);
+ set_gdbarch_frame_saved_pc (gdbarch, i386_interix_frame_saved_pc);
+ set_gdbarch_name_of_malloc (gdbarch, "_malloc");
+}
+
+static enum gdb_osabi
+i386_interix_osabi_sniffer (bfd * abfd)
+{
+ char *target_name = bfd_get_target (abfd);
+
+ if (strcmp (target_name, "pei-i386") == 0)
+ return GDB_OSABI_INTERIX;
+
+ return GDB_OSABI_UNKNOWN;
+}
+
+void
+_initialize_i386_interix_tdep (void)
+{
+ gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_coff_flavour,
+ i386_interix_osabi_sniffer);
+
+ gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_INTERIX,
+ i386_interix_init_abi);
+}
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index a833fb59838..0d6ab40747a 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -209,11 +209,17 @@ i386_linux_rt_sigtramp_start (CORE_ADDR pc)
static int
i386_linux_pc_in_sigtramp (CORE_ADDR pc, char *name)
{
- if (name)
- return STREQ ("__restore", name) || STREQ ("__restore_rt", name);
-
- return (i386_linux_sigtramp_start (pc) != 0
- || i386_linux_rt_sigtramp_start (pc) != 0);
+ /* If we have NAME, we can optimize the search. The trampolines are
+ named __restore and __restore_rt. However, they aren't dynamically
+ exported from the shared C library, so the trampoline may appear to
+ be part of the preceding function. This should always be sigaction,
+ __sigaction, or __libc_sigaction (all aliases to the same function). */
+ if (name == NULL || strstr (name, "sigaction") != NULL)
+ return (i386_linux_sigtramp_start (pc) != 0
+ || i386_linux_rt_sigtramp_start (pc) != 0);
+
+ return (strcmp ("__restore", name) == 0
+ || strcmp ("__restore_rt", name) == 0);
}
/* Assuming FRAME is for a GNU/Linux sigtramp routine, return the
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 5a19308294f..91e57142e42 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -535,8 +535,12 @@ static CORE_ADDR
i386_frame_saved_pc (struct frame_info *frame)
{
if (PC_IN_CALL_DUMMY (frame->pc, 0, 0))
- return deprecated_read_register_dummy (frame->pc, frame->frame,
- PC_REGNUM);
+ {
+ ULONGEST pc;
+
+ frame_unwind_unsigned_register (frame, PC_REGNUM, &pc);
+ return pc;
+ }
if (frame->signal_handler_caller)
return i386_sigtramp_saved_pc (frame);
@@ -834,7 +838,7 @@ i386_do_pop_frame (struct frame_info *frame)
if (addr)
{
read_memory (addr, regbuf, REGISTER_RAW_SIZE (regnum));
- write_register_gen (regnum, regbuf);
+ deprecated_write_register_gen (regnum, regbuf);
}
}
write_register (FP_REGNUM, read_memory_integer (fp, 4));
@@ -1039,25 +1043,17 @@ i386_store_return_value (struct type *type, struct regcache *regcache,
}
}
-/* Extract from an array REGBUF containing the (raw) register state
- the address in which a function should return its structure value,
- as a CORE_ADDR. */
+/* Extract from REGCACHE, which contains the (raw) register state, the
+ address in which a function should return its structure value, as a
+ CORE_ADDR. */
static CORE_ADDR
i386_extract_struct_value_address (struct regcache *regcache)
{
- /* NOTE: cagney/2002-08-12: Replaced a call to
- regcache_raw_read_as_address() with a call to
- regcache_cooked_read_unsigned(). The old, ...as_address function
- was eventually calling extract_unsigned_integer (via
- extract_address) to unpack the registers value. The below is
- doing an unsigned extract so that it is functionally equivalent.
- The read needs to be cooked as, otherwise, it will never
- correctly return the value of a register in the [NUM_REGS
- .. NUM_REGS+NUM_PSEUDO_REGS) range. */
- ULONGEST val;
- regcache_cooked_read_unsigned (regcache, LOW_RETURN_REGNUM, &val);
- return val;
+ ULONGEST addr;
+
+ regcache_raw_read_unsigned (regcache, LOW_RETURN_REGNUM, &addr);
+ return addr;
}
diff --git a/gdb/i386bsd-nat.c b/gdb/i386bsd-nat.c
index 8a3acd4cf58..ec38e135717 100644
--- a/gdb/i386bsd-nat.c
+++ b/gdb/i386bsd-nat.c
@@ -306,7 +306,7 @@ i386bsd_dr_set (int regnum, unsigned int value)
/* For some mysterious reason, some of the reserved bits in the
debug control register get set. Mask these off, otherwise the
ptrace call below will fail. */
- dbregs.dr7 &= ~(0x0000fc00);
+ DBREG_DRX ((&dbregs), 7) &= ~(0x0000fc00);
DBREG_DRX ((&dbregs), regnum) = value;
@@ -355,7 +355,7 @@ i386bsd_dr_get_status (void)
return 0;
#endif
- return dbregs.dr6;
+ return DBREG_DRX ((&dbregs), 6);
}
#endif /* PT_GETDBREGS */
@@ -400,11 +400,16 @@ _initialize_i386bsd_nat (void)
extern int i386fbsd4_sc_sp_offset;
#define SC_PC_OFFSET i386fbsd4_sc_pc_offset
#define SC_SP_OFFSET i386fbsd4_sc_sp_offset
-#elif defined (NetBSD) || defined (__NetBSD_Version__) || defined (OpenBSD)
+#elif defined (NetBSD) || defined (__NetBSD_Version__)
extern int i386nbsd_sc_pc_offset;
extern int i386nbsd_sc_sp_offset;
#define SC_PC_OFFSET i386nbsd_sc_pc_offset
#define SC_SP_OFFSET i386nbsd_sc_sp_offset
+#elif defined (OpenBSD)
+ extern int i386obsd_sc_pc_offset;
+ extern int i386obsd_sc_sp_offset;
+#define SC_PC_OFFSET i386obsd_sc_pc_offset
+#define SC_SP_OFFSET i386obsd_sc_sp_offset
#else
extern int i386bsd_sc_pc_offset;
extern int i386bsd_sc_sp_offset;
diff --git a/gdb/i386obsd-nat.c b/gdb/i386obsd-nat.c
index 17ef922b82a..b2cdc2a7e58 100644
--- a/gdb/i386obsd-nat.c
+++ b/gdb/i386obsd-nat.c
@@ -44,16 +44,16 @@ _initialize_i386obsd_nat (void)
int mib[2];
size_t len;
- extern CORE_ADDR i386nbsd_sigtramp_start;
- extern CORE_ADDR i386nbsd_sigtramp_end;
+ extern CORE_ADDR i386obsd_sigtramp_start;
+ extern CORE_ADDR i386obsd_sigtramp_end;
mib[0] = CTL_VM;
mib[1] = VM_PSSTRINGS;
len = sizeof (_ps);
if (sysctl (mib, 2, &_ps, &len, NULL, 0) == 0)
{
- i386nbsd_sigtramp_start = (CORE_ADDR)_ps.val - 128;
- i386nbsd_sigtramp_end = (CORE_ADDR)_ps.val;
+ i386obsd_sigtramp_start = (CORE_ADDR)_ps.val - 128;
+ i386obsd_sigtramp_end = (CORE_ADDR)_ps.val;
}
}
#endif
diff --git a/gdb/i386obsd-tdep.c b/gdb/i386obsd-tdep.c
new file mode 100644
index 00000000000..7f162379a54
--- /dev/null
+++ b/gdb/i386obsd-tdep.c
@@ -0,0 +1,122 @@
+/* Target-dependent code for OpenBSD/i386.
+ Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000, 2001, 2002
+ Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include "defs.h"
+#include "arch-utils.h"
+#include "gdbcore.h"
+#include "regcache.h"
+
+#include "i386-tdep.h"
+#include "i387-tdep.h"
+
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_i386obsd_tdep (void);
+
+#define SIZEOF_STRUCT_REG (16 * 4)
+
+static void
+i386obsd_supply_reg (char *regs, int regno)
+{
+ int i;
+
+ for (i = 0; i <= 15; i++)
+ if (regno == i || regno == -1)
+ supply_register (i, regs + i * 4);
+}
+
+static void
+fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
+ CORE_ADDR ignore)
+{
+ char *regs, *fsave;
+
+ /* We get everything from one section. */
+ if (which != 0)
+ return;
+
+ if (core_reg_size < (SIZEOF_STRUCT_REG + 108))
+ {
+ warning ("Wrong size register set in core file.");
+ return;
+ }
+
+ regs = core_reg_sect;
+ fsave = core_reg_sect + SIZEOF_STRUCT_REG;
+
+ /* Integer registers. */
+ i386obsd_supply_reg (regs, -1);
+
+ /* Floating point registers. */
+ i387_supply_fsave (fsave);
+}
+
+static struct core_fns i386obsd_core_fns =
+{
+ bfd_target_unknown_flavour, /* core_flavour */
+ default_check_format, /* check_format */
+ default_core_sniffer, /* core_sniffer */
+ fetch_core_registers, /* core_read_registers */
+ NULL /* next */
+};
+
+
+CORE_ADDR i386obsd_sigtramp_start = 0xbfbfdf20;
+CORE_ADDR i386obsd_sigtramp_end = 0xbfbfdff0;
+
+/* From <machine/signal.h>. */
+int i386obsd_sc_pc_offset = 44;
+int i386obsd_sc_sp_offset = 56;
+
+static void
+i386obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ /* Obviously OpenBSD is BSD-based. */
+ i386bsd_init_abi (info, gdbarch);
+
+ /* OpenBSD uses -freg-struct-return by default. */
+ tdep->struct_return = reg_struct_return;
+
+ /* OpenBSD uses a different memory layout. */
+ tdep->sigtramp_start = i386obsd_sigtramp_start;
+ tdep->sigtramp_end = i386obsd_sigtramp_end;
+
+ /* OpenBSD has a `struct sigcontext' that's different from the
+ origional 4.3 BSD. */
+ tdep->sc_pc_offset = i386obsd_sc_pc_offset;
+ tdep->sc_sp_offset = i386obsd_sc_sp_offset;
+}
+
+void
+_initialize_i386obsd_tdep (void)
+{
+ add_core_fns (&i386obsd_core_fns);
+
+ /* FIXME: kettenis/20021020: Since OpenBSD/i386 binaries are
+ indistingushable from NetBSD/i386 a.out binaries, building a GDB
+ that should support both these targets will probably not work as
+ expected. */
+#define GDB_OSABI_OPENBSD_AOUT GDB_OSABI_NETBSD_AOUT
+
+ gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_OPENBSD_AOUT,
+ i386obsd_init_abi);
+}
diff --git a/gdb/i386v-nat.c b/gdb/i386v-nat.c
index 8180093c2ae..78152e410e1 100644
--- a/gdb/i386v-nat.c
+++ b/gdb/i386v-nat.c
@@ -60,6 +60,8 @@
#include "floatformat.h"
#include "target.h"
+
+#include "i386-tdep.h"
/* Mapping between the general-purpose registers in `struct user'
diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c
index 3d4b39775fb..f2ed6b8e37a 100644
--- a/gdb/i387-tdep.c
+++ b/gdb/i387-tdep.c
@@ -321,26 +321,35 @@ void
i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
struct frame_info *frame, const char *args)
{
- unsigned int fctrl;
- unsigned int fstat;
- unsigned int ftag;
- unsigned int fiseg;
- unsigned int fioff;
- unsigned int foseg;
- unsigned int fooff;
- unsigned int fop;
+ char buf[4];
+ ULONGEST fctrl;
+ ULONGEST fstat;
+ ULONGEST ftag;
+ ULONGEST fiseg;
+ ULONGEST fioff;
+ ULONGEST foseg;
+ ULONGEST fooff;
+ ULONGEST fop;
int fpreg;
int top;
- fctrl = read_register (FCTRL_REGNUM);
- fstat = read_register (FSTAT_REGNUM);
- ftag = read_register (FTAG_REGNUM);
- fiseg = read_register (FCS_REGNUM);
- fioff = read_register (FCOFF_REGNUM);
- foseg = read_register (FDS_REGNUM);
- fooff = read_register (FDOFF_REGNUM);
- fop = read_register (FOP_REGNUM);
-
+ frame_register_read (frame, FCTRL_REGNUM, buf);
+ fctrl = extract_unsigned_integer (buf, 4);
+ frame_register_read (frame, FSTAT_REGNUM, buf);
+ fstat = extract_unsigned_integer (buf, 4);
+ frame_register_read (frame, FTAG_REGNUM, buf);
+ ftag = extract_unsigned_integer (buf, 4);
+ frame_register_read (frame, FISEG_REGNUM, buf);
+ fiseg = extract_unsigned_integer (buf, 4);
+ frame_register_read (frame, FIOFF_REGNUM, buf);
+ fioff = extract_unsigned_integer (buf, 4);
+ frame_register_read (frame, FOSEG_REGNUM, buf);
+ foseg = extract_unsigned_integer (buf, 4);
+ frame_register_read (frame, FOOFF_REGNUM, buf);
+ fooff = extract_unsigned_integer (buf, 4);
+ frame_register_read (frame, FOP_REGNUM, buf);
+ fop = extract_unsigned_integer (buf, 4);
+
top = ((fstat >> 11) & 7);
for (fpreg = 7; fpreg >= 0; fpreg--)
@@ -367,7 +376,7 @@ i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
break;
}
- read_register_gen ((fpreg + 8 - top) % 8 + FP0_REGNUM, raw);
+ frame_register_read (frame, (fpreg + 8 - top) % 8 + FP0_REGNUM, raw);
fputs_filtered ("0x", file);
for (i = 9; i >= 0; i--)
@@ -379,7 +388,7 @@ i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
fputs_filtered ("\n", file);
}
- puts_filtered ("\n");
+ fputs_filtered ("\n", file);
print_i387_status_word (fstat, file);
print_i387_control_word (fctrl, file);
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index 53f21a46b1f..64738185c5a 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -1375,8 +1375,8 @@ ia64_get_saved_register (char *raw_buffer,
+ ((regnum - IA64_FR32_REGNUM) + rrb_fr) % 96;
}
- generic_get_saved_register (raw_buffer, optimized, addrp, frame,
- regnum, lval);
+ deprecated_generic_get_saved_register (raw_buffer, optimized, addrp,
+ frame, regnum, lval);
}
}
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index a1d030bbce5..38cb1b69a4b 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -42,18 +42,24 @@
#include "parser-defs.h"
#include "regcache.h"
-/* Functions exported for general use: */
-
-void nofp_registers_info (char *, int);
+/* Functions exported for general use, in inferior.h: */
void all_registers_info (char *, int);
void registers_info (char *, int);
-/* Local functions: */
+void nexti_command (char *, int);
+
+void stepi_command (char *, int);
void continue_command (char *, int);
+void interrupt_target_command (char *args, int from_tty);
+
+/* Local functions: */
+
+static void nofp_registers_info (char *, int);
+
static void print_return_value (int struct_return, struct type *value_type);
static void finish_command_continuation (struct continuation_arg *);
@@ -72,8 +78,6 @@ static void float_info (char *, int);
static void detach_command (char *, int);
-static void interrupt_target_command (char *args, int from_tty);
-
static void unset_environment_command (char *, int);
static void set_environment_command (char *, int);
@@ -92,10 +96,6 @@ static void step_1 (int, int, char *);
static void step_once (int skip_subroutines, int single_inst, int count);
static void step_1_continuation (struct continuation_arg *arg);
-void nexti_command (char *, int);
-
-void stepi_command (char *, int);
-
static void next_command (char *, int);
static void step_command (char *, int);
@@ -983,7 +983,7 @@ run_stack_dummy (CORE_ADDR addr, struct regcache *buffer)
struct breakpoint *bpt;
struct symtab_and_line sal;
- INIT_SAL (&sal); /* initialize to zeroes */
+ init_sal (&sal); /* initialize to zeroes */
if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT)
{
sal.pc = CALL_DUMMY_ADDRESS ();
@@ -1571,10 +1571,9 @@ default_print_registers_info (struct gdbarch *gdbarch,
char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
char *virtual_buffer = alloca (MAX_REGISTER_VIRTUAL_SIZE);
- /* FIXME: cagney/2002-03-08: This should be deprecated. */
- if (DO_REGISTERS_INFO_P ())
+ if (DEPRECATED_DO_REGISTERS_INFO_P ())
{
- DO_REGISTERS_INFO (regnum, print_all);
+ DEPRECATED_DO_REGISTERS_INFO (regnum, print_all);
return;
}
@@ -1729,7 +1728,7 @@ all_registers_info (char *addr_exp, int from_tty)
registers_info (addr_exp, 1);
}
-void
+static void
nofp_registers_info (char *addr_exp, int from_tty)
{
registers_info (addr_exp, 0);
@@ -1891,14 +1890,7 @@ detach_command (char *args, int from_tty)
/* Stop the execution of the target while running in async mode, in
the backgound. */
-
void
-interrupt_target_command_wrapper (char *args, int from_tty)
-{
- interrupt_target_command (args, from_tty);
-}
-
-static void
interrupt_target_command (char *args, int from_tty)
{
if (event_loop_p && target_can_async_p ())
diff --git a/gdb/inferior.h b/gdb/inferior.h
index 8035ccd9825..2cccda1103b 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -315,6 +315,16 @@ extern char *set_inferior_args (char *);
extern void set_inferior_args_vector (int, char **);
+extern void registers_info (char *, int);
+
+extern void nexti_command (char *, int);
+
+extern void stepi_command (char *, int);
+
+extern void continue_command (char *, int);
+
+extern void interrupt_target_command (char *args, int from_tty);
+
/* Last signal that the inferior received (why it stopped). */
extern enum target_signal stop_signal;
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 0f0c96b62ec..88c59c58fd7 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -231,13 +231,6 @@ a command like `return' or `jump' to continue execution.");
#define HAVE_STEPPABLE_WATCHPOINT 1
#endif
-#ifndef HAVE_NONSTEPPABLE_WATCHPOINT
-#define HAVE_NONSTEPPABLE_WATCHPOINT 0
-#else
-#undef HAVE_NONSTEPPABLE_WATCHPOINT
-#define HAVE_NONSTEPPABLE_WATCHPOINT 1
-#endif
-
#ifndef HAVE_CONTINUABLE_WATCHPOINT
#define HAVE_CONTINUABLE_WATCHPOINT 0
#else
@@ -870,13 +863,14 @@ resume (int step, enum target_signal sig)
resume_ptid = inferior_ptid;
}
-#ifdef CANNOT_STEP_BREAKPOINT
- /* Most targets can step a breakpoint instruction, thus executing it
- normally. But if this one cannot, just continue and we will hit
- it anyway. */
- if (step && breakpoints_inserted && breakpoint_here_p (read_pc ()))
- step = 0;
-#endif
+ if (CANNOT_STEP_BREAKPOINT)
+ {
+ /* Most targets can step a breakpoint instruction, thus
+ executing it normally. But if this one cannot, just
+ continue and we will hit it anyway. */
+ if (step && breakpoints_inserted && breakpoint_here_p (read_pc ()))
+ step = 0;
+ }
target_resume (resume_ptid, step, sig);
}
@@ -2609,7 +2603,7 @@ process_event_stop_test:
/* Set up a step-resume breakpoint at the address
indicated by SKIP_SOLIB_RESOLVER. */
struct symtab_and_line sr_sal;
- INIT_SAL (&sr_sal);
+ init_sal (&sr_sal);
sr_sal.pc = pc_after_resolver;
check_for_old_step_resume_breakpoint ();
@@ -2662,7 +2656,7 @@ process_event_stop_test:
breakpoint even though the signal happened. */
struct symtab_and_line sr_sal;
- INIT_SAL (&sr_sal);
+ init_sal (&sr_sal);
sr_sal.symtab = NULL;
sr_sal.line = 0;
sr_sal.pc = prev_pc;
@@ -2775,7 +2769,7 @@ process_event_stop_test:
struct symtab_and_line xxx;
/* Why isn't this s_a_l called "sr_sal", like all of the
other s_a_l's where this code is duplicated? */
- INIT_SAL (&xxx); /* initialize to zeroes */
+ init_sal (&xxx); /* initialize to zeroes */
xxx.pc = tmp;
xxx.section = find_pc_overlay (xxx.pc);
check_for_old_step_resume_breakpoint ();
@@ -2850,7 +2844,7 @@ process_event_stop_test:
/* And put the step-breakpoint there and go until there. */
struct symtab_and_line sr_sal;
- INIT_SAL (&sr_sal); /* initialize to zeroes */
+ init_sal (&sr_sal); /* initialize to zeroes */
sr_sal.pc = tmp;
sr_sal.section = find_pc_overlay (sr_sal.pc);
/* Do not specify what the fp should be when we stop
@@ -2966,7 +2960,7 @@ check_sigtramp2 (struct execution_control_state *ecs)
struct symtab_and_line sr_sal;
- INIT_SAL (&sr_sal); /* initialize to zeroes */
+ init_sal (&sr_sal); /* initialize to zeroes */
sr_sal.pc = prev_pc;
sr_sal.section = find_pc_overlay (sr_sal.pc);
/* We perhaps could set the frame if we kept track of what the
@@ -3022,7 +3016,7 @@ step_into_function (struct execution_control_state *ecs)
else
{
/* Put the step-breakpoint there and go until there. */
- INIT_SAL (&sr_sal); /* initialize to zeroes */
+ init_sal (&sr_sal); /* initialize to zeroes */
sr_sal.pc = ecs->stop_func_start;
sr_sal.section = find_pc_overlay (ecs->stop_func_start);
/* Do not specify what the fp should be when we stop since on
@@ -3057,7 +3051,7 @@ step_over_function (struct execution_control_state *ecs)
{
struct symtab_and_line sr_sal;
- INIT_SAL (&sr_sal); /* initialize to zeros */
+ init_sal (&sr_sal); /* initialize to zeros */
sr_sal.pc = ADDR_BITS_REMOVE (SAVED_PC_AFTER_CALL (get_current_frame ()));
sr_sal.section = find_pc_overlay (sr_sal.pc);
diff --git a/gdb/jv-exp.y b/gdb/jv-exp.y
index 70c228b9575..b4ae3401ea4 100644
--- a/gdb/jv-exp.y
+++ b/gdb/jv-exp.y
@@ -179,7 +179,7 @@ static int parse_number (char *, int, int, YYSTYPE *);
%token <opcode> ASSIGN_MODIFY
-%token THIS SUPER NEW
+%token SUPER NEW
%left ','
%right '=' ASSIGN_MODIFY
@@ -365,9 +365,6 @@ Primary:
PrimaryNoNewArray:
Literal
-| THIS
- { write_exp_elt_opcode (OP_THIS);
- write_exp_elt_opcode (OP_THIS); }
| '(' Expression ')'
| ClassInstanceCreationExpression
| FieldAccess
@@ -1167,17 +1164,6 @@ yylex ()
yylval.lval = 1;
return BOOLEAN_LITERAL;
}
- if (current_language->la_language == language_cplus
- && STREQN (tokstart, "this", 4))
- {
- static const char this_name[] =
- { CPLUS_MARKER, 't', 'h', 'i', 's', '\0' };
-
- if (lookup_symbol (this_name, expression_context_block,
- VAR_NAMESPACE, (int *) NULL,
- (struct symtab **) NULL))
- return THIS;
- }
break;
case 3:
if (STREQN (tokstart, "int", 3))
diff --git a/gdb/language.c b/gdb/language.c
index dc94ebdd8c3..8eee8f6d4a5 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -549,6 +549,7 @@ binop_result_type (struct value *v1, struct value *v2)
{
case language_c:
case language_cplus:
+ case language_objc:
if (TYPE_CODE (t1) == TYPE_CODE_FLT)
return TYPE_CODE (t2) == TYPE_CODE_FLT && l2 > l1 ?
VALUE_TYPE (v2) : VALUE_TYPE (v1);
@@ -786,6 +787,7 @@ integral_type (struct type *type)
{
case language_c:
case language_cplus:
+ case language_objc:
return (TYPE_CODE (type) != TYPE_CODE_INT) &&
(TYPE_CODE (type) != TYPE_CODE_ENUM) ? 0 : 1;
case language_m2:
@@ -828,6 +830,7 @@ character_type (struct type *type)
case language_c:
case language_cplus:
+ case language_objc:
return (TYPE_CODE (type) == TYPE_CODE_INT) &&
TYPE_LENGTH (type) == sizeof (char)
? 1 : 0;
@@ -850,6 +853,7 @@ string_type (struct type *type)
case language_c:
case language_cplus:
+ case language_objc:
/* C does not have distinct string type. */
return (0);
default:
@@ -868,6 +872,7 @@ boolean_type (struct type *type)
{
case language_c:
case language_cplus:
+ case language_objc:
/* Might be more cleanly handled by having a
TYPE_CODE_INT_NOT_BOOL for (OBSOLETE) CHILL and such
languages, or a TYPE_CODE_INT_OR_BOOL for C. */
@@ -904,6 +909,7 @@ structured_type (struct type *type)
{
case language_c:
case language_cplus:
+ case language_objc:
return (TYPE_CODE (type) == TYPE_CODE_STRUCT) ||
(TYPE_CODE (type) == TYPE_CODE_UNION) ||
(TYPE_CODE (type) == TYPE_CODE_ARRAY);
@@ -1124,6 +1130,7 @@ binop_type_check (struct value *arg1, struct value *arg2, int op)
#ifdef _LANG_c
case language_c:
case language_cplus:
+ case language_objc:
switch (op)
{
case BINOP_DIV:
diff --git a/gdb/language.h b/gdb/language.h
index 67a8ff26afe..b15544fead9 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -288,7 +288,8 @@ language_mode;
/* "cast" really means conversion */
/* FIXME -- should be a setting in language_defn */
#define CAST_IS_CONVERSION (current_language->la_language == language_c || \
- current_language->la_language == language_cplus)
+ current_language->la_language == language_cplus || \
+ current_language->la_language == language_objc)
extern void language_info (int);
diff --git a/gdb/lin-lwp.c b/gdb/lin-lwp.c
index cd577fbe3a0..4b9d57d0320 100644
--- a/gdb/lin-lwp.c
+++ b/gdb/lin-lwp.c
@@ -579,11 +579,8 @@ lin_lwp_resume (ptid_t ptid, int step, enum target_signal signo)
struct lwp_info *lp;
int resume_all;
- /* Apparently the interpretation of PID is dependent on STEP: If
- STEP is non-zero, a specific PID means `step only this process
- id'. But if STEP is zero, then PID means `continue *all*
- processes, but give the signal only to this one'. */
- resume_all = (PIDGET (ptid) == -1) || !step;
+ /* A specific PTID means `step only this process id'. */
+ resume_all = (PIDGET (ptid) == -1);
if (resume_all)
iterate_over_lwps (resume_set_callback, NULL);
diff --git a/gdb/linespec.c b/gdb/linespec.c
index 5631fd31433..94f3b731c0e 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -31,11 +31,7 @@
#include "value.h"
#include "completer.h"
#include "cp-abi.h"
-
-/* Prototype for one function in parser-defs.h,
- instead of including that entire file. */
-
-extern char *find_template_name_end (char *);
+#include "parser-defs.h"
/* We share this one with symtab.c, but it is not exported widely. */
@@ -371,8 +367,8 @@ decode_line_2 (struct symbol *sym_arr[], int nelts, int funfirstline,
printf_unfiltered ("[0] cancel\n[1] all\n");
while (i < nelts)
{
- INIT_SAL (&return_values.sals[i]); /* initialize to zeroes */
- INIT_SAL (&values.sals[i]);
+ init_sal (&return_values.sals[i]); /* initialize to zeroes */
+ init_sal (&values.sals[i]);
if (sym_arr[i] && SYMBOL_CLASS (sym_arr[i]) == LOC_BLOCK)
{
values.sals[i] = find_function_start_sal (sym_arr[i], funfirstline);
@@ -540,7 +536,7 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab,
char *saved_arg = *argptr;
extern char *gdb_completer_quote_characters;
- INIT_SAL (&val); /* initialize to zeroes */
+ init_sal (&val); /* initialize to zeroes */
/* Defaults have defaults. */
diff --git a/gdb/m32r-stub.c b/gdb/m32r-stub.c
index a691a657a23..2e69b4403ea 100644
--- a/gdb/m32r-stub.c
+++ b/gdb/m32r-stub.c
@@ -210,8 +210,16 @@ handle_exception(int exceptionVector)
unsigned char buf[16];
int binary;
- if (!finish_from_step())
- return; /* "false step": let the target continue */
+ /* Do not call finish_from_step() if this is not a trap #1
+ * (breakpoint trap). Without this check, the finish_from_step()
+ * might interpret a system call trap as a single step trap. This
+ * can happen if: the stub receives 's' and exits, but an interrupt
+ * was pending; the interrupt is now handled and causes the stub to
+ * be reentered because some function makes a system call.
+ */
+ if (exceptionVector == 1) /* Trap exception? */
+ if (!finish_from_step()) /* Go see if stepping state needs update. */
+ return; /* "false step": let the target continue */
gdb_m32r_vector = exceptionVector;
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index aa1a226754f..3045a58fa88 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -1345,7 +1345,7 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
sizeof (m68hc11_call_dummy_words));
set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
- set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+ set_gdbarch_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_deprecated_extract_return_value (gdbarch, m68hc11_extract_return_value);
set_gdbarch_push_arguments (gdbarch, m68hc11_push_arguments);
@@ -1368,7 +1368,7 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
- set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+ set_gdbarch_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
set_gdbarch_store_struct_return (gdbarch, m68hc11_store_struct_return);
set_gdbarch_deprecated_store_return_value (gdbarch, m68hc11_store_return_value);
diff --git a/gdb/macrotab.c b/gdb/macrotab.c
index accaa7dad83..5bc5b7327da 100644
--- a/gdb/macrotab.c
+++ b/gdb/macrotab.c
@@ -445,7 +445,7 @@ macro_include (struct macro_source_file *source,
should tolerate bad debug info. So:
First, squawk. */
- static struct complaint bogus_inclusion_line = {
+ static struct deprecated_complaint bogus_inclusion_line = {
"both `%s' and `%s' allegedly #included at %s:%d", 0, 0
};
@@ -707,7 +707,7 @@ check_for_redefinition (struct macro_source_file *source, int line,
if (! same)
{
- static struct complaint macro_redefined = {
+ static struct deprecated_complaint macro_redefined = {
"macro `%s' redefined at %s:%d; original definition at %s:%d",
0, 0
};
@@ -801,7 +801,7 @@ macro_undef (struct macro_source_file *source, int line,
if (key->end_file)
{
- static struct complaint double_undef = {
+ static struct deprecated_complaint double_undef = {
"macro '%s' is #undefined twice, at %s:%d and %s:%d",
0, 0
};
@@ -820,7 +820,7 @@ macro_undef (struct macro_source_file *source, int line,
has no macro definition in scope is ignored. So we should
ignore it too. */
#if 0
- static struct complaint no_macro_to_undefine = {
+ static struct deprecated_complaint no_macro_to_undefine = {
"no definition for macro `%s' in scope to #undef at %s:%d",
0, 0
};
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 1695afdf178..cdf800d67b8 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -143,94 +143,94 @@ struct symloc
/* Various complaints about symbol reading that don't abort the process */
-static struct complaint bad_file_number_complaint =
+static struct deprecated_complaint bad_file_number_complaint =
{"bad file number %d", 0, 0};
-static struct complaint index_complaint =
+static struct deprecated_complaint index_complaint =
{"bad aux index at symbol %s", 0, 0};
-static struct complaint aux_index_complaint =
+static struct deprecated_complaint aux_index_complaint =
{"bad proc end in aux found from symbol %s", 0, 0};
-static struct complaint block_index_complaint =
+static struct deprecated_complaint block_index_complaint =
{"bad aux index at block symbol %s", 0, 0};
-static struct complaint unknown_ext_complaint =
+static struct deprecated_complaint unknown_ext_complaint =
{"unknown external symbol %s", 0, 0};
-static struct complaint unknown_sym_complaint =
+static struct deprecated_complaint unknown_sym_complaint =
{"unknown local symbol %s", 0, 0};
-static struct complaint unknown_st_complaint =
+static struct deprecated_complaint unknown_st_complaint =
{"with type %d", 0, 0};
-static struct complaint block_overflow_complaint =
+static struct deprecated_complaint block_overflow_complaint =
{"block containing %s overfilled", 0, 0};
-static struct complaint basic_type_complaint =
+static struct deprecated_complaint basic_type_complaint =
{"cannot map ECOFF basic type 0x%x for %s", 0, 0};
-static struct complaint unknown_type_qual_complaint =
+static struct deprecated_complaint unknown_type_qual_complaint =
{"unknown type qualifier 0x%x", 0, 0};
-static struct complaint array_index_type_complaint =
+static struct deprecated_complaint array_index_type_complaint =
{"illegal array index type for %s, assuming int", 0, 0};
-static struct complaint bad_tag_guess_complaint =
+static struct deprecated_complaint bad_tag_guess_complaint =
{"guessed tag type of %s incorrectly", 0, 0};
-static struct complaint block_member_complaint =
+static struct deprecated_complaint block_member_complaint =
{"declaration block contains unhandled symbol type %d", 0, 0};
-static struct complaint stEnd_complaint =
+static struct deprecated_complaint stEnd_complaint =
{"stEnd with storage class %d not handled", 0, 0};
-static struct complaint unknown_mdebug_symtype_complaint =
+static struct deprecated_complaint unknown_mdebug_symtype_complaint =
{"unknown symbol type 0x%x", 0, 0};
-static struct complaint stab_unknown_complaint =
+static struct deprecated_complaint stab_unknown_complaint =
{"unknown stabs symbol %s", 0, 0};
-static struct complaint pdr_for_nonsymbol_complaint =
+static struct deprecated_complaint pdr_for_nonsymbol_complaint =
{"PDR for %s, but no symbol", 0, 0};
-static struct complaint pdr_static_symbol_complaint =
+static struct deprecated_complaint pdr_static_symbol_complaint =
{"can't handle PDR for static proc at 0x%lx", 0, 0};
-static struct complaint bad_setjmp_pdr_complaint =
+static struct deprecated_complaint bad_setjmp_pdr_complaint =
{"fixing bad setjmp PDR from libc", 0, 0};
-static struct complaint bad_fbitfield_complaint =
+static struct deprecated_complaint bad_fbitfield_complaint =
{"can't handle TIR fBitfield for %s", 0, 0};
-static struct complaint bad_continued_complaint =
+static struct deprecated_complaint bad_continued_complaint =
{"illegal TIR continued for %s", 0, 0};
-static struct complaint bad_rfd_entry_complaint =
+static struct deprecated_complaint bad_rfd_entry_complaint =
{"bad rfd entry for %s: file %d, index %d", 0, 0};
-static struct complaint unexpected_type_code_complaint =
+static struct deprecated_complaint unexpected_type_code_complaint =
{"unexpected type code for %s", 0, 0};
-static struct complaint unable_to_cross_ref_complaint =
+static struct deprecated_complaint unable_to_cross_ref_complaint =
{"unable to cross ref btTypedef for %s", 0, 0};
-static struct complaint bad_indirect_xref_complaint =
+static struct deprecated_complaint bad_indirect_xref_complaint =
{"unable to cross ref btIndirect for %s", 0, 0};
-static struct complaint illegal_forward_tq0_complaint =
+static struct deprecated_complaint illegal_forward_tq0_complaint =
{"illegal tq0 in forward typedef for %s", 0, 0};
-static struct complaint illegal_forward_bt_complaint =
+static struct deprecated_complaint illegal_forward_bt_complaint =
{"illegal bt %d in forward typedef for %s", 0, 0};
-static struct complaint bad_linetable_guess_complaint =
+static struct deprecated_complaint bad_linetable_guess_complaint =
{"guessed size of linetable for %s incorrectly", 0, 0};
-static struct complaint bad_ext_ifd_complaint =
+static struct deprecated_complaint bad_ext_ifd_complaint =
{"bad ifd for external symbol: %d (max %d)", 0, 0};
-static struct complaint bad_ext_iss_complaint =
+static struct deprecated_complaint bad_ext_iss_complaint =
{"bad iss for external symbol: %ld (max %ld)", 0, 0};
/* Macros and extra defs */
@@ -2720,7 +2720,7 @@ parse_partial_symbols (struct objfile *objfile)
switch (type_code)
{
- static struct complaint function_outside_compilation_unit = {
+ static struct deprecated_complaint function_outside_compilation_unit = {
"function `%s' appears to be defined outside of all compilation units", 0, 0
};
char *p;
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index d895a044529..3a59321263d 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -151,6 +151,55 @@
(mi_init_ui): Remove.
(_initialize_mi_main): Remove. No longer needed.
+2002-10-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * mi-cmd-var.c: Change all remaining occurrences of ui_out_tuple_begin
+ to make_cleanup_ui_out_tuple_begin_end. Change all remaining
+ occurrences of ui_out_list_begin to make_cleanup_ui_out_list_begin_end.
+ Use do_cleanups instead of ui_out_list_end or ui_out_tuple_end. This
+ is a fix for PR gdb/680.
+ * mi-cmd-stack.c: Ditto.
+ * mi-main.c: Ditto.
+
+2002-10-22 Keith Seitz <keiths@redhat.com>
+
+ * mi-main.c (mi_cmd_thread_select): Only return MI_CMD_CAUGHT_ERROR
+ when we really did catch an error(). If we got GDB_RC_FAIL, return
+ MI_CMD_ERROR instead.
+
+2002-10-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * gdbmi.texinfo: Fix examples that show frames to remove
+ extraneous blank in level field. Part of fix for PR gdb/192.
+
+2002-10-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * mi-cmd-var.c (mi_cmd_var_update): Fix for PR gdb/672. For m2,
+ output list begin and end for "changelist" rather than tuple begin/end.
+ (varobj_update_one): For m2, add tuple begin and end for varobj
+ update output.
+
+2002-10-02 Elena Zannoni <ezannoni@redhat.com>
+
+ * mi-main.c (mi_cmd_exec_return): Don't use
+ return_command_wrapper, use return_command instead.
+ (mi_cmd_exec_interrupt): Don't use
+ interrupt_target_command_wrapper, use interrupt_target_command
+ instead.
+ (return_command_wrapper, interrupt_target_command_wrapper):
+ Delete.
+ Include frame.h.
+
+2002-10-01 Andrew Cagney <ac131313@redhat.com>
+
+ * mi-main.c (mi2_command_loop): New function.
+ (mi0_command_loop): Delete function.
+ (_initialize_mi_main): Recognize, and default to, "mi2". Do not
+ recognize "mi0".
+ * mi-out.c (mi_table_begin): Remove mi0 code.
+ (mi_table_body, mi_table_end): Ditto.
+ (mi_table_header, mi_open, mi_close): Ditto.
+
2002-09-29 Andrew Cagney <ac131313@redhat.com>
* mi-out.c (mi_version): New function.
diff --git a/gdb/mi/gdbmi.texinfo b/gdb/mi/gdbmi.texinfo
index 6efedd32ee3..0d65c8b9717 100644
--- a/gdb/mi/gdbmi.texinfo
+++ b/gdb/mi/gdbmi.texinfo
@@ -2074,7 +2074,7 @@ file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@}
205^done
(@value{GDBP})
111-exec-return
-111^done,frame=@{level="0 ",func="callee3",
+111^done,frame=@{level="0",func="callee3",
args=[@{name="strarg",
value="0x11940 \"A string argument.\""@}],
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
@@ -2709,15 +2709,15 @@ functionality of @samp{-stack-list-arguments}.
-stack-list-frames
^done,
stack=[
-frame=@{level="0 ",addr="0x00010734",func="callee4",
+frame=@{level="0",addr="0x00010734",func="callee4",
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@},
-frame=@{level="1 ",addr="0x0001076c",func="callee3",
+frame=@{level="1",addr="0x0001076c",func="callee3",
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="17"@},
-frame=@{level="2 ",addr="0x0001078c",func="callee2",
+frame=@{level="2",addr="0x0001078c",func="callee2",
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="22"@},
-frame=@{level="3 ",addr="0x000107b4",func="callee1",
+frame=@{level="3",addr="0x000107b4",func="callee1",
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="27"@},
-frame=@{level="4 ",addr="0x000107e0",func="main",
+frame=@{level="4",addr="0x000107e0",func="main",
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="32"@}]
(@value{GDBP})
-stack-list-arguments 0
@@ -2799,25 +2799,25 @@ Full stack backtrace:
(@value{GDBP})
-stack-list-frames
^done,stack=
-[frame=@{level="0 ",addr="0x0001076c",func="foo",
+[frame=@{level="0",addr="0x0001076c",func="foo",
file="recursive2.c",line="11"@},
-frame=@{level="1 ",addr="0x000107a4",func="foo",
+frame=@{level="1",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"@},
-frame=@{level="2 ",addr="0x000107a4",func="foo",
+frame=@{level="2",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"@},
-frame=@{level="3 ",addr="0x000107a4",func="foo",
+frame=@{level="3",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"@},
-frame=@{level="4 ",addr="0x000107a4",func="foo",
+frame=@{level="4",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"@},
-frame=@{level="5 ",addr="0x000107a4",func="foo",
+frame=@{level="5",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"@},
-frame=@{level="6 ",addr="0x000107a4",func="foo",
+frame=@{level="6",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"@},
-frame=@{level="7 ",addr="0x000107a4",func="foo",
+frame=@{level="7",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"@},
-frame=@{level="8 ",addr="0x000107a4",func="foo",
+frame=@{level="8",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"@},
-frame=@{level="9 ",addr="0x000107a4",func="foo",
+frame=@{level="9",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"@},
frame=@{level="10",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"@},
@@ -2832,11 +2832,11 @@ Show frames between @var{low_frame} and @var{high_frame}:
(@value{GDBP})
-stack-list-frames 3 5
^done,stack=
-[frame=@{level="3 ",addr="0x000107a4",func="foo",
+[frame=@{level="3",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"@},
-frame=@{level="4 ",addr="0x000107a4",func="foo",
+frame=@{level="4",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"@},
-frame=@{level="5 ",addr="0x000107a4",func="foo",
+frame=@{level="5",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"@}]
(@value{GDBP})
@end smallexample
@@ -2847,7 +2847,7 @@ Show a single frame:
(@value{GDBP})
-stack-list-frames 3 3
^done,stack=
-[frame=@{level="3 ",addr="0x000107a4",func="foo",
+[frame=@{level="3",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"@}]
(@value{GDBP})
@end smallexample
@@ -3510,7 +3510,7 @@ number-of-threads="3"
(@value{GDBP})
-thread-select 3
^done,new-thread-id="3",
-frame=@{level="0 ",func="vprintf",
+frame=@{level="0",func="vprintf",
args=[@{name="format",value="0x8048e9c \"%*s%c %d %c\\n\""@},
@{name="arg",value="0x2"@}],file="vprintf.c",line="31"@}
(@value{GDBP})
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index da6f7496b2a..a4cea3e9aae 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -46,6 +46,7 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc)
int frame_low;
int frame_high;
int i;
+ struct cleanup *cleanup_stack;
struct frame_info *fi;
if (!target_has_stack)
@@ -77,7 +78,7 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc)
if (fi == NULL)
error ("mi_cmd_stack_list_frames: Not enough frames in stack.");
- ui_out_list_begin (uiout, "stack");
+ cleanup_stack = make_cleanup_ui_out_list_begin_end (uiout, "stack");
/* Now let;s print the frames up to frame_high, or until there are
frames in the stack. */
@@ -96,7 +97,7 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc)
0 /* args */ );
}
- ui_out_list_end (uiout);
+ do_cleanups (cleanup_stack);
if (i < frame_high)
error ("mi_cmd_stack_list_frames: Not enough frames in stack.");
@@ -156,6 +157,7 @@ mi_cmd_stack_list_args (char *command, char **argv, int argc)
int frame_high;
int i;
struct frame_info *fi;
+ struct cleanup *cleanup_stack_args;
if (argc < 1 || argc > 3 || argc == 2)
error ("mi_cmd_stack_list_args: Usage: PRINT_VALUES [FRAME_LOW FRAME_HIGH]");
@@ -183,7 +185,7 @@ mi_cmd_stack_list_args (char *command, char **argv, int argc)
if (fi == NULL)
error ("mi_cmd_stack_list_args: Not enough frames in stack.");
- ui_out_list_begin (uiout, "stack-args");
+ cleanup_stack_args = make_cleanup_ui_out_list_begin_end (uiout, "stack-args");
/* Now let's print the frames up to frame_high, or until there are
frames in the stack. */
@@ -191,14 +193,15 @@ mi_cmd_stack_list_args (char *command, char **argv, int argc)
fi && (i <= frame_high || frame_high == -1);
i++, fi = get_prev_frame (fi))
{
+ struct cleanup *cleanup_frame;
QUIT;
- ui_out_tuple_begin (uiout, "frame");
+ cleanup_frame = make_cleanup_ui_out_tuple_begin_end (uiout, "frame");
ui_out_field_int (uiout, "level", i);
list_args_or_locals (0, atoi (argv[0]), fi);
- ui_out_tuple_end (uiout);
+ do_cleanups (cleanup_frame);
}
- ui_out_list_end (uiout);
+ do_cleanups (cleanup_stack_args);
if (i < frame_high)
error ("mi_cmd_stack_list_args: Not enough frames in stack.");
@@ -215,13 +218,14 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
struct block *block;
struct symbol *sym;
int i, nsyms;
+ struct cleanup *cleanup_list;
static struct ui_stream *stb = NULL;
stb = ui_out_stream_new (uiout);
block = get_frame_block (fi, 0);
- ui_out_list_begin (uiout, locals ? "locals" : "args");
+ cleanup_list = make_cleanup_ui_out_list_begin_end (uiout, locals ? "locals" : "args");
while (block != 0)
{
@@ -263,8 +267,10 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
}
if (print_me)
{
+ struct cleanup *cleanup_tuple = NULL;
if (values)
- ui_out_tuple_begin (uiout, NULL);
+ cleanup_tuple =
+ make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
ui_out_field_string (uiout, "name", SYMBOL_NAME (sym));
if (values)
@@ -279,7 +285,7 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
sym2 = sym;
print_variable_value (sym2, fi, stb->stream);
ui_out_field_stream (uiout, "value", stb);
- ui_out_tuple_end (uiout);
+ do_cleanups (cleanup_tuple);
}
}
}
@@ -288,7 +294,7 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
else
block = BLOCK_SUPERBLOCK (block);
}
- ui_out_list_end (uiout);
+ do_cleanups (cleanup_list);
ui_out_stream_delete (stb);
}
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index cb5e939e9f1..ee65deb773f 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -254,6 +254,7 @@ mi_cmd_var_list_children (char *command, char **argv, int argc)
struct varobj *var;
struct varobj **childlist;
struct varobj **cc;
+ struct cleanup *cleanup_children;
int numchild;
char *type;
@@ -271,11 +272,12 @@ mi_cmd_var_list_children (char *command, char **argv, int argc)
if (numchild <= 0)
return MI_CMD_DONE;
- ui_out_tuple_begin (uiout, "children");
+ cleanup_children = make_cleanup_ui_out_tuple_begin_end (uiout, "children");
cc = childlist;
while (*cc != NULL)
{
- ui_out_tuple_begin (uiout, "child");
+ struct cleanup *cleanup_child;
+ cleanup_child = make_cleanup_ui_out_tuple_begin_end (uiout, "child");
ui_out_field_string (uiout, "name", varobj_get_objname (*cc));
ui_out_field_string (uiout, "exp", varobj_get_expression (*cc));
ui_out_field_int (uiout, "numchild", varobj_get_num_children (*cc));
@@ -283,10 +285,10 @@ mi_cmd_var_list_children (char *command, char **argv, int argc)
/* C++ pseudo-variables (public, private, protected) do not have a type */
if (type)
ui_out_field_string (uiout, "type", varobj_get_type (*cc));
- ui_out_tuple_end (uiout);
+ do_cleanups (cleanup_child);
cc++;
}
- ui_out_tuple_end (uiout);
+ do_cleanups (cleanup_children);
xfree (childlist);
return MI_CMD_DONE;
}
@@ -405,6 +407,7 @@ mi_cmd_var_update (char *command, char **argv, int argc)
struct varobj *var;
struct varobj **rootlist;
struct varobj **cr;
+ struct cleanup *cleanup;
char *name;
int nv;
@@ -419,10 +422,13 @@ mi_cmd_var_update (char *command, char **argv, int argc)
if ((*name == '*') && (*(name + 1) == '\0'))
{
nv = varobj_list (&rootlist);
- ui_out_tuple_begin (uiout, "changelist");
+ if (mi_version (uiout) <= 1)
+ cleanup = make_cleanup_ui_out_tuple_begin_end (uiout, "changelist");
+ else
+ cleanup = make_cleanup_ui_out_list_begin_end (uiout, "changelist");
if (nv <= 0)
{
- ui_out_tuple_end (uiout);
+ do_cleanups (cleanup);
return MI_CMD_DONE;
}
cr = rootlist;
@@ -432,7 +438,7 @@ mi_cmd_var_update (char *command, char **argv, int argc)
cr++;
}
xfree (rootlist);
- ui_out_tuple_end (uiout);
+ do_cleanups (cleanup);
}
else
{
@@ -441,9 +447,12 @@ mi_cmd_var_update (char *command, char **argv, int argc)
if (var == NULL)
error ("mi_cmd_var_update: Variable object not found");
- ui_out_tuple_begin (uiout, "changelist");
+ if (mi_version (uiout) <= 1)
+ cleanup = make_cleanup_ui_out_tuple_begin_end (uiout, "changelist");
+ else
+ cleanup = make_cleanup_ui_out_list_begin_end (uiout, "changelist");
varobj_update_one (var);
- ui_out_tuple_end (uiout);
+ do_cleanups (cleanup);
}
return MI_CMD_DONE;
}
@@ -457,6 +466,7 @@ varobj_update_one (struct varobj *var)
{
struct varobj **changelist;
struct varobj **cc;
+ struct cleanup *cleanup = NULL;
int nc;
nc = varobj_update (&var, &changelist);
@@ -469,17 +479,25 @@ varobj_update_one (struct varobj *var)
return 1;
else if (nc == -1)
{
+ if (mi_version (uiout) > 1)
+ cleanup = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
ui_out_field_string (uiout, "name", varobj_get_objname(var));
ui_out_field_string (uiout, "in_scope", "false");
+ if (mi_version (uiout) > 1)
+ do_cleanups (cleanup);
return -1;
}
else if (nc == -2)
{
+ if (mi_version (uiout) > 1)
+ cleanup = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
ui_out_field_string (uiout, "name", varobj_get_objname (var));
ui_out_field_string (uiout, "in_scope", "true");
ui_out_field_string (uiout, "new_type", varobj_get_type(var));
ui_out_field_int (uiout, "new_num_children",
varobj_get_num_children(var));
+ if (mi_version (uiout) > 1)
+ do_cleanups (cleanup);
}
else
{
@@ -487,9 +505,13 @@ varobj_update_one (struct varobj *var)
cc = changelist;
while (*cc != NULL)
{
+ if (mi_version (uiout) > 1)
+ cleanup = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
ui_out_field_string (uiout, "name", varobj_get_objname (*cc));
ui_out_field_string (uiout, "in_scope", "true");
ui_out_field_string (uiout, "type_changed", "false");
+ if (mi_version (uiout) > 1)
+ do_cleanups (cleanup);
cc++;
}
xfree (changelist);
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 533c2fbd9c4..5e2f4cc08c9 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -40,6 +40,8 @@
#include "value.h" /* for write_register_bytes() */
#include "regcache.h"
#include "gdb.h"
+#include "frame.h"
+
#include <ctype.h>
#include <sys/time.h>
@@ -98,12 +100,6 @@ void mi_load_progress (const char *section_name,
unsigned long total_sent,
unsigned long grand_total);
-/* FIXME: these should go in some .h file, but infcmd.c doesn't have a
- corresponding .h file. These wrappers will be obsolete anyway, once
- we pull the plug on the sanitization. */
-extern void interrupt_target_command_wrapper (char *, int);
-extern void return_command_wrapper (char *, int);
-
/* A helper function which will set mi_error_message to error_last_message. */
void
mi_error_last_message (void)
@@ -187,11 +183,11 @@ mi_cmd_exec_return (char *args, int from_tty)
if (*args)
/* Call return_command with from_tty argument equal to 0 so as to
avoid being queried. */
- return_command_wrapper (args, 0);
+ return_command (args, 0);
else
/* Call return_command with from_tty argument equal to 0 so as to
avoid being queried. */
- return_command_wrapper (NULL, 0);
+ return_command (NULL, 0);
/* Because we have called return_command with from_tty = 0, we need
to print the frame here. */
@@ -223,7 +219,7 @@ mi_cmd_exec_interrupt (char *args, int from_tty)
"mi_cmd_exec_interrupt: Inferior not executing.");
return MI_CMD_ERROR;
}
- interrupt_target_command_wrapper (args, from_tty);
+ interrupt_target_command (args, from_tty);
if (last_async_command)
fputs_unfiltered (last_async_command, raw_stdout);
fputs_unfiltered ("^done", raw_stdout);
@@ -252,8 +248,12 @@ mi_cmd_thread_select (char *command, char **argv, int argc)
else
rc = gdb_thread_select (uiout, argv[0]);
- if (rc == GDB_RC_FAIL)
+ /* RC is enum gdb_rc if it is successful (>=0)
+ enum return_reason if not (<0). */
+ if ((int) rc < 0 && (enum return_reason) rc == RETURN_ERROR)
return MI_CMD_CAUGHT_ERROR;
+ else if ((int) rc >= 0 && rc == GDB_RC_FAIL)
+ return MI_CMD_ERROR;
else
return MI_CMD_DONE;
}
@@ -923,19 +923,22 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
/* Build the result as a two dimentional table. */
{
struct ui_stream *stream = ui_out_stream_new (uiout);
+ struct cleanup *cleanup_list_memory;
int row;
int row_byte;
- ui_out_list_begin (uiout, "memory");
+ cleanup_list_memory = make_cleanup_ui_out_list_begin_end (uiout, "memory");
for (row = 0, row_byte = 0;
row < nr_rows;
row++, row_byte += nr_cols * word_size)
{
int col;
int col_byte;
- ui_out_tuple_begin (uiout, NULL);
+ struct cleanup *cleanup_tuple;
+ struct cleanup *cleanup_list_data;
+ cleanup_tuple = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
ui_out_field_core_addr (uiout, "addr", addr + row_byte);
/* ui_out_field_core_addr_symbolic (uiout, "saddr", addr + row_byte); */
- ui_out_list_begin (uiout, "data");
+ cleanup_list_data = make_cleanup_ui_out_list_begin_end (uiout, "data");
for (col = 0, col_byte = row_byte;
col < nr_cols;
col++, col_byte += word_size)
@@ -952,7 +955,7 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
ui_out_field_stream (uiout, NULL, stream);
}
}
- ui_out_list_end (uiout);
+ do_cleanups (cleanup_list_data);
if (aschar)
{
int byte;
@@ -972,10 +975,10 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
}
ui_out_field_stream (uiout, "ascii", stream);
}
- ui_out_tuple_end (uiout);
+ do_cleanups (cleanup_tuple);
}
ui_out_stream_delete (stream);
- ui_out_list_end (uiout);
+ do_cleanups (cleanup_list_memory);
}
do_cleanups (cleanups);
return MI_CMD_DONE;
@@ -1429,17 +1432,18 @@ mi_load_progress (const char *section_name,
strcmp (previous_sect_name, section_name) : 1);
if (new_section)
{
+ struct cleanup *cleanup_tuple;
xfree (previous_sect_name);
previous_sect_name = xstrdup (section_name);
if (last_async_command)
fputs_unfiltered (last_async_command, raw_stdout);
fputs_unfiltered ("+download", raw_stdout);
- ui_out_tuple_begin (uiout, NULL);
+ cleanup_tuple = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
ui_out_field_string (uiout, "section", section_name);
ui_out_field_int (uiout, "section-size", total_section);
ui_out_field_int (uiout, "total-size", grand_total);
- ui_out_tuple_end (uiout);
+ do_cleanups (cleanup_tuple);
mi_out_put (uiout, raw_stdout);
fputs_unfiltered ("\n", raw_stdout);
gdb_flush (raw_stdout);
@@ -1448,26 +1452,96 @@ mi_load_progress (const char *section_name,
if (delta.tv_sec >= update_threshold.tv_sec &&
delta.tv_usec >= update_threshold.tv_usec)
{
+ struct cleanup *cleanup_tuple;
last_update.tv_sec = time_now.tv_sec;
last_update.tv_usec = time_now.tv_usec;
if (last_async_command)
fputs_unfiltered (last_async_command, raw_stdout);
fputs_unfiltered ("+download", raw_stdout);
- ui_out_tuple_begin (uiout, NULL);
+ cleanup_tuple = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
ui_out_field_string (uiout, "section", section_name);
ui_out_field_int (uiout, "section-sent", sent_so_far);
ui_out_field_int (uiout, "section-size", total_section);
ui_out_field_int (uiout, "total-sent", total_sent);
ui_out_field_int (uiout, "total-size", grand_total);
- ui_out_tuple_end (uiout);
+ do_cleanups (cleanup_tuple);
mi_out_put (uiout, raw_stdout);
fputs_unfiltered ("\n", raw_stdout);
gdb_flush (raw_stdout);
}
}
-void
-mi_setup_architecture_data (void)
+static void
+mi_command_loop (int mi_version)
+{
+ /* HACK: Force stdout/stderr to point at the console. This avoids
+ any potential side effects caused by legacy code that is still
+ using the TUI / fputs_unfiltered_hook */
+ raw_stdout = stdio_fileopen (stdout);
+ /* Route normal output through the MIx */
+ gdb_stdout = mi_console_file_new (raw_stdout, "~");
+ /* Route error and log output through the MI */
+ gdb_stderr = mi_console_file_new (raw_stdout, "&");
+ gdb_stdlog = gdb_stderr;
+ /* Route target output through the MI. */
+ gdb_stdtarg = mi_console_file_new (raw_stdout, "@");
+
+ /* HACK: Poke the ui_out table directly. Should we be creating a
+ mi_out object wired up to the above gdb_stdout / gdb_stderr? */
+ uiout = mi_out_new (mi_version);
+
+ /* HACK: Override any other interpreter hooks. We need to create a
+ real event table and pass in that. */
+ init_ui_hook = 0;
+ /* command_loop_hook = 0; */
+ print_frame_info_listing_hook = 0;
+ query_hook = 0;
+ warning_hook = 0;
+ create_breakpoint_hook = 0;
+ delete_breakpoint_hook = 0;
+ modify_breakpoint_hook = 0;
+ interactive_hook = 0;
+ registers_changed_hook = 0;
+ readline_begin_hook = 0;
+ readline_hook = 0;
+ readline_end_hook = 0;
+ register_changed_hook = 0;
+ memory_changed_hook = 0;
+ context_hook = 0;
+ target_wait_hook = 0;
+ call_command_hook = 0;
+ error_hook = 0;
+ error_begin_hook = 0;
+ show_load_progress = mi_load_progress;
+
+ /* Turn off 8 bit strings in quoted output. Any character with the
+ high bit set is printed using C's octal format. */
+ sevenbit_strings = 1;
+
+ /* Tell the world that we're alive */
+ fputs_unfiltered ("(gdb) \n", raw_stdout);
+ gdb_flush (raw_stdout);
+
+ if (!event_loop_p)
+ simplified_command_loop (mi_input, mi_execute_command);
+ else
+ start_event_loop ();
+}
+
+static void
+mi1_command_loop (void)
+{
+ mi_command_loop (1);
+}
+
+static void
+mi2_command_loop (void)
+{
+ mi_command_loop (2);
+}
+
+static void
+setup_architecture_data (void)
{
/* don't trust REGISTER_BYTES to be zero. */
old_regs = xmalloc (REGISTER_BYTES + 1);
@@ -1477,6 +1551,21 @@ mi_setup_architecture_data (void)
void
mi_register_gdbarch_swap (void)
{
+ if (interpreter_p == NULL)
+ return;
+
+ /* If we're _the_ interpreter, take control. */
+ if (strcmp (interpreter_p, "mi") == 0)
+ command_loop_hook = mi2_command_loop;
+ else if (strcmp (interpreter_p, "mi1") == 0)
+ command_loop_hook = mi1_command_loop;
+ else if (strcmp (interpreter_p, "mi2") == 0)
+ command_loop_hook = mi2_command_loop;
+ else
+ return;
+
+ init_ui_hook = mi_init_ui;
+ setup_architecture_data ();
register_gdbarch_swap (&old_regs, sizeof (old_regs), NULL);
register_gdbarch_swap (NULL, 0, mi_setup_architecture_data);
}
diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c
index f7ed7ecfbdc..f7156ca9c59 100644
--- a/gdb/mi/mi-out.c
+++ b/gdb/mi/mi-out.c
@@ -109,14 +109,6 @@ mi_table_begin (struct ui_out *uiout,
{
struct ui_out_data *data = ui_out_data (uiout);
mi_open (uiout, tblid, ui_out_type_tuple);
- if (data->mi_version == 0)
- {
- if (nr_rows == 0)
- data->suppress_output = 1;
- else
- mi_open (uiout, "hdr", ui_out_type_list);
- return;
- }
mi_field_int (uiout, -1/*fldno*/, -1/*width*/, -1/*alin*/,
"nr_rows", nr_rows);
mi_field_int (uiout, -1/*fldno*/, -1/*width*/, -1/*alin*/,
@@ -134,8 +126,6 @@ mi_table_body (struct ui_out *uiout)
return;
/* close the table header line if there were any headers */
mi_close (uiout, ui_out_type_list);
- if (data->mi_version == 0)
- return;
mi_open (uiout, "body", ui_out_type_list);
}
@@ -146,11 +136,6 @@ mi_table_end (struct ui_out *uiout)
{
struct ui_out_data *data = ui_out_data (uiout);
data->suppress_output = 0;
- if (data->mi_version == 0)
- {
- mi_close (uiout, ui_out_type_tuple);
- return;
- }
mi_close (uiout, ui_out_type_list); /* body */
mi_close (uiout, ui_out_type_tuple);
}
@@ -165,11 +150,6 @@ mi_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
struct ui_out_data *data = ui_out_data (uiout);
if (data->suppress_output)
return;
- if (data->mi_version == 0)
- {
- mi_field_string (uiout, 0, width, alignment, 0, colhdr);
- return;
- }
mi_open (uiout, NULL, ui_out_type_tuple);
mi_field_int (uiout, 0, 0, 0, "width", width);
mi_field_int (uiout, 0, 0, 0, "alignment", alignment);
@@ -361,10 +341,7 @@ mi_open (struct ui_out *uiout,
fputc_unfiltered ('{', data->buffer);
break;
case ui_out_type_list:
- if (data->mi_version == 0)
- fputc_unfiltered ('{', data->buffer);
- else
- fputc_unfiltered ('[', data->buffer);
+ fputc_unfiltered ('[', data->buffer);
break;
default:
internal_error (__FILE__, __LINE__, "bad switch");
@@ -382,10 +359,7 @@ mi_close (struct ui_out *uiout,
fputc_unfiltered ('}', data->buffer);
break;
case ui_out_type_list:
- if (data->mi_version == 0)
- fputc_unfiltered ('}', data->buffer);
- else
- fputc_unfiltered (']', data->buffer);
+ fputc_unfiltered (']', data->buffer);
break;
default:
internal_error (__FILE__, __LINE__, "bad switch");
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
index 454520d35e7..a0469f6f9f3 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -29,6 +29,8 @@
int
mips_linux_cannot_fetch_register (int regno)
{
+ if (REGISTER_NAME (regno)[0] == 0)
+ return 1;
if (regno == PS_REGNUM)
return 1;
else if (regno == ZERO_REGNUM)
@@ -40,6 +42,8 @@ mips_linux_cannot_fetch_register (int regno)
int
mips_linux_cannot_store_register (int regno)
{
+ if (REGISTER_NAME (regno)[0] == 0)
+ return 1;
if (regno == PS_REGNUM)
return 1;
else if (regno == ZERO_REGNUM)
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 95b288ce6da..7071c108707 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -1704,7 +1704,14 @@ mips_frame_saved_pc (struct frame_info *frame)
int pcreg = frame->signal_handler_caller ? PC_REGNUM
: (proc_desc ? PROC_PC_REG (proc_desc) : RA_REGNUM);
- if (proc_desc && PROC_DESC_IS_DUMMY (proc_desc))
+ if (USE_GENERIC_DUMMY_FRAMES
+ && PC_IN_CALL_DUMMY (frame->pc, 0, 0))
+ {
+ LONGEST tmp;
+ frame_unwind_signed_register (frame, PC_REGNUM, &tmp);
+ saved_pc = tmp;
+ }
+ else if (proc_desc && PROC_DESC_IS_DUMMY (proc_desc))
saved_pc = read_memory_integer (frame->frame - MIPS_SAVED_REGSIZE, MIPS_SAVED_REGSIZE);
else
saved_pc = read_next_frame_reg (frame, pcreg);
@@ -2421,6 +2428,15 @@ mips_frame_chain (struct frame_info *frame)
if ((tmp = SKIP_TRAMPOLINE_CODE (saved_pc)) != 0)
saved_pc = tmp;
+ if (USE_GENERIC_DUMMY_FRAMES
+ && PC_IN_CALL_DUMMY (saved_pc, 0, 0))
+ {
+ /* A dummy frame, uses SP not FP. Get the old SP value. If all
+ is well, frame->frame the bottom of the current frame will
+ contain that value. */
+ return frame->frame;
+ }
+
/* Look up the procedure descriptor for this PC. */
proc_desc = find_proc_desc (saved_pc, frame, 1);
if (!proc_desc)
@@ -2436,8 +2452,10 @@ mips_frame_chain (struct frame_info *frame)
/* The previous frame from a sigtramp frame might be frameless
and have frame size zero. */
&& !frame->signal_handler_caller
- /* Check if this is a call dummy frame. */
- && frame->pc != CALL_DUMMY_ADDRESS ())
+ /* For a generic dummy frame, let get_frame_pointer() unwind a
+ register value saved as part of the dummy frame call. */
+ && !(USE_GENERIC_DUMMY_FRAMES
+ && PC_IN_CALL_DUMMY (frame->pc, 0, 0)))
return 0;
else
return get_frame_pointer (frame, proc_desc);
@@ -2467,6 +2485,15 @@ mips_init_extra_frame_info (int fromleaf, struct frame_info *fci)
if (fci->pc == PROC_LOW_ADDR (proc_desc)
&& !PROC_DESC_IS_DUMMY (proc_desc))
fci->frame = read_next_frame_reg (fci->next, SP_REGNUM);
+ else if (USE_GENERIC_DUMMY_FRAMES
+ && PC_IN_CALL_DUMMY (fci->pc, 0, 0))
+ /* Do not ``fix'' fci->frame. It will have the value of the
+ generic dummy frame's top-of-stack (since the draft
+ fci->frame is obtained by returning the unwound stack
+ pointer) and that is what we want. That way the fci->frame
+ value will match the top-of-stack value that was saved as
+ part of the dummy frames data. */
+ /* Do nothing. */;
else
fci->frame = get_frame_pointer (fci->next, proc_desc);
@@ -3691,7 +3718,7 @@ mips_push_register (CORE_ADDR * sp, int regno)
offset = 0;
}
*sp -= regsize;
- read_register_gen (regno, buffer);
+ deprecated_read_register_gen (regno, buffer);
write_memory (*sp, buffer + offset, regsize);
}
@@ -3783,9 +3810,16 @@ mips_pop_frame (void)
register int regnum;
struct frame_info *frame = get_current_frame ();
CORE_ADDR new_sp = FRAME_FP (frame);
-
mips_extra_func_info_t proc_desc = frame->extra_info->proc_desc;
+ if (USE_GENERIC_DUMMY_FRAMES
+ && PC_IN_CALL_DUMMY (frame->pc, 0, 0))
+ {
+ generic_pop_dummy_frame ();
+ flush_cached_frames ();
+ return;
+ }
+
write_register (PC_REGNUM, FRAME_SAVED_PC (frame));
if (frame->saved_regs == NULL)
FRAME_INIT_SAVED_REGS (frame);
@@ -5558,7 +5592,7 @@ mips_find_abi_section (bfd *abfd, asection *sect, void *obj)
*abip = MIPS_ABI_O32;
else if (strcmp (name, ".mdebug.abiN32") == 0)
*abip = MIPS_ABI_N32;
- else if (strcmp (name, ".mdebug.abiN64") == 0)
+ else if (strcmp (name, ".mdebug.abi64") == 0)
*abip = MIPS_ABI_N64;
else if (strcmp (name, ".mdebug.abiO64") == 0)
*abip = MIPS_ABI_O64;
@@ -5956,22 +5990,38 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
+#if OLD_STYLE_MIPS_DUMMY_FRAMES
set_gdbarch_use_generic_dummy_frames (gdbarch, 0);
+#else
+ set_gdbarch_use_generic_dummy_frames (gdbarch, 1);
+#endif
set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);
set_gdbarch_call_dummy_address (gdbarch, mips_call_dummy_address);
set_gdbarch_push_return_address (gdbarch, mips_push_return_address);
+#if OLD_STYLE_MIPS_DUMMY_FRAMES
set_gdbarch_push_dummy_frame (gdbarch, mips_push_dummy_frame);
+#else
+ set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
+#endif
set_gdbarch_pop_frame (gdbarch, mips_pop_frame);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_length (gdbarch, 0);
set_gdbarch_fix_call_dummy (gdbarch, mips_fix_call_dummy);
+#if OLD_STYLE_MIPS_DUMMY_FRAMES
set_gdbarch_pc_in_call_dummy (gdbarch, pc_in_call_dummy_at_entry_point);
+#else
+ set_gdbarch_pc_in_call_dummy (gdbarch, generic_pc_in_call_dummy);
+#endif
set_gdbarch_call_dummy_words (gdbarch, mips_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (mips_call_dummy_words));
set_gdbarch_push_return_address (gdbarch, mips_push_return_address);
set_gdbarch_frame_align (gdbarch, mips_frame_align);
+#if OLD_STYLE_MIPS_DUMMY_FRAMES
+#else
+ set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
+#endif
set_gdbarch_register_convertible (gdbarch, mips_register_convertible);
set_gdbarch_register_convert_to_virtual (gdbarch,
mips_register_convert_to_virtual);
@@ -6010,7 +6060,7 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_register_virtual_type (gdbarch, mips_register_virtual_type);
set_gdbarch_register_virtual_size (gdbarch, generic_register_size);
- set_gdbarch_do_registers_info (gdbarch, mips_do_registers_info);
+ set_gdbarch_deprecated_do_registers_info (gdbarch, mips_do_registers_info);
set_gdbarch_pc_in_sigtramp (gdbarch, mips_pc_in_sigtramp);
/* Hook in OS ABI-specific overrides, if they have been registered. */
@@ -6144,12 +6194,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
"mips_dump_tdep: CAUSE_REGNUM = %d\n",
CAUSE_REGNUM);
fprintf_unfiltered (file,
- "mips_dump_tdep: CPLUS_MARKER = %c\n",
- CPLUS_MARKER);
- fprintf_unfiltered (file,
- "mips_dump_tdep: DO_REGISTERS_INFO # %s\n",
- XSTRING (DO_REGISTERS_INFO));
- fprintf_unfiltered (file,
"mips_dump_tdep: DWARF_REG_TO_REGNUM # %s\n",
XSTRING (DWARF_REG_TO_REGNUM (REGNUM)));
fprintf_unfiltered (file,
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index 6e7bada4cad..a5536b1e74f 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -1148,7 +1148,7 @@ mn10300_gdbarch_init (struct gdbarch_info info,
set_gdbarch_register_virtual_size (gdbarch, mn10300_register_virtual_size);
set_gdbarch_register_virtual_type (gdbarch, mn10300_register_virtual_type);
set_gdbarch_dwarf2_reg_to_regnum (gdbarch, mn10300_dwarf2_reg_to_regnum);
- set_gdbarch_do_registers_info (gdbarch, mn10300_do_registers_info);
+ set_gdbarch_deprecated_do_registers_info (gdbarch, mn10300_do_registers_info);
set_gdbarch_sp_regnum (gdbarch, 8);
set_gdbarch_pc_regnum (gdbarch, 9);
set_gdbarch_fp_regnum (gdbarch, 31);
diff --git a/gdb/objc-exp.y b/gdb/objc-exp.y
index 54b99b00610..c1971f77a87 100644
--- a/gdb/objc-exp.y
+++ b/gdb/objc-exp.y
@@ -203,9 +203,6 @@ parse_number PARAMS ((char *, int, int, YYSTYPE *));
%token <opcode> ASSIGN_MODIFY
-/* C++ */
-%token THIS
-
%left ','
%left ABOVE_COMMA
%right '=' ASSIGN_MODIFY
@@ -613,14 +610,6 @@ exp : NSSTRING /* ObjC NextStep NSString constant
write_exp_elt_opcode (OP_NSSTRING); }
;
-/* C++. */
-exp : THIS
- { write_exp_elt_opcode (OP_THIS);
- write_exp_elt_opcode (OP_THIS); }
- ;
-
-/* end of C++. */
-
block : BLOCKNAME
{
if ($1.sym != 0)
@@ -986,7 +975,7 @@ name_not_typename : NAME
name_not_typename (=variable, =exp) or just an exp. If
name_not_typename was ever used in an lvalue context where only a
name could occur, this might be useful. */
- | NAME_OR_INT */
+/* | NAME_OR_INT */
;
%%
@@ -1631,18 +1620,6 @@ yylex ()
return ENUM;
if (STREQN (tokstart, "long", 4))
return LONG;
- if (current_language->la_language == language_cplus
- && STREQN (tokstart, "this", 4))
- {
- static const char this_name[] = {
- CPLUS_MARKER, 't', 'h', 'i', 's', '\0'
- };
-
- if (lookup_symbol (this_name, expression_context_block,
- VAR_NAMESPACE, (int *) NULL,
- (struct symtab **) NULL))
- return THIS;
- }
break;
case 3:
if (STREQN (tokstart, "int", 3))
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index dc839518b24..7309d002534 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -34,7 +34,7 @@
#include "value.h"
#include "symfile.h"
#include "objfiles.h"
-#include "string.h" /* for strchr */
+#include "gdb_string.h" /* for strchr */
#include "target.h" /* for target_has_execution */
#include "gdbcore.h"
#include "gdbcmd.h"
@@ -74,11 +74,11 @@ struct objc_method {
/* Complaints about ObjC classes, selectors, etc. */
-static struct complaint noclass_lookup_complaint = {
+static struct deprecated_complaint noclass_lookup_complaint = {
"no way to lookup Objective-C classes", 0, 0
};
-static struct complaint nosel_lookup_complaint = {
+static struct deprecated_complaint nosel_lookup_complaint = {
"no way to lookup Objective-C selectors", 0, 0
};
@@ -266,9 +266,10 @@ objc_demangle (const char *mangled)
while (*cp && *cp == '_')
cp++; /* skip any initial underbars in class name */
- if (!(cp = strchr(cp, '_'))) /* find first non-initial underbar */
+ cp = strchr(cp, '_');
+ if (!cp) /* find first non-initial underbar */
{
- free(demangled); /* not mangled name */
+ xfree(demangled); /* not mangled name */
return NULL;
}
if (cp[1] == '_') { /* easy case: no category name */
@@ -277,9 +278,10 @@ objc_demangle (const char *mangled)
}
else {
*cp++ = '('; /* less easy case: category name */
- if (!(cp = strchr(cp, '_')))
+ cp = strchr(cp, '_');
+ if (!cp)
{
- free(demangled); /* not mangled name */
+ xfree(demangled); /* not mangled name */
return NULL;
}
*cp++ = ')';
@@ -739,7 +741,7 @@ add_msglist(struct stoken *str, int addcolon)
s = (char *)xmalloc(len);
strcpy(s, msglist_sel);
strncat(s, p, plen);
- free(msglist_sel);
+ xfree(msglist_sel);
msglist_sel = s;
if (addcolon) {
s[len-2] = ':';
@@ -764,9 +766,9 @@ end_msglist(void)
if (!selid)
error("Can't find selector \"%s\"", p);
write_exp_elt_longcst (selid);
- free(p);
+ xfree(p);
write_exp_elt_longcst (val); /* Number of args */
- free(sel);
+ xfree(sel);
return val;
}
@@ -805,12 +807,14 @@ compare_selectors (void *a, void *b)
{
char *aname, *bname;
- if ((aname = SYMBOL_SOURCE_NAME (*(struct symbol **) a)) == NULL ||
- (bname = SYMBOL_SOURCE_NAME (*(struct symbol **) b)) == NULL)
+ aname = SYMBOL_SOURCE_NAME (*(struct symbol **) a);
+ bname = SYMBOL_SOURCE_NAME (*(struct symbol **) b);
+ if (aname == NULL || bname == NULL)
error ("internal: compare_selectors(1)");
- if ((aname = strchr(aname, ' ')) == NULL ||
- (bname = strchr(bname, ' ')) == NULL)
+ aname = strchr(aname, ' ');
+ bname = strchr(bname, ' ');
+ if (aname == NULL || bname == NULL)
error ("internal: compare_selectors(2)");
return specialcmp (aname+1, bname+1);
@@ -870,7 +874,8 @@ selectors_info (char *regexp, int from_tty)
ALL_MSYMBOLS (objfile, msymbol)
{
QUIT;
- if ((name = SYMBOL_DEMANGLED_NAME (msymbol)) == NULL)
+ name = SYMBOL_DEMANGLED_NAME (msymbol);
+ if (name == NULL)
name = SYMBOL_NAME (msymbol);
if (name &&
(name[0] == '-' || name[0] == '+') &&
@@ -902,7 +907,8 @@ selectors_info (char *regexp, int from_tty)
ALL_MSYMBOLS (objfile, msymbol)
{
QUIT;
- if ((name = SYMBOL_DEMANGLED_NAME (msymbol)) == NULL)
+ name = SYMBOL_DEMANGLED_NAME (msymbol);
+ if (name == NULL)
name = SYMBOL_NAME (msymbol);
if (name &&
(name[0] == '-' || name[0] == '+') &&
@@ -927,7 +933,8 @@ selectors_info (char *regexp, int from_tty)
char *p = asel;
QUIT;
- if ((name = SYMBOL_DEMANGLED_NAME (sym_arr[ix])) == NULL)
+ name = SYMBOL_DEMANGLED_NAME (sym_arr[ix]);
+ if (name == NULL)
name = SYMBOL_NAME (sym_arr[ix]);
name = strchr (name, ' ') + 1;
if (p[0] && specialcmp(name, p) == 0)
@@ -958,8 +965,9 @@ compare_classes (void *a, void *b)
{
char *aname, *bname;
- if ((aname = SYMBOL_SOURCE_NAME (*(struct symbol **) a)) == NULL ||
- (bname = SYMBOL_SOURCE_NAME (*(struct symbol **) b)) == NULL)
+ aname = SYMBOL_SOURCE_NAME (*(struct symbol **) a);
+ bname = SYMBOL_SOURCE_NAME (*(struct symbol **) b);
+ if (aname == NULL || bname == NULL)
error ("internal: compare_classes(1)");
return specialcmp (aname+1, bname+1);
@@ -1009,7 +1017,8 @@ classes_info (char *regexp, int from_tty)
ALL_MSYMBOLS (objfile, msymbol)
{
QUIT;
- if ((name = SYMBOL_DEMANGLED_NAME (msymbol)) == NULL)
+ name = SYMBOL_DEMANGLED_NAME (msymbol);
+ if (name == NULL)
name = SYMBOL_NAME (msymbol);
if (name &&
(name[0] == '-' || name[0] == '+') &&
@@ -1034,7 +1043,8 @@ classes_info (char *regexp, int from_tty)
ALL_MSYMBOLS (objfile, msymbol)
{
QUIT;
- if ((name = SYMBOL_DEMANGLED_NAME (msymbol)) == NULL)
+ name = SYMBOL_DEMANGLED_NAME (msymbol);
+ if (name == NULL)
name = SYMBOL_NAME (msymbol);
if (name &&
(name[0] == '-' || name[0] == '+') &&
@@ -1052,7 +1062,8 @@ classes_info (char *regexp, int from_tty)
char *p = aclass;
QUIT;
- if ((name = SYMBOL_DEMANGLED_NAME (sym_arr[ix])) == NULL)
+ name = SYMBOL_DEMANGLED_NAME (sym_arr[ix]);
+ if (name == NULL)
name = SYMBOL_NAME (sym_arr[ix]);
name += 2;
if (p[0] && specialcmp(name, p) == 0)
@@ -1309,8 +1320,8 @@ find_methods (struct symtab *symtab, char type,
continue;
if (symtab)
- if ((SYMBOL_VALUE_ADDRESS (msymbol) < block->startaddr) ||
- (SYMBOL_VALUE_ADDRESS (msymbol) >= block->endaddr))
+ if ((SYMBOL_VALUE_ADDRESS (msymbol) < BLOCK_START (block)) ||
+ (SYMBOL_VALUE_ADDRESS (msymbol) >= BLOCK_END (block)))
/* Not in the specified symtab. */
continue;
@@ -1551,12 +1562,14 @@ print_object_command (char *args, int from_tty)
do_cleanups (old_chain);
}
- if (!(function = find_function_in_inferior ("_NSPrintForDebugger")))
+ function = find_function_in_inferior ("_NSPrintForDebugger");
+ if (!function)
error ("Unable to locate _NSPrintForDebugger in child process");
description = call_function_by_hand (function, 1, &object);
- if ((string_addr = value_as_long (description)) == 0)
+ string_addr = value_as_long (description);
+ if (string_addr == 0)
error ("object returns null description");
read_memory (string_addr + i++, &c, 1);
@@ -1658,7 +1671,7 @@ struct objc_submethod_helper_data {
};
int
-find_objc_msgcall_submethod_helper (PTR arg)
+find_objc_msgcall_submethod_helper (void * arg)
{
struct objc_submethod_helper_data *s =
(struct objc_submethod_helper_data *) arg;
@@ -1681,7 +1694,7 @@ find_objc_msgcall_submethod (CORE_ADDR (*f) (CORE_ADDR, CORE_ADDR *),
s.new_pc = new_pc;
if (catch_errors (find_objc_msgcall_submethod_helper,
- (PTR) &s,
+ (void *) &s,
"Unable to determine target of Objective-C method call (ignoring):\n",
RETURN_MASK_ALL) == 0)
return 1;
diff --git a/gdb/objc-lang.h b/gdb/objc-lang.h
index 87e315b5c06..9fd93e7a5fc 100644
--- a/gdb/objc-lang.h
+++ b/gdb/objc-lang.h
@@ -19,9 +19,7 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifdef __STDC__ /* Forward decls for prototypes. */
struct value;
-#endif
extern int objc_parse (void); /* Defined in c-exp.y */
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index f0939e7bbbf..4dc99be8ce4 100644
--- a/gdb/p-exp.y
+++ b/gdb/p-exp.y
@@ -1358,8 +1358,7 @@ yylex ()
{
/* here we search for 'this' like
inserted in FPC stabs debug info */
- static const char this_name[] =
- { /* CPLUS_MARKER,*/ 't', 'h', 'i', 's', '\0' };
+ static const char this_name[] = "this";
if (lookup_symbol (this_name, expression_context_block,
VAR_NAMESPACE, (int *) NULL,
diff --git a/gdb/parse.c b/gdb/parse.c
index 29b8e3c3709..5d81dfd0e53 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -830,6 +830,11 @@ length_of_subexp (register struct expression *expr, register int endpos)
args = 1 + longest_to_int (expr->elts[endpos - 2].longconst);
break;
+ case OP_MSGCALL: /* Objective C message (method) call */
+ oplen = 4;
+ args = 1 + longest_to_int (expr->elts[endpos - 2].longconst);
+ break;
+
case UNOP_MAX:
case UNOP_MIN:
oplen = 3;
@@ -861,6 +866,8 @@ length_of_subexp (register struct expression *expr, register int endpos)
/* fall through */
case OP_M2_STRING:
case OP_STRING:
+ case OP_NSSTRING: /* Objective C Foundation Class NSString constant */
+ case OP_SELECTOR: /* Objective C "@selector" pseudo-op */
case OP_NAME:
case OP_EXPRSTRING:
oplen = longest_to_int (expr->elts[endpos - 2].longconst);
@@ -899,6 +906,7 @@ length_of_subexp (register struct expression *expr, register int endpos)
/* C++ */
case OP_THIS:
+ case OP_SELF:
oplen = 2;
break;
@@ -967,6 +975,11 @@ prefixify_subexp (register struct expression *inexpr,
args = 1 + longest_to_int (inexpr->elts[inend - 2].longconst);
break;
+ case OP_MSGCALL: /* Objective C message (method) call */
+ oplen = 4;
+ args = 1 + longest_to_int (inexpr->elts[inend - 2].longconst);
+ break;
+
case UNOP_MIN:
case UNOP_MAX:
oplen = 3;
@@ -997,6 +1010,8 @@ prefixify_subexp (register struct expression *inexpr,
/* fall through */
case OP_M2_STRING:
case OP_STRING:
+ case OP_NSSTRING: /* Objective C Foundation Class NSString constant */
+ case OP_SELECTOR: /* Objective C "@selector" pseudo-op */
case OP_NAME:
case OP_EXPRSTRING:
oplen = longest_to_int (inexpr->elts[inend - 2].longconst);
@@ -1035,6 +1050,7 @@ prefixify_subexp (register struct expression *inexpr,
/* C++ */
case OP_THIS:
+ case OP_SELF:
oplen = 2;
break;
@@ -1107,7 +1123,7 @@ parse_exp_1 (char **stringptr, struct block *block, int comma)
if (block)
{
expression_context_block = block;
- expression_context_pc = block->startaddr;
+ expression_context_pc = BLOCK_START (block);
}
else
expression_context_block = get_selected_block (&expression_context_pc);
diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c
index 0d33683a4c4..ecaed850cbf 100644
--- a/gdb/ppc-sysv-tdep.c
+++ b/gdb/ppc-sysv-tdep.c
@@ -25,6 +25,7 @@
#include "inferior.h"
#include "regcache.h"
#include "value.h"
+#include "gdb_string.h"
#include "ppc-tdep.h"
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 8542b8a9a5b..28697f2019f 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1104,7 +1104,11 @@ address_info (char *exp, int from_tty)
printf_filtered ("Symbol \"");
fprintf_symbol_filtered (gdb_stdout, exp,
current_language->la_language, DMGL_ANSI);
- printf_filtered ("\" is a field of the local class variable `this'\n");
+ printf_filtered ("\" is a field of the local class variable ");
+ if (current_language->la_language == language_objc)
+ printf_filtered ("`self'\n"); /* ObjC equivalent of "this" */
+ else
+ printf_filtered ("`this'\n");
return;
}
@@ -1275,12 +1279,18 @@ address_info (char *exp, int from_tty)
}
break;
- case LOC_THREAD_LOCAL_STATIC:
+ case LOC_HP_THREAD_LOCAL_STATIC:
printf_filtered (
"a thread-local variable at offset %ld from the thread base register %s",
val, REGISTER_NAME (basereg));
break;
+ case LOC_THREAD_LOCAL_STATIC:
+ printf_filtered ("a thread-local variable at offset %ld in the "
+ "thread-local storage for `%s'",
+ val, SYMBOL_OBJFILE (sym)->name);
+ break;
+
case LOC_OPTIMIZED_OUT:
printf_filtered ("optimized out");
break;
diff --git a/gdb/regcache.c b/gdb/regcache.c
index ab65c67a47b..16a520cb5af 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -26,6 +26,7 @@
#include "gdbarch.h"
#include "gdbcmd.h"
#include "regcache.h"
+#include "reggroups.h"
#include "gdb_assert.h"
#include "gdb_string.h"
#include "gdbcmd.h" /* For maintenanceprintlist. */
@@ -604,7 +605,7 @@ read_register_bytes (int in_start, char *in_buf, int in_len)
if (REGISTER_NAME (regnum) != NULL && *REGISTER_NAME (regnum) != '\0')
/* Force the cache to fetch the entire register. */
- read_register_gen (regnum, reg_buf);
+ deprecated_read_register_gen (regnum, reg_buf);
else
/* Legacy note: even though this register is ``invalid'' we
still need to return something. It would appear that some
@@ -748,7 +749,7 @@ regcache_raw_write_unsigned (struct regcache *regcache, int regnum,
}
void
-read_register_gen (int regnum, char *buf)
+deprecated_read_register_gen (int regnum, char *buf)
{
gdb_assert (current_regcache != NULL);
gdb_assert (current_regcache->descr->gdbarch == current_gdbarch);
@@ -894,7 +895,7 @@ regcache_raw_write (struct regcache *regcache, int regnum, const void *buf)
}
void
-write_register_gen (int regnum, char *buf)
+deprecated_write_register_gen (int regnum, char *buf)
{
gdb_assert (current_regcache != NULL);
gdb_assert (current_regcache->descr->gdbarch == current_gdbarch);
@@ -947,7 +948,7 @@ write_register_bytes (int myregstart, char *myaddr, int inlen)
/* Is this register completely within the range the user is writing? */
else if (myregstart <= regstart && regend <= myregend)
- write_register_gen (regnum, myaddr + (regstart - myregstart));
+ deprecated_write_register_gen (regnum, myaddr + (regstart - myregstart));
/* The register partially overlaps the range being written. */
else
@@ -960,7 +961,7 @@ write_register_bytes (int myregstart, char *myaddr, int inlen)
/* We may be doing a partial update of an invalid register.
Update it from the target before scribbling on it. */
- read_register_gen (regnum, regbuf);
+ deprecated_read_register_gen (regnum, regbuf);
memcpy (registers + overlapstart,
myaddr + (overlapstart - myregstart),
@@ -1147,7 +1148,7 @@ ULONGEST
read_register (int regnum)
{
char *buf = alloca (REGISTER_RAW_SIZE (regnum));
- read_register_gen (regnum, buf);
+ deprecated_read_register_gen (regnum, buf);
return (extract_unsigned_integer (buf, REGISTER_RAW_SIZE (regnum)));
}
@@ -1178,7 +1179,7 @@ LONGEST
read_signed_register (int regnum)
{
void *buf = alloca (REGISTER_RAW_SIZE (regnum));
- read_register_gen (regnum, buf);
+ deprecated_read_register_gen (regnum, buf);
return (extract_signed_integer (buf, REGISTER_RAW_SIZE (regnum)));
}
@@ -1212,7 +1213,7 @@ write_register (int regnum, LONGEST val)
size = REGISTER_RAW_SIZE (regnum);
buf = alloca (size);
store_signed_integer (buf, size, (LONGEST) val);
- write_register_gen (regnum, buf);
+ deprecated_write_register_gen (regnum, buf);
}
void
@@ -1479,7 +1480,7 @@ dump_endian_bytes (struct ui_file *file, enum bfd_endian endian,
enum regcache_dump_what
{
- regcache_dump_none, regcache_dump_raw, regcache_dump_cooked
+ regcache_dump_none, regcache_dump_raw, regcache_dump_cooked, regcache_dump_groups
};
static void
@@ -1487,6 +1488,8 @@ regcache_dump (struct regcache *regcache, struct ui_file *file,
enum regcache_dump_what what_to_dump)
{
struct cleanup *cleanups = make_cleanup (null_cleanup, NULL);
+ struct gdbarch *gdbarch = regcache->descr->gdbarch;
+ struct reggroup *const *groups = reggroups (gdbarch);
int regnum;
int footnote_nr = 0;
int footnote_register_size = 0;
@@ -1593,27 +1596,32 @@ regcache_dump (struct regcache *regcache, struct ui_file *file,
}
/* Type. */
- if (regnum < 0)
- fprintf_unfiltered (file, " %-20s", "Type");
- else
- {
- static const char blt[] = "builtin_type";
- const char *t = TYPE_NAME (register_type (regcache->descr->gdbarch,
- regnum));
- if (t == NULL)
- {
- char *n;
- if (!footnote_register_type_name_null)
- footnote_register_type_name_null = ++footnote_nr;
- xasprintf (&n, "*%d", footnote_register_type_name_null);
- make_cleanup (xfree, n);
- t = n;
- }
- /* Chop a leading builtin_type. */
- if (strncmp (t, blt, strlen (blt)) == 0)
- t += strlen (blt);
- fprintf_unfiltered (file, " %-20s", t);
- }
+ {
+ const char *t;
+ if (regnum < 0)
+ t = "Type";
+ else
+ {
+ static const char blt[] = "builtin_type";
+ t = TYPE_NAME (register_type (regcache->descr->gdbarch, regnum));
+ if (t == NULL)
+ {
+ char *n;
+ if (!footnote_register_type_name_null)
+ footnote_register_type_name_null = ++footnote_nr;
+ xasprintf (&n, "*%d", footnote_register_type_name_null);
+ make_cleanup (xfree, n);
+ t = n;
+ }
+ /* Chop a leading builtin_type. */
+ if (strncmp (t, blt, strlen (blt)) == 0)
+ t += strlen (blt);
+ }
+ fprintf_unfiltered (file, " %-15s", t);
+ }
+
+ /* Leading space always present. */
+ fprintf_unfiltered (file, " ");
/* Value, raw. */
if (what_to_dump == regcache_dump_raw)
@@ -1647,6 +1655,26 @@ regcache_dump (struct regcache *regcache, struct ui_file *file,
}
}
+ /* Group members. */
+ if (what_to_dump == regcache_dump_groups)
+ {
+ if (regnum < 0)
+ fprintf_unfiltered (file, "Groups");
+ else
+ {
+ int i;
+ const char *sep = "";
+ for (i = 0; groups[i] != NULL; i++)
+ {
+ if (gdbarch_register_reggroup_p (gdbarch, regnum, groups[i]))
+ {
+ fprintf_unfiltered (file, "%s%s", sep, reggroup_name (groups[i]));
+ sep = ",";
+ }
+ }
+ }
+ }
+
fprintf_unfiltered (file, "\n");
}
@@ -1696,6 +1724,12 @@ maintenance_print_cooked_registers (char *args, int from_tty)
regcache_print (args, regcache_dump_cooked);
}
+static void
+maintenance_print_register_groups (char *args, int from_tty)
+{
+ regcache_print (args, regcache_dump_groups);
+}
+
void
_initialize_regcache (void)
{
@@ -1728,5 +1762,10 @@ Takes an optional file parameter.",
"Print the internal register configuration including cooked values.\
Takes an optional file parameter.",
&maintenanceprintlist);
+ add_cmd ("register-groups", class_maintenance,
+ maintenance_print_register_groups,
+ "Print the internal register configuration including each register's group.\
+Takes an optional file parameter.",
+ &maintenanceprintlist);
}
diff --git a/gdb/regcache.h b/gdb/regcache.h
index 4ddcda38104..a15fc369d99 100644
--- a/gdb/regcache.h
+++ b/gdb/regcache.h
@@ -169,8 +169,24 @@ extern struct regcache *regcache_dup_no_passthrough (struct regcache *regcache);
extern void regcache_cpy (struct regcache *dest, struct regcache *src);
extern void regcache_cpy_no_passthrough (struct regcache *dest, struct regcache *src);
+/* NOTE: cagney/2002-11-02: The below have been superseded by the
+ regcache_cooked_*() functions found above, and the frame_*()
+ functions found in "frame.h". Take care though, often more than a
+ simple substitution is required when updating the code. The
+ change, as far as practical, should avoid adding references to
+ global variables (e.g., current_regcache, current_frame,
+ current_gdbarch or selected_frame) and instead refer to the FRAME
+ or REGCACHE that has been passed into the containing function as
+ parameters. Consequently, the change typically involves modifying
+ the containing function so that it takes a FRAME or REGCACHE
+ parameter. In the case of an architecture vector method, there
+ should already be a non-deprecated variant that is parameterized
+ with FRAME or REGCACHE. */
+
extern char *deprecated_grub_regcache_for_registers (struct regcache *);
extern char *deprecated_grub_regcache_for_register_valid (struct regcache *);
+extern void deprecated_read_register_gen (int regnum, char *myaddr);
+extern void deprecated_write_register_gen (int regnum, char *myaddr);
extern int register_cached (int regnum);
@@ -184,10 +200,6 @@ extern void registers_fetched (void);
extern void read_register_bytes (int regbyte, char *myaddr, int len);
-extern void read_register_gen (int regnum, char *myaddr);
-
-extern void write_register_gen (int regnum, char *myaddr);
-
extern void write_register_bytes (int regbyte, char *myaddr, int len);
/* Rename to read_unsigned_register()? */
diff --git a/gdb/reggroups.c b/gdb/reggroups.c
new file mode 100644
index 00000000000..8c3cbb76128
--- /dev/null
+++ b/gdb/reggroups.c
@@ -0,0 +1,268 @@
+/* Register groupings for GDB, the GNU debugger.
+
+ Copyright 2002 Free Software Foundation, Inc.
+
+ Contributed by Red Hat.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include "defs.h"
+#include "reggroups.h"
+#include "gdbtypes.h"
+#include "gdb_assert.h"
+#include "regcache.h"
+#include "command.h"
+#include "gdbcmd.h" /* For maintenanceprintlist. */
+
+/* Individual register groups. */
+
+struct reggroup
+{
+ const char *name;
+ enum reggroup_type type;
+};
+
+struct reggroup *
+reggroup_new (const char *name, enum reggroup_type type)
+{
+ struct reggroup *group = XMALLOC (struct reggroup);
+ group->name = name;
+ group->type = type;
+ return group;
+}
+
+/* Register group attributes. */
+
+const char *
+reggroup_name (struct reggroup *group)
+{
+ return group->name;
+}
+
+enum reggroup_type
+reggroup_type (struct reggroup *group)
+{
+ return group->type;
+}
+
+/* All the groups for a given architecture. */
+
+struct reggroups
+{
+ int nr_group;
+ struct reggroup **group;
+};
+
+static struct gdbarch_data *reggroups_data;
+
+static void *
+reggroups_init (struct gdbarch *gdbarch)
+{
+ struct reggroups *groups = XMALLOC (struct reggroups);
+ groups->nr_group = 0;
+ groups->group = NULL;
+ return groups;
+}
+
+static void
+reggroups_free (struct gdbarch *gdbarch, void *data)
+{
+ struct reggroups *groups = data;
+ xfree (groups->group);
+ xfree (groups);
+}
+
+/* Add a register group (with attribute values) to the pre-defined
+ list. This function can be called during architecture
+ initialization and hence needs to handle NULL architecture groups. */
+
+static void
+add_group (struct reggroups *groups, struct reggroup *group)
+{
+ gdb_assert (group != NULL);
+ groups->nr_group++;
+ groups->group = xrealloc (groups->group, (sizeof (struct reggroup *)
+ * (groups->nr_group + 1)));
+ groups->group[groups->nr_group - 1] = group;
+ groups->group[groups->nr_group] = NULL;
+}
+
+void
+reggroup_add (struct gdbarch *gdbarch, struct reggroup *group)
+{
+ struct reggroups *groups = gdbarch_data (gdbarch, reggroups_data);
+ if (groups == NULL)
+ {
+ /* ULGH, called during architecture initialization. Patch
+ things up. */
+ groups = reggroups_init (gdbarch);
+ set_gdbarch_data (gdbarch, reggroups_data, groups);
+ }
+ add_group (groups, group);
+}
+
+/* The register groups for the current architecture. Mumble something
+ about the lifetime of the buffer.... */
+
+static struct reggroups *default_groups;
+
+struct reggroup * const*
+reggroups (struct gdbarch *gdbarch)
+{
+ struct reggroups *groups = gdbarch_data (gdbarch, reggroups_data);
+ /* Don't allow this function to be called during architecture
+ creation. */
+ gdb_assert (groups != NULL);
+ if (groups->group == NULL)
+ return default_groups->group;
+ else
+ return groups->group;
+}
+
+/* Is REGNUM a member of REGGROUP? */
+int
+default_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
+ struct reggroup *group)
+{
+ int vector_p;
+ int float_p;
+ int raw_p;
+ if (REGISTER_NAME (regnum) == NULL
+ || *REGISTER_NAME (regnum) == '\0')
+ return 0;
+ if (group == all_reggroup)
+ return 1;
+ vector_p = TYPE_VECTOR (register_type (gdbarch, regnum));
+ float_p = TYPE_CODE (register_type (gdbarch, regnum)) == TYPE_CODE_FLT;
+ raw_p = regnum < gdbarch_num_regs (gdbarch);
+ if (group == float_reggroup)
+ return float_p;
+ if (group == vector_reggroup)
+ return vector_p;
+ if (group == general_reggroup)
+ return (!vector_p && !float_p);
+ if (group == save_reggroup || group == restore_reggroup)
+ return raw_p;
+ return 0;
+}
+
+/* Dump out a table of register groups for the current architecture. */
+
+static void
+reggroups_dump (struct gdbarch *gdbarch, struct ui_file *file)
+{
+ struct reggroup *const *groups = reggroups (gdbarch);
+ int i = -1;
+ do
+ {
+ /* Group name. */
+ {
+ const char *name;
+ if (i < 0)
+ name = "Group";
+ else
+ name = reggroup_name (groups[i]);
+ fprintf_unfiltered (file, " %-10s", name);
+ }
+
+ /* Group type. */
+ {
+ const char *type;
+ if (i < 0)
+ type = "Type";
+ else
+ {
+ switch (reggroup_type (groups[i]))
+ {
+ case USER_REGGROUP:
+ type = "user";
+ break;
+ case INTERNAL_REGGROUP:
+ type = "internal";
+ break;
+ default:
+ internal_error (__FILE__, __LINE__, "bad switch");
+ }
+ }
+ fprintf_unfiltered (file, " %-10s", type);
+ }
+
+ /* Note: If you change this, be sure to also update the
+ documentation. */
+
+ fprintf_unfiltered (file, "\n");
+ i++;
+ }
+ while (groups[i] != NULL);
+}
+
+static void
+maintenance_print_reggroups (char *args, int from_tty)
+{
+ if (args == NULL)
+ reggroups_dump (current_gdbarch, gdb_stdout);
+ else
+ {
+ struct ui_file *file = gdb_fopen (args, "w");
+ if (file == NULL)
+ perror_with_name ("maintenance print reggroups");
+ reggroups_dump (current_gdbarch, file);
+ ui_file_delete (file);
+ }
+}
+
+/* Pre-defined register groups. */
+static struct reggroup general_group = { "general", USER_REGGROUP };
+static struct reggroup float_group = { "float", USER_REGGROUP };
+static struct reggroup system_group = { "system", USER_REGGROUP };
+static struct reggroup vector_group = { "vector", USER_REGGROUP };
+static struct reggroup all_group = { "all", USER_REGGROUP };
+static struct reggroup save_group = { "save", INTERNAL_REGGROUP };
+static struct reggroup restore_group = { "restore", INTERNAL_REGGROUP };
+
+struct reggroup *const general_reggroup = &general_group;
+struct reggroup *const float_reggroup = &float_group;
+struct reggroup *const system_reggroup = &system_group;
+struct reggroup *const vector_reggroup = &vector_group;
+struct reggroup *const all_reggroup = &all_group;
+struct reggroup *const save_reggroup = &save_group;
+struct reggroup *const restore_reggroup = &restore_group;
+
+void
+_initialize_reggroup (void)
+{
+ reggroups_data = register_gdbarch_data (reggroups_init, reggroups_free);
+
+ /* The pre-defined list of groups. */
+ default_groups = reggroups_init (NULL);
+ add_group (default_groups, general_reggroup);
+ add_group (default_groups, float_reggroup);
+ add_group (default_groups, system_reggroup);
+ add_group (default_groups, vector_reggroup);
+ add_group (default_groups, all_reggroup);
+ add_group (default_groups, save_reggroup);
+ add_group (default_groups, restore_reggroup);
+
+
+ add_cmd ("reggroups", class_maintenance,
+ maintenance_print_reggroups, "\
+Print the internal register group names.\n\
+Takes an optional file parameter.",
+ &maintenanceprintlist);
+
+}
diff --git a/gdb/reggroups.h b/gdb/reggroups.h
new file mode 100644
index 00000000000..0088a8520e3
--- /dev/null
+++ b/gdb/reggroups.h
@@ -0,0 +1,61 @@
+/* Register groupings for GDB, the GNU debugger.
+
+ Copyright 2002 Free Software Foundation, Inc.
+
+ Contributed by Red Hat.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef REGGROUPS_H
+#define REGGROUPS_H
+
+struct gdbarch;
+struct reggroup;
+
+enum reggroup_type { USER_REGGROUP, INTERNAL_REGGROUP };
+
+/* Pre-defined, user visible, register groups. */
+extern struct reggroup *const general_reggroup;
+extern struct reggroup *const float_reggroup;
+extern struct reggroup *const system_reggroup;
+extern struct reggroup *const vector_reggroup;
+extern struct reggroup *const all_reggroup;
+
+/* Pre-defined, internal, register groups. */
+extern struct reggroup *const save_reggroup;
+extern struct reggroup *const restore_reggroup;
+
+/* Create a new local register group. */
+extern struct reggroup *reggroup_new (const char *name,
+ enum reggroup_type type);
+
+/* Add a register group (with attribute values) to the pre-defined list. */
+extern void reggroup_add (struct gdbarch *gdbarch, struct reggroup *group);
+
+/* Register group attributes. */
+extern const char *reggroup_name (struct reggroup *reggroup);
+extern enum reggroup_type reggroup_type (struct reggroup *reggroup);
+
+/* The register groups for the current architecture. */
+extern struct reggroup *const *reggroups (struct gdbarch *gdbarch);
+
+/* Is REGNUM a member of REGGROUP? */
+extern int default_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
+ struct reggroup *reggroup);
+
+#endif
diff --git a/gdb/remote-rdi.c b/gdb/remote-rdi.c
index 228e3d98c37..a85fbb118b7 100644
--- a/gdb/remote-rdi.c
+++ b/gdb/remote-rdi.c
@@ -598,7 +598,7 @@ arm_rdi_store_registers (int regno)
}
else
{
- read_register_gen (regno, (char *) rawreg);
+ deprecated_read_register_gen (regno, (char *) rawreg);
/* RDI manipulates data in host byte order, so convert now. */
store_unsigned_integer (rawerreg, 4, rawreg[0]);
diff --git a/gdb/remote-rdp.c b/gdb/remote-rdp.c
index 34a42abb1fa..07b340bf9e4 100644
--- a/gdb/remote-rdp.c
+++ b/gdb/remote-rdp.c
@@ -643,7 +643,7 @@ remote_rdp_store_register (int regno)
else
{
char tmp[ARM_MAX_REGISTER_RAW_SIZE];
- read_register_gen (regno, tmp);
+ deprecated_read_register_gen (regno, tmp);
if (regno < 15)
rdp_store_one_register (1 << regno, tmp);
else if (regno == ARM_PC_REGNUM)
diff --git a/gdb/remote-sds.c b/gdb/remote-sds.c
index 507ac5be208..053b97a7615 100644
--- a/gdb/remote-sds.c
+++ b/gdb/remote-sds.c
@@ -978,6 +978,7 @@ getmessage (unsigned char *buf, int forever)
/* Try the whole thing again. */
retry:
/* need to do something here */
+ ;
}
/* We have tried hard enough, and just can't receive the packet. Give up. */
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 221efe45674..c2c435c8703 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -361,7 +361,7 @@ gdbsim_store_register (int regno)
{
char tmp[MAX_REGISTER_RAW_SIZE];
int nr_bytes;
- read_register_gen (regno, tmp);
+ deprecated_read_register_gen (regno, tmp);
nr_bytes = sim_store_register (gdbsim_desc,
REGISTER_SIM_REGNO (regno),
tmp, REGISTER_RAW_SIZE (regno));
diff --git a/gdb/remote-vx.c b/gdb/remote-vx.c
index 5ec4df42fd7..b26a4ede916 100644
--- a/gdb/remote-vx.c
+++ b/gdb/remote-vx.c
@@ -820,7 +820,7 @@ net_get_symbols (ldtabl *pLoadTable)
Returns status of symbol read on target side (0=success, -1=fail)
Returns -1 and complain()s if rpc fails. */
-struct complaint cant_contact_target =
+struct deprecated_complaint cant_contact_target =
{"Lost contact with VxWorks target", 0, 0};
static int
diff --git a/gdb/remote-vx68.c b/gdb/remote-vx68.c
index 2ebaa633f77..6feaf5b0f16 100644
--- a/gdb/remote-vx68.c
+++ b/gdb/remote-vx68.c
@@ -30,7 +30,7 @@
#include "gdbcore.h"
#include "command.h"
#include "symtab.h"
-#include "symfile.h" /* for struct complaint */
+#include "symfile.h"
#include "regcache.h"
#include "gdb_string.h"
diff --git a/gdb/remote-vxmips.c b/gdb/remote-vxmips.c
index 8be4a2f9464..e0f7fc3dfd0 100644
--- a/gdb/remote-vxmips.c
+++ b/gdb/remote-vxmips.c
@@ -30,7 +30,7 @@
#include "gdbcore.h"
#include "command.h"
#include "symtab.h"
-#include "symfile.h" /* for struct complaint */
+#include "symfile.h"
#include "regcache.h"
#include "gdb_string.h"
diff --git a/gdb/remote-vxsparc.c b/gdb/remote-vxsparc.c
index 294e940f500..ac52542b807 100644
--- a/gdb/remote-vxsparc.c
+++ b/gdb/remote-vxsparc.c
@@ -30,7 +30,7 @@
#include "gdbcore.h"
#include "command.h"
#include "symtab.h"
-#include "symfile.h" /* for struct complaint */
+#include "symfile.h"
#include "regcache.h"
#include "gdb_string.h"
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index e6a68ef202b..d3ad2a5c955 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -465,6 +465,7 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
int prev_insn_was_prologue_insn = 1;
int num_skip_non_prologue_insns = 0;
const struct bfd_arch_info *arch_info = gdbarch_bfd_arch_info (current_gdbarch);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
/* Attempt to find the end of the prologue when no limit is specified.
Note that refine_prologue_limit() has been written so that it may
@@ -694,7 +695,7 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
{ /* mr r31, r1 */
fdata->frameless = 0;
framep = 1;
- fdata->alloca_reg = 31;
+ fdata->alloca_reg = (tdep->ppc_gp0_regnum + 31);
continue;
/* Another way to set up the frame pointer. */
@@ -703,7 +704,8 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
{ /* addi rX, r1, 0x0 */
fdata->frameless = 0;
framep = 1;
- fdata->alloca_reg = (op & ~0x38010000) >> 21;
+ fdata->alloca_reg = (tdep->ppc_gp0_regnum
+ + ((op & ~0x38010000) >> 21));
continue;
}
/* AltiVec related instructions. */
@@ -1989,7 +1991,8 @@ rs6000_stab_reg_to_regnum (int num)
static void
rs6000_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
{
- write_register (3, addr);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ write_register (tdep->ppc_gp0_regnum + 3, addr);
}
/* Write into appropriate registers a function return value
@@ -2011,7 +2014,7 @@ e500_store_return_value (struct type *type, char *valbuf)
memcpy (reg_val_buf, valbuf + copied, reg_size);
copied += reg_size;
- write_register_gen (regnum, reg_val_buf);
+ deprecated_write_register_gen (regnum, reg_val_buf);
i++;
}
}
@@ -2793,7 +2796,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
case bfd_mach_ppc_7400:
tdep->ppc_vr0_regnum = 119;
- tdep->ppc_vrsave_regnum = 153;
+ tdep->ppc_vrsave_regnum = 152;
tdep->ppc_ev0_regnum = -1;
tdep->ppc_ev31_regnum = -1;
break;
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index f19e4ddfdd8..da415edbd08 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -1595,10 +1595,10 @@ s390_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
else if (is_double_arg (type)
&& gr <= 5)
{
- write_register_gen (S390_GP0_REGNUM + gr,
- VALUE_CONTENTS (arg));
- write_register_gen (S390_GP0_REGNUM + gr + 1,
- VALUE_CONTENTS (arg) + 4);
+ deprecated_write_register_gen (S390_GP0_REGNUM + gr,
+ VALUE_CONTENTS (arg));
+ deprecated_write_register_gen (S390_GP0_REGNUM + gr + 1,
+ VALUE_CONTENTS (arg) + 4);
gr += 2;
}
else
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index c5e5bf457d2..06940a1c418 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -1874,7 +1874,7 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
if (addrp)
*addrp = REGISTER_BYTE (live_regnum);
if (raw_buffer)
- read_register_gen (live_regnum, raw_buffer);
+ deprecated_read_register_gen (live_regnum, raw_buffer);
}
/* Extract from an array REGBUF containing the (raw) register state
@@ -2223,7 +2223,8 @@ sh64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
if (float_arg_index <= tdep->FLOAT_ARGLAST_REGNUM)
{
/* Goes in FR0...FR11 */
- write_register_gen (FP0_REGNUM + float_arg_index, val);
+ deprecated_write_register_gen (FP0_REGNUM + float_arg_index,
+ val);
fp_args[float_arg_index] = 1;
/* Skip the corresponding general argument register. */
int_argreg ++;
@@ -2266,7 +2267,7 @@ sh64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
call the gdbarch function to do register
writes, and that will properly know how to deal
with pseudoregs. */
- write_register_gen (regnum, val);
+ deprecated_write_register_gen (regnum, val);
fp_args[double_arg_index] = 1;
fp_args[double_arg_index + 1] = 1;
/* Skip the corresponding general argument register. */
@@ -2501,7 +2502,7 @@ sh64_store_return_value (struct type *type, char *valbuf)
if (len == 4)
{
/* Return value stored in FP0_REGNUM */
- write_register_gen (FP0_REGNUM, valbuf);
+ deprecated_write_register_gen (FP0_REGNUM, valbuf);
}
if (len == 8)
{
@@ -2524,10 +2525,10 @@ sh64_store_return_value (struct type *type, char *valbuf)
offset = REGISTER_RAW_SIZE (return_register) - len;
memcpy (buf + offset, valbuf, len);
- write_register_gen (return_register, buf);
+ deprecated_write_register_gen (return_register, buf);
}
else
- write_register_gen (return_register, valbuf);
+ deprecated_write_register_gen (return_register, valbuf);
}
}
@@ -4289,10 +4290,10 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_pc_regnum (gdbarch, 16);
set_gdbarch_register_size (gdbarch, 4);
set_gdbarch_register_bytes (gdbarch, SH_DEFAULT_NUM_REGS * 4);
- set_gdbarch_do_registers_info (gdbarch, sh_do_registers_info);
+ set_gdbarch_deprecated_do_registers_info (gdbarch, sh_do_registers_info);
set_gdbarch_breakpoint_from_pc (gdbarch, sh_breakpoint_from_pc);
set_gdbarch_frame_chain (gdbarch, sh_frame_chain);
- set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+ set_gdbarch_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
set_gdbarch_init_extra_frame_info (gdbarch, sh_init_extra_frame_info);
set_gdbarch_deprecated_extract_return_value (gdbarch, sh_extract_return_value);
set_gdbarch_push_arguments (gdbarch, sh_push_arguments);
@@ -4516,7 +4517,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_pseudo_register_read (gdbarch, sh64_pseudo_register_read);
set_gdbarch_pseudo_register_write (gdbarch, sh64_pseudo_register_write);
- set_gdbarch_do_registers_info (gdbarch, sh64_do_registers_info);
+ set_gdbarch_deprecated_do_registers_info (gdbarch, sh64_do_registers_info);
set_gdbarch_frame_init_saved_regs (gdbarch, sh64_nofp_frame_init_saved_regs);
set_gdbarch_breakpoint_from_pc (gdbarch, sh_sh64_breakpoint_from_pc);
set_gdbarch_init_extra_frame_info (gdbarch, sh64_init_extra_frame_info);
diff --git a/gdb/solib-sunos.c b/gdb/solib-sunos.c
index 374ec253a01..ae115673c2b 100644
--- a/gdb/solib-sunos.c
+++ b/gdb/solib-sunos.c
@@ -39,6 +39,8 @@
#include "gdbcore.h"
#include "inferior.h"
#include "solist.h"
+#include "bcache.h"
+#include "regcache.h"
/* Link map info to include in an allocated so_list entry */
@@ -135,10 +137,8 @@ allocate_rt_common_objfile (void)
objfile = (struct objfile *) xmalloc (sizeof (struct objfile));
memset (objfile, 0, sizeof (struct objfile));
objfile->md = NULL;
- obstack_specify_allocation (&objfile->psymbol_cache.cache, 0, 0,
- xmalloc, xfree);
- obstack_specify_allocation (&objfile->macro_cache.cache, 0, 0,
- xmalloc, xfree);
+ objfile->psymbol_cache = bcache_xmalloc ();
+ objfile->macro_cache = bcache_xmalloc ();
obstack_specify_allocation (&objfile->psymbol_obstack, 0, 0, xmalloc,
xfree);
obstack_specify_allocation (&objfile->symbol_obstack, 0, 0, xmalloc,
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 3f98a1eb433..78161e0d249 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -762,6 +762,77 @@ svr4_current_sos (void)
return head;
}
+/* Get the address of the link_map for a given OBJFILE. Loop through
+ the link maps, and return the address of the one corresponding to
+ the given objfile. Note that this function takes into account that
+ objfile can be the main executable, not just a shared library. The
+ main executable has always an empty name field in the linkmap. */
+
+CORE_ADDR
+svr4_fetch_objfile_link_map (struct objfile *objfile)
+{
+ CORE_ADDR lm;
+
+ if ((debug_base = locate_base ()) == 0)
+ return 0; /* failed somehow... */
+
+ /* Position ourselves on the first link map. */
+ lm = first_link_map_member ();
+ while (lm)
+ {
+ /* Get info on the layout of the r_debug and link_map structures. */
+ struct link_map_offsets *lmo = SVR4_FETCH_LINK_MAP_OFFSETS ();
+ int errcode;
+ char *buffer;
+ struct lm_info objfile_lm_info;
+ struct cleanup *old_chain;
+ CORE_ADDR name_address;
+ char *l_name_buf = xmalloc (lmo->l_name_size);
+ old_chain = make_cleanup (xfree, l_name_buf);
+
+ /* Set up the buffer to contain the portion of the link_map
+ structure that gdb cares about. Note that this is not the
+ whole link_map structure. */
+ objfile_lm_info.lm = xmalloc (lmo->link_map_size);
+ make_cleanup (xfree, objfile_lm_info.lm);
+ memset (objfile_lm_info.lm, 0, lmo->link_map_size);
+
+ /* Read the link map into our internal structure. */
+ read_memory (lm, objfile_lm_info.lm, lmo->link_map_size);
+
+ /* Read address of name from target memory to GDB. */
+ read_memory (lm + lmo->l_name_offset, l_name_buf, lmo->l_name_size);
+
+ /* Extract this object's name. */
+ name_address = extract_address (l_name_buf,
+ lmo->l_name_size);
+ target_read_string (name_address, &buffer,
+ SO_NAME_MAX_PATH_SIZE - 1, &errcode);
+ make_cleanup (xfree, buffer);
+ if (errcode != 0)
+ {
+ warning ("svr4_fetch_objfile_link_map: Can't read pathname for load map: %s\n",
+ safe_strerror (errcode));
+ }
+ else
+ {
+ /* Is this the linkmap for the file we want? */
+ /* If the file is not a shared library and has no name,
+ we are sure it is the main executable, so we return that. */
+ if ((buffer && strcmp (buffer, objfile->name) == 0)
+ || (!(objfile->flags & OBJF_SHARED) && (strcmp (buffer, "") == 0)))
+ {
+ do_cleanups (old_chain);
+ return lm;
+ }
+ }
+ /* Not the file we wanted, continue checking. */
+ lm = extract_address (objfile_lm_info.lm + lmo->l_next_offset,
+ lmo->l_next_size);
+ do_cleanups (old_chain);
+ }
+ return 0;
+}
/* On some systems, the only way to recognize the link map entry for
the main executable file is by looking at its name. Return
diff --git a/gdb/solib-svr4.h b/gdb/solib-svr4.h
index 8611dff8e6e..e41c240f2f8 100644
--- a/gdb/solib-svr4.h
+++ b/gdb/solib-svr4.h
@@ -72,6 +72,10 @@ struct link_map_offsets
extern void set_solib_svr4_fetch_link_map_offsets
(struct gdbarch *gdbarch, struct link_map_offsets *(*func) (void));
+/* This function is called by thread_db.c. Return the address of the
+ link map for the given objfile. */
+extern CORE_ADDR svr4_fetch_objfile_link_map (struct objfile *objfile);
+
/* legacy_svr4_fetch_link_map_offsets_hook is a pointer to a function
which is used to fetch link map offsets. It will only be set
by solib-legacy.c, if at all. */
diff --git a/gdb/source.c b/gdb/source.c
index 5c88a55db81..0107bfa2355 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1197,8 +1197,9 @@ print_source_lines (struct symtab *s, int line, int stopline, int noerror)
/* Print a list of files and line numbers which a user may choose from
in order to list a function which was specified ambiguously (as with
- `list classname::overloadedfuncname', for example). The vector in
- SALS provides the filenames and line numbers. */
+ `list classname::overloadedfuncname', or 'list objectiveCSelector:).
+ The vector in SALS provides the filenames and line numbers.
+ NOTE: some of the SALS may have no filename or line information! */
static void
ambiguous_line_spec (struct symtabs_and_lines *sals)
@@ -1220,7 +1221,7 @@ line_info (char *arg, int from_tty)
CORE_ADDR start_pc, end_pc;
int i;
- INIT_SAL (&sal); /* initialize to zeroes */
+ init_sal (&sal); /* initialize to zeroes */
if (arg == 0)
{
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 033cc8170bf..0fce4732ab2 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -956,7 +956,7 @@ sparc_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
*lval = lval_register;
addr = REGISTER_BYTE (regnum);
if (raw_buffer != NULL)
- read_register_gen (regnum, raw_buffer);
+ deprecated_read_register_gen (regnum, raw_buffer);
}
if (addrp != NULL)
*addrp = addr;
@@ -1245,12 +1245,12 @@ sparc_pop_frame (void)
if (fsr[FPS_REGNUM])
{
read_memory (fsr[FPS_REGNUM], raw_buffer, SPARC_INTREG_SIZE);
- write_register_gen (FPS_REGNUM, raw_buffer);
+ deprecated_write_register_gen (FPS_REGNUM, raw_buffer);
}
if (fsr[CPS_REGNUM])
{
read_memory (fsr[CPS_REGNUM], raw_buffer, SPARC_INTREG_SIZE);
- write_register_gen (CPS_REGNUM, raw_buffer);
+ deprecated_write_register_gen (CPS_REGNUM, raw_buffer);
}
}
}
@@ -1609,37 +1609,37 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno)
for (regi = 0; regi <= R_I7; regi++)
if ((regno == -1) || (regno == regi))
- read_register_gen (regi, (char *) (regp + regi) + offset);
+ deprecated_read_register_gen (regi, (char *) (regp + regi) + offset);
if ((regno == -1) || (regno == PC_REGNUM))
- read_register_gen (PC_REGNUM, (char *) (regp + R_PC) + offset);
+ deprecated_read_register_gen (PC_REGNUM, (char *) (regp + R_PC) + offset);
if ((regno == -1) || (regno == NPC_REGNUM))
- read_register_gen (NPC_REGNUM, (char *) (regp + R_nPC) + offset);
+ deprecated_read_register_gen (NPC_REGNUM, (char *) (regp + R_nPC) + offset);
if ((regno == -1) || (regno == Y_REGNUM))
- read_register_gen (Y_REGNUM, (char *) (regp + R_Y) + offset);
+ deprecated_read_register_gen (Y_REGNUM, (char *) (regp + R_Y) + offset);
if (GDB_TARGET_IS_SPARC64)
{
#ifdef R_CCR
if (regno == -1 || regno == CCR_REGNUM)
- read_register_gen (CCR_REGNUM, ((char *) (regp + R_CCR)) + offset);
+ deprecated_read_register_gen (CCR_REGNUM, ((char *) (regp + R_CCR)) + offset);
#endif
#ifdef R_FPRS
if (regno == -1 || regno == FPRS_REGNUM)
- read_register_gen (FPRS_REGNUM, ((char *) (regp + R_FPRS)) + offset);
+ deprecated_read_register_gen (FPRS_REGNUM, ((char *) (regp + R_FPRS)) + offset);
#endif
#ifdef R_ASI
if (regno == -1 || regno == ASI_REGNUM)
- read_register_gen (ASI_REGNUM, ((char *) (regp + R_ASI)) + offset);
+ deprecated_read_register_gen (ASI_REGNUM, ((char *) (regp + R_ASI)) + offset);
#endif
}
else /* sparc32 */
{
#ifdef R_PS
if (regno == -1 || regno == PS_REGNUM)
- read_register_gen (PS_REGNUM, ((char *) (regp + R_PS)) + offset);
+ deprecated_read_register_gen (PS_REGNUM, ((char *) (regp + R_PS)) + offset);
#endif
/* For 64-bit hosts, R_WIM and R_TBR may not be defined.
@@ -1655,18 +1655,18 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno)
#if defined (R_WIM)
if (regno == -1 || regno == WIM_REGNUM)
- read_register_gen (WIM_REGNUM, ((char *) (regp + R_WIM)) + offset);
+ deprecated_read_register_gen (WIM_REGNUM, ((char *) (regp + R_WIM)) + offset);
#else
if (regno == -1 || regno == WIM_REGNUM)
- read_register_gen (WIM_REGNUM, NULL);
+ deprecated_read_register_gen (WIM_REGNUM, NULL);
#endif
#if defined (R_TBR)
if (regno == -1 || regno == TBR_REGNUM)
- read_register_gen (TBR_REGNUM, ((char *) (regp + R_TBR)) + offset);
+ deprecated_read_register_gen (TBR_REGNUM, ((char *) (regp + R_TBR)) + offset);
#else
if (regno == -1 || regno == TBR_REGNUM)
- read_register_gen (TBR_REGNUM, NULL);
+ deprecated_read_register_gen (TBR_REGNUM, NULL);
#endif
}
}
@@ -2099,7 +2099,7 @@ sparc32_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
for (j = 0;
j < m_arg->len && oregnum < 6;
j += SPARC_INTREG_SIZE, oregnum++)
- write_register_gen (O0_REGNUM + oregnum, m_arg->contents + j);
+ deprecated_write_register_gen (O0_REGNUM + oregnum, m_arg->contents + j);
}
return sp;
@@ -2155,7 +2155,7 @@ sparc_store_return_value (struct type *type, char *valbuf)
memset (buffer, 0, REGISTER_RAW_SIZE (regno));
memcpy (buffer + REGISTER_RAW_SIZE (regno) - TYPE_LENGTH (type), valbuf,
TYPE_LENGTH (type));
- write_register_gen (regno, buffer);
+ deprecated_write_register_gen (regno, buffer);
}
else
write_register_bytes (REGISTER_BYTE (regno), valbuf, TYPE_LENGTH (type));
@@ -2440,7 +2440,7 @@ sparc64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
{
int oreg = O0_REGNUM + register_counter;
- write_register_gen (oreg, VALUE_CONTENTS (copyarg) + j);
+ deprecated_write_register_gen (oreg, VALUE_CONTENTS (copyarg) + j);
register_counter += 1;
}
}
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 4697b4067e7..fcd6046d8dd 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -169,6 +169,8 @@ static int
read_cfront_member_functions (struct field_info *, char **,
struct type *, struct objfile *);
+static char *find_name_end (char *name);
+
/* end new functions added for cfront support */
static void
@@ -185,10 +187,8 @@ resolve_symbol_reference (struct objfile *, struct symbol *, char *);
void stabsread_clear_cache (void);
-static const char vptr_name[] =
-{'_', 'v', 'p', 't', 'r', CPLUS_MARKER, '\0'};
-static const char vb_name[] =
-{'_', 'v', 'b', CPLUS_MARKER, '\0'};
+static const char vptr_name[] = "_vptr$";
+static const char vb_name[] = "_vb$";
/* Define this as 1 if a pcc declaration of a char or short argument
gives the correct address. Otherwise assume pcc gives the
@@ -202,46 +202,46 @@ static const char vb_name[] =
#define BELIEVE_PCC_PROMOTION_TYPE 0
#endif
-static struct complaint invalid_cpp_abbrev_complaint =
+static struct deprecated_complaint invalid_cpp_abbrev_complaint =
{"invalid C++ abbreviation `%s'", 0, 0};
-static struct complaint invalid_cpp_type_complaint =
+static struct deprecated_complaint invalid_cpp_type_complaint =
{"C++ abbreviated type name unknown at symtab pos %d", 0, 0};
-static struct complaint member_fn_complaint =
+static struct deprecated_complaint member_fn_complaint =
{"member function type missing, got '%c'", 0, 0};
-static struct complaint const_vol_complaint =
+static struct deprecated_complaint const_vol_complaint =
{"const/volatile indicator missing, got '%c'", 0, 0};
-static struct complaint error_type_complaint =
+static struct deprecated_complaint error_type_complaint =
{"couldn't parse type; debugger out of date?", 0, 0};
-static struct complaint invalid_member_complaint =
+static struct deprecated_complaint invalid_member_complaint =
{"invalid (minimal) member type data format at symtab pos %d.", 0, 0};
-static struct complaint range_type_base_complaint =
+static struct deprecated_complaint range_type_base_complaint =
{"base type %d of range type is not defined", 0, 0};
-static struct complaint reg_value_complaint =
+static struct deprecated_complaint reg_value_complaint =
{"register number %d too large (max %d) in symbol %s", 0, 0};
-static struct complaint vtbl_notfound_complaint =
+static struct deprecated_complaint vtbl_notfound_complaint =
{"virtual function table pointer not found when defining class `%s'", 0, 0};
-static struct complaint unrecognized_cplus_name_complaint =
+static struct deprecated_complaint unrecognized_cplus_name_complaint =
{"Unknown C++ symbol name `%s'", 0, 0};
-static struct complaint rs6000_builtin_complaint =
+static struct deprecated_complaint rs6000_builtin_complaint =
{"Unknown builtin type %d", 0, 0};
-static struct complaint unresolved_sym_chain_complaint =
+static struct deprecated_complaint unresolved_sym_chain_complaint =
{"%s: common block `%s' from global_sym_chain unresolved", 0, 0};
-static struct complaint stabs_general_complaint =
+static struct deprecated_complaint stabs_general_complaint =
{"%s", 0, 0};
-static struct complaint lrs_general_complaint =
+static struct deprecated_complaint lrs_general_complaint =
{"%s", 0, 0};
/* Make a list of forward references which haven't been defined. */
@@ -311,7 +311,7 @@ dbx_lookup_type (int typenums[2])
if (filenum < 0 || filenum >= n_this_object_header_files)
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"\
Invalid symbol data: type number (%d,%d) out of range at symtab pos %d.",
0, 0};
@@ -618,11 +618,11 @@ static int
read_cfront_baseclasses (struct field_info *fip, char **pp, struct type *type,
struct objfile *objfile)
{
- static struct complaint msg_unknown =
+ static struct deprecated_complaint msg_unknown =
{"\
Unsupported token in stabs string %s.\n",
0, 0};
- static struct complaint msg_notfound =
+ static struct deprecated_complaint msg_notfound =
{"\
Unable to find base type for %s.\n",
0, 0};
@@ -692,7 +692,7 @@ read_cfront_baseclasses (struct field_info *fip, char **pp, struct type *type,
/* Bad visibility format. Complain and treat it as
public. */
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{
"Unknown visibility `%c' for baseclass", 0, 0};
complain (&msg, new->visibility);
@@ -810,7 +810,7 @@ read_cfront_member_functions (struct field_info *fip, char **pp,
ref_func = lookup_symbol (fname, 0, VAR_NAMESPACE, 0, 0); /* demangled name */
if (!ref_func)
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"\
Unable to find function symbol for %s\n",
0, 0};
@@ -1273,7 +1273,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
struct objfile *objfile)
{
register struct symbol *sym;
- char *p = (char *) strchr (string, ':');
+ char *p = (char *) find_name_end (string);
int deftype;
int synonym = 0;
register int i;
@@ -2006,7 +2006,8 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
a typedef for "foo". Unfortunately, cfront never makes the typedef
when translating C++ into C. We make the typedef here so that
"ptype foo" works as expected for cfront translated code. */
- else if (current_subfile->language == language_cplus)
+ else if ((current_subfile->language == language_cplus)
+ || (current_subfile->language == language_objc))
synonym = 1;
SYMBOL_TYPE (sym) = read_type (&p, objfile);
@@ -2434,7 +2435,7 @@ again:
{
/* Complain and keep going, so compilers can invent new
cross-reference types. */
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Unrecognized cross-reference type `%c'", 0, 0};
complain (&msg, (*pp)[0]);
code = TYPE_CODE_STRUCT;
@@ -2659,7 +2660,7 @@ again:
++*pp;
else
{
- static struct complaint msg = {
+ static struct deprecated_complaint msg = {
"Prototyped function type didn't end arguments with `#':\n%s",
0, 0
};
@@ -3179,8 +3180,7 @@ read_member_functions (struct field_info *fip, char **pp, struct type *type,
/* This lets the user type "break operator+".
We could just put in "+" as the name, but that wouldn't
work for "*". */
- static char opname[32] =
- {'o', 'p', CPLUS_MARKER};
+ static char opname[32] = "op$";
char *o = opname + 3;
/* Skip past '::'. */
@@ -4018,7 +4018,7 @@ read_baseclasses (struct field_info *fip, char **pp, struct type *type,
default:
/* Unknown character. Complain and treat it as non-virtual. */
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{
"Unknown virtual character `%c' for baseclass", 0, 0};
complain (&msg, **pp);
@@ -4037,7 +4037,7 @@ read_baseclasses (struct field_info *fip, char **pp, struct type *type,
/* Bad visibility format. Complain and treat it as
public. */
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{
"Unknown visibility `%c' for baseclass", 0, 0
};
@@ -4138,8 +4138,9 @@ read_tilde_fields (struct field_info *fip, char **pp, struct type *type,
i >= TYPE_N_BASECLASSES (t);
--i)
{
- if (!strncmp (TYPE_FIELD_NAME (t, i), vptr_name,
- sizeof (vptr_name) - 1))
+ char *name = TYPE_FIELD_NAME (t, i);
+ if (!strncmp (name, vptr_name, sizeof (vptr_name) - 2)
+ && is_cplus_marker (name[sizeof (vptr_name) - 2]))
{
TYPE_VPTR_FIELDNO (type) = i;
goto gotit;
@@ -4209,7 +4210,7 @@ read_cfront_static_fields (struct field_info *fip, char **pp, struct type *type,
ref_static = lookup_symbol (sname, 0, VAR_NAMESPACE, 0, 0); /*demangled_name */
if (!ref_static)
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"\
Unable to find symbol for static data field %s\n",
0, 0};
@@ -4388,7 +4389,7 @@ attach_fields_to_type (struct field_info *fip, register struct type *type,
default:
/* Unknown visibility. Complain and treat it as public. */
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{
"Unknown visibility `%c' for field", 0, 0};
complain (&msg, fip->list->visibility);
@@ -4401,7 +4402,7 @@ attach_fields_to_type (struct field_info *fip, register struct type *type,
}
-static struct complaint multiply_defined_struct =
+static struct deprecated_complaint multiply_defined_struct =
{"struct/union type gets multiply defined: %s%s", 0, 0};
@@ -5213,7 +5214,7 @@ common_block_start (char *name, struct objfile *objfile)
{
if (common_block_name != NULL)
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{
"Invalid symbol data: common block within common block",
0, 0};
@@ -5243,7 +5244,7 @@ common_block_end (struct objfile *objfile)
if (common_block_name == NULL)
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"ECOMM symbol unmatched by BCOMM", 0, 0};
complain (&msg);
return;
@@ -5358,7 +5359,7 @@ cleanup_undefined_types (void)
if (typename == NULL)
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"need a type name", 0, 0};
complain (&msg);
break;
@@ -5383,7 +5384,7 @@ cleanup_undefined_types (void)
default:
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"\
GDB internal error. cleanup_undefined_types with bad type %d.", 0, 0};
complain (&msg, TYPE_CODE (*type));
@@ -5618,6 +5619,32 @@ finish_global_stabs (struct objfile *objfile)
}
}
+/* Find the end of the name, delimited by a ':', but don't match
+ ObjC symbols which look like -[Foo bar::]:bla. */
+static char *
+find_name_end (char *name)
+{
+ char *s = name;
+ if (s[0] == '-' || *s == '+')
+ {
+ /* Must be an ObjC method symbol. */
+ if (s[1] != '[')
+ {
+ error ("invalid symbol name \"%s\"", name);
+ }
+ s = strchr (s, ']');
+ if (s == NULL)
+ {
+ error ("invalid symbol name \"%s\"", name);
+ }
+ return strchr (s, ':');
+ }
+ else
+ {
+ return strchr (s, ':');
+ }
+}
+
/* Initializer for this module */
void
diff --git a/gdb/stabsread.h b/gdb/stabsread.h
index d470d477a82..1371f6c56ce 100644
--- a/gdb/stabsread.h
+++ b/gdb/stabsread.h
@@ -128,8 +128,8 @@ EXTERN int n_this_object_header_files;
EXTERN int n_allocated_this_object_header_files;
-extern struct complaint unknown_symtype_complaint;
-extern struct complaint unknown_symchar_complaint;
+extern struct deprecated_complaint unknown_symtype_complaint;
+extern struct deprecated_complaint unknown_symchar_complaint;
extern struct type *read_type (char **, struct objfile *);
diff --git a/gdb/stack.c b/gdb/stack.c
index 83fd26e476b..f36e651a375 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -50,9 +50,9 @@ void (*selected_frame_level_changed_hook) (int);
void _initialize_stack (void);
-/* Prototypes for local functions. */
+void return_command (char *, int);
-static void return_command (char *, int);
+/* Prototypes for local functions. */
static void down_command (char *, int);
@@ -358,7 +358,10 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args)
/* Do this regardless of SOURCE because we don't have any source
to list for this frame. */
if (level >= 0)
- printf_filtered ("#%-2d ", level);
+ {
+ ui_out_text (uiout, "#");
+ ui_out_field_fmt_int (uiout, 2, ui_left, "level", level);
+ }
annotate_function_call ();
printf_filtered ("<function called from gdb>\n");
annotate_frame_end ();
@@ -371,7 +374,10 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args)
/* Do this regardless of SOURCE because we don't have any source
to list for this frame. */
if (level >= 0)
- printf_filtered ("#%-2d ", level);
+ {
+ ui_out_text (uiout, "#");
+ ui_out_field_fmt_int (uiout, 2, ui_left, "level", level);
+ }
annotate_signal_handler_caller ();
printf_filtered ("<signal handler called>\n");
annotate_frame_end ();
@@ -548,8 +554,7 @@ print_frame (struct frame_info *fi,
if (level >= 0)
{
ui_out_text (uiout, "#");
- ui_out_field_fmt (uiout, "level", "%-2d", level);
- ui_out_spaces (uiout, 1);
+ ui_out_field_fmt_int (uiout, 2, ui_left, "level", level);
}
if (addressprint)
if (fi->pc != sal.pc || !sal.symtab || source == LOC_AND_ADDRESS)
@@ -1755,12 +1760,6 @@ down_command (char *count_exp, int from_tty)
}
void
-return_command_wrapper (char *retval_exp, int from_tty)
-{
- return_command (retval_exp, from_tty);
-}
-
-static void
return_command (char *retval_exp, int from_tty)
{
struct symbol *thisfun;
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 66bbf714984..28c84f9814e 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -299,16 +299,16 @@ sort_symtab_syms (register struct symtab *s)
may be part of a larger string and we are only saving a substring. */
char *
-obsavestring (char *ptr, int size, struct obstack *obstackp)
+obsavestring (const char *ptr, int size, struct obstack *obstackp)
{
register char *p = (char *) obstack_alloc (obstackp, size + 1);
/* Open-coded memcpy--saves function call time. These strings are usually
short. FIXME: Is this really still true with a compiler that can
inline memcpy? */
{
- register char *p1 = ptr;
+ register const char *p1 = ptr;
register char *p2 = p;
- char *end = ptr + size;
+ const char *end = ptr + size;
while (p1 != end)
*p2++ = *p1++;
}
@@ -1952,6 +1952,7 @@ init_filename_language_table (void)
/* OBSOLETE add_filename_language (".ch", language_chill); */
/* OBSOLETE add_filename_language (".c186", language_chill); */
/* OBSOLETE add_filename_language (".c286", language_chill); */
+ add_filename_language (".m", language_objc);
add_filename_language (".f", language_fortran);
add_filename_language (".F", language_fortran);
add_filename_language (".s", language_asm);
diff --git a/gdb/symfile.h b/gdb/symfile.h
index 39eb3080f13..62dfcefb54b 100644
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -25,6 +25,10 @@
/* This file requires that you first include "bfd.h". */
+/* Opaque declarations. */
+
+struct obstack;
+
/* Partial symbols are stored in the psymbol_cache and pointers to them
are kept in a dynamically grown array that is obtained from malloc and
grown as necessary via realloc. Each objfile typically has two of these,
@@ -208,7 +212,7 @@ extern void sort_symtab_syms (struct symtab *);
(and add a null character at the end in the copy).
Returns the address of the copy. */
-extern char *obsavestring (char *, int, struct obstack *);
+extern char *obsavestring (const char *, int, struct obstack *);
/* Concatenate strings S1, S2 and S3; return the new string.
Space is found in the symbol_obstack. */
diff --git a/gdb/symtab.c b/gdb/symtab.c
index a4322926e2f..2ecc40bc8c8 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -50,11 +50,6 @@
#include <ctype.h>
#include "cp-abi.h"
-/* Prototype for one function in parser-defs.h,
- instead of including that entire file. */
-
-extern char *find_template_name_end (char *);
-
/* Prototypes for local functions */
static void completion_list_add_name (char *, char *, int, char *, char *);
@@ -121,19 +116,6 @@ struct type *builtin_type_error;
const struct block *block_found;
-/* While the C++ support is still in flux, issue a possibly helpful hint on
- using the new command completion feature on single quoted demangled C++
- symbols. Remove when loose ends are cleaned up. FIXME -fnf */
-
-static void
-cplusplus_hint (char *name)
-{
- while (*name == '\'')
- name++;
- printf_filtered ("Hint: try '%s<TAB> or '%s<ESC-?>\n", name, name);
- printf_filtered ("(Note leading single quote.)\n");
-}
-
/* Check for a symtab of a specific name; first in symtabs, then in
psymtabs. *If* there is no '/' in the name, a match after a '/'
in the symtab filename will also work. */
@@ -385,6 +367,33 @@ gdb_mangle_name (struct type *type, int method_id, int signature_id)
}
+/* Initialize the language dependent portion of a symbol
+ depending upon the language for the symbol. */
+void
+symbol_init_language_specific (struct general_symbol_info *gsymbol,
+ enum language language)
+{
+ gsymbol->language = language;
+ if (gsymbol->language == language_cplus
+ || gsymbol->language == language_java)
+ {
+ gsymbol->language_specific.cplus_specific.demangled_name = NULL;
+ }
+ else if (gsymbol->language == language_objc)
+ {
+ gsymbol->language_specific.objc_specific.demangled_name = NULL;
+ }
+ /* OBSOLETE else if (SYMBOL_LANGUAGE (symbol) == language_chill) */
+ /* OBSOLETE { */
+ /* OBSOLETE SYMBOL_CHILL_DEMANGLED_NAME (symbol) = NULL; */
+ /* OBSOLETE } */
+ else
+ {
+ memset (&gsymbol->language_specific, 0,
+ sizeof (gsymbol->language_specific));
+ }
+}
+
/* Initialize a symbol's mangled name. */
/* Try to initialize the demangled name for a symbol, based on the
@@ -461,7 +470,35 @@ symbol_init_demangled_name (struct general_symbol_info *gsymbol,
#endif
}
+/* Return the demangled name for a symbol based on the language for
+ that symbol. If no demangled name exists, return NULL. */
+char *
+symbol_demangled_name (struct general_symbol_info *gsymbol)
+{
+ if (gsymbol->language == language_cplus
+ || gsymbol->language == language_java)
+ return gsymbol->language_specific.cplus_specific.demangled_name;
+ else if (gsymbol->language == language_objc)
+ return gsymbol->language_specific.objc_specific.demangled_name;
+
+ else
+ return NULL;
+
+ /* OBSOLETE (SYMBOL_LANGUAGE (symbol) == language_chill */
+ /* OBSOLETE ? SYMBOL_CHILL_DEMANGLED_NAME (symbol) */
+}
+
+/* Initialize the structure fields to zero values. */
+void
+init_sal (struct symtab_and_line *sal)
+{
+ sal->symtab = 0;
+ sal->section = 0;
+ sal->line = 0;
+ sal->pc = 0;
+ sal->end = 0;
+}
@@ -1655,94 +1692,6 @@ find_pc_symtab (CORE_ADDR pc)
}
-#if 0
-
-/* Find the closest symbol value (of any sort -- function or variable)
- for a given address value. Slow but complete. (currently unused,
- mainly because it is too slow. We could fix it if each symtab and
- psymtab had contained in it the addresses ranges of each of its
- sections, which also would be required to make things like "info
- line *0x2345" cause psymtabs to be converted to symtabs). */
-
-struct symbol *
-find_addr_symbol (CORE_ADDR addr, struct symtab **symtabp, CORE_ADDR *symaddrp)
-{
- struct symtab *symtab, *best_symtab;
- struct objfile *objfile;
- register int bot, top;
- register struct symbol *sym;
- register CORE_ADDR sym_addr;
- struct block *block;
- int blocknum;
-
- /* Info on best symbol seen so far */
-
- register CORE_ADDR best_sym_addr = 0;
- struct symbol *best_sym = 0;
-
- /* FIXME -- we should pull in all the psymtabs, too! */
- ALL_SYMTABS (objfile, symtab)
- {
- /* Search the global and static blocks in this symtab for
- the closest symbol-address to the desired address. */
-
- for (blocknum = GLOBAL_BLOCK; blocknum <= STATIC_BLOCK; blocknum++)
- {
- QUIT;
- block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab), blocknum);
- ALL_BLOCK_SYMBOLS (block, bot, sym)
- {
- switch (SYMBOL_CLASS (sym))
- {
- case LOC_STATIC:
- case LOC_LABEL:
- sym_addr = SYMBOL_VALUE_ADDRESS (sym);
- break;
-
- case LOC_INDIRECT:
- sym_addr = SYMBOL_VALUE_ADDRESS (sym);
- /* An indirect symbol really lives at *sym_addr,
- * so an indirection needs to be done.
- * However, I am leaving this commented out because it's
- * expensive, and it's possible that symbolization
- * could be done without an active process (in
- * case this read_memory will fail). RT
- sym_addr = read_memory_unsigned_integer
- (sym_addr, TARGET_PTR_BIT / TARGET_CHAR_BIT);
- */
- break;
-
- case LOC_BLOCK:
- sym_addr = BLOCK_START (SYMBOL_BLOCK_VALUE (sym));
- break;
-
- default:
- continue;
- }
-
- if (sym_addr <= addr)
- if (sym_addr > best_sym_addr)
- {
- /* Quit if we found an exact match. */
- best_sym = sym;
- best_sym_addr = sym_addr;
- best_symtab = symtab;
- if (sym_addr == addr)
- goto done;
- }
- }
- }
- }
-
-done:
- if (symtabp)
- *symtabp = best_symtab;
- if (symaddrp)
- *symaddrp = best_sym_addr;
- return best_sym;
-}
-#endif /* 0 */
-
/* Find the source file and line number for a given PC value and SECTION.
Return a structure containing a symtab pointer, a line number,
and a pc range for the entire source line.
@@ -1797,7 +1746,7 @@ find_pc_sect_line (CORE_ADDR pc, struct sec *section, int notcurrent)
But what we want is the statement containing the instruction.
Fudge the pc to make sure we get that. */
- INIT_SAL (&val); /* initialize to zeroes */
+ init_sal (&val); /* initialize to zeroes */
/* It's tempting to assume that, if we can't find debugging info for
any function enclosing PC, that we shouldn't search for line
diff --git a/gdb/symtab.h b/gdb/symtab.h
index a78607d584e..46d3b972096 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -89,6 +89,11 @@ struct general_symbol_info
char *demangled_name;
}
cplus_specific;
+ struct objc_specific
+ {
+ char *demangled_name;
+ }
+ objc_specific;
#if 0
/* OBSOLETE struct chill_specific *//* For Chill */
/* OBSOLETE { */
@@ -121,6 +126,14 @@ struct general_symbol_info
extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, asection *);
+/* Note that all the following SYMBOL_* macros are used with the
+ SYMBOL argument being either a partial symbol, a minimal symbol or
+ a full symbol. All three types have a ginfo field. In particular
+ the SYMBOL_INIT_LANGUAGE_SPECIFIC, SYMBOL_INIT_DEMANGLED_NAME,
+ SYMBOL_DEMANGLED_NAME macros cannot be entirely substituted by
+ functions, unless the callers are changed to pass in the ginfo
+ field only, instead of the SYMBOL parameter. */
+
#define SYMBOL_NAME(symbol) (symbol)->ginfo.name
#define SYMBOL_VALUE(symbol) (symbol)->ginfo.value.ivalue
#define SYMBOL_VALUE_ADDRESS(symbol) (symbol)->ginfo.value.address
@@ -134,49 +147,30 @@ extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, asection *);
#define SYMBOL_CPLUS_DEMANGLED_NAME(symbol) \
(symbol)->ginfo.language_specific.cplus_specific.demangled_name
-/* Macro that initializes the language dependent portion of a symbol
+/* Initializes the language dependent portion of a symbol
depending upon the language for the symbol. */
-
-#define SYMBOL_INIT_LANGUAGE_SPECIFIC(symbol,language) \
- do { \
- SYMBOL_LANGUAGE (symbol) = language; \
- if (SYMBOL_LANGUAGE (symbol) == language_cplus \
- || SYMBOL_LANGUAGE (symbol) == language_java \
- ) \
- { \
- SYMBOL_CPLUS_DEMANGLED_NAME (symbol) = NULL; \
- } \
- /* OBSOLETE else if (SYMBOL_LANGUAGE (symbol) == language_chill) */ \
- /* OBSOLETE { */ \
- /* OBSOLETE SYMBOL_CHILL_DEMANGLED_NAME (symbol) = NULL; */ \
- /* OBSOLETE } */ \
- else \
- { \
- memset (&(symbol)->ginfo.language_specific, 0, \
- sizeof ((symbol)->ginfo.language_specific)); \
- } \
- } while (0)
+#define SYMBOL_INIT_LANGUAGE_SPECIFIC(symbol,language) \
+ (symbol_init_language_specific (&(symbol)->ginfo, (language)))
+extern void symbol_init_language_specific (struct general_symbol_info *symbol,
+ enum language language);
#define SYMBOL_INIT_DEMANGLED_NAME(symbol,obstack) \
(symbol_init_demangled_name (&symbol->ginfo, (obstack)))
extern void symbol_init_demangled_name (struct general_symbol_info *symbol,
struct obstack *obstack);
-
-/* Macro that returns the demangled name for a symbol based on the language
- for that symbol. If no demangled name exists, returns NULL. */
-
-#define SYMBOL_DEMANGLED_NAME(symbol) \
- (SYMBOL_LANGUAGE (symbol) == language_cplus \
- || SYMBOL_LANGUAGE (symbol) == language_java \
- ? SYMBOL_CPLUS_DEMANGLED_NAME (symbol) \
- : /* OBSOLETE (SYMBOL_LANGUAGE (symbol) == language_chill */ \
- /* OBSOLETE ? SYMBOL_CHILL_DEMANGLED_NAME (symbol) */ \
- NULL)
+/* Return the demangled name for a symbol based on the language for
+ that symbol. If no demangled name exists, return NULL. */
+#define SYMBOL_DEMANGLED_NAME(symbol) \
+ (symbol_demangled_name (&(symbol)->ginfo))
+extern char *symbol_demangled_name (struct general_symbol_info *symbol);
/* OBSOLETE #define SYMBOL_CHILL_DEMANGLED_NAME(symbol) */
/* OBSOLETE (symbol)->ginfo.language_specific.chill_specific.demangled_name */
+#define SYMBOL_OBJC_DEMANGLED_NAME(symbol) \
+ (symbol)->ginfo.language_specific.objc_specific.demangled_name
+
/* Macro that returns the "natural source name" of a symbol. In C++ this is
the "demangled" form of the name if demangle is on and the "mangled" form
of the name if demangle is off. In other languages this is just the
@@ -611,8 +605,16 @@ enum address_class
LOC_UNRESOLVED,
/* Value is at a thread-specific location calculated by a
- target-specific method. */
+ target-specific method. This is used only by hppa. */
+
+ LOC_HP_THREAD_LOCAL_STATIC,
+ /* Value is at a thread-specific location calculated by a
+ target-specific method. SYMBOL_OBJFILE gives the object file
+ in which the symbol is defined; the symbol's value is the
+ offset into that objfile's thread-local storage for the current
+ thread. */
+
LOC_THREAD_LOCAL_STATIC,
/* The variable does not actually exist in the program.
@@ -684,6 +686,12 @@ struct symbol
{
/* Used by LOC_BASEREG and LOC_BASEREG_ARG. */
short basereg;
+
+ /* Used by LOC_THREAD_LOCAL_STATIC. The objfile in which this
+ symbol is defined. To find a thread-local variable (e.g., a
+ variable declared with the `__thread' storage class), we may
+ need to know which object file it's in. */
+ struct objfile *objfile;
}
aux_value;
@@ -705,6 +713,7 @@ struct symbol
#define SYMBOL_TYPE(symbol) (symbol)->type
#define SYMBOL_LINE(symbol) (symbol)->line
#define SYMBOL_BASEREG(symbol) (symbol)->aux_value.basereg
+#define SYMBOL_OBJFILE(symbol) (symbol)->aux_value.objfile
#define SYMBOL_ALIASES(symbol) (symbol)->aliases
#define SYMBOL_RANGES(symbol) (symbol)->ranges
@@ -736,15 +745,6 @@ struct partial_symbol
#define PSYMBOL_CLASS(psymbol) (psymbol)->aclass
-/* Source-file information. This describes the relation between source files,
- line numbers and addresses in the program text. */
-
-struct sourcevector
-{
- int length; /* Number of source files described */
- struct source *source[1]; /* Descriptions of the files */
-};
-
/* Each item represents a line-->pc (or the reverse) mapping. This is
somewhat more wasteful of space than one might wish, but since only
the files which are actually debugged are read in to core, we don't
@@ -783,14 +783,6 @@ struct linetable
struct linetable_entry item[1];
};
-/* All the information on one source file. */
-
-struct source
-{
- char *name; /* Name of file */
- struct linetable contents;
-};
-
/* How to relocate the symbols from each section in a symbol file.
Each struct contains an array of offsets.
The ordering and meaning of the offsets is file-type-dependent;
@@ -1215,13 +1207,7 @@ struct symtab_and_line
CORE_ADDR end;
};
-#define INIT_SAL(sal) { \
- (sal)->symtab = 0; \
- (sal)->section = 0; \
- (sal)->line = 0; \
- (sal)->pc = 0; \
- (sal)->end = 0; \
-}
+extern void init_sal (struct symtab_and_line *sal);
struct symtabs_and_lines
{
@@ -1275,13 +1261,6 @@ extern struct symtab_and_line find_pc_line (CORE_ADDR, int);
extern struct symtab_and_line find_pc_sect_line (CORE_ADDR, asection *, int);
-/* Given an address, return the nearest symbol at or below it in memory.
- Optionally return the symtab it's from through 2nd arg, and the
- address in inferior memory of the symbol through 3rd arg. */
-
-extern struct symbol *find_addr_symbol (CORE_ADDR, struct symtab **,
- CORE_ADDR *);
-
/* Given a symtab and line number, return the pc there. */
extern int find_line_pc (struct symtab *, int, CORE_ADDR *);
diff --git a/gdb/target.c b/gdb/target.c
index 75d022ff200..c7a2acf0dc8 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -1733,7 +1733,7 @@ debug_print_register (const char * func, int regno)
{
int i;
unsigned char *buf = alloca (MAX_REGISTER_RAW_SIZE);
- read_register_gen (regno, buf);
+ deprecated_read_register_gen (regno, buf);
fprintf_unfiltered (gdb_stdlog, " = ");
for (i = 0; i < REGISTER_RAW_SIZE (regno); i++)
{
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index b2b729c405c..57db691328b 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -48,6 +48,44 @@
out what version of MI is running. Use this to determine the proper
output of setting a breakpoint.
+2002-10-22 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.threads/schedlock.c (args): Make unsigned.
+
+2002-10-21 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.asm/asm-source.exp: Add "mips*-*" pattern. Update line
+ numbers. Allow "foo2|selected stack frame".
+ * gdb.asm/asmsrc1.s: Use gdbasm_declare and gdbasm_end.
+ * gdb.asm/asmsrc2.s: Likewise.
+ * gdb.asm/common.inc: Define gdbasm_declare and gdbasm_end. Update
+ comments.
+ * gdb.asm/mips.inc: New file.
+
+2002-10-18 Adam Fedor <fedor@gnu.org>
+
+ * gdb.base/default.exp: Update expected output to include 'ObjC'.
+ * gdb.base/help.exp: Likewise.
+
+2002-10-17 Kevin Buettner <kevinb@redhat.com>
+
+ * gdb.base/constvars.c (struct crass, struct crisp): New structs.
+ * gdb.base/constvars.exp (ptype crass, ptype crisp): New tests.
+
+2002-10-02 Jim Blandy <jimb@redhat.com>
+
+ * gdb.c++/casts.cc, gdb.c++/casts.exp: New test.
+
+2002-10-01 Andrew Cagney <ac131313@redhat.com>
+
+ * mi1-basics.exp: Copy of mi1-basics.exp MIFLAGS set "-i=mi1".
+ * mi1-break.exp, mi1-console.exp, mi1-disassemble.exp: Ditto.
+ * mi1-eval.exp, mi1-hack-cli.exp, mi1-pthreads.exp: Ditto.
+ * mi1-read-memory.exp, mi1-regs.exp, mi1-return.exp: Ditto.
+ * mi1-simplerun.exp, mi1-stack.exp, mi1-stepi.exp: Ditto.
+ * mi1-until.exp, mi1-var-block.exp, mi1-var-child.exp: Ditto.
+ * mi1-var-cmd.exp, mi1-var-display.exp, mi1-watch.exp: Ditto.
+
2002-09-29 Andrew Cagney <ac131313@redhat.com>
* mi0-basics.exp, mi0-break.exp, mi0-console.exp: Delete.
diff --git a/gdb/testsuite/gdb.mi/ChangeLog b/gdb/testsuite/gdb.mi/ChangeLog
index 49df9580035..bb46f56cfe3 100644
--- a/gdb/testsuite/gdb.mi/ChangeLog
+++ b/gdb/testsuite/gdb.mi/ChangeLog
@@ -60,6 +60,30 @@
mi-var-display.exp mi-watch.exp: Update to conform to MI2
notify-async-output (events).
+2002-10-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * mi-var-cmd.exp: Add tests to verify that a -var-assign that changes
+ a value shows up in the changelist of a -var-update. Part of fix
+ for gdb/702.
+ * mi1-var-cmd.exp: Ditto.
+
+2002-10-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * mi-return.exp: Change expected frame output to remove extraneous
+ space in level field when frame level is single digit. Part of
+ fix for PR gdb/192.
+ * mi-stack.exp: Ditto.
+ * mi1-return.exp: Ditto.
+ * mi1-stack.exp: Ditto.
+
+2002-10-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * mi-var-block.exp: Change expected output from -var-update
+ command to expect list format for "changelist". Fix for
+ PR gdb/672.
+ * mi-var-cmd.exp: Ditto.
+ * mi-var-child: Ditto.
+
2002-09-25 Keith Seitz <keiths@redhat.com>
* mi-pthreads.exp (get_mi_thread_list): Check if expect_out
diff --git a/gdb/testsuite/gdb.mi/mi-return.exp b/gdb/testsuite/gdb.mi/mi-return.exp
index 9b029a5b695..1cc7c2651cc 100644
--- a/gdb/testsuite/gdb.mi/mi-return.exp
+++ b/gdb/testsuite/gdb.mi/mi-return.exp
@@ -80,7 +80,7 @@ proc test_return_simple {} {
send_gdb "111-exec-return\n"
gdb_expect {
- -re "111\\^done,frame=\{level=\"0 \",addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",line=\"18\"\}\r\n$mi_gdb_prompt$" {pass "return from callee4 now"}
+ -re "111\\^done,frame=\{level=\"0\",addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",line=\"18\"\}\r\n$mi_gdb_prompt$" {pass "return from callee4 now"}
-re ".*\r\n$mi_gdb_prompt$" { fail "return from callee4 now" }
timeout { fail "return from callee4 now (timeout)"
}
diff --git a/gdb/testsuite/gdb.mi/mi-stack.exp b/gdb/testsuite/gdb.mi/mi-stack.exp
index 07f8e9ba348..79da6ee0e8d 100644
--- a/gdb/testsuite/gdb.mi/mi-stack.exp
+++ b/gdb/testsuite/gdb.mi/mi-stack.exp
@@ -73,13 +73,13 @@ proc test_stack_frame_listing {} {
# -stack-list-frames 1 3
mi_gdb_test "231-stack-list-frames" \
- "231\\^done,stack=\\\[frame=\{level=\"0 \",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\"\},frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2 \",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3 \",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4 \",addr=\"$hex\",func=\"main\",.*\}\\\]" \
+ "231\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4\",addr=\"$hex\",func=\"main\",.*\}\\\]" \
"stack frame listing"
mi_gdb_test "232-stack-list-frames 1 1" \
- "232\\^done,stack=\\\[frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\}\\\]" \
+ "232\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\}\\\]" \
"stack frame listing 1 1"
mi_gdb_test "233-stack-list-frames 1 3" \
- "233\\^done,stack=\\\[frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2 \",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3 \",addr=\"$hex\",func=\"callee1\",.*\}\\\]" \
+ "233\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\}\\\]" \
"stack frame listing 1 3"
mi_gdb_test "234-stack-list-frames 1" \
diff --git a/gdb/testsuite/gdb.mi/mi-var-block.exp b/gdb/testsuite/gdb.mi/mi-var-block.exp
index 89a4998b740..5f6a413963b 100644
--- a/gdb/testsuite/gdb.mi/mi-var-block.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-block.exp
@@ -104,7 +104,7 @@ gdb_expect {
# Test: c_variable-3.4
# Desc: check foo, cb changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"foo\",in_scope=\"true\",type_changed=\"false\",name=\"cb\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"foo\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"cb\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars: cb foo changed"
# step to "foo = 321;"
@@ -155,7 +155,7 @@ mi_gdb_test "-var-evaluate-expression inner_foo" \
clear_xfail *-*-*
mi_gdb_test "-var-update foo" \
- "\\^done,changelist=\{\}" \
+ "\\^done,changelist=\\\[\\\]" \
"update foo: did not change"
mi_gdb_test "-var-delete inner_foo" \
@@ -193,7 +193,7 @@ gdb_expect {
# Desc: check that only cb is in scope (known gdb problem)
setup_xfail *-*-*
mi_gdb_test "-var-update foo2" \
- "\\^done,changelist=\{FIXME\}" \
+ "\\^done,changelist=\\\[FIXME\\\]" \
"update foo2 should be out of scope: KNOWN PROBLEM"
clear_xfail *-*-*
setup_xfail *-*-*
@@ -202,7 +202,7 @@ mi_gdb_test "-var-update foo" \
"update foo should be out of scope: KNOWN PROBLEM"
clear_xfail *-*-*
mi_gdb_test "-var-update cb" \
- "\\^done,changelist=\{\}" \
+ "\\^done,changelist=\\\[\\\]" \
"update cb"
# Test: c_variable-3.10
diff --git a/gdb/testsuite/gdb.mi/mi-var-child.exp b/gdb/testsuite/gdb.mi/mi-var-child.exp
index 18b5a29d86f..af058d5170d 100644
--- a/gdb/testsuite/gdb.mi/mi-var-child.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-child.exp
@@ -750,7 +750,7 @@ mi_gdb_test "-var-delete weird" \
# Test: c_variable-5.1
# Desc: check that nothing changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{\}" \
+ "\\^done,changelist=\\\[\\\]" \
"update all vars. None changed"
# Step over "struct_declarations.integer = 123;"
@@ -760,7 +760,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.2
# Desc: check that integer changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"struct_declarations.integer\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"struct_declarations.integer\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars struct_declarations.integer"
# Step over:
@@ -773,7 +773,7 @@ mi_execute_to "exec-step 3" "end-stepping-range" do_children_tests {} {.*var-cmd
# Test: c_variable-5.3
# Desc: check that char_ptr changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"struct_declarations.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"struct_declarations.char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars struct_declarations.char_ptr"
# Step over "struct_declarations.int_ptr_ptr = &foo;"
@@ -783,7 +783,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.4
# Desc: check that int_ptr_ptr and children changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars int_ptr_ptr and children changed"
# Step over "weird->long_array[0] = 1234;"
@@ -793,7 +793,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.5
# Desc: check that long_array[0] changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"struct_declarations.long_array.0\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.0\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars struct_declarations.long_array.0 changed"
# Step over "struct_declarations.long_array[1] = 2345;"
@@ -803,7 +803,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.6
# Desc: check that long_array[1] changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"struct_declarations.long_array.1\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.1\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars struct_declarations.long_array.1 changed"
# Step over "weird->long_array[2] = 3456;"
@@ -813,7 +813,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.7
# Desc: check that long_array[2] changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"struct_declarations.long_array.2\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.2\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars struct_declarations.long_array.2 changed"
# Step over:
@@ -830,7 +830,7 @@ mi_execute_to "exec-step 7" "end-stepping-range" do_children_tests {} {.*var-cmd
# Test: c_variable-5.8
# Desc: check that long_array[3-9] changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"struct_declarations.long_array.3\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.4\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.5\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.6\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.7\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.8\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.9\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.3\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.4\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.5\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.6\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.7\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.8\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.9\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars struct_declarations.long_array.3-9 changed"
@@ -841,7 +841,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.9
# Desc: check that func_ptr changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"struct_declarations.func_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"struct_declarations.func_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars struct_declarations.func_ptr changed"
# Delete all variables
@@ -1133,7 +1133,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.47
# Desc: check that psnp->char_ptr (and [0].char_ptr) changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"psnp->ptrs.0.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars psnp->char_ptr (and 0.char_ptr) changed"
# Step over "snp1.char_ptr = &c3;"
@@ -1143,7 +1143,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.48
# Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"psnp->ptrs.0.next.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars psnp->next->char_ptr (and 1.char_ptr) changed"
@@ -1154,7 +1154,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.49
# Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"psnp->ptrs.0.next.next.char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.next.char_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars psnp->next->next->char_ptr (and 2.char_ptr) changed"
@@ -1165,7 +1165,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.50
# Desc: check that psnp->long_ptr (and [0].long_ptr) changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"psnp->ptrs.0.long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.long_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars psnp->long_ptr (and 0.long_ptr) changed"
@@ -1178,7 +1178,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Why does this have a FIXME?
setup_xfail *-*-*
mi_gdb_test "-var-update *" \
- "FIXME\\^done,changelist=\{name=\"psnp->ptrs.0.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "FIXME\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars psnp->next->long_ptr (and 1.long_ptr) changed"
clear_xfail *-*-*
@@ -1193,7 +1193,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.52
# Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"psnp->ptrs.0.next.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars psnp->next->next->long_ptr (and 2.long_ptr) changed"
diff --git a/gdb/testsuite/gdb.mi/mi-var-cmd.exp b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
index 8352734b14d..2c6041d3cbd 100644
--- a/gdb/testsuite/gdb.mi/mi-var-cmd.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
@@ -176,7 +176,7 @@ mi_gdb_test "-var-create int * int" \
# Test: c_variable-2.1
# Desc: check whether values changed at do_block_tests
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{\}" \
+ "\\^done,changelist=\\\[\\\]" \
"update all vars"
# Step over "linteger = 1234;"
@@ -185,7 +185,7 @@ mi_step_to "do_locals_tests" "" "var-cmd.c" "107" "step at do_locals_test"
# Test: c_variable-2.2
# Desc: check whether only linteger changed values
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars: linteger changed"
# Step over "lpinteger = &linteger;"
@@ -194,7 +194,7 @@ mi_step_to "do_locals_tests" "" "var-cmd.c" 108 "step at do_locals_tests (2)"
# Test: c_variable-2.3
# Desc: check whether only lpinteger changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"lpinteger\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"lpinteger\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars: lpinteger changed"
# Step over "lcharacter = 'a';"
@@ -203,7 +203,7 @@ mi_step_to "do_locals_tests" "" "var-cmd.c" "109" "step at do_locals_tests (3)"
# Test: c_variable-2.4
# Desc: check whether only lcharacter changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"lcharacter\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"lcharacter\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars: lcharacter changed"
# Step over "lpcharacter = &lcharacter;"
@@ -212,7 +212,7 @@ mi_step_to "do_locals_tests" "" "var-cmd.c" "110" "step at do_locals_tests (4)"
# Test: c_variable-2.5
# Desc: check whether only lpcharacter changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"lpcharacter\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"lpcharacter\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars: lpcharacter changed"
@@ -234,7 +234,7 @@ mi_execute_to "exec-step 9" "end-stepping-range" "do_locals_tests" "" \
# Desc: check whether llong, lplong, lfloat, lpfloat, ldouble, lpdouble, lsimple.integer,
# lsimple.unsigned_character lsimple.integer lsimple.character changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"lsimple.integer\",in_scope=\"true\",type_changed=\"false\",name=\"lsimple->integer\",in_scope=\"true\",type_changed=\"false\",name=\"lsimple.character\",in_scope=\"true\",type_changed=\"false\",name=\"lpdouble\",in_scope=\"true\",type_changed=\"false\",name=\"ldouble\",in_scope=\"true\",type_changed=\"false\",name=\"lpfloat\",in_scope=\"true\",type_changed=\"false\",name=\"lfloat\",in_scope=\"true\",type_changed=\"false\",name=\"lplong\",in_scope=\"true\",type_changed=\"false\",name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"lsimple.integer\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lsimple->integer\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lsimple.character\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lpdouble\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"ldouble\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lpfloat\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lfloat\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lplong\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars: many changed"
# Step over:
@@ -249,7 +249,7 @@ mi_execute_to "exec-step 4" "end-stepping-range" "do_locals_tests" "" \
# Test: c_variable-2.7
# Desc: check whether (lsimple.signed_character, lsimple.char_ptr) lpsimple, func changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"func\",in_scope=\"true\",type_changed=\"false\",name=\"lpsimple\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"func\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lpsimple\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars: func and lpsimple changed"
# Step over
@@ -271,7 +271,7 @@ mi_execute_to "exec-step 8" "end-stepping-range" "do_locals_tests" "" \
# Note: this test also checks that lpsimple->integer and lsimple.integer have
# changed (they are the same)
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"lsimple.integer\",in_scope=\"true\",type_changed=\"false\",name=\"lsimple->integer\",in_scope=\"true\",type_changed=\"false\",name=\"lsimple.character\",in_scope=\"true\",type_changed=\"false\",name=\"ldouble\",in_scope=\"true\",type_changed=\"false\",name=\"lfloat\",in_scope=\"true\",type_changed=\"false\",name=\"llong\",in_scope=\"true\",type_changed=\"false\",name=\"lcharacter\",in_scope=\"true\",type_changed=\"false\",name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"lsimple.integer\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lsimple->integer\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lsimple.character\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"ldouble\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lfloat\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"llong\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lcharacter\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars: func and lpsimple changed"
@@ -288,6 +288,18 @@ mi_gdb_test "-var-assign linteger 3333" \
"\\^done,value=\"3333\"" \
"assign to linteger"
+mi_gdb_test "-var-update *" \
+ "\\^done,changelist=\\\[\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
+ "update all vars: linteger changed after assign"
+
+mi_gdb_test "-var-assign linteger 3333" \
+ "\\^done,value=\"3333\"" \
+ "assign to linteger again, same value"
+
+mi_gdb_test "-var-update *" \
+ "\\^done,changelist=\\\[\\\]" \
+ "update all vars: linteger not changed after same assign"
+
mi_gdb_test "-var-evaluate-expression linteger" \
"\\^done,value=\"3333\"" \
"eval linteger"
@@ -296,6 +308,14 @@ mi_gdb_test "-var-assign lpinteger \"&linteger + 3\"" \
"\\^done,value=\"$hex\"" \
"assign to lpinteger"
+mi_gdb_test "-var-update *" \
+ "\\^done,changelist=\\\[\{name=\"lpinteger\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
+ "update all vars: lpinteger changed after assign"
+
+mi_gdb_test "-var-update *" \
+ "\\^done,changelist=\\\[\\\]" \
+ "update all vars: no changes on second update"
+
mi_gdb_test "-var-evaluate-expression lpinteger" \
"\\^done,value=\"$hex\"" \
"eval lpinteger"
@@ -421,7 +441,7 @@ mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\
# Test: c_variable-2.13
# Desc: change subroutine1 local i
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"i\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"i\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars: i changed"
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
@@ -430,7 +450,7 @@ mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\
# Test: c_variable-2.14
# Desc: change do_locals_tests local llong
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars: llong changed"
mi_next_to "do_locals_tests" "" "var-cmd.c" "136" "next out of subroutine1"
@@ -438,7 +458,7 @@ mi_next_to "do_locals_tests" "" "var-cmd.c" "136" "next out of subroutine1"
# Test: c_variable-2.15
# Desc: check for out of scope subroutine1 locals
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"l\",in_scope=\"false\",name=\"i\",in_scope=\"false\"\}" \
+ "\\^done,changelist=\\\[\{name=\"l\",in_scope=\"false\"\},\{name=\"i\",in_scope=\"false\"\}\\\]" \
"update all vars: all now out of scope"
# Done with locals/globals tests. Erase all variables
@@ -538,15 +558,15 @@ mi_gdb_test "-break-insert incr_a" \
mi_continue_to {.*} incr_a {.*} {.*var-cmd.c} {.*} {stop in incr_a}
mi_gdb_test "-var-update selected_a" \
- {\^done,changelist=\{name="selected_a",in_scope="true",new_type="char",new_num_children="0"\}} \
- "update selected_a in incr_a"
+ "\\^done,changelist=\\\[\{name=\"selected_a\",in_scope=\"true\",new_type=\"char\",new_num_children=\"0\"\}\\\]" \
+ "update selected_a in incr_a"
mi_next "step a line in incr_a"
mi_next "return from incr_a to do_special_tests"
mi_gdb_test "-var-update selected_a" \
- {\^done,changelist=\{name="selected_a",in_scope="true",new_type="int",new_num_children="0"\}} \
- "update selected_a in do_special_tests"
+ "\\^done,changelist=\\\[\{name=\"selected_a\",in_scope=\"true\",new_type=\"int\",new_num_children=\"0\"\}\\\]" \
+ "update selected_a in do_special_tests"
mi_gdb_exit
return 0
diff --git a/gdb/testsuite/gdb.mi/mi1-pthreads.exp b/gdb/testsuite/gdb.mi/mi1-pthreads.exp
new file mode 100644
index 00000000000..aea4f582836
--- /dev/null
+++ b/gdb/testsuite/gdb.mi/mi1-pthreads.exp
@@ -0,0 +1,220 @@
+# Copyright 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This file tests MI thread commands.
+# Specifically, we are testing the MI command set and the console (in MI)
+# command set ("interpreter-exec") and that the commands that are executed
+# via these command pathways are properly executed. Console commands
+# executed via MI should use MI output wrappers, MI event handlers, etc.
+
+# This only works with native configurations
+if {![isnative]} {
+ return
+}
+
+load_lib mi-support.exp
+set MIFLAGS "-i=mi1"
+
+gdb_exit
+if {[mi_gdb_start]} {
+ continue
+}
+
+# The procs below dealing with parsing cli/mi output for the threadlist
+# is duplicated in gdb669.exp. Any changes here will probably need to
+# be made there as well.
+
+proc get_mi_thread_list {name} {
+ global expect_out
+
+ # MI will return a list of thread ids:
+ #
+ # -thread-list-ids
+ # ^done,thread-ids=[thread-id="1",thread-id="2",...],number-of-threads="N"
+ # (gdb)
+ mi_gdb_test "-thread-list-ids" \
+ {\^done,thread-ids={(thread-id="[0-9]+"(,)?)+},number-of-threads="[0-9]+"} \
+ "-thread_list_ids ($name)"
+
+ set output {}
+ if {[info exists expect_out(buffer)]} {
+ set output $expect_out(buffer)
+ }
+
+ set thread_list {}
+ if {![regexp {thread-ids=\{(thread-id="[0-9]+"(,)?)*\}} $output threads]} {
+ fail "finding threads in MI output ($name)"
+ } else {
+ pass "finding threads in MI output ($name)"
+
+ # Make list of console threads
+ set start [expr {[string first \{ $threads] + 1}]
+ set end [expr {[string first \} $threads] - 1}]
+ set threads [string range $threads $start $end]
+ foreach thread [split $threads ,] {
+ if {[scan $thread {thread-id="%d"} num]} {
+ lappend thread_list $num
+ }
+ }
+ }
+
+ return $thread_list
+}
+
+# Check that MI and the console know of the same threads.
+# Appends NAME to all test names.
+proc check_mi_and_console_threads {name} {
+ global expect_out
+
+ mi_gdb_test "-thread-list-ids" \
+ {\^done,thread-ids={(thread-id="[0-9]+"(,)*)+},number-of-threads="[0-9]+"} \
+ "-thread-list-ids ($name)"
+ set mi_output {}
+ if {[info exists expect_out(buffer)]} {
+ set mi_output $expect_out(buffer)
+ }
+
+ # GDB will return a list of thread ids and some more info:
+ #
+ # (gdb)
+ # -interpreter-exec console "info threads"
+ # ~" 4 Thread 2051 (LWP 7734) 0x401166b1 in __libc_nanosleep () at __libc_nanosleep:-1"
+ # ~" 3 Thread 1026 (LWP 7733) () at __libc_nanosleep:-1"
+ # ~" 2 Thread 2049 (LWP 7732) 0x401411f8 in __poll (fds=0x804bb24, nfds=1, timeout=2000) at ../sysdeps/unix/sysv/linux/poll.c:63"
+ # ~"* 1 Thread 1024 (LWP 7731) main (argc=1, argv=0xbfffdd94) at ../../../src/gdb/testsuite/gdb.mi/pthreads.c:160"
+ # FIXME: kseitz/2002-09-05: Don't use the hack-cli method.
+ mi_gdb_test "info threads" \
+ {.*(~".*"[\r\n]*)+.*} \
+ "info threads ($name)"
+ set console_output {}
+ if {[info exists $expect_out(buffer)]} {
+ set console_output $expect_out(buffer)
+ }
+
+ # Make a list of all known threads to console (gdb's thread IDs)
+ set console_thread_list {}
+ foreach line [split $console_output \n] {
+ if {[string index $line 0] == "~"} {
+ # This is a line from the console; trim off "~", " ", "*", and "\""
+ set line [string trim $line ~\ \"\*]
+ if {[scan $line "%d" id] == 1} {
+ lappend console_thread_list $id
+ }
+ }
+ }
+
+ # Now find the result string from MI
+ set mi_result ""
+ foreach line [split $mi_output \n] {
+ if {[string range $line 0 4] == "^done"} {
+ set mi_result $line
+ }
+ }
+ if {$mi_result == ""} {
+ fail "finding MI result string ($name)"
+ } else {
+ pass "finding MI result string ($name)"
+ }
+
+ # Finally, extract the thread ids and compare them to the console
+ set num_mi_threads_str ""
+ if {![regexp {number-of-threads="[0-9]+"} $mi_result num_mi_threads_str]} {
+ fail "finding number of threads in MI output ($name)"
+ } else {
+ pass "finding number of threads in MI output ($name)"
+
+ # Extract the number of threads from the MI result
+ if {![scan $num_mi_threads_str {number-of-threads="%d"} num_mi_threads]} {
+ fail "got number of threads from MI ($name)"
+ } else {
+ pass "got number of threads from MI ($name)"
+
+ # Check if MI and console have same number of threads
+ if {$num_mi_threads != [llength $console_thread_list]} {
+ fail "console and MI have same number of threads ($name)"
+ } else {
+ pass "console and MI have same number of threads ($name)"
+
+ # Get MI thread list
+ set mi_thread_list [get_mi_thread_list $name]
+
+ # Check if MI and console have the same threads
+ set fails 0
+ foreach ct [lsort $console_thread_list] mt [lsort $mi_thread_list] {
+ if {$ct != $mt} {
+ incr fails
+ }
+ }
+ if {$fails > 0} {
+ fail "MI and console have same threads ($name)"
+
+ # Send a list of failures to the log
+ send_log "Console has thread ids: $console_thread_list\n"
+ send_log "MI has thread ids: $mi_thread_list\n"
+ } else {
+ pass "MI and console have same threads ($name)"
+ }
+ }
+ }
+ }
+}
+
+# This procedure tests the various thread commands in MI.
+proc check_mi_thread_command_set {} {
+
+ mi_runto done_making_threads
+
+ set thread_list [get_mi_thread_list "in check_mi_thread_command_set"]
+
+ mi_gdb_test "-thread-select" \
+ {\^error,msg="mi_cmd_thread_select: USAGE: threadnum."} \
+ "check_mi_thread_command_set: -thread-select"
+
+ mi_gdb_test "-thread-select 123456789" \
+ {\^error,msg="Thread ID 123456789 not known\."} \
+ "check_mi_thread_command_set: -thread-select 123456789"
+
+ foreach thread $thread_list {
+ mi_gdb_test "-thread-select $thread" \
+ "\\^done,new-thread-id=\"$thread\",frame={.*},line=\"(-)?\[0-9\]+\",file=\".*\"" \
+ "check_mi_thread_command_set: -thread-select $thread"
+ }
+}
+
+#
+# Start here
+#
+set testfile "pthreads"
+set srcfile "$testfile.c"
+set binfile "$objdir/$subdir/$testfile"
+
+set options [list debug incdir=$subdir]
+if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options]
+ != "" } {
+ gdb_suppress_entire_file \
+ "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+mi_gdb_reinitialize_dir $srcdir/$subdir
+mi_gdb_load $binfile
+
+check_mi_thread_command_set
+
+mi_gdb_exit
+
diff --git a/gdb/thread-db.c b/gdb/thread-db.c
index d38db74b4b1..34b5c558b4c 100644
--- a/gdb/thread-db.c
+++ b/gdb/thread-db.c
@@ -829,7 +829,7 @@ thread_db_store_registers (int regno)
{
char raw[MAX_REGISTER_RAW_SIZE];
- read_register_gen (regno, raw);
+ deprecated_read_register_gen (regno, raw);
thread_db_fetch_registers (-1);
supply_register (regno, raw);
}
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 2d12f31d57b..b2900b60a41 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -73,10 +73,6 @@ extern int addressprint; /* Print machine addresses? */
*/
extern void output_command (char *, int);
-extern void registers_info (char *, int);
-extern void args_info (char *, int);
-extern void locals_info (char *, int);
-
/* If this definition isn't overridden by the header files, assume
that isatty and fileno exist on this system. */
diff --git a/gdb/ui-out.c b/gdb/ui-out.c
index 4a4a9228540..da7740f4ca6 100644
--- a/gdb/ui-out.c
+++ b/gdb/ui-out.c
@@ -486,6 +486,23 @@ ui_out_field_int (struct ui_out *uiout,
}
void
+ui_out_field_fmt_int (struct ui_out *uiout,
+ int input_width,
+ enum ui_align input_align,
+ const char *fldname,
+ int value)
+{
+ int fldno;
+ int width;
+ int align;
+ struct ui_out_level *current = current_level (uiout);
+
+ verify_field (uiout, &fldno, &width, &align);
+
+ uo_field_int (uiout, fldno, input_width, input_align, fldname, value);
+}
+
+void
ui_out_field_core_addr (struct ui_out *uiout,
const char *fldname,
CORE_ADDR address)
diff --git a/gdb/ui-out.h b/gdb/ui-out.h
index 797c2fe960d..c8ed9dd504e 100644
--- a/gdb/ui-out.h
+++ b/gdb/ui-out.h
@@ -119,6 +119,10 @@ extern struct cleanup *make_cleanup_ui_out_tuple_begin_end (struct ui_out *uiout
extern void ui_out_field_int (struct ui_out *uiout, const char *fldname,
int value);
+extern void ui_out_field_fmt_int (struct ui_out *uiout, int width,
+ enum ui_align align, const char *fldname,
+ int value);
+
extern void ui_out_field_core_addr (struct ui_out *uiout, const char *fldname,
CORE_ADDR address);
diff --git a/gdb/utils.c b/gdb/utils.c
index 9aab625f63c..24a2819f492 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -153,13 +153,13 @@ int quit_flag;
int immediate_quit;
-/* Nonzero means that encoded C++ names should be printed out in their
- C++ form rather than raw. */
+/* Nonzero means that encoded C++/ObjC names should be printed out in their
+ C++/ObjC form rather than raw. */
int demangle = 1;
-/* Nonzero means that encoded C++ names should be printed out in their
- C++ form even in assembler language displays. If this is set, but
+/* Nonzero means that encoded C++/ObjC names should be printed out in their
+ C++/ObjC form even in assembler language displays. If this is set, but
DEMANGLE is zero, names are printed raw, i.e. DEMANGLE controls. */
int asm_demangle = 0;
@@ -1817,6 +1817,51 @@ wrap_here (char *indent)
}
}
+/* Print input string to gdb_stdout, filtered, with wrap,
+ arranging strings in columns of n chars. String can be
+ right or left justified in the column. Never prints
+ trailing spaces. String should never be longer than
+ width. FIXME: this could be useful for the EXAMINE
+ command, which currently doesn't tabulate very well */
+
+void
+puts_filtered_tabular (char *string, int width, int right)
+{
+ int spaces = 0;
+ int stringlen;
+ char *spacebuf;
+
+ gdb_assert (chars_per_line > 0);
+ if (chars_per_line == UINT_MAX)
+ {
+ fputs_filtered (string, gdb_stdout);
+ fputs_filtered ("\n", gdb_stdout);
+ return;
+ }
+
+ if (((chars_printed - 1) / width + 2) * width >= chars_per_line)
+ fputs_filtered ("\n", gdb_stdout);
+
+ if (width >= chars_per_line)
+ width = chars_per_line - 1;
+
+ stringlen = strlen (string);
+
+ if (chars_printed > 0)
+ spaces = width - (chars_printed - 1) % width - 1;
+ if (right)
+ spaces += width - stringlen;
+
+ spacebuf = alloca (spaces + 1);
+ spacebuf[spaces] = '\0';
+ while (spaces--)
+ spacebuf[spaces] = ' ';
+
+ fputs_filtered (spacebuf, gdb_stdout);
+ fputs_filtered (string, gdb_stdout);
+}
+
+
/* Ensure that whatever gets printed next, using the filtered output
commands, starts at the beginning of the line. I.E. if there is
any pending output for the current line, flush it and start a new
@@ -2244,7 +2289,7 @@ print_spaces_filtered (int n, struct ui_file *stream)
fputs_filtered (n_spaces (n), stream);
}
-/* C++ demangler stuff. */
+/* C++/ObjC demangler stuff. */
/* fprintf_symbol_filtered attempts to demangle NAME, a symbol in language
LANG, using demangling args ARG_MODE, and print it filtered to STREAM.
@@ -2274,6 +2319,10 @@ fprintf_symbol_filtered (struct ui_file *stream, char *name, enum language lang,
case language_java:
demangled = cplus_demangle (name, arg_mode | DMGL_JAVA);
break;
+ case language_objc:
+ /* Commented out until ObjC handling is enabled. */
+ /*demangled = objc_demangle (name);*/
+ /*break;*/
#if 0
/* OBSOLETE case language_chill: */
/* OBSOLETE demangled = chill_demangle (name); */
@@ -2393,7 +2442,7 @@ initialize_utils (void)
add_show_from_set
(add_set_cmd ("demangle", class_support, var_boolean,
(char *) &demangle,
- "Set demangling of encoded C++ names when displaying symbols.",
+ "Set demangling of encoded C++/ObjC names when displaying symbols.",
&setprintlist),
&showprintlist);
@@ -2421,7 +2470,7 @@ initialize_utils (void)
add_show_from_set
(add_set_cmd ("asm-demangle", class_support, var_boolean,
(char *) &asm_demangle,
- "Set demangling of C++ names in disassembly listings.",
+ "Set demangling of C++/ObjC names in disassembly listings.",
&setprintlist),
&showprintlist);
}
diff --git a/gdb/v850ice.c b/gdb/v850ice.c
index 1aec483bb90..958eac331b8 100644
--- a/gdb/v850ice.c
+++ b/gdb/v850ice.c
@@ -50,12 +50,6 @@ struct MessageIO
/* Prototypes for functions located in other files */
extern void break_command (char *, int);
-extern void stepi_command (char *, int);
-
-extern void nexti_command (char *, int);
-
-extern void continue_command (char *, int);
-
extern int (*ui_loop_hook) (int);
/* Prototypes for local functions */
diff --git a/gdb/valops.c b/gdb/valops.c
index eb0e4e89da0..e7ed04e3a72 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -3308,18 +3308,17 @@ value_full_object (struct value *argp, struct type *rtype, int xfull, int xtop,
-/* C++: return the value of the class instance variable, if one exists.
+/* Return the value of the local variable, if one exists.
Flag COMPLAIN signals an error if the request is made in an
inappropriate context. */
struct value *
-value_of_this (int complain)
+value_of_local (const char *name, int complain)
{
struct symbol *func, *sym;
struct block *b;
int i;
- static const char funny_this[] = "this";
- struct value *this;
+ struct value * ret;
if (selected_frame == 0)
{
@@ -3333,7 +3332,7 @@ value_of_this (int complain)
if (!func)
{
if (complain)
- error ("no `this' in nameless context");
+ error ("no `%s' in nameless context", name);
else
return 0;
}
@@ -3343,26 +3342,39 @@ value_of_this (int complain)
if (i <= 0)
{
if (complain)
- error ("no args, no `this'");
+ error ("no args, no `%s'", name);
else
return 0;
}
/* Calling lookup_block_symbol is necessary to get the LOC_REGISTER
symbol instead of the LOC_ARG one (if both exist). */
- sym = lookup_block_symbol (b, funny_this, NULL, VAR_NAMESPACE);
+ sym = lookup_block_symbol (b, name, NULL, VAR_NAMESPACE);
if (sym == NULL)
{
if (complain)
- error ("current stack frame not in method");
+ error ("current stack frame does not contain a variable named `%s'", name);
else
return NULL;
}
- this = read_var_value (sym, selected_frame);
- if (this == 0 && complain)
- error ("`this' argument at unknown address");
- return this;
+ ret = read_var_value (sym, selected_frame);
+ if (ret == 0 && complain)
+ error ("`%s' argument unreadable", name);
+ return ret;
+}
+
+/* C++/Objective-C: return the value of the class instance variable,
+ if one exists. Flag COMPLAIN signals an error if the request is
+ made in an inappropriate context. */
+
+struct value *
+value_of_this (int complain)
+{
+ if (current_language->la_language == language_objc)
+ return value_of_local ("self", complain);
+ else
+ return value_of_local ("this", complain);
}
/* Create a slice (sub-string, sub-array) of ARRAY, that is LENGTH elements
diff --git a/gdb/value.h b/gdb/value.h
index efabecb8806..a38b576947b 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -566,4 +566,6 @@ extern CORE_ADDR default_push_arguments (int nargs, struct value ** args,
CORE_ADDR sp, int struct_return,
CORE_ADDR struct_addr);
+extern struct value *value_of_local (const char *name, int complain);
+
#endif /* !defined (VALUE_H) */
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 16ba528afe6..a0e1d53f95c 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -111,6 +111,9 @@ struct varobj
/* The format of the output for this object */
enum varobj_display_formats format;
+
+ /* Was this variable updated via a varobj_set_value operation */
+ int updated;
};
/* Every variable keeps a linked list of its children, described
@@ -753,6 +756,7 @@ int
varobj_set_value (struct varobj *var, char *expression)
{
struct value *val;
+ int error;
int offset = 0;
/* The argument "expression" contains the variable's new value.
@@ -778,6 +782,8 @@ varobj_set_value (struct varobj *var, char *expression)
return 0;
}
+ if (!my_value_equal (var->value, value, &error))
+ var->updated = 1;
if (!gdb_value_assign (var->value, value, &val))
return 0;
value_free (var->value);
@@ -893,10 +899,11 @@ varobj_update (struct varobj **varp, struct varobj ***changelist)
/* If values are not equal, note that it's changed.
There a couple of exceptions here, though.
We don't want some types to be reported as "changed". */
- else if (type_changeable (*varp)
- && !my_value_equal ((*varp)->value, new, &error2))
+ else if (type_changeable (*varp) &&
+ ((*varp)->updated || !my_value_equal ((*varp)->value, new, &error2)))
{
vpush (&result, *varp);
+ (*varp)->updated = 0;
changed++;
/* error2 replaces var->error since this new value
WILL replace the old one. */
@@ -933,10 +940,12 @@ varobj_update (struct varobj **varp, struct varobj ***changelist)
/* Update this variable */
new = value_of_child (v->parent, v->index);
- if (type_changeable (v) && !my_value_equal (v->value, new, &error2))
+ if (type_changeable (v) &&
+ (v->updated || !my_value_equal (v->value, new, &error2)))
{
/* Note that it's changed */
vpush (&result, v);
+ v->updated = 0;
changed++;
}
/* error2 replaces v->error since this new value
@@ -1294,6 +1303,7 @@ new_variable (void)
var->children = NULL;
var->format = 0;
var->root = NULL;
+ var->updated = 0;
return var;
}
diff --git a/gdb/version.in b/gdb/version.in
index 5bd79e9203d..1c14be99d73 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-2002-09-30-cvs
+2002-11-03-cvs
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index e2a85e138dc..73bc0839780 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -383,7 +383,7 @@ static void
do_child_store_inferior_registers (int r)
{
if (r >= 0)
- read_register_gen (r, ((char *) &current_thread->context) + mappings[r]);
+ deprecated_read_register_gen (r, ((char *) &current_thread->context) + mappings[r]);
else
{
for (r = 0; r < NUM_REGS; r++)
diff --git a/gdb/wince.c b/gdb/wince.c
index 92c115820b4..15138b87a28 100644
--- a/gdb/wince.c
+++ b/gdb/wince.c
@@ -1139,7 +1139,7 @@ static void
do_child_store_inferior_registers (int r)
{
if (r >= 0)
- read_register_gen (r, ((char *) &current_thread->context) + mappings[r]);
+ deprecated_read_register_gen (r, ((char *) &current_thread->context) + mappings[r]);
else
{
for (r = 0; r < NUM_REGS; r++)
diff --git a/gdb/x86-64-linux-nat.c b/gdb/x86-64-linux-nat.c
index 7e6417b1cc9..78e9c495af6 100644
--- a/gdb/x86-64-linux-nat.c
+++ b/gdb/x86-64-linux-nat.c
@@ -158,7 +158,7 @@ fill_gregset (elf_gregset_t * gregsetp, int regno)
for (i = 0; i < x86_64_num_gregs; i++)
if ((regno == -1 || regno == i))
- read_register_gen (i, (char *) (regp + x86_64_regmap[i]));
+ deprecated_read_register_gen (i, (char *) (regp + x86_64_regmap[i]));
}
/* Fetch all general-purpose registers from process/thread TID and
diff --git a/gdb/x86-64-linux-tdep.c b/gdb/x86-64-linux-tdep.c
index ac41daa8849..b8385a6c756 100644
--- a/gdb/x86-64-linux-tdep.c
+++ b/gdb/x86-64-linux-tdep.c
@@ -35,8 +35,10 @@
#define LINUX_SIGTRAMP_OFFSET1 (7)
static const unsigned char linux_sigtramp_code[] = {
- LINUX_SIGTRAMP_INSN0, 0xc7, 0xc0, 0x89, 0x00, 0x00, 0x00, /* mov $0x89,%rax */
- LINUX_SIGTRAMP_INSN1, 0x05 /* syscall */
+ /* mov $__NR_rt_sigreturn,%rax */
+ LINUX_SIGTRAMP_INSN0, 0xc7, 0xc0, 0x0f, 0x00, 0x00, 0x00,
+ /* syscall */
+ LINUX_SIGTRAMP_INSN1, 0x05
};
#define LINUX_SIGTRAMP_LEN (sizeof linux_sigtramp_code)
@@ -68,17 +70,22 @@ x86_64_linux_sigtramp_start (CORE_ADDR pc)
return pc;
}
-#define LINUX_SIGINFO_SIZE 128
+#define LINUX_SIGINFO_SIZE 0
/* Offset to struct sigcontext in ucontext, from <asm/ucontext.h>. */
-#define LINUX_UCONTEXT_SIGCONTEXT_OFFSET (36)
+#define LINUX_UCONTEXT_SIGCONTEXT_OFFSET 40
+
+/* Offset to saved PC in sigcontext, from <asm/sigcontext.h>. */
+#define LINUX_SIGCONTEXT_PC_OFFSET 128
+#define LINUX_SIGCONTEXT_FP_OFFSET 120
/* Assuming FRAME is for a GNU/Linux sigtramp routine, return the
address of the associated sigcontext structure. */
-CORE_ADDR
+static CORE_ADDR
x86_64_linux_sigcontext_addr (struct frame_info *frame)
{
CORE_ADDR pc;
+ ULONGEST rsp;
pc = x86_64_linux_sigtramp_start (frame->pc);
if (pc)
@@ -92,8 +99,8 @@ x86_64_linux_sigcontext_addr (struct frame_info *frame)
/* This is the top frame. */
- return read_register (SP_REGNUM) + LINUX_SIGINFO_SIZE +
- LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
+ rsp = read_register (SP_REGNUM);
+ return rsp + LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
}
@@ -101,13 +108,10 @@ x86_64_linux_sigcontext_addr (struct frame_info *frame)
return 0;
}
-/* Offset to saved PC in sigcontext, from <asm/sigcontext.h>. */
-#define LINUX_SIGCONTEXT_PC_OFFSET (136)
-
/* Assuming FRAME is for a GNU/Linux sigtramp routine, return the
saved program counter. */
-CORE_ADDR
+static CORE_ADDR
x86_64_linux_sigtramp_saved_pc (struct frame_info *frame)
{
CORE_ADDR addr;
@@ -135,3 +139,53 @@ x86_64_linux_frame_saved_pc (struct frame_info *frame)
return x86_64_linux_sigtramp_saved_pc (frame);
return cfi_get_ra (frame);
}
+
+/* Return whether PC is in a GNU/Linux sigtramp routine. */
+
+int
+x86_64_linux_in_sigtramp (CORE_ADDR pc, char *name)
+{
+ if (name)
+ return STREQ ("__restore_rt", name);
+
+ return (x86_64_linux_sigtramp_start (pc) != 0);
+}
+
+CORE_ADDR
+x86_64_linux_frame_chain (struct frame_info *fi)
+{
+ ULONGEST addr;
+ CORE_ADDR fp, pc;
+
+ if (!fi->signal_handler_caller)
+ {
+ fp = cfi_frame_chain (fi);
+ if (fp)
+ return fp;
+ else
+ addr = fi->frame;
+ }
+ else
+ addr = fi->next->frame;
+
+ addr += LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
+
+ fp = read_memory_integer (addr + LINUX_SIGCONTEXT_FP_OFFSET, 8) + 8;
+
+ return fp;
+}
+
+void
+x86_64_init_frame_pc (int fromleaf, struct frame_info *fi)
+{
+ CORE_ADDR addr;
+
+ if (fi->next && fi->next->signal_handler_caller)
+ {
+ addr = fi->next->next->frame
+ + LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
+ fi->pc = read_memory_integer (addr + LINUX_SIGCONTEXT_PC_OFFSET, 8);
+ }
+ else
+ cfi_init_frame_pc (fromleaf, fi);
+}
diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c
index dbc5611cb0d..d3ecb2b5c35 100644
--- a/gdb/x86-64-tdep.c
+++ b/gdb/x86-64-tdep.c
@@ -1,7 +1,6 @@
/* Target-dependent code for the x86-64 for GDB, the GNU debugger.
Copyright 2001, 2002 Free Software Foundation, Inc.
-
Contributed by Jiri Smid, SuSE Labs.
This file is part of GDB.
@@ -251,18 +250,20 @@ static const char *valid_flavours[] = {
};
static const char *disassembly_flavour = att_flavour;
+/* Push the return address (pointing to the call dummy) onto the stack
+ and return the new value for the stack pointer. */
+
static CORE_ADDR
x86_64_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
{
char buf[8];
store_unsigned_integer (buf, 8, CALL_DUMMY_ADDRESS ());
-
write_memory (sp - 8, buf, 8);
return sp - 8;
}
-void
+static void
x86_64_pop_frame (void)
{
generic_pop_current_frame (cfi_pop_frame);
@@ -300,8 +301,8 @@ merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2)
if (class1 == class2)
return class1;
- /* Rule #2: If one of the classes is NO_CLASS, the resulting class is
- the other class. */
+ /* Rule #2: If one of the classes is NO_CLASS, the resulting class
+ is the other class. */
if (class1 == X86_64_NO_CLASS)
return class2;
if (class2 == X86_64_NO_CLASS)
@@ -328,15 +329,13 @@ merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2)
return X86_64_SSE_CLASS;
}
+/* Classify the argument type. CLASSES will be filled by the register
+ class used to pass each word of the operand. The number of words
+ is returned. In case the parameter should be passed in memory, 0
+ is returned. As a special case for zero sized containers,
+ classes[0] will be NO_CLASS and 1 is returned.
-/* Classify the argument type.
- CLASSES will be filled by the register class used to pass each word
- of the operand. The number of words is returned. In case the parameter
- should be passed in memory, 0 is returned. As a special case for zero
- sized containers, classes[0] will be NO_CLASS and 1 is returned.
-
- See the x86-64 PS ABI for details.
-*/
+ See the x86-64 psABI for details. */
static int
classify_argument (struct type *type,
@@ -361,8 +360,8 @@ classify_argument (struct type *type,
for (i = 0; i < words; i++)
classes[i] = X86_64_NO_CLASS;
- /* Zero sized arrays or structures are NO_CLASS. We return 0 to
- signalize memory class, so handle it as special case. */
+ /* Zero sized arrays or structures are NO_CLASS. We return 0
+ to signalize memory class, so handle it as special case. */
if (!words)
{
classes[0] = X86_64_NO_CLASS;
@@ -445,7 +444,7 @@ classify_argument (struct type *type,
&& (i == 0 || classes[i - 1] != X86_64_SSE_CLASS))
classes[i] = X86_64_SSE_CLASS;
- /* X86_64_X87UP_CLASS should be preceeded by X86_64_X87_CLASS. */
+ /* X86_64_X87UP_CLASS should be preceeded by X86_64_X87_CLASS. */
if (classes[i] == X86_64_X87UP_CLASS
&& (i == 0 || classes[i - 1] != X86_64_X87_CLASS))
classes[i] = X86_64_SSE_CLASS;
@@ -499,8 +498,9 @@ classify_argument (struct type *type,
"classify_argument: unknown argument type");
}
-/* Examine the argument and return set number of register required in each
- class. Return 0 ifif parameter should be passed in memory. */
+/* Examine the argument and set *INT_NREGS and *SSE_NREGS to the
+ number of registers required based on the information passed in
+ CLASSES. Return 0 if parameter should be passed in memory. */
static int
examine_argument (enum x86_64_reg_class classes[MAX_CLASSES],
@@ -538,9 +538,9 @@ examine_argument (enum x86_64_reg_class classes[MAX_CLASSES],
#define RET_SSE_REGS 2
/* Check if the structure in value_type is returned in registers or in
- memory. If this function returns 1, gdb will call STORE_STRUCT_RETURN and
- EXTRACT_STRUCT_VALUE_ADDRESS else STORE_RETURN_VALUE and EXTRACT_RETURN_VALUE
- will be used. */
+ memory. If this function returns 1, GDB will call
+ STORE_STRUCT_RETURN and EXTRACT_STRUCT_VALUE_ADDRESS else
+ STORE_RETURN_VALUE and EXTRACT_RETURN_VALUE will be used. */
int
x86_64_use_struct_convention (int gcc_p, struct type *value_type)
{
@@ -554,7 +554,6 @@ x86_64_use_struct_convention (int gcc_p, struct type *value_type)
needed_intregs > RET_INT_REGS || needed_sseregs > RET_SSE_REGS);
}
-
/* Extract from an array REGBUF containing the (raw) register state, a
function return value of TYPE, and copy that, in virtual format,
into VALBUF. */
@@ -637,10 +636,10 @@ x86_64_extract_return_value (struct type *type, char *regbuf, char *valbuf)
}
}
-/* Handled by unwind informations. */
static void
x86_64_frame_init_saved_regs (struct frame_info *fi)
{
+ /* Do nothing. Everything is handled by the stack unwinding code. */
}
#define INT_REGS 6
@@ -693,30 +692,30 @@ x86_64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
case X86_64_NO_CLASS:
break;
case X86_64_INTEGER_CLASS:
- write_register_gen (int_parameter_registers
- [(intreg + 1) / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
+ deprecated_write_register_gen (int_parameter_registers
+ [(intreg + 1) / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
offset += 8;
intreg += 2;
break;
case X86_64_INTEGERSI_CLASS:
- write_register_gen (int_parameter_registers[intreg / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
+ deprecated_write_register_gen (int_parameter_registers[intreg / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
offset += 8;
intreg++;
break;
case X86_64_SSEDF_CLASS:
case X86_64_SSESF_CLASS:
case X86_64_SSE_CLASS:
- write_register_gen (sse_parameter_registers
- [(ssereg + 1) / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
+ deprecated_write_register_gen (sse_parameter_registers
+ [(ssereg + 1) / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
offset += 8;
ssereg += 2;
break;
case X86_64_SSEUP_CLASS:
- write_register_gen (sse_parameter_registers[ssereg / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
+ deprecated_write_register_gen (sse_parameter_registers[ssereg / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
offset += 8;
ssereg++;
break;
@@ -862,34 +861,35 @@ x86_64_skip_prologue (CORE_ADDR pc)
struct symtab_and_line v_sal;
struct symbol *v_function;
CORE_ADDR endaddr;
+ unsigned char prolog_buf[PROLOG_BUFSIZE];
- /* We will handle only functions beginning with:
- 55 pushq %rbp
- 48 89 e5 movq %rsp,%rbp
- */
- unsigned char prolog_expect[PROLOG_BUFSIZE] = { 0x55, 0x48, 0x89, 0xe5 },
- prolog_buf[PROLOG_BUFSIZE];
+ /* We will handle only functions starting with: */
+ static unsigned char prolog_expect[PROLOG_BUFSIZE] =
+ {
+ 0x55, /* pushq %rbp */
+ 0x48, 0x89, 0xe5 /* movq %rsp, %rbp */
+ };
read_memory (pc, (char *) prolog_buf, PROLOG_BUFSIZE);
- /* First check, whether pc points to pushq %rbp, movq %rsp,%rbp. */
+ /* First check, whether pc points to pushq %rbp, movq %rsp, %rbp. */
for (i = 0; i < PROLOG_BUFSIZE; i++)
if (prolog_expect[i] != prolog_buf[i])
- return pc; /* ... no, it doesn't. Nothing to skip. */
+ return pc; /* ... no, it doesn't. Nothing to skip. */
- /* OK, we have found the prologue and want PC of the first
+ /* OK, we have found the prologue and want PC of the first
non-prologue instruction. */
pc += PROLOG_BUFSIZE;
v_function = find_pc_function (pc);
v_sal = find_pc_line (pc, 0);
- /* If pc doesn't point to a function with debuginfo,
- some of the following may be NULL. */
+ /* If pc doesn't point to a function with debuginfo, some of the
+ following may be NULL. */
if (!v_function || !v_function->ginfo.value.block || !v_sal.symtab)
return pc;
- endaddr = v_function->ginfo.value.block->endaddr;
+ endaddr = BLOCK_END (SYMBOL_BLOCK_VALUE (v_function));
for (i = 0; i < v_sal.symtab->linetable->nitems; i++)
if (v_sal.symtab->linetable->item[i].pc >= pc
@@ -903,224 +903,207 @@ x86_64_skip_prologue (CORE_ADDR pc)
}
/* Sequence of bytes for breakpoint instruction. */
-static unsigned char *
-x86_64_breakpoint_from_pc (CORE_ADDR * pc, int *lenptr)
+static const unsigned char *
+x86_64_breakpoint_from_pc (CORE_ADDR *pc, int *lenptr)
{
static unsigned char breakpoint[] = { 0xcc };
*lenptr = 1;
return breakpoint;
}
-static struct gdbarch *
-x86_64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+static void
+x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- struct gdbarch *gdbarch;
- struct gdbarch_tdep *tdep;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int i, sum;
- /* Find a candidate among the list of pre-declared architectures. */
- for (arches = gdbarch_list_lookup_by_info (arches, &info);
- arches != NULL;
- arches = gdbarch_list_lookup_by_info (arches->next, &info))
- {
- switch (info.bfd_arch_info->mach)
- {
- case bfd_mach_x86_64:
- case bfd_mach_x86_64_intel_syntax:
- switch (gdbarch_bfd_arch_info (arches->gdbarch)->mach)
- {
- case bfd_mach_x86_64:
- case bfd_mach_x86_64_intel_syntax:
- return arches->gdbarch;
- case bfd_mach_i386_i386:
- case bfd_mach_i386_i8086:
- case bfd_mach_i386_i386_intel_syntax:
- break;
- default:
- internal_error (__FILE__, __LINE__,
- "x86_64_gdbarch_init: unknown machine type");
- }
- break;
- case bfd_mach_i386_i386:
- case bfd_mach_i386_i8086:
- case bfd_mach_i386_i386_intel_syntax:
- switch (gdbarch_bfd_arch_info (arches->gdbarch)->mach)
- {
- case bfd_mach_x86_64:
- case bfd_mach_x86_64_intel_syntax:
- break;
- case bfd_mach_i386_i386:
- case bfd_mach_i386_i8086:
- case bfd_mach_i386_i386_intel_syntax:
- return arches->gdbarch;
- default:
- internal_error (__FILE__, __LINE__,
- "x86_64_gdbarch_init: unknown machine type");
- }
- break;
- default:
- internal_error (__FILE__, __LINE__,
- "x86_64_gdbarch_init: unknown machine type");
- }
- }
-
- tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
- gdbarch = gdbarch_alloc (&info, tdep);
-
- switch (info.bfd_arch_info->mach)
- {
- case bfd_mach_x86_64:
- case bfd_mach_x86_64_intel_syntax:
- tdep->num_xmm_regs = 16;
- break;
- case bfd_mach_i386_i386:
- case bfd_mach_i386_i8086:
- case bfd_mach_i386_i386_intel_syntax:
- /* This is place for definition of i386 target vector. */
- break;
- default:
- internal_error (__FILE__, __LINE__,
- "x86_64_gdbarch_init: unknown machine type");
- }
+ /* The x86-64 has 16 SSE registers. */
+ tdep->num_xmm_regs = 16;
+ /* This is what all the fuss is about. */
set_gdbarch_long_bit (gdbarch, 64);
set_gdbarch_long_long_bit (gdbarch, 64);
set_gdbarch_ptr_bit (gdbarch, 64);
- set_gdbarch_long_double_format (gdbarch, &floatformat_i387_ext);
+ /* In contrast to the i386, on the x86-64 a `long double' actually
+ takes up 128 bits, even though it's still based on the i387
+ extended floating-point format which has only 80 significant bits. */
+ set_gdbarch_long_double_bit (gdbarch, 128);
set_gdbarch_num_regs (gdbarch, X86_64_NUM_REGS);
+
+ /* Register numbers of various important registers. */
+ set_gdbarch_sp_regnum (gdbarch, 7); /* %rsp */
+ set_gdbarch_fp_regnum (gdbarch, 6); /* %rbp */
+ set_gdbarch_pc_regnum (gdbarch, 16); /* %rip */
+ set_gdbarch_ps_regnum (gdbarch, 17); /* %eflags */
+ set_gdbarch_fp0_regnum (gdbarch, X86_64_NUM_GREGS); /* %st(0) */
+
+ /* The "default" register numbering scheme for the x86-64 is
+ referred to as the "DWARF register number mapping" in the psABI.
+ The preferred debugging format for all known x86-64 targets is
+ actually DWARF2, and GCC doesn't seem to support DWARF (that is
+ DWARF-1), but we provide the same mapping just in case. This
+ mapping is also used for stabs, which GCC does support. */
+ set_gdbarch_stab_reg_to_regnum (gdbarch, x86_64_dwarf2_reg_to_regnum);
+ set_gdbarch_dwarf_reg_to_regnum (gdbarch, x86_64_dwarf2_reg_to_regnum);
+ set_gdbarch_dwarf2_reg_to_regnum (gdbarch, x86_64_dwarf2_reg_to_regnum);
+
+ /* We don't override SDB_REG_RO_REGNUM, sice COFF doesn't seem to be
+ in use on any of the supported x86-64 targets. */
+
set_gdbarch_register_name (gdbarch, x86_64_register_name);
set_gdbarch_register_size (gdbarch, 8);
- set_gdbarch_register_raw_size (gdbarch, x86_64_register_raw_size);
- set_gdbarch_max_register_raw_size (gdbarch, 16);
- set_gdbarch_register_byte (gdbarch, x86_64_register_byte);
- /* Total amount of space needed to store our copies of the machine's register
- (SIZEOF_GREGS + SIZEOF_FPU_REGS + SIZEOF_FPU_CTRL_REGS + SIZEOF_SSE_REGS) */
+ /* Total amount of space needed to store our copies of the machine's
+ register (SIZEOF_GREGS + SIZEOF_FPU_REGS + SIZEOF_FPU_CTRL_REGS +
+ SIZEOF_SSE_REGS) */
for (i = 0, sum = 0; i < X86_64_NUM_REGS; i++)
sum += x86_64_register_info_table[i].size;
set_gdbarch_register_bytes (gdbarch, sum);
- set_gdbarch_register_virtual_size (gdbarch, generic_register_size);
- set_gdbarch_max_register_virtual_size (gdbarch, 16);
+ set_gdbarch_register_raw_size (gdbarch, x86_64_register_raw_size);
+ set_gdbarch_register_byte (gdbarch, x86_64_register_byte);
set_gdbarch_register_virtual_type (gdbarch, x86_64_register_virtual_type);
+ /* FIXME: kettenis/20021026: As long as we don't support longjmp,
+ that is, as long as we have `tdep->jb_pc_offset == -1', using
+ i386_get_longjmp_target is fine. */
+
set_gdbarch_register_convertible (gdbarch, x86_64_register_convertible);
set_gdbarch_register_convert_to_virtual (gdbarch,
x86_64_register_convert_to_virtual);
set_gdbarch_register_convert_to_raw (gdbarch,
x86_64_register_convert_to_raw);
-/* Register numbers of various important registers. */
- set_gdbarch_sp_regnum (gdbarch, 7); /* (rsp) Contains address of top of stack. */
- set_gdbarch_fp_regnum (gdbarch, 6); /* (rbp) */
- set_gdbarch_pc_regnum (gdbarch, 16); /* (rip) Contains program counter. */
-
- set_gdbarch_fp0_regnum (gdbarch, X86_64_NUM_GREGS); /* First FPU floating-point register. */
+ /* Getting saved registers is handled by unwind information. */
+ set_gdbarch_get_saved_register (gdbarch, cfi_get_saved_register);
+ /* FIXME: kettenis/20021026: Should we set parm_boundary to 64 here? */
set_gdbarch_read_fp (gdbarch, cfi_read_fp);
-/* Discard from the stack the innermost frame, restoring all registers. */
+ /* FIXME: kettenis/20021026: Should be undeprecated. */
+ set_gdbarch_extract_return_value (gdbarch, NULL);
+ set_gdbarch_deprecated_extract_return_value (gdbarch,
+ x86_64_extract_return_value);
+ set_gdbarch_push_arguments (gdbarch, x86_64_push_arguments);
+ set_gdbarch_push_return_address (gdbarch, x86_64_push_return_address);
set_gdbarch_pop_frame (gdbarch, x86_64_pop_frame);
+ set_gdbarch_store_struct_return (gdbarch, x86_64_store_struct_return);
+ /* FIXME: kettenis/20021026: Should be undeprecated. */
+ set_gdbarch_store_return_value (gdbarch, NULL);
+ set_gdbarch_deprecated_store_return_value (gdbarch,
+ x86_64_store_return_value);
+ /* Override, since this is handled by x86_64_extract_return_value. */
+ set_gdbarch_extract_struct_value_address (gdbarch, NULL);
+ set_gdbarch_use_struct_convention (gdbarch, x86_64_use_struct_convention);
- /* FRAME_CHAIN takes a frame's nominal address and produces the frame's
- chain-pointer. */
- set_gdbarch_frame_chain (gdbarch, cfi_frame_chain);
+ set_gdbarch_frame_init_saved_regs (gdbarch, x86_64_frame_init_saved_regs);
+ set_gdbarch_skip_prologue (gdbarch, x86_64_skip_prologue);
+ set_gdbarch_frame_chain (gdbarch, x86_64_linux_frame_chain);
set_gdbarch_frameless_function_invocation (gdbarch,
- x86_64_frameless_function_invocation);
+ x86_64_frameless_function_invocation);
+ /* FIXME: kettenis/20021025: Shouldn't this be set to
+ generic_file_frame_chain_valid? */
+ set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
+ /* FIXME: kettenis/20021026: These two are GNU/Linux-specific and
+ should be moved elsewhere. */
set_gdbarch_frame_saved_pc (gdbarch, x86_64_linux_frame_saved_pc);
+ set_gdbarch_saved_pc_after_call (gdbarch, x86_64_linux_saved_pc_after_call);
+ set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
+ /* FIXME: kettenis/20021026: This one is GNU/Linux-specific too. */
+ set_gdbarch_pc_in_sigtramp (gdbarch, x86_64_linux_in_sigtramp);
- set_gdbarch_frame_args_address (gdbarch, default_frame_address);
- set_gdbarch_frame_locals_address (gdbarch, default_frame_address);
-
-/* Return number of bytes at start of arglist that are not really args. */
- set_gdbarch_frame_args_skip (gdbarch, 8);
-
- set_gdbarch_frame_init_saved_regs (gdbarch, x86_64_frame_init_saved_regs);
-
-/* Frame pc initialization is handled by unwind informations. */
- set_gdbarch_init_frame_pc (gdbarch, cfi_init_frame_pc);
+ /* Build call frame information (CFI) from DWARF2 frame debug info. */
+ set_gdbarch_dwarf2_build_frame_info (gdbarch, dwarf2_build_frame_info);
-/* Initialization of unwind informations. */
+ /* Initialization of per-frame CFI. */
set_gdbarch_init_extra_frame_info (gdbarch, cfi_init_extra_frame_info);
-/* Getting saved registers is handled by unwind informations. */
- set_gdbarch_get_saved_register (gdbarch, cfi_get_saved_register);
-
- set_gdbarch_frame_init_saved_regs (gdbarch, x86_64_frame_init_saved_regs);
+ /* Frame PC initialization is handled by using CFI. */
+ set_gdbarch_init_frame_pc (gdbarch, x86_64_init_frame_pc);
-/* Cons up virtual frame pointer for trace */
+ /* Cons up virtual frame pointer for trace. */
set_gdbarch_virtual_frame_pointer (gdbarch, cfi_virtual_frame_pointer);
+ /* FIXME: kettenis/20021026: This is ELF-specific. Fine for now,
+ since all supported x86-64 targets are ELF, but that might change
+ in the future. */
+ set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
+}
- set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
+static struct gdbarch *
+x86_64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+{
+ struct gdbarch_tdep *tdep;
+ struct gdbarch *gdbarch;
+ enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
- set_gdbarch_use_generic_dummy_frames (gdbarch, 1);
- set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
- set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
- set_gdbarch_pc_in_call_dummy (gdbarch, pc_in_call_dummy_at_entry_point);
- set_gdbarch_call_dummy_words (gdbarch, 0);
- set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
- set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
- set_gdbarch_call_dummy_p (gdbarch, 1);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
- set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
- set_gdbarch_push_return_address (gdbarch, x86_64_push_return_address);
- set_gdbarch_push_arguments (gdbarch, x86_64_push_arguments);
+ /* Try to determine the OS ABI of the object we're loading. */
+ if (info.abfd != NULL)
+ osabi = gdbarch_lookup_osabi (info.abfd);
-/* Return number of args passed to a frame, no way to tell. */
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
-/* Don't use default structure extract routine */
- set_gdbarch_deprecated_extract_struct_value_address (gdbarch, 0);
+ /* Find a candidate among extant architectures. */
+ for (arches = gdbarch_list_lookup_by_info (arches, &info);
+ arches != NULL;
+ arches = gdbarch_list_lookup_by_info (arches->next, &info))
+ {
+ /* Make sure the OS ABI selection matches. */
+ tdep = gdbarch_tdep (arches->gdbarch);
+ if (tdep && tdep->osabi == osabi)
+ return arches->gdbarch;
+ }
-/* If USE_STRUCT_CONVENTION retruns 0, then gdb uses STORE_RETURN_VALUE
- and EXTRACT_RETURN_VALUE to store/fetch the functions return value. It is
- the case when structure is returned in registers. */
- set_gdbarch_use_struct_convention (gdbarch, x86_64_use_struct_convention);
+ /* Allocate space for the new architecture. */
+ tdep = XMALLOC (struct gdbarch_tdep);
+ gdbarch = gdbarch_alloc (&info, tdep);
-/* Store the address of the place in which to copy the structure the
- subroutine will return. This is called from call_function. */
- set_gdbarch_store_struct_return (gdbarch, x86_64_store_struct_return);
+ tdep->osabi = osabi;
-/* Extract from an array REGBUF containing the (raw) register state
- a function return value of type TYPE, and copy that, in virtual format,
- into VALBUF. */
- set_gdbarch_deprecated_extract_return_value (gdbarch, x86_64_extract_return_value);
+ /* FIXME: kettenis/20021025: The following calls are going to
+ disappear when we integrate the x86_64 target into the i386
+ target. */
+ set_gdbarch_long_double_format (gdbarch, &floatformat_i387_ext);
-/* Write into the appropriate registers a function return value stored
- in VALBUF of type TYPE, given in virtual format. */
- set_gdbarch_deprecated_store_return_value (gdbarch, x86_64_store_return_value);
-
+ set_gdbarch_max_register_raw_size (gdbarch, 16);
+ set_gdbarch_max_register_virtual_size (gdbarch, 16);
+
+ set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
-/* Offset from address of function to start of its code. */
+ set_gdbarch_breakpoint_from_pc (gdbarch, x86_64_breakpoint_from_pc);
+ set_gdbarch_decr_pc_after_break (gdbarch, 1);
set_gdbarch_function_start_offset (gdbarch, 0);
- set_gdbarch_skip_prologue (gdbarch, x86_64_skip_prologue);
+ set_gdbarch_frame_args_skip (gdbarch, 8);
+ set_gdbarch_frame_args_address (gdbarch, default_frame_address);
+ set_gdbarch_frame_locals_address (gdbarch, default_frame_address);
- set_gdbarch_saved_pc_after_call (gdbarch, x86_64_linux_saved_pc_after_call);
+ set_gdbarch_use_generic_dummy_frames (gdbarch, 1);
- set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
+ set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);
+ set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
+ set_gdbarch_call_dummy_start_offset (gdbarch, 0);
+ set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
+ set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
+ set_gdbarch_call_dummy_length (gdbarch, 0);
+ set_gdbarch_call_dummy_p (gdbarch, 1);
+ set_gdbarch_call_dummy_words (gdbarch, NULL);
+ set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
+ set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
+ set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
- set_gdbarch_breakpoint_from_pc (gdbarch,
- (gdbarch_breakpoint_from_pc_ftype *)
- x86_64_breakpoint_from_pc);
+ set_gdbarch_pc_in_call_dummy (gdbarch, pc_in_call_dummy_at_entry_point);
- set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
+ set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
-/* Amount PC must be decremented by after a breakpoint. This is often the
- number of bytes in BREAKPOINT but not always. */
- set_gdbarch_decr_pc_after_break (gdbarch, 1);
+ /* FIXME: kettenis/20021025: These already are the default. */
-/* Use dwarf2 debug frame informations. */
- set_gdbarch_dwarf2_build_frame_info (gdbarch, dwarf2_build_frame_info);
- set_gdbarch_dwarf2_reg_to_regnum (gdbarch, x86_64_dwarf2_reg_to_regnum);
+ set_gdbarch_register_virtual_size (gdbarch, generic_register_size);
+ set_gdbarch_deprecated_extract_struct_value_address (gdbarch, 0);
+
+ x86_64_init_abi (info, gdbarch);
return gdbarch;
}
diff --git a/gdb/x86-64-tdep.h b/gdb/x86-64-tdep.h
index 711486077fb..4e7320643ca 100644
--- a/gdb/x86-64-tdep.h
+++ b/gdb/x86-64-tdep.h
@@ -30,9 +30,12 @@ extern int x86_64_num_gregs;
int x86_64_register_number (const char *name);
const char *x86_64_register_name (int reg_nr);
-
gdbarch_frame_saved_pc_ftype x86_64_linux_frame_saved_pc;
gdbarch_saved_pc_after_call_ftype x86_64_linux_saved_pc_after_call;
+gdbarch_pc_in_sigtramp_ftype x86_64_linux_in_sigtramp;
+CORE_ADDR x86_64_linux_frame_chain (struct frame_info *fi);
+void x86_64_init_frame_pc (int fromleaf, struct frame_info *fi);
+
#endif
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 0e85125791d..140161f7341 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -150,16 +150,16 @@ struct coff_symfile_info
CORE_ADDR toc_offset;
};
-static struct complaint storclass_complaint =
+static struct deprecated_complaint storclass_complaint =
{"Unexpected storage class: %d", 0, 0};
-static struct complaint bf_notfound_complaint =
+static struct deprecated_complaint bf_notfound_complaint =
{"line numbers off, `.bf' symbol not found", 0, 0};
-static struct complaint ef_complaint =
+static struct deprecated_complaint ef_complaint =
{"Mismatched .ef symbol ignored starting at symnum %d", 0, 0};
-static struct complaint eb_complaint =
+static struct deprecated_complaint eb_complaint =
{"Mismatched .eb symbol ignored starting at symnum %d", 0, 0};
static void xcoff_initial_scan (struct objfile *, int);
@@ -483,7 +483,7 @@ record_include_begin (struct coff_symbol *cs)
/* This can happen with old versions of GCC.
GCC 2.3.3-930426 does not exhibit this on a test case which
a user said produced the message for him. */
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Nested C_BINCL symbols", 0, 0};
complain (&msg);
}
@@ -502,7 +502,7 @@ record_include_end (struct coff_symbol *cs)
if (inclDepth == 0)
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Mismatched C_BINCL/C_EINCL pair", 0, 0};
complain (&msg);
}
@@ -766,7 +766,7 @@ enter_line_range (struct subfile *subfile, unsigned beginoffset, unsigned endoff
{
if (endoffset >= limit_offset)
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Bad line table offset in C_EINCL directive", 0, 0};
complain (&msg);
return;
@@ -864,7 +864,7 @@ static char *
xcoff_next_symbol_text (struct objfile *objfile)
{
struct internal_syment symbol;
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Unexpected symbol continuation", 0, 0};
char *retval;
/* FIXME: is this the same as the passed arg? */
@@ -1332,7 +1332,7 @@ read_xcoff_symtab (struct partial_symtab *pst)
case C_UNTAG:
case C_ENTAG:
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Unrecognized storage class %d.", 0, 0};
complain (&msg, cs->c_sclass);
}
@@ -1603,7 +1603,7 @@ read_symbol (struct internal_syment *symbol, int symno)
->symtbl;
if (symno < 0 || symno >= nsyms)
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Invalid symbol offset", 0, 0};
complain (&msg);
symbol->n_value = 0;
@@ -2442,7 +2442,7 @@ scan_xcoff_symtab (struct objfile *objfile)
default:
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Storage class %d not recognized during scan", 0, 0};
complain (&msg, sclass);
}
@@ -2565,7 +2565,7 @@ scan_xcoff_symtab (struct objfile *objfile)
case C_STSYM:
{
- static struct complaint function_outside_compilation_unit = {
+ static struct deprecated_complaint function_outside_compilation_unit = {
"function `%s' appears to be defined outside of all compilation units", 0, 0
};
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index b08808563f2..21457d0834a 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -186,7 +186,7 @@ xstormy16_get_saved_register (char *raw_buffer,
struct frame_info *fi,
int regnum, enum lval_type *lval)
{
- generic_get_saved_register (raw_buffer, optimized, addrp, fi, regnum, lval);
+ deprecated_generic_get_saved_register (raw_buffer, optimized, addrp, fi, regnum, lval);
}
/* Function: xstormy16_type_is_scalar
@@ -387,7 +387,7 @@ xstormy16_store_return_value (struct type *type, char *valbuf)
/* Add leading zeros to the value. */
memset (buf, 0, xstormy16_reg_size);
memcpy (buf, valbuf, 1);
- write_register_gen (E_1ST_ARG_REGNUM, buf);
+ deprecated_write_register_gen (E_1ST_ARG_REGNUM, buf);
}
else if (xstormy16_type_is_scalar (type) &&
TYPE_LENGTH (type) <= E_MAX_RETTYPE_SIZE_IN_REGS)
@@ -439,7 +439,7 @@ xstormy16_frame_saved_register (struct frame_info *fi, int regnum)
int size = xstormy16_register_raw_size (regnum);
char *buf = (char *) alloca (size);
- generic_get_saved_register (buf, NULL, NULL, fi, regnum, NULL);
+ deprecated_generic_get_saved_register (buf, NULL, NULL, fi, regnum, NULL);
return (CORE_ADDR) extract_unsigned_integer (buf, size);
}
diff --git a/gdb/z8k-tdep.c b/gdb/z8k-tdep.c
index c7396e21ff7..257962e8b71 100644
--- a/gdb/z8k-tdep.c
+++ b/gdb/z8k-tdep.c
@@ -319,7 +319,7 @@ store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
}
-void
+static void
z8k_print_register_hook (int regno)
{
if ((regno & 1) == 0 && regno < 16)
@@ -359,7 +359,117 @@ z8k_print_register_hook (int regno)
(unsigned int)read_memory_short (rval + i));
}
}
+}
+
+static void
+z8k_print_registers_info (struct gdbarch *gdbarch,
+ struct ui_file *file,
+ struct frame_info *frame,
+ int regnum, int print_all)
+{
+ int i;
+ const int numregs = NUM_REGS + NUM_PSEUDO_REGS;
+ char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
+ char *virtual_buffer = alloca (MAX_REGISTER_VIRTUAL_SIZE);
+
+ for (i = 0; i < numregs; i++)
+ {
+ /* Decide between printing all regs, non-float / vector regs, or
+ specific reg. */
+ if (regnum == -1)
+ {
+ if (!print_all)
+ {
+ if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
+ continue;
+ if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)))
+ continue;
+ }
+ }
+ else
+ {
+ if (i != regnum)
+ continue;
+ }
+
+ /* If the register name is empty, it is undefined for this
+ processor, so don't display anything. */
+ if (REGISTER_NAME (i) == NULL || *(REGISTER_NAME (i)) == '\0')
+ continue;
+
+ fputs_filtered (REGISTER_NAME (i), file);
+ print_spaces_filtered (15 - strlen (REGISTER_NAME (i)), file);
+
+ /* Get the data in raw format. */
+ if (! frame_register_read (frame, i, raw_buffer))
+ {
+ fprintf_filtered (file, "*value not available*\n");
+ continue;
+ }
+ /* FIXME: cagney/2002-08-03: This code shouldn't be necessary.
+ The function frame_register_read() should have returned the
+ pre-cooked register so no conversion is necessary. */
+ /* Convert raw data to virtual format if necessary. */
+ if (REGISTER_CONVERTIBLE (i))
+ {
+ REGISTER_CONVERT_TO_VIRTUAL (i, REGISTER_VIRTUAL_TYPE (i),
+ raw_buffer, virtual_buffer);
+ }
+ else
+ {
+ memcpy (virtual_buffer, raw_buffer,
+ REGISTER_VIRTUAL_SIZE (i));
+ }
+
+ /* If virtual format is floating, print it that way, and in raw
+ hex. */
+ if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
+ {
+ int j;
+
+ val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
+ file, 0, 1, 0, Val_pretty_default);
+
+ fprintf_filtered (file, "\t(raw 0x");
+ for (j = 0; j < REGISTER_RAW_SIZE (i); j++)
+ {
+ int idx;
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ idx = j;
+ else
+ idx = REGISTER_RAW_SIZE (i) - 1 - j;
+ fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[idx]);
+ }
+ fprintf_filtered (file, ")");
+ }
+ else
+ {
+ /* Print the register in hex. */
+ val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
+ file, 'x', 1, 0, Val_pretty_default);
+ /* If not a vector register, print it also according to its
+ natural format. */
+ if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)) == 0)
+ {
+ fprintf_filtered (file, "\t");
+ val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
+ file, 0, 1, 0, Val_pretty_default);
+ }
+ }
+
+ /* Some z8k specific info. */
+ z8k_print_register_hook (i);
+
+ fprintf_filtered (file, "\n");
+ }
+}
+
+void
+z8k_do_registers_info (int regnum, int all)
+{
+ z8k_print_registers_info (current_gdbarch, gdb_stdout, selected_frame,
+ regnum, all);
}
void