summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog949
-rw-r--r--gdb/MAINTAINERS1
-rw-r--r--gdb/Makefile.in13
-rw-r--r--gdb/NEWS32
-rw-r--r--gdb/acconfig.h3
-rw-r--r--gdb/ada-exp.y4
-rw-r--r--gdb/ada-lang.c98
-rw-r--r--gdb/ada-lex.l2
-rw-r--r--gdb/arch-utils.c30
-rw-r--r--gdb/arch-utils.h19
-rw-r--r--gdb/arm-linux-tdep.c7
-rw-r--r--gdb/arm-tdep.c12
-rw-r--r--gdb/bcache.c15
-rw-r--r--gdb/bcache.h9
-rw-r--r--gdb/blockframe.c114
-rw-r--r--gdb/breakpoint.c55
-rw-r--r--gdb/coffread.c14
-rw-r--r--gdb/config.in9
-rw-r--r--gdb/config/alpha/nm-osf2.h3
-rw-r--r--gdb/config/arm/nbsd.mt1
-rw-r--r--gdb/config/arm/tm-linux.h8
-rw-r--r--gdb/config/arm/tm-nbsd.h (renamed from gdb/config/mips/tm-linux64.h)14
-rw-r--r--gdb/config/djgpp/fnchange.lst1
-rw-r--r--gdb/config/h8300/tm-h8300.h15
-rw-r--r--gdb/config/i386/tm-i386sol2.h2
-rw-r--r--gdb/config/i386/tm-linux.h8
-rw-r--r--gdb/config/i386/x86-64linux.mt2
-rw-r--r--gdb/config/ia64/nm-linux.h11
-rw-r--r--gdb/config/m68k/3b1.mh24
-rw-r--r--gdb/config/m68k/3b1.mt6
-rw-r--r--gdb/config/m68k/delta68.mh10
-rw-r--r--gdb/config/m68k/delta68.mt6
-rw-r--r--gdb/config/m68k/dpx2.mh12
-rw-r--r--gdb/config/m68k/dpx2.mt6
-rw-r--r--gdb/config/m68k/m68klynx.mh12
-rw-r--r--gdb/config/m68k/m68klynx.mt8
-rw-r--r--gdb/config/m68k/m68kv4.mh14
-rw-r--r--gdb/config/m68k/m68kv4.mt6
-rw-r--r--gdb/config/m68k/nm-delta68.h44
-rw-r--r--gdb/config/m68k/nm-dpx2.h58
-rw-r--r--gdb/config/m68k/nm-m68klynx.h52
-rw-r--r--gdb/config/m68k/nm-sun2.h68
-rw-r--r--gdb/config/m68k/nm-sun3.h68
-rw-r--r--gdb/config/m68k/nm-sysv4.h46
-rw-r--r--gdb/config/m68k/sun2os3.mh8
-rw-r--r--gdb/config/m68k/sun2os3.mt14
-rw-r--r--gdb/config/m68k/sun2os4.mh8
-rw-r--r--gdb/config/m68k/sun2os4.mt6
-rw-r--r--gdb/config/m68k/sun3os3.mh8
-rw-r--r--gdb/config/m68k/sun3os3.mt16
-rw-r--r--gdb/config/m68k/sun3os4.mh8
-rw-r--r--gdb/config/m68k/sun3os4.mt6
-rw-r--r--gdb/config/m68k/tm-3b1.h66
-rw-r--r--gdb/config/m68k/tm-delta68.h218
-rw-r--r--gdb/config/m68k/tm-dpx2.h70
-rw-r--r--gdb/config/m68k/tm-m68klynx.h78
-rw-r--r--gdb/config/m68k/tm-m68kv4.h134
-rw-r--r--gdb/config/m68k/tm-sun2.h48
-rw-r--r--gdb/config/m68k/tm-sun2os4.h42
-rw-r--r--gdb/config/m68k/tm-sun3.h178
-rw-r--r--gdb/config/m68k/tm-sun3os4.h44
-rw-r--r--gdb/config/m68k/xm-3b1.h164
-rw-r--r--gdb/config/m68k/xm-delta68.h70
-rw-r--r--gdb/config/m68k/xm-dpx2.h44
-rw-r--r--gdb/config/m68k/xm-m68kv4.h58
-rw-r--r--gdb/config/m68k/xm-sun2.h154
-rw-r--r--gdb/config/m68k/xm-sun3.h142
-rw-r--r--gdb/config/m68k/xm-sun3os4.h44
-rw-r--r--gdb/config/mips/decstation.mh8
-rw-r--r--gdb/config/mips/embed64.mt4
-rw-r--r--gdb/config/mips/linux64.mt7
-rw-r--r--gdb/config/mips/littlemips.mh6
-rw-r--r--gdb/config/mips/mipsv4.mt6
-rw-r--r--gdb/config/mips/news-mips.mh6
-rw-r--r--gdb/config/mips/nm-mips.h68
-rw-r--r--gdb/config/mips/nm-news-mips.h86
-rw-r--r--gdb/config/mips/nm-riscos.h120
-rw-r--r--gdb/config/mips/riscos.mh32
-rw-r--r--gdb/config/mips/tm-irix5.h74
-rw-r--r--gdb/config/mips/tm-irix6.h62
-rw-r--r--gdb/config/mips/tm-mips.h53
-rw-r--r--gdb/config/mips/tm-mips64.h37
-rw-r--r--gdb/config/mips/tm-mipsv4.h74
-rw-r--r--gdb/config/mips/tx39.mt5
-rw-r--r--gdb/config/mips/tx39l.mt5
-rw-r--r--gdb/config/mips/xm-mips.h118
-rw-r--r--gdb/config/mips/xm-mipsv4.h44
-rw-r--r--gdb/config/mips/xm-riscos.h50
-rw-r--r--gdb/config/pa/tm-hppa.h18
-rw-r--r--gdb/config/powerpc/tm-linux.h7
-rw-r--r--gdb/config/sparc/tm-sparc.h2
-rw-r--r--gdb/config/sparc/tm-sun4sol2.h4
-rwxr-xr-xgdb/configure1236
-rw-r--r--gdb/configure.host36
-rw-r--r--gdb/configure.in24
-rw-r--r--gdb/configure.tgt28
-rw-r--r--gdb/cp-abi.c2
-rw-r--r--gdb/cp-namespace.c2
-rw-r--r--gdb/cp-support.c48
-rw-r--r--gdb/cp-support.h4
-rw-r--r--gdb/dbxread.c20
-rw-r--r--gdb/defs.h15
-rw-r--r--gdb/dve3900-rom.c64
-rw-r--r--gdb/dwarf2-frame.c97
-rw-r--r--gdb/dwarf2read.c1031
-rw-r--r--gdb/dwarfread.c96
-rw-r--r--gdb/elfread.c30
-rw-r--r--gdb/environ.c2
-rw-r--r--gdb/eval.c4
-rw-r--r--gdb/exec.c4
-rw-r--r--gdb/f-lang.c3
-rw-r--r--gdb/frame.c79
-rw-r--r--gdb/frame.h47
-rw-r--r--gdb/frv-tdep.c6
-rw-r--r--gdb/gdbarch.c15
-rw-r--r--gdb/gdbarch.h36
-rwxr-xr-xgdb/gdbarch.sh30
-rw-r--r--gdb/glibc-tdep.c2
-rw-r--r--gdb/glibc-tdep.h5
-rw-r--r--gdb/gnu-v2-abi.c9
-rw-r--r--gdb/gnu-v3-abi.c28
-rw-r--r--gdb/h8300-tdep.c79
-rw-r--r--gdb/hppa-tdep.c26
-rw-r--r--gdb/hpread.c4
-rw-r--r--gdb/i386-linux-tdep.c9
-rw-r--r--gdb/i386-tdep.c112
-rw-r--r--gdb/i386-tdep.h7
-rw-r--r--gdb/i386nbsd-tdep.c181
-rw-r--r--gdb/i387-tdep.c28
-rw-r--r--gdb/i387-tdep.h5
-rw-r--r--gdb/ia64-linux-nat.c11
-rw-r--r--gdb/ia64-tdep.c622
-rw-r--r--gdb/infcall.c16
-rw-r--r--gdb/infcmd.c8
-rw-r--r--gdb/infrun.c42
-rw-r--r--gdb/inftarg.c2
-rw-r--r--gdb/irix5-nat.c56
-rw-r--r--gdb/jv-exp.y20
-rw-r--r--gdb/language.c8
-rw-r--r--gdb/libunwind-frame.c387
-rw-r--r--gdb/libunwind-frame.h63
-rw-r--r--gdb/m2-exp.y8
-rw-r--r--gdb/m68hc11-tdep.c10
-rw-r--r--gdb/mcore-rom.c6
-rw-r--r--gdb/mcore-tdep.c21
-rw-r--r--gdb/mdebugread.c14
-rw-r--r--gdb/minsyms.c2
-rw-r--r--gdb/mips-linux-nat.c45
-rw-r--r--gdb/mips-linux-tdep.c187
-rw-r--r--gdb/mips-nat.c18
-rw-r--r--gdb/mips-tdep.c1063
-rw-r--r--gdb/mips-tdep.h33
-rw-r--r--gdb/mipsnbsd-tdep.c21
-rw-r--r--gdb/mipsnbsd-tdep.h4
-rw-r--r--gdb/mipsread.c8
-rw-r--r--gdb/mipsv4-nat.c52
-rw-r--r--gdb/mn10300-tdep.c19
-rw-r--r--gdb/objc-exp.y30
-rw-r--r--gdb/objfiles.c3
-rw-r--r--gdb/observer.c22
-rw-r--r--gdb/osabi.c19
-rw-r--r--gdb/p-exp.y14
-rw-r--r--gdb/p-typeprint.c10
-rw-r--r--gdb/p-valprint.c2
-rw-r--r--gdb/ppc-linux-nat.c37
-rw-r--r--gdb/ppc-linux-tdep.c9
-rw-r--r--gdb/ppc-sysv-tdep.c40
-rw-r--r--gdb/proc-api.c2
-rw-r--r--gdb/procfs.c2
-rw-r--r--gdb/remote-e7000.c34
-rw-r--r--gdb/remote-mips.c43
-rw-r--r--gdb/remote-rdp.c22
-rw-r--r--gdb/remote-sim.c27
-rw-r--r--gdb/remote-vxmips.c24
-rw-r--r--gdb/remote.c30
-rw-r--r--gdb/rs6000-nat.c12
-rw-r--r--gdb/sh64-tdep.c454
-rw-r--r--gdb/solib.h2
-rw-r--r--gdb/source.c4
-rw-r--r--gdb/sparc-tdep.c2
-rw-r--r--gdb/stabsread.c14
-rw-r--r--gdb/stack.c57
-rw-r--r--gdb/symfile.c13
-rw-r--r--gdb/symtab.c5
-rw-r--r--gdb/symtab.h7
-rw-r--r--gdb/target.c2
-rw-r--r--gdb/target.h6
-rw-r--r--gdb/testsuite/ChangeLog239
-rw-r--r--gdb/testsuite/gdb.arch/i386-unwind.c (renamed from gdb/config/mips/tm-tx39.h)40
-rw-r--r--gdb/testsuite/gdb.arch/i386-unwind.exp68
-rw-r--r--gdb/testsuite/gdb.asm/asm-source.exp36
-rw-r--r--gdb/testsuite/gdb.asm/asmsrc1.s2
-rw-r--r--gdb/testsuite/gdb.asm/empty.inc1
-rw-r--r--gdb/testsuite/gdb.asm/frv.inc54
-rw-r--r--gdb/testsuite/gdb.asm/mips.inc2
-rw-r--r--gdb/testsuite/gdb.asm/netbsd.inc12
-rw-r--r--gdb/testsuite/gdb.base/break.c71
-rw-r--r--gdb/testsuite/gdb.base/break.exp195
-rw-r--r--gdb/testsuite/gdb.base/break1.c44
-rw-r--r--gdb/testsuite/gdb.base/callfuncs.exp48
-rw-r--r--gdb/testsuite/gdb.base/completion.exp68
-rw-r--r--gdb/testsuite/gdb.base/complex.exp2
-rw-r--r--gdb/testsuite/gdb.base/condbreak.exp57
-rw-r--r--gdb/testsuite/gdb.base/constvars.exp10
-rw-r--r--gdb/testsuite/gdb.base/define.exp24
-rw-r--r--gdb/testsuite/gdb.base/ena-dis-br.exp51
-rw-r--r--gdb/testsuite/gdb.base/freebpcmd.c15
-rw-r--r--gdb/testsuite/gdb.base/freebpcmd.exp121
-rw-r--r--gdb/testsuite/gdb.base/info-proc.exp20
-rw-r--r--gdb/testsuite/gdb.base/list.exp1
-rw-r--r--gdb/testsuite/gdb.base/maint.exp55
-rw-r--r--gdb/testsuite/gdb.base/mips_pro.exp4
-rw-r--r--gdb/testsuite/gdb.base/scope.exp57
-rw-r--r--gdb/testsuite/gdb.base/so-impl-ld.exp8
-rw-r--r--gdb/testsuite/gdb.base/structs.c296
-rw-r--r--gdb/testsuite/gdb.base/structs.exp726
-rw-r--r--gdb/testsuite/gdb.base/until.exp31
-rw-r--r--gdb/testsuite/gdb.base/volatile.exp6
-rw-r--r--gdb/testsuite/gdb.cp/ambiguous.exp4
-rw-r--r--gdb/testsuite/gdb.cp/class2.cc66
-rw-r--r--gdb/testsuite/gdb.cp/class2.exp115
-rw-r--r--gdb/testsuite/gdb.cp/ctti.exp4
-rw-r--r--gdb/testsuite/gdb.cp/derivation.exp6
-rw-r--r--gdb/testsuite/gdb.cp/member-ptr.exp4
-rw-r--r--gdb/testsuite/gdb.cp/method.exp4
-rw-r--r--gdb/testsuite/gdb.cp/rtti.exp8
-rw-r--r--gdb/testsuite/gdb.cp/templates.exp4
-rw-r--r--gdb/testsuite/gdb.cp/virtfunc.exp1
-rwxr-xr-xgdb/testsuite/gdb.trace/configure899
-rw-r--r--gdb/testsuite/lib/compiler.c23
-rw-r--r--gdb/testsuite/lib/compiler.cc23
-rw-r--r--gdb/testsuite/lib/gdb.exp78
-rw-r--r--gdb/thread-db.c46
-rw-r--r--gdb/values.c7
-rw-r--r--gdb/version.in2
-rw-r--r--gdb/x86-64-tdep.c834
-rw-r--r--gdb/xcoffread.c16
237 files changed, 9176 insertions, 6895 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c3825b8705a..36bff521fb2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,928 @@
2003-12-15 David Carlton <carlton@kealia.com>
+ * Merge with mainline; tag is carlton_dictionary-20031215-merge.
+ * cp-support.c (class_name_from_physname): Add DMGL_PARAMS to call
+ to cplus_demangle.
+ (method_name_from_physname): Ditto.
+
+2003-12-14 Mark Kettenis <kettenis@gnu.org>
+
+ * proc-api.c (procfs_note): Add format string to fprintf call.
+
+ * i386-tdep.c (i386_analyze_frame_setup): Add missing encodings
+ for `subl' and `xorl' instructions.
+
+2003-12-13 Jim Blandy <jimb@redhat.com>
+
+ * dwarf2read.c (dwarf2_add_member_fn, read_structure_scope):
+ Replace uses of DEPRECATED_STREQ and DEPRECATED_STREQN with calls
+ to strcmp and strncmp.
+
+ * osabi.c (gdbarch_init_osabi): Reformat error message with better
+ line breaks.
+
+2003-12-13 Mark Kettenis <kettenis@gnu.org>
+
+ * blockframe.c (inside_main_func): Reformat. Introduce new local
+ variables to prevent long lines. Update comments to reflect
+ reality.
+
+2003-12-12 Kevin Buettner <kevinb@redhat.com>
+
+ From David Mosberger <davidm@hpl.hp.com>:
+ * libunwind-frame.c (unw_find_dyn_list_p): Replace most arguments
+ with a single unw_dyn_info_t pointer.
+ (libunwind_find_dyn_list): Likewise.
+ * libunwind-frame.h: Likewise.
+ * ia64-tdep.c (ia64_find_unwind_table): Switch to using
+ UNW_INFO_FORMAT_REMOTE_TABLE so we can avoid having to read in the
+ entire unwind-table at once. Support for this table format has
+ been added to libunwind v0.95.
+ (ia64_find_proc_info_x): Adjust for remote-unwind-table changes.
+ (ia64_get_dyn_info_list): Adjust for interface change for
+ libunwind_find_dyn_list().
+
+2003-12-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * breakpoint.c (breakpoint_enabled): New function to test whether
+ breakpoint is active and enabled.
+ (insert_bp_location, insert_breakpoints): Call new function to test
+ for enabled breakpoint.
+ (remove_breakpoint, breakpoint_here_p, breakpoint_thread_match)
+ (bpstat_should_step, bpstat_have_active_hw_watchpoints)
+ (disable_breakpoints_in_shlibs, hw_watchpoint_used_count)
+ (disable_watchpoints_before_interactive_call_start)
+ (breakpoint_re_set_one): Ditto.
+ (bpstat_stop_status): Use new function and simplify test.
+
+2003-12-11 Mark Kettenis <kettenis@gnu.org>
+
+ * observer.c (observer_test_first_observer)
+ (observer_test_second_observer, observer_test_third_observer):
+ Don't define as `static'.
+ (observer_test_first_notification_function)
+ (observer_test_second_notification_function)
+ (observer_test_third_notification_function): Likewise.
+
+2003-12-10 Mark Kettenis <kettenis@gnu.org>
+
+ * solib.h (SOLIB_UNLOADED_LIBRARY_PATHNAME): Define as "" instead
+ of (0).
+
+2003-12-11 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
+
+ * MAINTAINERS (write after approval): Add myself.
+
+2003-12-11 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
+
+ * config/h8300/tm-h8300.h (h8300hmode): Remove.
+ (h8300hmode): Likewise.
+ (h8300smode): Likewise.
+ (h8300sxmode): Likewise.
+ (h8300_normal_mode): Likewise.
+ (GDB_TARGET_IS_H8300): Likewise.
+ (NUM_REALREGS): Use TARGET_ARCHITECTURE->mach instead of global.
+ * h8300-tdep.c (is_h8300hmode): New function.
+ (is_h8300smode): New function.
+ (is_h8300sxmode): New function.
+ (is_h8300_normal_mode): New function.
+ (BINWORD): Use new functions.
+ (h8300_examine_prologue): Likewise.
+ (h8300_print_register): Likewise.
+ (h8300_print_registers_info): Likewise.
+ (h8300_register_type): Likewise.
+ (h8300_gdbarch_init): Remove use of globals like h8300hmode.
+ * remote-e7000.c (e7000_open): Remove use of GDB_TARGET_IS_H8300.
+ (e7000_fetch_registers): Use TARGET_ARCHITECTURE->mach instead.
+ (e7000_wait): Use TARGET_ARCHITECTURE->mach instead of global.
+
+2003-12-10 J. Brobecker <brobecker@gnat.com>
+
+ * frame.c (select_frame): Get the current frame PC using
+ get_frame_address_in_block() instead of get_frame_pc().
+ * stack.c (get_frame_language): Likewise.
+
+2003-12-08 Kevin Buettner <kevinb@redhat.com>
+
+ * remote.c (remote_open_1, remote_cisco_open): Avoid closing
+ remote_desc more than once.
+
+2003-12-07 Andrew Cagney <cagney@redhat.com>
+
+ * defs.h (DEPRECATED_STREQN, DEPRECATED_STREQ): Simplify by
+ directly calling strcmp equivalents. Add disclaimer.
+
+2003-12-06 Andrew Cagney <cagney@redhat.com>
+
+ * remote.c (remote_fetch_registers): For short packets, explicitly
+ supply a zero value. Use regcache_raw_supply. Fix suggested by
+ Jonathan Larmour.
+
+2003-12-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * ia64-tdep.c (ia64_gdbarch_init): Set up the gdbarch long double
+ format to be the i387 extended float format which is used for
+ long doubles stored in memory.
+
+2003-12-05 Mark Kettenis <kettenis@gnu.org>
+
+ From Ulrich Weigand <weigand@informatik.uni-erlangen.de>:
+ * dwarf2-frame.c (dwarf2_frame_cache): Use the untranslated RA
+ column instead of translating it.
+
+2003-12-04 Michael Chastain <mec.gnu@mindspring.com>
+
+ Partial fix for PR c++/1465.
+ Fix for PR c++/1377.
+ * cp-support.h (cp_lookup_rtti_type): New function.
+ * cp-support.c (cp_lookup_rtti_type): New function.
+ * gnu-v2-abi.c: Update copyright years.
+ (gnuv2_rtti_type): Call cp_lookup_rtti_type.
+ * gnu-v3-abi.c: Update copyright years.
+ (gnuv3_rtti_type): Call cp_lookup_rtti_type.
+
+2003-12-04 J. Brobecker <brobecker@gnat.com>
+
+ * stabsread.c (read_type): Save a reference to types that are defined
+ as cross references to other types.
+
+2003-12-02 Roland McGrath <roland@redhat.com>
+
+ * thread-db.c (enable_thread_event): Change return type to
+ td_err_e. Return TD_OK or error code.
+ (enable_thread_event_reporting): Update callers.
+
+2003-12-03 Ian Lance Taylor <ian@wasabisystems.com>
+
+ * NEWS: Mention new C++ demangler code.
+
+2003-12-03 Andrew Cagney <cagney@redhat.com>
+
+ * ppc-linux-nat.c (store_register, fetch_register): Convert
+ between ptrace and regcache's wordsize.
+ (ppc_register_u_addr): Use the ptrace wordsize.
+
+2003-12-02 Kevin Buettner <kevinb@redhat.com>
+
+ * frv-tdep.c (frv_gdbarch_init): Add case for fr550.
+
+2003-12-02 Daniel Jacobowitz <drow@mvista.com>
+
+ * dwarf2read.c (dwarf_info_offset, dwarf_abbrev_offset)
+ (dwarf_line_offset, dwarf_pubnames_offset, dwarf_aranges_offset)
+ (dwarf_loc_offset, dwarf_macinfo_offset, dwarf_str_offset)
+ (dwarf_ranges_offset, dwarf_frame_offset, dwarf_eh_frame_offset):
+ Delete.
+ (dwarf2_read_section): Remove offset and size arguments. Use
+ bfd_get_section_size_before_reloc and sectp->filepos.
+ (dwarf2_has_info): Clear section variables instead of offsets.
+ (dwarf2_locate_sections): Don't initialize the deleted variables.
+ (dwarf2_build_psymtabs): Update calls to dwarf2_read_section.
+ (dwarf2_build_psymtabs_easy): Likewise.
+ * dwarf2-frame.c (dwarf_frame_offset, dwarf_frame_size)
+ (dwarf_eh_frame_offset, dwarf_eh_frame_size): Remove extern
+ declarations.
+ (dwarf2_read_section): Update prototype.
+ (dwarf2_build_frame_info): Update calls to dwarf2_read_section.
+ Use bfd_get_section_size_before_reloc instead of global size
+ variables.
+
+2003-12-01 Michael Chastain <mec.gnu@mindspring.com>
+
+ * dwarfread.c: Update documentation on the state of dwarf-1.
+
+2003-12-01 Andrew Cagney <cagney@redhat.com>
+
+ Obsolete old MIPS SVr3 and SVr4 systems.
+ * NEWS: Mention obsoleted systems.
+ * configure.tgt: Mark mips*-*-sysv4* as obsolete.
+ * configure.host: Mark mips-dec-*, mips-little-*, mips-sony-*,
+ mips-*-sysv4*, mips-*-sysv*, mips-*-riscos* and mips-*-mach3* as
+ obsolete.
+ * config/mips/decstation.mh: Mark as obsolete.
+ * config/mips/littlemips.mh: Mark as obsolete.
+ * config/mips/nm-mips.h: Mark as obsolete.
+ * config/mips/xm-mips.h: Mark as obsolete.
+ * config/mips/news-mips.mh: Mark as obsolete.
+ * config/mips/nm-news-mips.h: Mark as obsolete.
+ * config/mips/riscos.mh: Mark as obsolete.
+ * config/mips/nm-riscos.h: Mark as obsolete.
+ * config/mips/xm-riscos.h: Mark as obsolete.
+ * config/mips/mipsv4.mt: Mark as obsolete.
+ * config/mips/tm-mipsv4.h: Mark as obsolete.
+ * config/mips/xm-mipsv4.h: Mark as obsolete.
+
+ Obsolete old m68k systems.
+ * configure.host: Mark m68*-sun-*, m68*-sun-sunos4*,
+ m68*-sun-sunos3*, m68*-motorola-*, m68*-*-sysv4*, m68*-*-lynxos*,
+ m68*-bull*-sysv*, m68*-att-*, m680[01]0-sun-sunos4*, and
+ m680[01]0-sun-sunos3* as obsolete.
+ * configure.tgt: Mark m68*-*-lynxos*, m68*-*-sunos3*,
+ m68*-*-sunos4*, m68*-*-sysv4*, m68000-*-sunos3*, m68000-*-sunos4*,
+ m68*-bull-sysv*, m68*-att-*, and m68*-motorola-*, as obsolete.
+ * config/m68k/sun3os4.mh: Mark file obsolete.
+ * config/m68k/xm-sun3os4.h: Mark file obsolete.
+ * config/m68k/sun3os3.mh: Mark file obsolete.
+ * config/m68k/nm-sun3.h: Mark file obsolete.
+ * config/m68k/xm-sun3.h: Mark file obsolete.
+ * config/m68k/sun2os4.mh: Mark file obsolete.
+ * config/m68k/sun2os3.mh: Mark file obsolete.
+ * config/m68k/nm-sun2.h: Mark file obsolete.
+ * config/m68k/xm-sun2.h: Mark file obsolete.
+ * config/m68k/m68kv4.mh: Mark file obsolete.
+ * config/m68k/nm-sysv4.h: Mark file obsolete.
+ * config/m68k/xm-m68kv4.h: Mark file obsolete.
+ * config/m68k/m68klynx.mh: Mark file obsolete.
+ * config/m68k/nm-m68klynx.h: Mark file obsolete.
+ * config/m68k/dpx2.mh: Mark file obsolete.
+ * config/m68k/xm-dpx2.h: Mark file obsolete.
+ * config/m68k/nm-dpx2.h: Mark file obsolete.
+ * config/m68k/delta68.mh: Mark file obsolete.
+ * config/m68k/xm-delta68.h: Mark file obsolete.
+ * config/m68k/nm-delta68.h: Mark file obsolete.
+ * config/m68k/3b1.mh: Mark file obsolete.
+ * config/m68k/xm-3b1.h: Mark file obsolete.
+ * config/m68k/sun3os4.mt: Mark file obsolete.
+ * config/m68k/tm-sun3os4.h: Mark file obsolete.
+ * config/m68k/sun3os3.mt: Mark file obsolete.
+ * config/m68k/tm-sun3.h: Mark file obsolete.
+ * config/m68k/sun2os4.mt: Mark file obsolete.
+ * config/m68k/tm-sun2os4.h: Mark file obsolete.
+ * config/m68k/sun2os3.mt: Mark file obsolete.
+ * config/m68k/tm-sun2.h: Mark file obsolete.
+ * config/m68k/m68kv4.mt: Mark file obsolete.
+ * config/m68k/tm-m68kv4.h: Mark file obsolete.
+ * config/m68k/m68klynx.mt: Mark file obsolete.
+ * config/m68k/tm-m68klynx.h: Mark file obsolete.
+ * config/m68k/dpx2.mt: Mark file obsolete.
+ * config/m68k/tm-dpx2.h: Mark file obsolete.
+ * config/m68k/delta68.mt: Mark file obsolete.
+ * config/m68k/tm-delta68.h: Mark file obsolete.
+ * config/m68k/3b1.mt: Mark file obsolete.
+ * config/m68k/tm-3b1.h: Mark file obsolete.
+
+2003-11-29 Mark Kettenis <kettenis@gnu.org>
+
+ * x86-64-tdep.c (MAX_CLASSES): Remove macro.
+ (x86_64_reg_class): Remove enum.
+ (merge_classes, classify_argument, examine_argument): Remove
+ functions.
+ (INT_REGS, SSE_REGS): Remove macros.
+ (x86_64_push_arguments): Remove function.
+ (amd64_push_arguments): New function.
+ (x86_64_push_dummy_call): Call amd64_push_arguments instead of
+ x86_64_push_arguments.
+
+2003-11-28 Mark Kettenis <kettenis@gnu.org>
+
+ * x86-64-tdep.c (x86_64_frame_cache): Don't bail out if %rbp is
+ zero. Reorganize code a bit.
+
+2003-11-27 Mark Kettenis <kettenis@gnu.org>
+
+ * dwarf2-frame.c: Fix another comment.
+
+ * x86-64-tdep.c (RET_INT_REGS, RET_SSE_REGS): Remove defines.
+ (x86_64_use_struct_convention, x86_64_extract_return_value,
+ x86_64_store_return_value): Remove.
+ (amd64_reg_class): New enum.
+ (amd64_merge_classes, amd64_classify_aggregate, amd64_classify,
+ amd64_return_value): New functions.
+ (x86_64_init_abi): Don't set extract_return_value,
+ store_return_value and use_struct_convention. Set return_value to
+ amd64_return_value.
+ * i387-tdep.h (i387_return_value): New prototype.
+ * i387-tdep.c (i387_return_value): New function.
+
+ * dwarf2-frame.c: Fix some comments and whitespace problems.
+
+ * i386nbsd-tdep.c: Don't include "gdbtypes.h". Include
+ "gdb_assert.h" and "gdb_string.h".
+ (i386nbsd_r_reg_offset): Rename from regmap.
+ (SIZEOF_STRUCT_REG): Remove.
+ (i386nbsd_supply_reg, fetch_core_registers,
+ fetch_elfcore_registers, i386nbsd_core_fns, i386nbsd_elfcore_fns):
+ Remove.
+ (i386nbsd_aout_supply_regset,
+ i386nbsd_aout_regset_from_core_section): New functions.
+ (i386nbsd_sc_reg_offset): Don't explicitly specify size of array.
+ (i386nbsd_init_abi): Initialize TDEP->gregset_reg_offset,
+ TDEP->gregset_num_regs amd sizeof_gregset. Use ARRAY_SIZE to
+ initialize TDEP->sc_num_regs.
+ (i386nbsdaout_init_abi): New function.
+ (i386nbsdelf_init_abi): Remove initialization of
+ TDEP->num_xmm_regs. Don't set num_regs here.
+ (_initialize_i386nbsd_tdep): Don't call add_core_fns. Use
+ i386nbsd_aout_init to register NetBSD a.out OS/ABI.
+
+ * osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Use
+ .note.netbsdcore.procinfo section to recognize NetBSD core files.
+
+2003-11-26 Michael Chastain <mec.gnu@mindspring.com>
+
+ * cp-abi.c: Update copyright years.
+
+2003-11-25 Andrew Cagney <cagney@redhat.com>
+
+ * thread-db.c (enable_thread_event): New function. Ensure that BP
+ is a code address.
+ (enable_thread_event_reporting): Use enable_thread_event.
+
+2003-11-25 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c (mips_o64_extract_return_value): Correct for
+ NUM_REGS (see changes 2003-06-21).
+ (mips_eabi_extract_return_value): Ditto.
+
+2003-11-25 Andrew Cagney <cagney@redhat.com>
+
+ * infrun.c: Don't include "exec.h".
+ (handle_inferior_event): Pass current_target, instead of exec_ops,
+ to SOLIB_ADD. Add comments.
+ * Makefile.in (infrun.o): Update dependencies.
+
+2003-11-24 Daniel Jacobowitz <drow@mvista.com>
+
+ * NEWS: Mention improved location expression support.
+
+2003-11-23 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (infrun.o): Update dependencies.
+ * infrun.c: Include "exec.h".
+ (handle_inferior_event): Pass exec_ops to SOLIB_ADD.
+
+2003-11-23 Andrew Cagney <cagney@redhat.com>
+
+ * frame.c (frame_unwind_signed_register): Delete function.
+ * frame.h (frame_unwind_register_signed): Delete declaration.
+ * mips-tdep.c (mips_frame_saved_pc): Use frame_unwind_register_signed.
+
+ * arch-utils.h (generic_cannot_extract_struct_value_address):
+ Delete declaration.
+
+ * defs.h (DEPRECATED_STREQN): Rename STREQN.
+ (DEPRECATED_STREQ): Rename STREQ.
+ * ada-exp.y, ada-lang.c, ada-lex.l, coffread.c: Update.
+ * config/mips/tm-irix5.h, config/mips/tm-irix6.h: Update.
+ * config/mips/tm-mipsv4.h, config/sparc/tm-sun4sol2.h: Update.
+ * dbxread.c, dwarf2read.c, dwarfread.c, environ.c: Update.
+ * eval.c, exec.c, f-lang.c, hppa-tdep.c, hpread.c: Update.
+ * jv-exp.y, language.c, m2-exp.y, mcore-rom.c: Update.
+ * mdebugread.c, mipsread.c, objc-exp.y, objfiles.c: Update.
+ * p-exp.y, p-typeprint.c, p-valprint.c, rs6000-nat.c: Update.
+ * source.c, sparc-tdep.c, stack.c, target.c: Update.
+
+ * symfile.c (symbol_file_command): Replace STREQ with strcmp.
+ * elfread.c (elf_symtab_read): Delete STREQ from comment.
+
+2003-11-22 Andrew Cagney <cagney@redhat.com>
+
+ * frame.c (deprecated_frame_xmalloc): Delete function.
+ (deprecated_set_frame_extra_info_hack): Delete function.
+ (deprecated_set_frame_saved_regs_hack): Delete function.
+ * frame.h (deprecated_frame_xmalloc): Delete declaration.
+ (deprecated_set_frame_extra_info_hack): Delete declaration.
+ (deprecated_set_frame_saved_regs_hack): Delete declaration.
+ * mcore-tdep.c (analyze_dummy_frame): Instead of
+ deprecated_frame_xmalloc, deprecated_set_frame_saved_regs_hack,
+ and deprecated_set_frame_extra_info_hack use
+ deprecated_frame_xmalloc_with_cleanup.
+ * mn10300-tdep.c (analyze_dummy_frame): Ditto.
+ * mips-tdep.c (mips_init_extra_frame_info): Delete call to
+ deprecated_set_frame_saved_regs_hack.
+
+ * mips-tdep.c (mips_frame_chain): Delete call to
+ deprecated_inside_entry_file.
+
+ * frame.h (deprecated_set_frame_next_hack): Delete declaration.
+ (deprecated_set_frame_prev_hack): Delete declaration.
+ * frame.c (deprecated_set_frame_next_hack): Delete function.
+ (deprecated_set_frame_prev_hack): Delete function.
+ * mcore-tdep.c (analyze_dummy_frame): Delete calls to
+ "deprecated_set_frame_next_hack" and
+ "deprecated_set_frame_prev_hack".
+ * mn10300-tdep.c (analyze_dummy_frame): Ditto.
+
+ * mips-tdep.c (mips_register_convertible): Delete function.
+ (mips_register_convert_to_virtual): Delete function.
+ (mips_register_convert_to_raw): Delete function.
+ (mips_gdbarch_init): Do not set "deprecated_register_convertible",
+ "deprecated_register_convert_to_virtual", or
+ "deprecated_register_convert_to_raw".
+ (mips_pseudo_register_write, mips_pseudo_register_read): Handle
+ 32/64 cooked to raw register conversions.
+
+ * frame.c (deprecated_get_frame_context): Delete function.
+ (deprecated_set_frame_context): Delete function.
+ (struct frame_info): Delete member "context".
+ * frame.h (deprecated_get_frame_context): Delete declaration.
+ (deprecated_set_frame_context): Delete declaration.
+
+ * procfs.c (procfs_wait): Delete FAULTED_USE_SIGINFO comment.
+ * config/sparc/tm-sun4sol2.h (FAULTED_USE_SIGINFO): Delete macro.
+ * config/i386/tm-i386sol2.h (FAULTED_USE_SIGINFO): Delete macro.
+ * config/alpha/nm-osf2.h (FAULTED_USE_SIGINFO): Delete macro.
+
+ * mips-tdep.c (SIGFRAME_REG_SIZE): Delete macro.
+ (mips_find_saved_regs): Replace SIGFRAME_REG_SIZE with
+ mips_regsize.
+ (mips_dump_tdep): Do not print SIGFRAME_REG_SIZE.
+ * config/mips/tm-irix6.h (SIGFRAME_REG_SIZE): Delete macro.
+ * config/mips/tm-irix5.h: Update copyright.
+ (SIGFRAME_REG_SIZE): Delete macro.
+
+ * hppa-tdep.c (hppa_value_returned_from_stack): Delete function.
+ * config/pa/tm-hppa.h (hppa_value_returned_from_stack): Delete
+ declaration.
+ (DEPRECATED_VALUE_RETURNED_FROM_STACK): Delete macro.
+ * infcall.c (call_function_by_hand): Delete #ifdef
+ DEPRECATED_VALUE_RETURNED_FROM_STACK code.
+ * infcmd.c (print_return_value): Ditto.
+
+ * mips-tdep.c (skip_prologue_using_sal): New function.
+ (mips32_skip_prologue, mips16_skip_prologue): Use
+ skip_prologue_using_sal to get an upper bound on the search.
+
+ * config/powerpc/tm-linux.h (PROLOGUE_FIRSTLINE_OVERLAP): Delete
+ #if 0'ed macro.
+ * infrun.c (step_into_function): Delete #ifdef
+ PROLOGUE_FIRSTLINE_OVERLAP code.
+ * symtab.c (find_function_start_sal): Ditto.
+
+ * remote-rdp.c: Update copyright.
+ (rdp_init): #if 0 references to "target_byte_order".
+
+ * mips-tdep.c (mips_o32_store_return_value): Delete function.
+ (mips_o32_return_value): Replace mips_o32_xfer_return_value.
+ (mips_o32_extract_return_value): Delete function.
+ (mips_n32n64_return_value): Replace mips_n32n64_xfer_return_value.
+ (mips_n32n64_extract_return_value): Delete function.
+ (mips_n32n64_store_return_value): Delete function.
+ (mips_gdbarch_init): For o32 and n32n64, set "return_value"
+ instead of "store_return_value", "extract_return_value", and
+ "use_struct_convention".
+ (mips_n32n64_use_struct_convention): Delete function.
+
+2003-11-21 Kevin Buettner <kevinb@redhat.com>
+
+ * frv-tdep.c (frv_frame_this_id): Eliminate call to
+ inside_entry_func().
+
+2003-11-20 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c (i386_extract_return_value,
+ i386_store_return_value): Add gdbarch argument. Use it instead of
+ determining it from REGCACHE. Remove recursive call for
+ structures with a single member.
+ (i386_use_struct_convention): Remove.
+ (i386_reg_struct_return_p): New function.
+ (i386_return_value): New function.
+ (i386_gdbarch_init): Set return_value, don't set
+ extract_return_value, store_return_value and
+ use_struct_convention.
+ * x86-64-tdep.c (x86_64_init_abi): Set return_value to NULL.
+
+2003-11-20 Jim Blandy <jimb@redhat.com>
+
+ * osabi.c (_initialize_gdb_osabi): Don't return before registering
+ the 'set osabi' and 'show osabi' commands.
+
+2003-11-19 Mark Kettenis <kettenis@gnu.org>
+
+ * frame.c (get_prev_frame): Use result from
+ get_frame_address_in_block instead of get_frame_pc as argument to
+ inside_main_func. Fixes PR backtrace/1435.
+
+2003-11-19 Andrew Cagney <cagney@redhat.com>
+
+ * stack.c (return_command): Handle "void", "legacy" and "unknown
+ location" return values separatly.
+ * values.c (using_struct_return): Return 0 for a "void" return
+ type. Mention "register_value_being_returned".
+ (register_value_being_returned): Mention "using_struct_return".
+
+2003-11-19 Daniel Jacobowitz <drow@mvista.com>
+
+ * dwarf2read.c (offreg, basereg, isderef, frame_base_reg)
+ (frame_base_offset): Delete.
+ (read_func_scope): Delete call to decode_locdesc.
+ (decode_locdesc): Update comments. Don't set the removed variables.
+ Complain for DW_OP_reg* not at the end. Remove DW_OP_breg* and
+ DW_OP_fbreg support.
+
+2003-11-18 Daniel Jacobowitz <drow@mvista.com>
+
+ * dwarf2read.c (optimized_out, islocal): Remove.
+ (decode_locdesc): Update comments. Don't set optimized_out
+ or islocal.
+
+2003-11-17 Jeff Johnston <jjohnstn@redhat.com>
+ David Mosberger <davidm@hpl.hp.com>
+
+ * ia64-tdep.c: Include elf.h.
+ [HAVE_LIBUNWIND_IA64_H]: Include libunwind-frame.h and
+ libunwind-ia64.h.
+ (ia64_rse_slot_num, ia64_rse_skip_regs): New for libunwind support.
+ (ia64_gdb2uw_regnum, ia64_uw2gdb_regnum): Ditto.
+ (ia64_is_fpreg, ia64_access_reg): Ditto.
+ (ia64_access_fpreg, ia64_access_mem): Ditto.
+ (get_kernel_table): Ditto.
+ (ia64_find_unwind_table): Ditto.
+ (ia64_find_proc_info_x, ia64_put_unwind_info): Ditto.
+ (ia64_get_dyn_info_list, ia64_libunwind_frame_this_id): Ditto.
+ (ia64_libunwind_frame_prev_register): Ditto.
+ (ia64_libunwind_frame_sniffer): Ditto.
+ (ia64_gdbarch_init)[HAVE_LIBUNWIND_IA64_H]: Add libunwind frame
+ sniffer. Register libunwind functions needed by generic
+ libunwind frame code using libunwind_frame_set_descr().
+
+2003-11-16 Daniel Jacobowitz <drow@mvista.com>
+
+ * breakpoint.c (re_enable_breakpoints_in_shlibs): Only re-enable a
+ bp_shlib_disabled breakpoint if there is a shared library mapped
+ at its expected address.
+
+2003-11-16 Andrew Cagney <cagney@redhat.com>
+
+ * configure.tgt: Delete mips*tx39*-elf*.
+ * config/mips/tm-tx39.h: Delete file.
+ * config/mips/tx39.mt: Delete file.
+ * config/mips/tx39.mt: Delete file.
+
+ * mips-tdep.h (deprecated_mips_set_processor_regs_hack): Declare.
+ * remote-mips.c (common_open): Instead of
+ "mips_read_register_type" and "mips_set_processor_type_command"
+ call "deprecated_mips_set_processor_regs_hack".
+ * config/mips/tm-mips.h (mips_read_processor_type): Delete
+ declaration.
+ (mips_set_processor_type_command): Delete declaration.
+ * mips-tdep.c (mips_gdbarch_init): Update comment.
+ (mips_dump_tdep): Do not print MIPS_REGISTER_NAMES.
+ (mips_set_processor_type): Delete function.
+ (NUM_MIPS_PROCESSOR_REGS): Define.
+ (mips_show_processor_type_command): Delete function.
+ (mips_set_processor_type_command): Delete function.
+ (tmp_mips_processor_type): Delete.
+ (mips_processor_type): Delete.
+ (mips_processor_type_table): Delete.
+ (mips_r3051_reg_names): Delete.
+ (mips_r3081_reg_names): Delete.
+ (mips_lsi33k_reg_names): Delete.
+ (mips_processor_reg_names): Delete.
+ (mips_read_processor_type): Delete function.
+ (deprecated_mips_set_processor_regs_hack): New function.
+ (struct gdbarch_tdep): Add member "mips_processor_reg_names".
+ (mips_register_name): Get the processor names from the tdep.
+ (mips_tx39_reg_names): New array.
+ (mips_generic_reg_names): Wire to a standard set of names.
+ (mips_gdbarch_init): Set "mips_processor_reg_names".
+ * config/mips/tm-irix5.h (MIPS_REGISTER_NAMES): Delete macro.
+ * config/mips/tm-mips.h (MIPS_REGISTER_NAMES): Delete macro.
+ * config/mips/tm-tx39.h (MIPS_REGISTER_NAMES): Delete macro.
+
+2003-11-16 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (struct gdbarch_tdep): Add field "regnum".
+ (mips_fpa0_regnum, mips_regnum): New function.
+ (mips_gdbarch_init): Fill in the "regnum" fields.
+ * mips-tdep.h (struct mips_regnum): Define.
+ (mips_regnum): Declare.
+ * config/mips/tm-mips.h (BADVADDR_REGNUM): Delete macro.
+ (LO_REGNUM, HI_REGNUM, BADVADDR_REGNUM): Ditto.
+ (CAUSE_REGNUM, PC_REGNUM, FP0_REGNUM): Ditto.
+ (FCRCS_REGNUM, FCRIR_REGNUM, FPA0_REGNUM): Ditto.
+ * config/mips/tm-irix6.h (FP0_REGNUM): Delete macro.
+ (PC_REGNUM, CAUSE_REGNUM, BADVADDR_REGNUM): Ditto.
+ (HI_REGNUM, LO_REGNUM, FCRCS_REGNUM, FCRIR_REGNUM): Ditto.
+ * config/mips/tm-irix5.h (FP0_REGNUM): Delete macro.
+ (PC_REGNUM, CAUSE_REGNUM, BADVADDR_REGNUM): Ditto.
+ (HI_REGNUM, LO_REGNUM, FCRCS_REGNUM, FCRIR_REGNUM): Ditto.
+ * remote-mips.c: Include "mips-tdep.h". Update.
+ * mipsnbsd-tdep.c: Update.
+ * mipsv4-nat.c: Update.
+ * mips-tdep.c: Update.
+ * mips-nat.c: Update.
+ * mips-linux-tdep.c: Update.
+ * mips-linux-nat.c: Update.
+ * irix5-nat.c: Update.
+ * dve3900-rom.c: Include "mips-tdep.h". Update.
+ (ignore_packet): Supress GCC warning.
+ * config/mips/nm-riscos.h: Update.
+
+2003-11-16 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c: Replace DEPRECATED_REGISTER_RAW_SIZE with
+ register_size.
+ (mips_register_raw_size): Delete function.
+ (mips_register_type): Handle "mips64_transfers_32bit_regs_p".
+ (mips_gdbarch_init): Do not set "deprecated_register_raw_size".
+ Check and set "mips64_transfers_32bit_regs_p".
+ (struct gdbarch_tdep): Add "mips64_transfers_32bit_regs_p".
+ (mips_register_convertible): Check the architecture's
+ "mips64_transfers_32bit_regs_p".
+ (set_mips64_transfers_32bit_regs): New function.
+ (_initialize_mips_tdep): Use "add_setshow_cmd" when adding the
+ "set remote-mips64-transfers-32bit-regs" command. Specify
+ set_mips64_transfers_32bit_regs as the set function.
+ * Makefile.in (dve3900-rom.o, remote-mips.o): Update dependencies.
+
+2003-11-16 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.h (i386_supply_gregset): Provide prototype.
+ * i386-tdep.c (i386_supply_gregset): Make public.
+
+2003-11-16 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (mips_register_byte): Delete function.
+ (mips_gdbarch_init): Do not set "deprecated_register_byte".
+ * config/mips/tm-mips.h (MIPS_REGISTER_BYTE): Delete macro.
+ * config/mips/tm-irix6.h (MIPS_REGISTER_BYTE): Delete macro.
+ * config/mips/tm-irix5.h (MIPS_REGISTER_BYTE): Delete macro.
+
+2003-11-16 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c (i386_extract_return_value): Don't use bfd_byte.
+
+2003-11-16 Andrew Cagney <cagney@redhat.com>
+
+ * config/mips/linux64.mt: Delete file.
+ * config/mips/tm-linux64.h: Delete file.
+ * config/mips/tm-mips64.h: Delete file.
+ * config/mips/embed64.mt: Delete file.
+ * config/djgpp/fnchange.lst: Update.
+ * configure.tgt: Delete explicit patterns for mipsisa64*-*-linux*,
+ mips64*-*-linux*, mips64*-*-*, and mipsisa64*-*-*.
+ * config/mips/tm-irix6.h: Update copyright. Include
+ "mips/tm-mips.h" instead of "mips/tm-mips64.h".
+ * mips-tdep.c (mips_dump_tdep): Do not print "OP_LDFPR" or
+ "OP_LDGPR".
+
+2003-11-15 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (mips_register_type): Simplify. Eliminate reference
+ to MIPS_REGISTER_TYPE. Make integer registers signed. Make IRIX
+ n32 registers 64 bit.
+ (mips_register_raw_size, mips_register_byte): For pseudo
+ registers, use the register's pseudo size and not the
+ corresponding raw register's size.
+ * config/mips/tm-mips64.h (MIPS_REGISTER_TYPE): Delete macro.
+ * config/mips/tm-mips.h (MIPS_REGISTER_TYPE): Delete macro.
+ * config/mips/tm-irix6.h: Don't #undef MIPS_REGISTER_TYPE.
+ * config/mips/tm-irix5.h (MIPS_REGISTER_TYPE): Delete macro.
+
+2003-11-15 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (struct gdbarch_tdep): Delete member
+ gdb_target_is_mips64.
+ (GDB_TARGET_IS_MIPS64): Delete macro.
+ (mips_gdbarch_init): Do not set tdep's gdb_target_is_mips64.
+ (mips_dump_tdep): Do not print GDB_TARGET_IS_MIPS64.
+ (mips_addr_bits_remove): Simplify.
+
+ * mips-tdep.c: Replace DEPRECATED_REGISTER_VIRTUAL_SIZE with
+ register_size.
+
+ Replace MIPS_REGSIZE with mips_regsize.
+ * mips-tdep.c (mips_regsize): New function.
+ * mips-tdep.h (mips_regsize): Declare.
+ * mipsnbsd-tdep.h (SIZEOF_STRUCT_FPREG): Update.
+ (SIZEOF_STRUCT_REG): Update.
+ * mipsnbsd-tdep.c (mipsnbsd_supply_reg): Update.
+ (mipsnbsd_fill_reg): Update.
+ (mipsnbsd_supply_fpreg): Update.
+ (mipsnbsd_fill_fpreg): Update.
+ (NBSD_MIPS_JB_ELEMENT_SIZE): Update.
+ * mips-tdep.c (mips_register_raw_size): Update.
+ (mips_register_type): Update.
+ (SIGFRAME_BASE): Update.
+ (SIGFRAME_PC_OFF): Update.
+ (SIGFRAME_REGSAVE_OFF): Update.
+ (SIGFRAME_FPREGSAVE_OFF): Update.
+ (SIGFRAME_REG_SIZE): Update.
+ (mips32_heuristic_proc_desc): Update.
+ (print_gp_register_row): Update.
+ (mips_dump_tdep): Do not print MIPS_REGSIZE.
+ * irix5-nat.c (supply_gregset): Update.
+ (fetch_core_registers): Update.
+ * config/mips/tm-mips64.h (MIPS_REGSIZE): Delete macro.
+ * config/mips/tm-irix6.h (MIPS_REGISTER_BYTE): Update.
+ * config/mips/tm-mips.h (MIPS_REGSIZE): Delete macro.
+ (MIPS_REGISTER_BYTE): Update.
+ * config/mips/tm-irix5.h (MIPS_REGISTER_BYTE): Update.
+
+2003-11-15 Andrew Cagney <cagney@redhat.com>
+
+ * config/sparc/tm-sparc.h (DEPRECATE_USE_REGISTER_NOT_ARG): Rename
+ USE_REGISTER_NOT_ARG.
+ * stabsread.c (define_symbol): Update.
+
+2003-11-15 Andrew Cagney <cagney@redhat.com>
+
+ * bcache.h (deprecated_bcache): Declare.
+ (bcache): Make returned buffer constant.
+ * bcache.c (deprecated_bcache): New function.
+ (bcache_data): New function.
+ (bcache): Call bcache data.
+ * symfile.c (add_psymbol_to_list): Use deprecated_bcache.
+ (add_psymbol_with_dem_name_to_list): Ditto.
+
+2003-11-15 Mark Kettenis <kettenis@gnu.org>
+
+ * glibc-tdep.h (struct gdbarch): Declare opaque.
+ (glibc_skip_solib_resolver): Adjust prototype.
+ * glibc-tdep.c (glibc_skip_solib_resolver): Adjust.
+ * arm-linux-tdep.c (arm_linux_skip_solib_resolver): Remove.
+ (arm_linux_init_abi): Set skip_solib_resolver.
+ * i386-linux-tdep.c (i386_linux_skip_solib_resolver): Remove.
+ (i386_linux_init_abi): Set skip_solib_resolver.
+ * config/arm/tm-linux.h (SKIP_SOLIB_RESOLVER): Remove.
+ (arm_linux_skip_solib_resolver): Remove prototype.
+ * config/i386/tm-linux.h (SKIP_SOLIB_RESOLVER): Remove.
+ (i386_linux_skip_solib_resolver): Remove prototype.
+
+2003-11-14 Mark Kettenis <kettenis@gnu.org>
+
+ * gdbarch.sh (skip_solib_resolver): Change into a multi-arch
+ function.
+ * gdbarch.c, gdbarch.h: Regenerate.
+ * infrun.c (handle_inferior_event): Call
+ gdbarch_skip_solib_resolver instead of SKIP_SOLIB_RESOLVER.
+ * arch-utils.c (generic_in_solib_call_trampoline): Adjust function
+ definition.
+ * arch-utils.h (generic_in_solib_call_trampoline): Adjust function
+ prototype.
+
+2003-11-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libunwind-frame.c: New file.
+ * libunwind-frame.h: New file.
+ * acconfig.h (HAVE_LIBUNWIND): #undef reference added.
+ * configure.in: Add --with-libunwind option support. Define
+ HAVE_LIBUNWIND if libunwind support selected / defaulted.
+ Also check for libunwind.h and libunwind-ia64.h headers.
+ * configure: Regenerated.
+ * Makefile.in: Add support for libunwind-frame.o.
+ * config.in: Regenerated.
+
+2003-11-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * config/ia64/nm-linux.h (NATIVE_XFER_UNWIND_TABLE): New macro to
+ set up the ia64 linux native target method for getting the kernel
+ unwind table.
+ * ia64-linux-nat.c (ia64_linux_xfer_unwind_table): New function.
+ * inftarg.c (child_xfer_partial): Enable section of code to
+ handle TARGET_OBJECT_UNWIND_TABLE.
+ * target.h (target_object): Add new TARGET_OBJECT_UNWIND_TABLE macro.
+
+2003-11-14 Ian Lance Taylor <ian@wasabisystems.com>
+
+ * config/arm/nbsd.mt (TM_FILE): Define.
+ * config/arm/tm-nbsd.h: New file.
+
+2003-11-14 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (ppc-sysv-tdep.o): Update dependencies.
+ * ppc-sysv-tdep.c: Include "objfiles.h".
+ (ppc64_sysv_abi_push_dummy_call): Provide the
+ the FN's objfile when looking for the descriptor.
+
+ * ppc-linux-tdep.c (ppc_linux_init_abi): Set PPC64's
+ "name_of_malloc" to ".malloc".
+
+2003-11-13 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/x86-64linux.mt (TDEPFILES): Add glibc-tdep.o.
+
+2003-11-13 David Carlton <carlton@kealia.com>
+
+ * cp-namespace.c (lookup_namespace_scope): Fix typo in comment.
+
+2003-11-13 Andrew Cagney <cagney@redhat.com>
+
+ * arch-utils.h (selected_architecture_name): Declare.
+ (selected_byte_order): Declare.
+ * arch-utils.c (selected_byte_order): New function.
+ (selected_architecture_name): New function.
+ (target_architecture_auto): Make static.
+ (set_architecture_string): Make static.
+ (target_byte_order): Make static.
+ (target_byte_order_auto): Make static.
+ * gdbarch.sh (TARGET_BYTE_ORDER, TARGET_ARCHITECTURE): Delete
+ non-multi-arch definition.
+ (TARGET_ARCHITECTURE_AUTO, TARGET_BYTE_ORDER_AUTO): Delete.
+ (target_byte_order, target_architecture): Delete declaration.
+ (target_byte_order_auto, target_architecture_auto): Ditto.
+ * gdbarch.h: Re-generate.
+ * remote-sim.c (gdbsim_open): Use "selected_architecture_name" and
+ "selected_byte_order".
+
+2003-11-13 Andrew Cagney <cagney@redhat.com>
+
+ * ppc-linux-tdep.c (ppc_linux_return_value): Fix parameter order.
+
+2003-11-13 Jim Blandy <jimb@redhat.com>
+
+ * cp-namespace.c: Doc fix.
+
+2003-11-12 Michael Snyder <msnyder@redhat.com>
+
+ * sh64_tdep.c: Regularize some names.
+ (sh_sh64_register_name): Rename to sh64_register_name.
+ (sh_sh64_breakpoint_from_pc): Rename to sh64_breakpoint_from_pc.
+ (sh_sh64_register_byte): Rename to sh64_register_byte.
+ (sh_sh64_build_float_register_type):
+ Rename to sh64_build_float_register_type.
+ (sh_sh64_register_convert_to_virtual):
+ Rename to sh64_register_convert_to_virtual.
+ (sh_sh64_register_convert_to_raw):
+ Rename to sh64_register_convert_to_raw.
+
+ * sh64-tdep.c (translate_insn_rn, is_media_pseudo,
+ sh64_media_reg_base_num, sh64_compact_reg_base_num,
+ sh64_nofp_frame_init_saved_regs, sh64_push_arguments,
+ sh64_extract_return_value, sh64_show_media_regs,
+ sh64_show_compact_regs, sh_sh64_register_byte, sh64_register_type,
+ sh_sh64_register_convert_to_virtual, sh_sh64_register_convert_to_raw,
+ sh64_pseudo_register_read, sh64_pseudo_register_write,
+ sh64_do_pseudo_register, sh_compact_print_registers_info):
+ Delete unused variable 'tdep'.
+
+ * sh64-tdep.c: Coding standard and spelling comment fixes.
+ (sh64_extract_return_value): Replace deprecated_store_floating
+ with store_typed_floating.
+ (sh_sh64_register_convert_to_raw): Replace
+ deprecated_store_floating with store_typed_floating.
+ (sh_sh64_register_virtual_type): Convert to sh64_register_type.
+ (sh64_frame_chain, sh64_get_saved_pr, sh64_get_saved_register,
+ sh64_nofp_frame_init_saved_regs, sh64_push_arguments,
+ sh64_extract_struct_value_address, sh64_pop_frame,
+ sh64_extract_return_value, sh64_store_return_value,
+ sh_sh64_register_convert_to_virtual, sh64_pseudo_register_read,
+ sh_sh64_register_convert_to_raw, sh_pseudo_register_write):
+ Replace DEPRECATED_REGISTER_RAW_SIZE with register_size.
+ Replace DEPRECATED_REGISTER_VIRTUAL_TYPE with register_type.
+ (sh64_gdbarch_init): Don't set deprecated_register_bytes,
+ deprecated_register_virtual_type, deprecated_register_raw_size,
+ deprecated_max_register_raw_size, or
+ deprecated_max_register_virtual_size. Instead, just set
+ gdbarch_register_type.
+ (sh_sh64_register_raw_size): Delete.
+ (sh_sh64_register_virtual_size): Delete.
+
+2003-11-12 Daniel Jacobowitz <drow@mvista.com>
+
+ * dwarf2read.c (struct dwarf2_cu): New type.
+
+ (dwarf2_build_psymtabs_hard, psymtab_to_symtab_1): Create a
+ dwarf2_cu structure to pass down.
+
+ (scan_partial_symbols, add_partial_symbol, add_partial_namespace)
+ (add_partial_enumeration, locate_pdi_sibling, process_die)
+ (read_file_scope, read_func_scope)
+ (read_lexical_block_scope, dwarf2_get_pc_bounds)
+ (dwarf2_add_field, dwarf2_attach_fields_to_type)
+ (dwarf2_add_member_fn, dwarf2_attach_fn_fields_to_type)
+ (read_structure_scope, read_enumeration, read_array_type)
+ (read_common_block, read_namespace, read_tag_pointer_type)
+ (read_tag_ptr_to_member_type, read_tag_reference_type)
+ (read_tag_const_type, read_tag_volatile_type, read_tag_string_type)
+ (read_subroutine_type, read_typedef, read_base_type, read_comp_unit)
+ (read_die_and_children, read_die_and_siblings, dwarf2_read_section)
+ (dwarf2_read_abbrevs, dwarf2_lookup_abbrev, read_partial_die)
+ (read_full_die. read_attribute_value, read_attribute)
+ (read_address, dwarf_decode_line_header, dwarf_decode_lines)
+ (var_decode_location, new_symbol, dwarf2_const_value, die_type)
+ (die_containing_type, type_at_offset, tag_type_to_type)
+ (read_type_die, dwarf_base_type, decode_locdesc, dwarf_decode_macros)
+ (dwarf2_symbol_mark_computed): Accept and use a dwarf2_cu object.
+
+2003-11-12 Daniel Jacobowitz <drow@mvista.com>
+
+ PR breakpoints/1450
+ * breakpoint.c (insert_bp_location): Fix a logic error by returning
+ 0 after a catchpoint fails.
+
+2003-11-11 Michael Chastain <mec.gnu@mindspring.com>
+
+ * mips-tdep.c (msymbol_size): Delete.
+
+2003-11-07 Michael Chastain <mec@shout.net>
+
+ * symtab.h (struct minimal_symbol): Add size.
+ * dbxread.c: Use it.
+ * elfread.c: (record_minimal_symbol_and_info): Do not use info.
+ Rename to record_minimal_symbol.
+ (elf_symtab_read): Set MSYMBOL_SIZE explicitly.
+ * minsyms.c (prim_record_minimal_symbol_and_info): Initialize MSYMBOL_SIZE.
+ (install_minimal_symbols): Ditto.
+ * objfiles.c (terminate_minimal_symbol_table): Ditto.
+ * arm-tdep.c: Delete unused MSYMBOL_SIZE.
+ * m68hc11-tdep.c: Ditto.
+ * mips-tdep.c: Ditto.
+ * sh64-tdep.c: Ditto.
+
+2003-12-15 David Carlton <carlton@kealia.com>
+
* dwarf2read.c (get_scope_pc_bounds): New.
(psymtab_to_symtab_1): Use get_scope_pc_bounds.
(read_file_scope): Ditto.
@@ -79,7 +1002,7 @@
(TARGET_FLOAT_FORMAT: Pass "current_gdbarch" to default_double_format.
(TARGET_DOUBLE_FORMAT,TARGET_LONG_DOUBLE_FORMAT): Ditto.
* gdbarch.c: Re-generate.
-
+
* config/s390/s390.mh (XM_FILE, XM_CLIBS): Delete macros.
* config/s390/nm-linux.h (KERNEL_U_ADDR): Define.
* config/s390/xm-linux.h: Delete file.
@@ -434,10 +1357,10 @@
2003-11-05 Jeff Johnston <jjohnstn@redhat.com>
* ia64-tdep.c (struct gdbarch_tdep): Remove os_ident field.
- (ia64_gdbarch_init): Don't bother calculating the os.
- Instead use the gdbarch_info struct and look at the osabi field.
- Also use gdbarch_list_lookup_by_info() to look for a
- candidate gdbarch.
+ (ia64_gdbarch_init): Don't bother calculating the os.
+ Instead use the gdbarch_info struct and look at the osabi field.
+ Also use gdbarch_list_lookup_by_info() to look for a
+ candidate gdbarch.
2003-11-05 Kevin Buettner <kevinb@redhat.com>
@@ -490,7 +1413,7 @@
2003-11-04 Michael Snyder <msnyder@redhat.com>
- * MAINTAINERS: Remove myself as owner of breakpoints and
+ * MAINTAINERS: Remove myself as owner of breakpoints and
of sparc/solaris.
2003-11-03 Corinna Vinschen <vinschen@redhat.com>
@@ -680,7 +1603,7 @@
* symfile.c (reread_symbols): Clear per-objfile data.
2003-10-28 Jeff Johnston <jjohnstn@redhat.com>
-
+
* symfile.c (symbol_file_add_with_addrs_or_offsets): Switch to use
printf_unfiltered instead of printf_filtered for output messages.
(add_symbol_file_command): Ditto.
@@ -851,7 +1774,7 @@
* gdbarch.sh (convert_from_func_ptr_addr): Convert to a pure
multi-arch method, add "targ" parameter.
- (struct target_ops): Declare.
+ (struct target_ops): Declare.
* gdbarch.h, gdbarch.c: Re-generate.
* Makefile.in (c-valprint.o): Update dependencies.
* arch-utils.h: Update copyright.
@@ -1116,8 +2039,8 @@
(frame_id_build_special): New prototype.
* frame.c (frame_id_build_special): New function.
(frame_id_build): Change to call frame_id_build_special().
- (frame_id_eq): Change to also test special_addr field.
- (frame_id_inner): Update comment.
+ (frame_id_eq): Change to also test special_addr field.
+ (frame_id_inner): Update comment.
2003-10-17 Andrew Cagney <cagney@redhat.com>
@@ -1189,7 +2112,7 @@
(IA64_LINUX_SIGCONTEXT_OFFSET): Magic constant removed.
(ia64_linux_sigcontext_register_addr): Find the address of the
sigcontext area stored in the sigframe instead of using
- a magic offset constant.
+ a magic offset constant.
2003-10-15 Andrew Cagney <cagney@redhat.com>
@@ -1728,7 +2651,7 @@
2003-09-29 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_REGISTER_VIRTUAL_TYPE): Rename
- DEPRECATED_REGISTER_VIRTUAL_TYPE.
+ REGISTER_VIRTUAL_TYPE.
* gdbarch.h, gdbarch.c: Regenerate.
* arch-utils.c, hppa-tdep.c, regcache.c, regcache.h: Update.
* sh64-tdep.c, sparc-tdep.c: Update.
@@ -8224,7 +9147,7 @@ Fri Aug 8 00:28:38 UTC 2003 Brendan Conoboy <blc@redhat.com>
for 32-bit targets. Set extract_return_value and
store_return_value instead.
* config/sparc/tm-sparc.h (DEPRECATED_STORE_RETURN_VALUE,
- DEPRECTAED_EXTRACT_RETURN_VALUE,
+ DEPRECATED_EXTRACT_RETURN_VALUE,
DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS): Don't define these.
(STORE_RETURN_VALUE, EXTRACT_RETURN_VALUE,
EXTRACT_STRUCT_VALUE_ADDRESS): Define these instead.
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index ecf0df0fd15..7b997643bb7 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -327,6 +327,7 @@ Brendan Conoboy blc@redhat.com
DJ Delorie dj@redhat.com
Chris G. Demetriou cgd@broadcom.com
Philippe De Muyter phdm@macqel.be
+Dhananjay Deshpande dhananjayd@kpitcummins.com
Klee Dienes kdienes@apple.com
Richard Earnshaw rearnsha@arm.com
Frank Ch. Eigler fche@redhat.com
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index dac5496d430..7eeca767b80 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -708,6 +708,7 @@ interps_h = interps.h
jv_lang_h = jv-lang.h
kod_h = kod.h
language_h = language.h
+libunwind_frame_h = libunwind-frame.h
linespec_h = linespec.h
linux_nat_h = linux-nat.h
m2_lang_h = m2-lang.h
@@ -1281,6 +1282,7 @@ ALLDEPFILES = \
i386gnu-nat.c i386gnu-tdep.c \
ia64-linux-nat.c ia64-linux-tdep.c ia64-tdep.c \
infptrace.c inftarg.c irix4-nat.c irix5-nat.c \
+ libunwind-frame.c \
lynx-nat.c m3-nat.c \
m68hc11-tdep.c \
m68k-tdep.c \
@@ -1724,7 +1726,8 @@ dummy-frame.o: dummy-frame.c $(defs_h) $(dummy_frame_h) $(regcache_h) \
$(frame_h) $(inferior_h) $(gdb_assert_h) $(frame_unwind_h) \
$(command_h) $(gdbcmd_h)
dve3900-rom.o: dve3900-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
- $(serial_h) $(inferior_h) $(command_h) $(gdb_string_h) $(regcache_h)
+ $(serial_h) $(inferior_h) $(command_h) $(gdb_string_h) $(regcache_h) \
+ $(mips_tdep_h)
dwarf2expr.o: dwarf2expr.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) \
$(gdbcore_h) $(elf_dwarf2_h) $(dwarf2expr_h)
dwarf2-frame.o: dwarf2-frame.c $(defs_h) $(dwarf2expr_h) $(elf_dwarf2_h) \
@@ -1912,7 +1915,7 @@ ia64-tdep.o: ia64-tdep.c $(defs_h) $(inferior_h) $(symfile_h) $(gdbcore_h) \
$(arch_utils_h) $(floatformat_h) $(regcache_h) $(reggroups_h) \
$(frame_h) $(frame_base_h) $(frame_unwind_h) $(doublest_h) \
$(value_h) $(gdb_assert_h) $(objfiles_h) $(elf_common_h) \
- $(elf_bfd_h) $(dis_asm_h)
+ $(elf_bfd_h) $(dis_asm_h) $(libunwind_frame_h)
infcall.o: infcall.c $(defs_h) $(breakpoint_h) $(target_h) $(regcache_h) \
$(inferior_h) $(gdb_assert_h) $(block_h) $(gdbcore_h) $(language_h) \
$(symfile_h) $(gdbcmd_h) $(command_h) $(gdb_string_h) $(infcall_h)
@@ -1960,6 +1963,10 @@ kod-cisco.o: kod-cisco.c $(defs_h) $(gdb_string_h) $(kod_h)
language.o: language.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
$(value_h) $(gdbcmd_h) $(expression_h) $(language_h) $(target_h) \
$(parser_defs_h) $(jv_lang_h) $(demangle_h)
+libunwind-frame.o: libunwind-frame.c $(defs_h) \
+ $(frame_h) $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) \
+ $(gdbtypes_h) $(symtab_h) $(objfiles_h) $(regcache_h) \
+ $(gdb_assert_h) $(gdb_string_h) $(complaints_h) $(libunwind_frame_h)
linespec.o: linespec.c $(defs_h) $(symtab_h) $(frame_h) $(command_h) \
$(symfile_h) $(objfiles_h) $(source_h) $(demangle_h) $(value_h) \
$(completer_h) $(cp_abi_h) $(parser_defs_h) $(block_h) \
@@ -2188,7 +2195,7 @@ remote-m32r-sdi.o: remote-m32r-sdi.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
$(inferior_h) $(target_h) $(regcache_h) $(gdb_string_h) $(serial_h)
remote-mips.o: remote-mips.c $(defs_h) $(inferior_h) $(bfd_h) $(symfile_h) \
$(gdbcmd_h) $(gdbcore_h) $(serial_h) $(target_h) $(remote_utils_h) \
- $(gdb_string_h) $(gdb_stat_h) $(regcache_h)
+ $(gdb_string_h) $(gdb_stat_h) $(regcache_h) $(mips_tdep_h)
remote-rdi.o: remote-rdi.c $(defs_h) $(gdb_string_h) $(frame_h) \
$(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \
$(objfiles_h) $(gdb_stabs_h) $(gdbthread_h) $(gdbcore_h) \
diff --git a/gdb/NEWS b/gdb/NEWS
index e5bc43d2421..9b2a28fc2e0 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,6 +3,19 @@
*** Changes since GDB 6.0:
+* New C++ demangler
+
+GDB has a new C++ demangler which does a better job on the mangled
+names generated by current versions of g++. It also runs faster, so
+with this and other changes gdb should now start faster on large C++
+programs.
+
+* DWARF 2 Location Expressions
+
+GDB support for location expressions has been extended to support function
+arguments and frame bases. Older versions of GDB could crash when they
+encountered these.
+
* New native configurations
NetBSD/amd64 x86_64-*-netbsd*
@@ -17,6 +30,25 @@ The command "set prompt-escape-char" has been deleted. This command,
and its very obscure effet on GDB's prompt, was never documented,
tested, nor mentioned in the NEWS file.
+* OBSOLETE configurations and files
+
+Configurations that have been declared obsolete in this release have
+been commented out. Unless there is activity to revive these
+configurations, the next release of GDB will have their sources
+permanently REMOVED.
+
+Sun 3, running SunOS 3 m68*-*-sunos3*
+Sun 3, running SunOS 4 m68*-*-sunos4*
+Sun 2, running SunOS 3 m68000-*-sunos3*
+Sun 2, running SunOS 4 m68000-*-sunos4*
+Motorola 680x0 running LynxOS m68*-*-lynxos*
+AT&T 3b1/Unix pc m68*-att-*
+Bull DPX2 (68k, System V release 3) m68*-bull-sysv*
+decstation mips-dec-* mips-little-*
+riscos mips-*-riscos* mips-*-sysv*
+sonymips mips-sony-*
+sysv mips*-*-sysv4* (IRIX 5/6 not included)
+
* REMOVED configurations and files
SGI Irix-4.x mips-sgi-irix4 or iris4
diff --git a/gdb/acconfig.h b/gdb/acconfig.h
index a7d25e84bd5..f3b8bf1351a 100644
--- a/gdb/acconfig.h
+++ b/gdb/acconfig.h
@@ -157,6 +157,9 @@
/* Define if <sys/ptrace.h> defines the PT_GETXMMREGS request. */
#undef HAVE_PT_GETXMMREGS
+/* Define if libunwind library is being used. */
+#undef HAVE_LIBUNWIND
+
/* Multi-arch enabled. */
#undef GDB_MULTI_ARCH
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index 8d9bc045b8c..f4cbb37316a 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -823,7 +823,7 @@ write_object_renaming (orig_left_context, renaming)
simple_tail += 1;
break;
}
- else if (STREQN (simple_tail, "__", 2))
+ else if (DEPRECATED_STREQN (simple_tail, "__", 2))
{
simple_tail += 2;
break;
@@ -962,7 +962,7 @@ convert_char_literal (struct type* type, LONGEST val)
sprintf (name, "QU%02x", (int) val);
for (f = 0; f < TYPE_NFIELDS (type); f += 1)
{
- if (STREQ (name, TYPE_FIELD_NAME (type, f)))
+ if (DEPRECATED_STREQ (name, TYPE_FIELD_NAME (type, f)))
return TYPE_FIELD_BITPOS (type, f);
}
return val;
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 4ebbf442a76..81be6ddc48d 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -254,10 +254,10 @@ field_name_match (const char *field_name, const char *target)
{
int len = strlen (target);
return
- STREQN (field_name, target, len)
+ DEPRECATED_STREQN (field_name, target, len)
&& (field_name[len] == '\0'
- || (STREQN (field_name + len, "___", 3)
- && !STREQ (field_name + strlen (field_name) - 6, "___XVN")));
+ || (DEPRECATED_STREQN (field_name + len, "___", 3)
+ && !DEPRECATED_STREQ (field_name + strlen (field_name) - 6, "___XVN")));
}
@@ -287,7 +287,7 @@ is_suffix (const char *str, const char *suffix)
return 0;
len1 = strlen (str);
len2 = strlen (suffix);
- return (len1 >= len2 && STREQ (str + len1 - len2, suffix));
+ return (len1 >= len2 && DEPRECATED_STREQ (str + len1 - len2, suffix));
}
/* Create a value of type TYPE whose contents come from VALADDR, if it
@@ -438,7 +438,7 @@ const struct ada_opname_map ada_opname_table[] = {
static int
is_suppressed_name (const char *str)
{
- if (STREQN (str, "_ada_", 5))
+ if (DEPRECATED_STREQN (str, "_ada_", 5))
str += 5;
if (str[0] == '_' || str[0] == '\000')
return 1;
@@ -459,7 +459,7 @@ is_suppressed_name (const char *str)
if (*p != 'O')
return 1;
for (i = 0; ada_opname_table[i].mangled != NULL; i += 1)
- if (STREQN (ada_opname_table[i].mangled, p,
+ if (DEPRECATED_STREQN (ada_opname_table[i].mangled, p,
strlen (ada_opname_table[i].mangled)))
goto OK;
return 1;
@@ -499,7 +499,7 @@ ada_mangle (const char *demangled)
for (mapping = ada_opname_table;
mapping->mangled != NULL &&
- !STREQN (mapping->demangled, p, strlen (mapping->demangled));
+ !DEPRECATED_STREQN (mapping->demangled, p, strlen (mapping->demangled));
p += 1)
;
if (mapping->mangled == NULL)
@@ -570,7 +570,7 @@ ada_demangle (const char *mangled)
static char *demangling_buffer = NULL;
static size_t demangling_buffer_size = 0;
- if (STREQN (mangled, "_ada_", 5))
+ if (DEPRECATED_STREQN (mangled, "_ada_", 5))
mangled += 5;
if (mangled[0] == '_' || mangled[0] == '<')
@@ -586,9 +586,9 @@ ada_demangle (const char *mangled)
else
goto Suppress;
}
- if (len0 > 3 && STREQ (mangled + len0 - 3, "TKB"))
+ if (len0 > 3 && DEPRECATED_STREQ (mangled + len0 - 3, "TKB"))
len0 -= 3;
- if (len0 > 1 && STREQ (mangled + len0 - 1, "B"))
+ if (len0 > 1 && DEPRECATED_STREQ (mangled + len0 - 1, "B"))
len0 -= 1;
/* Make demangled big enough for possible expansion by operator name. */
@@ -617,7 +617,7 @@ ada_demangle (const char *mangled)
for (k = 0; ada_opname_table[k].mangled != NULL; k += 1)
{
int op_len = strlen (ada_opname_table[k].mangled);
- if (STREQN
+ if (DEPRECATED_STREQN
(ada_opname_table[k].mangled + 1, mangled + i + 1,
op_len - 1) && !isalnum (mangled[i + op_len]))
{
@@ -633,7 +633,7 @@ ada_demangle (const char *mangled)
}
at_start_name = 0;
- if (i < len0 - 4 && STREQN (mangled + i, "TK__", 4))
+ if (i < len0 - 4 && DEPRECATED_STREQN (mangled + i, "TK__", 4))
i += 2;
if (mangled[i] == 'X' && i != 0 && isalnum (mangled[i - 1]))
{
@@ -693,10 +693,10 @@ ada_match_name (const char *sym_name, const char *name, int wild)
else
{
int len_name = strlen (name);
- return (STREQN (sym_name, name, len_name)
+ return (DEPRECATED_STREQN (sym_name, name, len_name)
&& is_name_suffix (sym_name + len_name))
- || (STREQN (sym_name, "_ada_", 5)
- && STREQN (sym_name + 5, name, len_name)
+ || (DEPRECATED_STREQN (sym_name, "_ada_", 5)
+ && DEPRECATED_STREQN (sym_name + 5, name, len_name)
&& is_name_suffix (sym_name + len_name + 5));
}
}
@@ -1237,7 +1237,7 @@ decode_packed_array_type (struct type *type)
VAR_DOMAIN, &syms, &blocks);
for (i = 0; i < n; i += 1)
if (syms[i] != NULL && SYMBOL_CLASS (syms[i]) == LOC_TYPEDEF
- && STREQ (name, ada_type_name (SYMBOL_TYPE (syms[i]))))
+ && DEPRECATED_STREQ (name, ada_type_name (SYMBOL_TYPE (syms[i]))))
break;
if (i >= n)
{
@@ -2546,7 +2546,7 @@ mangled_ordered_before (char *N0, char *N1)
n1 = k1;
while (N1[n1] == '_' && n1 > 0 && N1[n1 - 1] == '_')
n1 -= 1;
- if (n0 == n1 && STREQN (N0, N1, n0))
+ if (n0 == n1 && DEPRECATED_STREQN (N0, N1, n0))
return (atoi (N0 + k0 + 1) < atoi (N1 + k1 + 1));
}
return (strcmp (N0, N1) < 0);
@@ -3218,7 +3218,7 @@ equiv_types (struct type *type0, struct type *type1)
if ((TYPE_CODE (type0) == TYPE_CODE_STRUCT
|| TYPE_CODE (type0) == TYPE_CODE_ENUM)
&& ada_type_name (type0) != NULL && ada_type_name (type1) != NULL
- && STREQ (ada_type_name (type0), ada_type_name (type1)))
+ && DEPRECATED_STREQ (ada_type_name (type0), ada_type_name (type1)))
return 1;
return 0;
@@ -3250,8 +3250,8 @@ lesseq_defined_than (struct symbol *sym0, struct symbol *sym1)
return
TYPE_CODE (type0) == TYPE_CODE (type1)
&& (equiv_types (type0, type1)
- || (len0 < strlen (name1) && STREQN (name0, name1, len0)
- && STREQN (name1 + len0, "___XV", 5)));
+ || (len0 < strlen (name1) && DEPRECATED_STREQN (name0, name1, len0)
+ && DEPRECATED_STREQN (name1 + len0, "___XV", 5)));
}
case LOC_CONST:
return SYMBOL_VALUE (sym0) == SYMBOL_VALUE (sym1)
@@ -3584,7 +3584,7 @@ static int
is_nondebugging_type (struct type *type)
{
char *name = ada_type_name (type);
- return (name != NULL && STREQ (name, "<variable, no debug info>"));
+ return (name != NULL && DEPRECATED_STREQ (name, "<variable, no debug info>"));
}
/* Remove any non-debugging symbols in SYMS[0 .. NSYMS-1] that definitely
@@ -3611,7 +3611,7 @@ remove_extra_symbols (struct symbol **syms, struct block **blocks, int nsyms)
{
if (i != j
&& DEPRECATED_SYMBOL_NAME (syms[j]) != NULL
- && STREQ (DEPRECATED_SYMBOL_NAME (syms[i]), DEPRECATED_SYMBOL_NAME (syms[j]))
+ && DEPRECATED_STREQ (DEPRECATED_SYMBOL_NAME (syms[i]), DEPRECATED_SYMBOL_NAME (syms[j]))
&& SYMBOL_CLASS (syms[i]) == SYMBOL_CLASS (syms[j])
&& SYMBOL_VALUE_ADDRESS (syms[i])
== SYMBOL_VALUE_ADDRESS (syms[j]))
@@ -3864,7 +3864,7 @@ is_name_suffix (const char *str)
return 0;
if (str[2] == '_')
{
- if (STREQ (str + 3, "LJM"))
+ if (DEPRECATED_STREQ (str + 3, "LJM"))
return 1;
if (str[3] != 'X')
return 0;
@@ -3901,14 +3901,14 @@ wild_match (const char *patn, int patn_len, const char *name)
int s, e;
name_len = strlen (name);
- if (name_len >= patn_len + 5 && STREQN (name, "_ada_", 5)
- && STREQN (patn, name + 5, patn_len)
+ if (name_len >= patn_len + 5 && DEPRECATED_STREQN (name, "_ada_", 5)
+ && DEPRECATED_STREQN (patn, name + 5, patn_len)
&& is_name_suffix (name + patn_len + 5))
return 1;
while (name_len >= patn_len)
{
- if (STREQN (patn, name, patn_len) && is_name_suffix (name + patn_len))
+ if (DEPRECATED_STREQN (patn, name, patn_len) && is_name_suffix (name + patn_len))
return 1;
do
{
@@ -4455,7 +4455,7 @@ find_sal_from_funcs_and_line (const char *filename, int line_num,
QUIT;
- if (!STREQ (filename, s->filename))
+ if (!DEPRECATED_STREQ (filename, s->filename))
continue;
l = LINETABLE (s);
ind = find_line_in_linetable (l, line_num, symbols, nsyms, &exact);
@@ -4753,7 +4753,7 @@ read_all_symtabs (const char *filename)
{
QUIT;
- if (STREQ (filename, ps->filename))
+ if (DEPRECATED_STREQ (filename, ps->filename))
PSYMTAB_TO_SYMTAB (ps);
}
}
@@ -4784,7 +4784,7 @@ all_sals_for_line (const char *filename, int line_num, char ***canonical)
QUIT;
- if (!STREQ (s->filename, filename))
+ if (!DEPRECATED_STREQ (s->filename, filename))
continue;
target_line_num =
@@ -4962,9 +4962,9 @@ begin_command (char *args, int from_tty)
int
is_ada_runtime_file (char *filename)
{
- return (STREQN (filename, "s-", 2) ||
- STREQN (filename, "a-", 2) ||
- STREQN (filename, "g-", 2) || STREQN (filename, "i-", 2));
+ return (DEPRECATED_STREQN (filename, "s-", 2) ||
+ DEPRECATED_STREQN (filename, "a-", 2) ||
+ DEPRECATED_STREQN (filename, "g-", 2) || DEPRECATED_STREQN (filename, "i-", 2));
}
/* find the first frame that contains debugging information and that is not
@@ -4985,7 +4985,7 @@ find_printable_frame (struct frame_info *fi, int level)
from finding the right frame */
if (sal.symtab->objfile &&
- STREQ (sal.symtab->objfile->name, "/usr/shlib/libpthread.so"))
+ DEPRECATED_STREQ (sal.symtab->objfile->name, "/usr/shlib/libpthread.so"))
continue;
#endif
deprecated_selected_frame = fi;
@@ -5046,7 +5046,7 @@ ada_is_exception_sym (struct symbol *sym)
return (SYMBOL_CLASS (sym) != LOC_TYPEDEF
&& SYMBOL_CLASS (sym) != LOC_BLOCK
&& SYMBOL_CLASS (sym) != LOC_CONST
- && type_name != NULL && STREQ (type_name, "exception"));
+ && type_name != NULL && DEPRECATED_STREQ (type_name, "exception"));
}
int
@@ -5069,7 +5069,7 @@ ada_breakpoint_rewrite (char *arg, int *break_on_exceptionp)
*break_on_exceptionp = 0;
/* FIXME: language_ada should be defined in defs.h */
/* if (current_language->la_language == language_ada
- && STREQN (arg, "exception", 9) &&
+ && DEPRECATED_STREQN (arg, "exception", 9) &&
(arg[9] == ' ' || arg[9] == '\t' || arg[9] == '\0'))
{
char *tok, *end_tok;
@@ -5094,7 +5094,7 @@ ada_breakpoint_rewrite (char *arg, int *break_on_exceptionp)
make_cleanup (xfree, arg);
if (toklen == 0)
strcpy (arg, "__gnat_raise_nodefer_with_msg");
- else if (STREQN (tok, "unhandled", toklen))
+ else if (DEPRECATED_STREQN (tok, "unhandled", toklen))
{
*break_on_exceptionp = 2;
strcpy (arg, "__gnat_unhandled_exception");
@@ -5107,7 +5107,7 @@ ada_breakpoint_rewrite (char *arg, int *break_on_exceptionp)
}
}
else if (current_language->la_language == language_ada
- && STREQN (arg, "assert", 6) &&
+ && DEPRECATED_STREQN (arg, "assert", 6) &&
(arg[6] == ' ' || arg[6] == '\t' || arg[6] == '\0'))
{
char *tok = arg + 6;
@@ -5139,7 +5139,7 @@ ada_is_ignored_field (struct type *type, int field_num)
{
const char *name = TYPE_FIELD_NAME (type, field_num);
return (name == NULL
- || (name[0] == '_' && !STREQN (name, "_parent", 7)));
+ || (name[0] == '_' && !DEPRECATED_STREQN (name, "_parent", 7)));
}
}
@@ -5198,7 +5198,7 @@ ada_is_parent_field (struct type *type, int field_num)
{
const char *name = TYPE_FIELD_NAME (check_typedef (type), field_num);
return (name != NULL &&
- (STREQN (name, "PARENT", 6) || STREQN (name, "_parent", 7)));
+ (DEPRECATED_STREQN (name, "PARENT", 6) || DEPRECATED_STREQN (name, "_parent", 7)));
}
/* True iff field number FIELD_NUM of structure type TYPE is a
@@ -5212,8 +5212,8 @@ ada_is_wrapper_field (struct type *type, int field_num)
{
const char *name = TYPE_FIELD_NAME (type, field_num);
return (name != NULL
- && (STREQN (name, "PARENT", 6) || STREQ (name, "REP")
- || STREQN (name, "_parent", 7)
+ && (DEPRECATED_STREQN (name, "PARENT", 6) || DEPRECATED_STREQ (name, "REP")
+ || DEPRECATED_STREQN (name, "_parent", 7)
|| name[0] == 'S' || name[0] == 'R' || name[0] == 'O'));
}
@@ -5284,7 +5284,7 @@ ada_variant_discrim_name (struct type *type0)
for (discrim_end = name + strlen (name) - 6; discrim_end != name;
discrim_end -= 1)
{
- if (STREQN (discrim_end, "___XVN", 6))
+ if (DEPRECATED_STREQN (discrim_end, "___XVN", 6))
break;
}
if (discrim_end == name)
@@ -5295,7 +5295,7 @@ ada_variant_discrim_name (struct type *type0)
{
if (discrim_start == name + 1)
return "";
- if ((discrim_start > name + 3 && STREQN (discrim_start - 3, "___", 3))
+ if ((discrim_start > name + 3 && DEPRECATED_STREQN (discrim_start - 3, "___", 3))
|| discrim_start[-1] == '.')
break;
}
@@ -5779,7 +5779,7 @@ field_alignment (struct type *type, int f)
else
align_offset = len - 1;
- if (align_offset < 7 || !STREQN ("___XV", name + align_offset - 6, 5))
+ if (align_offset < 7 || !DEPRECATED_STREQN ("___XV", name + align_offset - 6, 5))
return TARGET_CHAR_BIT;
return atoi (name + align_offset) * TARGET_CHAR_BIT;
@@ -5883,7 +5883,7 @@ dynamic_template_type (struct type *type)
else
{
int len = strlen (ada_type_name (type));
- if (len > 6 && STREQ (ada_type_name (type) + len - 6, "___XVE"))
+ if (len > 6 && DEPRECATED_STREQ (ada_type_name (type) + len - 6, "___XVE"))
return type;
else
return ada_find_parallel_type (type, "___XVE");
@@ -6548,8 +6548,8 @@ ada_is_character_type (struct type *type)
&& (TYPE_CODE (type) == TYPE_CODE_CHAR
|| TYPE_CODE (type) == TYPE_CODE_INT
|| TYPE_CODE (type) == TYPE_CODE_RANGE)
- && (STREQ (name, "character") || STREQ (name, "wide_character")
- || STREQ (name, "unsigned char"));
+ && (DEPRECATED_STREQ (name, "character") || DEPRECATED_STREQ (name, "wide_character")
+ || DEPRECATED_STREQ (name, "unsigned char"));
}
/* True if TYPE appears to be an Ada string type. */
@@ -6582,7 +6582,7 @@ ada_is_aligner_type (struct type *type)
CHECK_TYPEDEF (type);
return (TYPE_CODE (type) == TYPE_CODE_STRUCT
&& TYPE_NFIELDS (type) == 1
- && STREQ (TYPE_FIELD_NAME (type, 0), "F"));
+ && DEPRECATED_STREQ (TYPE_FIELD_NAME (type, 0), "F"));
}
/* If there is an ___XVS-convention type parallel to SUBTYPE, return
@@ -7669,7 +7669,7 @@ ada_is_vax_floating_type (struct type *type)
name_len > 6
&& (TYPE_CODE (type) == TYPE_CODE_INT
|| TYPE_CODE (type) == TYPE_CODE_RANGE)
- && STREQN (ada_type_name (type) + name_len - 6, "___XF", 5);
+ && DEPRECATED_STREQN (ada_type_name (type) + name_len - 6, "___XF", 5);
}
/* The type of special VAX floating-point type this is, assuming
diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l
index d8bc78952bf..139e3aad3dd 100644
--- a/gdb/ada-lex.l
+++ b/gdb/ada-lex.l
@@ -759,7 +759,7 @@ name_lookup (name0, err_name, token_type)
if (segments == 0)
{
type = lookup_primitive_typename (name);
- if (type == NULL && STREQ ("system__address", name))
+ if (type == NULL && DEPRECATED_STREQ ("system__address", name))
type = builtin_type_ada_system_address;
if (type != NULL)
{
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index 8d5720c6295..a5d8a1c11b1 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -103,7 +103,7 @@ generic_skip_trampoline_code (CORE_ADDR pc)
}
CORE_ADDR
-generic_skip_solib_resolver (CORE_ADDR pc)
+generic_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
{
return 0;
}
@@ -380,8 +380,17 @@ default_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
The choice of initial value is entirely arbitrary. During startup,
the function initialize_current_architecture() updates this value
based on default byte-order information extracted from BFD. */
-int target_byte_order = BFD_ENDIAN_BIG;
-int target_byte_order_auto = 1;
+static int target_byte_order = BFD_ENDIAN_BIG;
+static int target_byte_order_auto = 1;
+
+enum bfd_endian
+selected_byte_order (void)
+{
+ if (target_byte_order_auto)
+ return BFD_ENDIAN_UNKNOWN;
+ else
+ return target_byte_order;
+}
static const char endian_big[] = "big";
static const char endian_little[] = "little";
@@ -400,7 +409,7 @@ static const char *set_endian_string;
static void
show_endian (char *args, int from_tty)
{
- if (TARGET_BYTE_ORDER_AUTO)
+ if (target_byte_order_auto)
printf_unfiltered ("The target endianness is set automatically (currently %s endian)\n",
(TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? "big" : "little"));
else
@@ -443,9 +452,18 @@ set_endian (char *ignore_args, int from_tty, struct cmd_list_element *c)
enum set_arch { set_arch_auto, set_arch_manual };
-int target_architecture_auto = 1;
+static int target_architecture_auto = 1;
+
+static const char *set_architecture_string;
-const char *set_architecture_string;
+const char *
+selected_architecture_name (void)
+{
+ if (target_architecture_auto)
+ return NULL;
+ else
+ return set_architecture_string;
+}
/* Called if the user enters ``show architecture'' without an
argument. */
diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h
index fbc7aa26949..f8bd5bbfada 100644
--- a/gdb/arch-utils.h
+++ b/gdb/arch-utils.h
@@ -35,8 +35,6 @@ extern int gdbarch_debug;
/* Fallback for register convertible. */
extern gdbarch_deprecated_register_convertible_ftype deprecated_register_convertible_not;
-extern CORE_ADDR generic_cannot_extract_struct_value_address (char *dummy);
-
/* Implementation of extract return value that grubs around in the
register cache. */
extern gdbarch_extract_return_value_ftype legacy_extract_return_value;
@@ -110,7 +108,8 @@ extern gdbarch_virtual_frame_pointer_ftype legacy_virtual_frame_pointer;
extern CORE_ADDR generic_skip_trampoline_code (CORE_ADDR pc);
-extern CORE_ADDR generic_skip_solib_resolver (CORE_ADDR pc);
+extern CORE_ADDR generic_skip_solib_resolver (struct gdbarch *gdbarch,
+ CORE_ADDR pc);
extern int generic_in_solib_call_trampoline (CORE_ADDR pc, char *name);
@@ -149,9 +148,21 @@ extern int default_stabs_argument_has_addr (struct gdbarch *gdbarch,
extern int legacy_register_sim_regno (int regnum);
+/* Return the selected byte order, or BFD_ENDIAN_UNKNOWN if no byte
+ order was explicitly selected. */
+extern enum bfd_endian selected_byte_order (void);
+
+/* Return the selected architecture's name, or NULL if no architecture
+ was explicitly selected. */
+extern const char *selected_architecture_name (void);
+
/* Initialize a ``struct info''. Can't use memset(0) since some
- default values are not zero. */
+ default values are not zero. "fill" takes all available
+ information and fills in any unspecified fields. */
+
extern void gdbarch_info_init (struct gdbarch_info *info);
+extern void gdbarch_info_fill (struct gdbarch *gdbarch,
+ struct gdbarch_info *info);
/* Similar to init, but this time fill in the blanks. Information is
obtained from the specified architecture, global "set ..." options,
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index c91c0fd7ba0..42d4438d55d 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -387,12 +387,6 @@ arm_linux_svr4_fetch_link_map_offsets (void)
return lmp;
}
-CORE_ADDR
-arm_linux_skip_solib_resolver (CORE_ADDR pc)
-{
- return glibc_skip_solib_resolver (pc);
-}
-
/* The constants below were determined by examining the following files
in the linux kernel sources:
@@ -506,6 +500,7 @@ arm_linux_init_abi (struct gdbarch_info info,
/* Shared library handling. */
set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
+ set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver);
}
void
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 6faca9fdb03..e7aef4a4024 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -81,15 +81,10 @@ static int arm_debug;
/* Macros for setting and testing a bit in a minimal symbol that marks
it as Thumb function. The MSB of the minimal symbol's "info" field
- is used for this purpose. This field is already being used to store
- the symbol size, so the assumption is that the symbol size cannot
- exceed 2^31.
+ is used for this purpose.
MSYMBOL_SET_SPECIAL Actually sets the "special" bit.
- MSYMBOL_IS_SPECIAL Tests the "special" bit in a minimal symbol.
- MSYMBOL_SIZE Returns the size of the minimal symbol,
- i.e. the "info" field with the "special" bit
- masked out. */
+ MSYMBOL_IS_SPECIAL Tests the "special" bit in a minimal symbol. */
#define MSYMBOL_SET_SPECIAL(msym) \
MSYMBOL_INFO (msym) = (char *) (((long) MSYMBOL_INFO (msym)) \
@@ -98,9 +93,6 @@ static int arm_debug;
#define MSYMBOL_IS_SPECIAL(msym) \
(((long) MSYMBOL_INFO (msym) & 0x80000000) != 0)
-#define MSYMBOL_SIZE(msym) \
- ((long) MSYMBOL_INFO (msym) & 0x7fffffff)
-
/* The list of available "set arm ..." and "show arm ..." commands. */
static struct cmd_list_element *setarmcmdlist = NULL;
static struct cmd_list_element *showarmcmdlist = NULL;
diff --git a/gdb/bcache.c b/gdb/bcache.c
index ec8b777acd6..b1d9de8700f 100644
--- a/gdb/bcache.c
+++ b/gdb/bcache.c
@@ -195,8 +195,8 @@ expand_hash_table (struct bcache *bcache)
/* Find a copy of the LENGTH bytes at ADDR in BCACHE. If BCACHE has
never seen those bytes before, add a copy of them to BCACHE. In
either case, return a pointer to BCACHE's copy of that string. */
-void *
-bcache (const void *addr, int length, struct bcache *bcache)
+static void *
+bcache_data (const void *addr, int length, struct bcache *bcache)
{
unsigned long full_hash;
unsigned short half_hash;
@@ -247,6 +247,17 @@ bcache (const void *addr, int length, struct bcache *bcache)
}
}
+void *
+deprecated_bcache (const void *addr, int length, struct bcache *bcache)
+{
+ return bcache_data (addr, length, bcache);
+}
+
+const void *
+bcache (const void *addr, int length, struct bcache *bcache)
+{
+ return bcache_data (addr, length, bcache);
+}
/* Allocating and freeing bcaches. */
diff --git a/gdb/bcache.h b/gdb/bcache.h
index 6c3a63d2ba8..bf69853f21d 100644
--- a/gdb/bcache.h
+++ b/gdb/bcache.h
@@ -143,8 +143,13 @@ struct bcache;
/* Find a copy of the LENGTH bytes at ADDR in BCACHE. If BCACHE has
never seen those bytes before, add a copy of them to BCACHE. In
- either case, return a pointer to BCACHE's copy of that string. */
-extern void *bcache (const void *addr, int length, struct bcache *bcache);
+ either case, return a pointer to BCACHE's copy of that string.
+ Since the cached value is ment to be read-only, return a const
+ buffer. */
+extern void *deprecated_bcache (const void *addr, int length,
+ struct bcache *bcache);
+extern const void *bcache (const void *addr, int length,
+ struct bcache *bcache);
/* Free all the storage used by BCACHE. */
extern void bcache_xfree (struct bcache *bcache);
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index 381a61a26be..4602f5ca99f 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -72,13 +72,10 @@ deprecated_inside_entry_file (CORE_ADDR addr)
addr < symfile_objfile->ei.deprecated_entry_file_highpc);
}
-/* Test a specified PC value to see if it is in the range of addresses
- that correspond to the main() function. See comments above for why
- we might want to do this.
-
- Typically called from DEPRECATED_FRAME_CHAIN_VALID.
+/* Test whether PC is in the range of addresses that corresponds to
+ the "main" function.
- A PC of zero is always considered to be the bottom of the stack. */
+ A PC of zero is always considered to be the bottom of the stack. */
int
inside_main_func (CORE_ADDR pc)
@@ -87,30 +84,30 @@ inside_main_func (CORE_ADDR pc)
if (pc == 0)
return 1;
+
if (symfile_objfile == 0)
return 0;
msymbol = lookup_minimal_symbol (main_name (), NULL, symfile_objfile);
- /* If the addr range is not set up at symbol reading time, set it up
- now. This is for DEPRECATED_FRAME_CHAIN_VALID_ALTERNATE. I do
- this for coff, because it is unable to set it up and symbol
- reading time. */
+ /* If the address range hasn't been set up at symbol reading time,
+ set it up now. */
if (msymbol != NULL
&& symfile_objfile->ei.main_func_lowpc == INVALID_ENTRY_LOWPC
&& symfile_objfile->ei.main_func_highpc == INVALID_ENTRY_HIGHPC)
{
- /* brobecker/2003-10-10: We used to rely on lookup_symbol() to search
- the symbol associated to the main function. Unfortunately,
- lookup_symbol() uses the current-language la_lookup_symbol_nonlocal
- function to do the global symbol search. Depending on the language,
- this can introduce certain side-effects, because certain languages
- such as Ada for instance may find more than one match. So we prefer
- to search the main function symbol using its address rather than
- its name. */
- struct symbol *mainsym
- = find_pc_function (SYMBOL_VALUE_ADDRESS (msymbol));
+ /* brobecker/2003-10-10: We used to rely on lookup_symbol() to
+ search the symbol associated to the "main" function.
+ Unfortunately, lookup_symbol() uses the current-language
+ la_lookup_symbol_nonlocal function to do the global symbol
+ search. Depending on the language, this can introduce
+ certain side-effects, because certain languages, for instance
+ Ada, may find more than one match. Therefore we prefer to
+ search the "main" function symbol using its address rather
+ than its name. */
+ struct symbol *mainsym =
+ find_pc_function (SYMBOL_VALUE_ADDRESS (msymbol));
if (mainsym && SYMBOL_CLASS (mainsym) == LOC_BLOCK)
{
@@ -123,44 +120,45 @@ inside_main_func (CORE_ADDR pc)
/* Not in the normal symbol tables, see if "main" is in the partial
symbol table. If it's not, then give up. */
- {
- if (msymbol != NULL && MSYMBOL_TYPE (msymbol) == mst_text)
- {
- struct obj_section *osect
- = find_pc_sect_section (SYMBOL_VALUE_ADDRESS (msymbol),
- msymbol->ginfo.bfd_section);
- if (osect != NULL)
- {
- int i;
- /* Step over other symbols at this same address, and
- symbols in other sections, to find the next symbol in
- this section with a different address. */
- for (i = 1; SYMBOL_LINKAGE_NAME (msymbol + i) != NULL; i++)
- {
- if (SYMBOL_VALUE_ADDRESS (msymbol + i) != SYMBOL_VALUE_ADDRESS (msymbol)
- && SYMBOL_BFD_SECTION (msymbol + i) == SYMBOL_BFD_SECTION (msymbol))
- break;
- }
-
- symfile_objfile->ei.main_func_lowpc = SYMBOL_VALUE_ADDRESS (msymbol);
-
- /* Use the lesser of the next minimal symbol in the same
- section, or the end of the section, as the end of the
- function. */
- if (SYMBOL_LINKAGE_NAME (msymbol + i) != NULL
- && SYMBOL_VALUE_ADDRESS (msymbol + i) < osect->endaddr)
- symfile_objfile->ei.main_func_highpc = SYMBOL_VALUE_ADDRESS (msymbol + i);
- else
- /* We got the start address from the last msymbol in the
- objfile. So the end address is the end of the
- section. */
- symfile_objfile->ei.main_func_highpc = osect->endaddr;
- }
- }
- }
-
- return (symfile_objfile->ei.main_func_lowpc <= pc &&
- symfile_objfile->ei.main_func_highpc > pc);
+ if (msymbol != NULL && MSYMBOL_TYPE (msymbol) == mst_text)
+ {
+ CORE_ADDR maddr = SYMBOL_VALUE_ADDRESS (msymbol);
+ asection *msect = SYMBOL_BFD_SECTION (msymbol);
+ struct obj_section *osect = find_pc_sect_section (maddr, msect);
+
+ if (osect != NULL)
+ {
+ int i;
+
+ /* Step over other symbols at this same address, and symbols
+ in other sections, to find the next symbol in this
+ section with a different address. */
+ for (i = 1; SYMBOL_LINKAGE_NAME (msymbol + i) != NULL; i++)
+ {
+ if (SYMBOL_VALUE_ADDRESS (msymbol + i) != maddr
+ && SYMBOL_BFD_SECTION (msymbol + i) == msect)
+ break;
+ }
+
+ symfile_objfile->ei.main_func_lowpc = maddr;
+
+ /* Use the lesser of the next minimal symbol in the same
+ section, or the end of the section, as the end of the
+ function. */
+ if (SYMBOL_LINKAGE_NAME (msymbol + i) != NULL
+ && SYMBOL_VALUE_ADDRESS (msymbol + i) < osect->endaddr)
+ symfile_objfile->ei.main_func_highpc =
+ SYMBOL_VALUE_ADDRESS (msymbol + i);
+ else
+ /* We got the start address from the last msymbol in the
+ objfile. So the end address is the end of the
+ section. */
+ symfile_objfile->ei.main_func_highpc = osect->endaddr;
+ }
+ }
+
+ return (symfile_objfile->ei.main_func_lowpc <= pc
+ && symfile_objfile->ei.main_func_highpc > pc);
}
/* Test a specified PC value to see if it is in the range of addresses
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 1cbd00663d9..84713526b19 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -332,6 +332,13 @@ int exception_support_initialized = 0;
error ("catch of library unloads not yet implemented on this platform")
#endif
+/* Return whether a breakpoint is an active enabled breakpoint. */
+static int
+breakpoint_enabled (struct breakpoint *b)
+{
+ return b->enable_state == bp_enabled;
+}
+
/* Set breakpoint count to NUM. */
void
@@ -757,7 +764,7 @@ insert_bp_location (struct bp_location *bpt,
/* Permanent breakpoints cannot be inserted or removed. Disabled
breakpoints should not be inserted. */
- if (bpt->owner->enable_state != bp_enabled)
+ if (!breakpoint_enabled (bpt->owner))
return 0;
if (bpt->inserted || bpt->duplicate)
@@ -1071,7 +1078,11 @@ insert_bp_location (struct bp_location *bpt,
bpt->owner->enable_state = bp_disabled;
else
bpt->inserted = 1;
- return val;
+
+ /* We've already printed an error message if there was a problem
+ inserting this catchpoint, and we've disabled the catchpoint,
+ so just return success. */
+ return 0;
}
return 0;
@@ -1103,7 +1114,7 @@ insert_breakpoints (void)
{
/* Permanent breakpoints cannot be inserted or removed. Disabled
breakpoints should not be inserted. */
- if (b->owner->enable_state != bp_enabled)
+ if (!breakpoint_enabled (b->owner))
continue;
/* FIXME drow/2003-10-07: This code should be pushed elsewhere when
@@ -1453,7 +1464,7 @@ remove_breakpoint (struct bp_location *b, insertion_state_t is)
b->inserted = (is == mark_inserted);
}
else if (b->loc_type == bp_loc_hardware_watchpoint
- && b->owner->enable_state == bp_enabled
+ && breakpoint_enabled (b->owner)
&& !b->duplicate)
{
struct value *v;
@@ -1509,7 +1520,7 @@ remove_breakpoint (struct bp_location *b, insertion_state_t is)
else if ((b->owner->type == bp_catch_fork ||
b->owner->type == bp_catch_vfork ||
b->owner->type == bp_catch_exec)
- && b->owner->enable_state == bp_enabled
+ && breakpoint_enabled (b->owner)
&& !b->duplicate)
{
val = -1;
@@ -1534,7 +1545,7 @@ remove_breakpoint (struct bp_location *b, insertion_state_t is)
}
else if ((b->owner->type == bp_catch_catch ||
b->owner->type == bp_catch_throw)
- && b->owner->enable_state == bp_enabled
+ && breakpoint_enabled (b->owner)
&& !b->duplicate)
{
@@ -1545,7 +1556,7 @@ remove_breakpoint (struct bp_location *b, insertion_state_t is)
}
else if (ep_is_exception_catchpoint (b->owner)
&& b->inserted /* sometimes previous insert doesn't happen */
- && b->owner->enable_state == bp_enabled
+ && breakpoint_enabled (b->owner)
&& !b->duplicate)
{
@@ -1671,7 +1682,7 @@ breakpoint_here_p (CORE_ADDR pc)
&& bpt->loc_type != bp_loc_hardware_breakpoint)
continue;
- if ((bpt->owner->enable_state == bp_enabled
+ if ((breakpoint_enabled (bpt->owner)
|| bpt->owner->enable_state == bp_permanent)
&& bpt->address == pc) /* bp is enabled and matches pc */
{
@@ -1768,7 +1779,7 @@ breakpoint_thread_match (CORE_ADDR pc, ptid_t ptid)
&& bpt->loc_type != bp_loc_hardware_breakpoint)
continue;
- if ((bpt->owner->enable_state == bp_enabled
+ if ((breakpoint_enabled (bpt->owner)
|| bpt->owner->enable_state == bp_permanent)
&& bpt->address == pc
&& (bpt->owner->thread == -1 || bpt->owner->thread == thread))
@@ -2570,9 +2581,7 @@ bpstat_stop_status (CORE_ADDR *pc, int not_a_sw_breakpoint)
ALL_BREAKPOINTS_SAFE (b, temp)
{
- if (b->enable_state == bp_disabled
- || b->enable_state == bp_shlib_disabled
- || b->enable_state == bp_call_disabled)
+ if (!breakpoint_enabled (b) && b->enable_state != bp_permanent)
continue;
if (b->type != bp_watchpoint
@@ -3175,7 +3184,7 @@ bpstat_should_step (void)
{
struct breakpoint *b;
ALL_BREAKPOINTS (b)
- if (b->enable_state == bp_enabled && b->type == bp_watchpoint)
+ if (breakpoint_enabled (b) && b->type == bp_watchpoint)
return 1;
return 0;
}
@@ -3186,7 +3195,7 @@ bpstat_have_active_hw_watchpoints (void)
{
struct bp_location *bpt;
ALL_BP_LOCATIONS (bpt)
- if ((bpt->owner->enable_state == bp_enabled)
+ if (breakpoint_enabled (bpt->owner)
&& bpt->inserted
&& bpt->loc_type == bp_loc_hardware_watchpoint)
return 1;
@@ -4264,7 +4273,7 @@ disable_breakpoints_in_shlibs (int silent)
#if defined (PC_SOLIB)
if (((b->type == bp_breakpoint) ||
(b->type == bp_hardware_breakpoint)) &&
- b->enable_state == bp_enabled &&
+ breakpoint_enabled (b) &&
!b->loc->duplicate &&
PC_SOLIB (b->loc->address))
{
@@ -4293,11 +4302,12 @@ re_enable_breakpoints_in_shlibs (void)
ALL_BREAKPOINTS (b)
if (b->enable_state == bp_shlib_disabled)
{
- char buf[1];
+ char buf[1], *lib;
/* Do not reenable the breakpoint if the shared library
is still not mapped in. */
- if (target_read_memory (b->loc->address, buf, 1) == 0)
+ lib = PC_SOLIB (b->loc->address);
+ if (lib != NULL && target_read_memory (b->loc->address, buf, 1) == 0)
b->enable_state = bp_enabled;
}
}
@@ -4486,14 +4496,13 @@ hw_watchpoint_used_count (enum bptype type, int *other_type_used)
*other_type_used = 0;
ALL_BREAKPOINTS (b)
{
- if (b->enable_state == bp_enabled)
+ if (breakpoint_enabled (b))
{
if (b->type == type)
i++;
else if ((b->type == bp_hardware_watchpoint ||
b->type == bp_read_watchpoint ||
- b->type == bp_access_watchpoint)
- && b->enable_state == bp_enabled)
+ b->type == bp_access_watchpoint))
*other_type_used = 1;
}
}
@@ -4535,7 +4544,7 @@ disable_watchpoints_before_interactive_call_start (void)
|| (b->type == bp_read_watchpoint)
|| (b->type == bp_access_watchpoint)
|| ep_is_exception_catchpoint (b))
- && (b->enable_state == bp_enabled))
+ && breakpoint_enabled (b))
{
b->enable_state = bp_call_disabled;
check_duplicates (b);
@@ -7058,7 +7067,7 @@ breakpoint_re_set_one (void *bint)
value_free (b->val);
b->val = evaluate_expression (b->exp);
release_value (b->val);
- if (VALUE_LAZY (b->val) && b->enable_state == bp_enabled)
+ if (VALUE_LAZY (b->val) && breakpoint_enabled (b))
value_fetch_lazy (b->val);
if (b->cond_string != NULL)
@@ -7068,7 +7077,7 @@ breakpoint_re_set_one (void *bint)
xfree (b->cond);
b->cond = parse_exp_1 (&s, (struct block *) 0, 0);
}
- if (b->enable_state == bp_enabled)
+ if (breakpoint_enabled (b))
mention (b);
value_free_to_mark (mark);
break;
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 0a983f062d8..7712437bbc8 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -207,7 +207,7 @@ coff_locate_sections (bfd *abfd, asection *sectp, void *csip)
csi = (struct coff_symfile_info *) csip;
name = bfd_get_section_name (abfd, sectp);
- if (STREQ (name, ".text"))
+ if (DEPRECATED_STREQ (name, ".text"))
{
csi->textaddr = bfd_section_vma (abfd, sectp);
csi->textsize += bfd_section_size (abfd, sectp);
@@ -216,7 +216,7 @@ coff_locate_sections (bfd *abfd, asection *sectp, void *csip)
{
csi->textsize += bfd_section_size (abfd, sectp);
}
- else if (STREQ (name, ".stabstr"))
+ else if (DEPRECATED_STREQ (name, ".stabstr"))
{
csi->stabstrsect = sectp;
}
@@ -828,7 +828,7 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
case C_THUMBSTATFUNC:
if (cs->c_name[0] == '.')
{
- if (STREQ (cs->c_name, ".text"))
+ if (DEPRECATED_STREQ (cs->c_name, ".text"))
{
/* FIXME: don't wire in ".text" as section name
or symbol name! */
@@ -953,7 +953,7 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
break;
case C_FCN:
- if (STREQ (cs->c_name, ".bf"))
+ if (DEPRECATED_STREQ (cs->c_name, ".bf"))
{
within_function = 1;
@@ -975,7 +975,7 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
new->name =
process_coff_symbol (&fcn_cs_saved, &fcn_aux_saved, objfile);
}
- else if (STREQ (cs->c_name, ".ef"))
+ else if (DEPRECATED_STREQ (cs->c_name, ".ef"))
{
if (!within_function)
error ("Bad coff function information\n");
@@ -1051,13 +1051,13 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
break;
case C_BLOCK:
- if (STREQ (cs->c_name, ".bb"))
+ if (DEPRECATED_STREQ (cs->c_name, ".bb"))
{
tmpaddr = cs->c_value;
tmpaddr += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
push_context (++depth, tmpaddr);
}
- else if (STREQ (cs->c_name, ".eb"))
+ else if (DEPRECATED_STREQ (cs->c_name, ".eb"))
{
if (context_stack_depth <= 0)
{ /* We attempted to pop an empty context stack */
diff --git a/gdb/config.in b/gdb/config.in
index 4acf3e7bc65..a3edf86a0d7 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -167,6 +167,9 @@
/* Define if <sys/ptrace.h> defines the PT_GETXMMREGS request. */
#undef HAVE_PT_GETXMMREGS
+/* Define if libunwind library is being used. */
+#undef HAVE_LIBUNWIND
+
/* hostfile */
#undef GDB_XM_FILE
@@ -269,6 +272,12 @@
/* Define if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
+/* Define if you have the <libunwind-ia64.h> header file. */
+#undef HAVE_LIBUNWIND_IA64_H
+
+/* Define if you have the <libunwind.h> header file. */
+#undef HAVE_LIBUNWIND_H
+
/* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
diff --git a/gdb/config/alpha/nm-osf2.h b/gdb/config/alpha/nm-osf2.h
index 4b225af237f..1f3932df59b 100644
--- a/gdb/config/alpha/nm-osf2.h
+++ b/gdb/config/alpha/nm-osf2.h
@@ -25,9 +25,6 @@
#define USE_PROC_FS
#define HAVE_OPTIONAL_PROC_FS
-/* OSF/1 doesn't provide the standard fault definitions, so don't use them. */
-#define FAULTED_USE_SIGINFO
-
/* Don't trace faults under OSF/1, rely on the posting of the appropriate
signal if fault tracing is disabled.
Tracing T_IFAULT under Alpha OSF/1 causes a `floating point enable'
diff --git a/gdb/config/arm/nbsd.mt b/gdb/config/arm/nbsd.mt
index 94971369506..1e7d4fa3e61 100644
--- a/gdb/config/arm/nbsd.mt
+++ b/gdb/config/arm/nbsd.mt
@@ -1,2 +1,3 @@
# Target: ARM running NetBSD
TDEPFILES= arm-tdep.o armnbsd-tdep.o solib.o solib-svr4.o nbsd-tdep.o
+TM_FILE=tm-nbsd.h
diff --git a/gdb/config/arm/tm-linux.h b/gdb/config/arm/tm-linux.h
index 995ba7312fb..dd41540786b 100644
--- a/gdb/config/arm/tm-linux.h
+++ b/gdb/config/arm/tm-linux.h
@@ -44,14 +44,6 @@
need to skip over the dynamic linker call. This function decides
when to skip, and where to skip to. See the comments for
SKIP_SOLIB_RESOLVER at the top of infrun.c. */
-extern CORE_ADDR arm_linux_skip_solib_resolver (CORE_ADDR pc);
-#define SKIP_SOLIB_RESOLVER arm_linux_skip_solib_resolver
-
-/* When we call a function in a shared library, and the PLT sends us
- into the dynamic linker to find the function's real address, we
- need to skip over the dynamic linker call. This function decides
- when to skip, and where to skip to. See the comments for
- SKIP_SOLIB_RESOLVER at the top of infrun.c. */
#if 0
#undef IN_SOLIB_DYNSYM_RESOLVE_CODE
extern CORE_ADDR arm_in_solib_dynsym_resolve_code (CORE_ADDR pc, char *name);
diff --git a/gdb/config/mips/tm-linux64.h b/gdb/config/arm/tm-nbsd.h
index 92226d7fe4a..97bca68bc18 100644
--- a/gdb/config/mips/tm-linux64.h
+++ b/gdb/config/arm/tm-nbsd.h
@@ -1,6 +1,5 @@
-/* Target-dependent definitions for 64-bit GNU/Linux MIPS.
-
- Copyright 2002 Free Software Foundation, Inc.
+/* Macro definitions for ARM running under NetBSD.
+ Copyright 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,10 +18,9 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef TM_MIPS64LINUX_H
-#define TM_MIPS64LINUX_H
+#ifndef TM_NBSD_H
+#define TM_NBSD_H
-#include "mips/tm-mips64.h"
-#include "mips/tm-linux.h"
+#include "solib.h"
-#endif /* TM_MIPS64LINUX_H */
+#endif /* TM_NBSD_H */
diff --git a/gdb/config/djgpp/fnchange.lst b/gdb/config/djgpp/fnchange.lst
index 2bcb5f9a0ca..61d9014245a 100644
--- a/gdb/config/djgpp/fnchange.lst
+++ b/gdb/config/djgpp/fnchange.lst
@@ -88,7 +88,6 @@
@V@/gdb/config/i386/xm-i386v4.h @V@/gdb/config/i386/xm-v4.h
@V@/gdb/config/m88k/xm-delta88v4.h @V@/gdb/config/m88k/xm-d88v4.h
@V@/gdb/config/mips/tm-linux.h @V@/gdb/config/mips/tm-lx.h
-@V@/gdb/config/mips/tm-linux64.h @V@/gdb/config/mips/tm-lx64.h
@V@/gdb/config/pa/nm-hppah11.h @V@/gdb/config/pa/nm-hppa11.h
@V@/gdb/config/powerpc/tm-ppcle-sim.h @V@/gdb/config/powerpc/tm-ppcl-sim.h
@V@/gdb/config/rs6000/nm-rs6000ly.h @V@/gdb/config/rs6000/nm-rs6kly.h
diff --git a/gdb/config/h8300/tm-h8300.h b/gdb/config/h8300/tm-h8300.h
index 807d7c0d90a..a1c337eac4b 100644
--- a/gdb/config/h8300/tm-h8300.h
+++ b/gdb/config/h8300/tm-h8300.h
@@ -20,20 +20,13 @@
Boston, MA 02111-1307, USA. */
/* Contributed by Steve Chamberlain sac@cygnus.com */
-/* NOTE: ezannoni 2000-07-18: these variables are part of sim, defined
- in sim/h8300/compile.c. They really should not be used this
- way. Because of this we cannot get rid of the macro
- GDB_TARGET_IS_H8300 in remote-e7000.c */
-extern int h8300hmode;
-extern int h8300smode;
-extern int h8300_normal_mode; /* 1 - Normal Mode , 0 - Advanced mode */
-extern int h8300sxmode;
-#define GDB_TARGET_IS_H8300
-
/* Needed for remote.c */
#define DEPRECATED_REMOTE_BREAKPOINT { 0x57, 0x30} /* trapa #3 */
/* Needed for remote-hms.c */
#define CCR_REGNUM 8
/* Needed for remote-e7000.c */
-#define NUM_REALREGS (h8300smode?11:10)
+#define NUM_REALREGS ((TARGET_ARCHITECTURE->mach == bfd_mach_h8300s || \
+ TARGET_ARCHITECTURE->mach == bfd_mach_h8300sn || \
+ TARGET_ARCHITECTURE->mach == bfd_mach_h8300sx || \
+ TARGET_ARCHITECTURE->mach == bfd_mach_h8300sxn) ? 11 : 10)
diff --git a/gdb/config/i386/tm-i386sol2.h b/gdb/config/i386/tm-i386sol2.h
index 5a79f67dabc..921df26dc07 100644
--- a/gdb/config/i386/tm-i386sol2.h
+++ b/gdb/config/i386/tm-i386sol2.h
@@ -31,6 +31,4 @@ extern char *sunpro_static_transform_name (char *);
#define STATIC_TRANSFORM_NAME(x) sunpro_static_transform_name (x)
#define IS_STATIC_TRANSFORM_NAME(name) ((name)[0] == '.')
-#define FAULTED_USE_SIGINFO
-
#endif /* ifndef TM_I386SOL2_H */
diff --git a/gdb/config/i386/tm-linux.h b/gdb/config/i386/tm-linux.h
index 799678ed8f0..83440a8722f 100644
--- a/gdb/config/i386/tm-linux.h
+++ b/gdb/config/i386/tm-linux.h
@@ -29,14 +29,6 @@
/* The following works around a problem with /usr/include/sys/procfs.h */
#define sys_quotactl 1
-/* When we call a function in a shared library, and the PLT sends us
- into the dynamic linker to find the function's real address, we
- need to skip over the dynamic linker call. This function decides
- when to skip, and where to skip to. See the comments for
- SKIP_SOLIB_RESOLVER at the top of infrun.c. */
-#define SKIP_SOLIB_RESOLVER i386_linux_skip_solib_resolver
-extern CORE_ADDR i386_linux_skip_solib_resolver (CORE_ADDR pc);
-
/* N_FUN symbols in shared libaries have 0 for their values and need
to be relocated. */
#define SOFUN_ADDRESS_MAYBE_MISSING
diff --git a/gdb/config/i386/x86-64linux.mt b/gdb/config/i386/x86-64linux.mt
index 9ef593844e2..8bc4adbad4d 100644
--- a/gdb/config/i386/x86-64linux.mt
+++ b/gdb/config/i386/x86-64linux.mt
@@ -1,6 +1,6 @@
# Target: AMD x86-64 running GNU/Linux
TDEPFILES= x86-64-tdep.o x86-64-linux-tdep.o \
- i386-tdep.o i387-tdep.o i386-linux-tdep.o \
+ i386-tdep.o i387-tdep.o i386-linux-tdep.o glibc-tdep.o \
solib.o solib-svr4.o solib-legacy.o corelow.o
TM_FILE=tm-x86-64linux.h
diff --git a/gdb/config/ia64/nm-linux.h b/gdb/config/ia64/nm-linux.h
index 0418495c111..01c980748e2 100644
--- a/gdb/config/ia64/nm-linux.h
+++ b/gdb/config/ia64/nm-linux.h
@@ -69,4 +69,15 @@ extern int ia64_linux_insert_watchpoint (ptid_t ptid, CORE_ADDR addr,
extern int ia64_linux_remove_watchpoint (ptid_t ptid, CORE_ADDR addr,
int len);
+#include "target.h"
+
+#define NATIVE_XFER_UNWIND_TABLE ia64_linux_xfer_unwind_table
+extern LONGEST ia64_linux_xfer_unwind_table (struct target_ops *ops,
+ enum target_object object,
+ const char *annex,
+ void *readbuf,
+ const void *writebuf,
+ ULONGEST offset,
+ LONGEST len);
+
#endif /* #ifndef NM_LINUX_H */
diff --git a/gdb/config/m68k/3b1.mh b/gdb/config/m68k/3b1.mh
index e305e672d6c..1ebba273f7f 100644
--- a/gdb/config/m68k/3b1.mh
+++ b/gdb/config/m68k/3b1.mh
@@ -1,12 +1,12 @@
-# Host: AT&T 3b1/Unix pc
-# I don't think cc has been tried. -traditional for <sys/ioctl.h>
-# (not sure whether necessary).
-CC= gcc -traditional
-# GCC runs out of virtual memory.
-# A separate CC for pinsn routines is no longer supported, though.
-# FIXME -- someone unlucky enough to have a 3B1, let bug-gcc@prep.ai.mit.edu
-# know what works and what fails on the 3B1.
-#PINSN_CC= cc
-
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
-XM_FILE= xm-3b1.h
+# OBSOLETE # Host: AT&T 3b1/Unix pc
+# OBSOLETE # I don't think cc has been tried. -traditional for <sys/ioctl.h>
+# OBSOLETE # (not sure whether necessary).
+# OBSOLETE CC= gcc -traditional
+# OBSOLETE # GCC runs out of virtual memory.
+# OBSOLETE # A separate CC for pinsn routines is no longer supported, though.
+# OBSOLETE # FIXME -- someone unlucky enough to have a 3B1, let bug-gcc@prep.ai.mit.edu
+# OBSOLETE # know what works and what fails on the 3B1.
+# OBSOLETE #PINSN_CC= cc
+# OBSOLETE
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
+# OBSOLETE XM_FILE= xm-3b1.h
diff --git a/gdb/config/m68k/3b1.mt b/gdb/config/m68k/3b1.mt
index 4c5d9d4bb07..745918758b2 100644
--- a/gdb/config/m68k/3b1.mt
+++ b/gdb/config/m68k/3b1.mt
@@ -1,3 +1,3 @@
-# Target: AT&T 3b1/Unix pc
-TDEPFILES= m68k-tdep.o
-TM_FILE= tm-3b1.h
+# OBSOLETE # Target: AT&T 3b1/Unix pc
+# OBSOLETE TDEPFILES= m68k-tdep.o
+# OBSOLETE TM_FILE= tm-3b1.h
diff --git a/gdb/config/m68k/delta68.mh b/gdb/config/m68k/delta68.mh
index 5492af08d73..cfa14baca26 100644
--- a/gdb/config/m68k/delta68.mh
+++ b/gdb/config/m68k/delta68.mh
@@ -1,5 +1,5 @@
-# Host: Motorola Delta Series sysV68 R3V7.1
-
-XM_FILE= xm-delta68.h
-NAT_FILE= nm-delta68.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o delta68-nat.o
+# OBSOLETE # Host: Motorola Delta Series sysV68 R3V7.1
+# OBSOLETE
+# OBSOLETE XM_FILE= xm-delta68.h
+# OBSOLETE NAT_FILE= nm-delta68.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o delta68-nat.o
diff --git a/gdb/config/m68k/delta68.mt b/gdb/config/m68k/delta68.mt
index 2761329f2c8..743a92a3ae6 100644
--- a/gdb/config/m68k/delta68.mt
+++ b/gdb/config/m68k/delta68.mt
@@ -1,3 +1,3 @@
-# Motorola Delta Series sysV68 R3V7.1
-TDEPFILES= m68k-tdep.o
-TM_FILE= tm-delta68.h
+# OBSOLETE # Motorola Delta Series sysV68 R3V7.1
+# OBSOLETE TDEPFILES= m68k-tdep.o
+# OBSOLETE TM_FILE= tm-delta68.h
diff --git a/gdb/config/m68k/dpx2.mh b/gdb/config/m68k/dpx2.mh
index 25ed85ee6fd..e9c5b68c58e 100644
--- a/gdb/config/m68k/dpx2.mh
+++ b/gdb/config/m68k/dpx2.mh
@@ -1,6 +1,6 @@
-# Host: Bull DPX2 (68k, System V release 3)
-
-XM_FILE= xm-dpx2.h
-
-NAT_FILE= nm-dpx2.h
-NATDEPFILES= infptrace.o corelow.o core-aout.o inftarg.o dpx2-nat.o fork-child.o
+# OBSOLETE # Host: Bull DPX2 (68k, System V release 3)
+# OBSOLETE
+# OBSOLETE XM_FILE= xm-dpx2.h
+# OBSOLETE
+# OBSOLETE NAT_FILE= nm-dpx2.h
+# OBSOLETE NATDEPFILES= infptrace.o corelow.o core-aout.o inftarg.o dpx2-nat.o fork-child.o
diff --git a/gdb/config/m68k/dpx2.mt b/gdb/config/m68k/dpx2.mt
index 5bbbbe6fd8d..7cecda6af3d 100644
--- a/gdb/config/m68k/dpx2.mt
+++ b/gdb/config/m68k/dpx2.mt
@@ -1,3 +1,3 @@
-# Target: Bull DPX2 (68k, System V release 3)
-TDEPFILES= m68k-tdep.o
-TM_FILE= tm-dpx2.h
+# OBSOLETE # Target: Bull DPX2 (68k, System V release 3)
+# OBSOLETE TDEPFILES= m68k-tdep.o
+# OBSOLETE TM_FILE= tm-dpx2.h
diff --git a/gdb/config/m68k/m68klynx.mh b/gdb/config/m68k/m68klynx.mh
index 3838012a801..c76dccecfb1 100644
--- a/gdb/config/m68k/m68klynx.mh
+++ b/gdb/config/m68k/m68klynx.mh
@@ -1,6 +1,6 @@
-# Host: Motorola 680x0 running LynxOS
-
-XM_CLIBS= -lbsd
-
-NAT_FILE= nm-m68klynx.h
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o lynx-nat.o
+# OBSOLETE # Host: Motorola 680x0 running LynxOS
+# OBSOLETE
+# OBSOLETE XM_CLIBS= -lbsd
+# OBSOLETE
+# OBSOLETE NAT_FILE= nm-m68klynx.h
+# OBSOLETE NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o lynx-nat.o
diff --git a/gdb/config/m68k/m68klynx.mt b/gdb/config/m68k/m68klynx.mt
index 4aeac96d881..e3a3c797ece 100644
--- a/gdb/config/m68k/m68klynx.mt
+++ b/gdb/config/m68k/m68klynx.mt
@@ -1,4 +1,4 @@
-# Target: Motorola 680x0 running LynxOS
-TDEPFILES= coff-solib.o m68k-tdep.o
-# m68kly-tdep.o
-TM_FILE= tm-m68klynx.h
+# OBSOLETE # Target: Motorola 680x0 running LynxOS
+# OBSOLETE TDEPFILES= coff-solib.o m68k-tdep.o
+# OBSOLETE # m68kly-tdep.o
+# OBSOLETE TM_FILE= tm-m68klynx.h
diff --git a/gdb/config/m68k/m68kv4.mh b/gdb/config/m68k/m68kv4.mh
index 7deb1309c08..23c64fab82d 100644
--- a/gdb/config/m68k/m68kv4.mh
+++ b/gdb/config/m68k/m68kv4.mh
@@ -1,7 +1,7 @@
-# Host: Motorola 680x0 running SVR4 (Commodore Amiga amix or Atari TT ASV)
-
-XM_FILE= xm-m68kv4.h
-
-NAT_FILE= nm-sysv4.h
-NATDEPFILES= corelow.o core-regset.o solib.o solib-svr4.o solib-legacy.o \
- fork-child.o procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
+# OBSOLETE # Host: Motorola 680x0 running SVR4 (Commodore Amiga amix or Atari TT ASV)
+# OBSOLETE
+# OBSOLETE XM_FILE= xm-m68kv4.h
+# OBSOLETE
+# OBSOLETE NAT_FILE= nm-sysv4.h
+# OBSOLETE NATDEPFILES= corelow.o core-regset.o solib.o solib-svr4.o solib-legacy.o \
+# OBSOLETE fork-child.o procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
diff --git a/gdb/config/m68k/m68kv4.mt b/gdb/config/m68k/m68kv4.mt
index fcabb172d50..0a9ad08d795 100644
--- a/gdb/config/m68k/m68kv4.mt
+++ b/gdb/config/m68k/m68kv4.mt
@@ -1,3 +1,3 @@
-# Target: Motorola 680x0 running SVR4 (Commodore Amiga amix or Atari TT ASV)
-TDEPFILES= m68k-tdep.o
-TM_FILE= tm-m68kv4.h
+# OBSOLETE # Target: Motorola 680x0 running SVR4 (Commodore Amiga amix or Atari TT ASV)
+# OBSOLETE TDEPFILES= m68k-tdep.o
+# OBSOLETE TM_FILE= tm-m68kv4.h
diff --git a/gdb/config/m68k/nm-delta68.h b/gdb/config/m68k/nm-delta68.h
index 78871a06a97..e27bb69a449 100644
--- a/gdb/config/m68k/nm-delta68.h
+++ b/gdb/config/m68k/nm-delta68.h
@@ -1,22 +1,22 @@
-/* Macro definitions for a Motorola Delta Series sysV68 R3V7.1.
- Copyright 1993, 1998 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. */
-
-
-#define KERNEL_U_SIZE kernel_u_size()
+// OBSOLETE /* Macro definitions for a Motorola Delta Series sysV68 R3V7.1.
+// OBSOLETE Copyright 1993, 1998 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE #define KERNEL_U_SIZE kernel_u_size()
diff --git a/gdb/config/m68k/nm-dpx2.h b/gdb/config/m68k/nm-dpx2.h
index 4c88a6c8a1e..f6cce8a0412 100644
--- a/gdb/config/m68k/nm-dpx2.h
+++ b/gdb/config/m68k/nm-dpx2.h
@@ -1,29 +1,29 @@
-/* Native support for a Bull DPX2.
- Copyright 1986, 1987, 1989, 1993, 2000 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. */
-
-/* KERNEL_U_ADDR is determined upon startup in dpx2-xdep.c. */
-
-#define REGISTER_U_ADDR(addr, blockend, regno) \
- (addr) = dpx2_register_u_addr ((blockend),(regno));
-
-extern int dpx2_register_u_addr (int, int);
-
-/* Kernel is a bit tenacious about sharing text segments, disallowing bpts. */
-#define ONE_PROCESS_WRITETEXT
+// OBSOLETE /* Native support for a Bull DPX2.
+// OBSOLETE Copyright 1986, 1987, 1989, 1993, 2000 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* KERNEL_U_ADDR is determined upon startup in dpx2-xdep.c. */
+// OBSOLETE
+// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
+// OBSOLETE (addr) = dpx2_register_u_addr ((blockend),(regno));
+// OBSOLETE
+// OBSOLETE extern int dpx2_register_u_addr (int, int);
+// OBSOLETE
+// OBSOLETE /* Kernel is a bit tenacious about sharing text segments, disallowing bpts. */
+// OBSOLETE #define ONE_PROCESS_WRITETEXT
diff --git a/gdb/config/m68k/nm-m68klynx.h b/gdb/config/m68k/nm-m68klynx.h
index 9d95d3728dd..88b1260522b 100644
--- a/gdb/config/m68k/nm-m68klynx.h
+++ b/gdb/config/m68k/nm-m68klynx.h
@@ -1,26 +1,26 @@
-/* Native-dependent definitions for Motorola 680x0 running LynxOS.
- Copyright 1993 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. */
-
-#ifndef NM_M68KLYNX_H
-#define NM_M68KLYNX_H
-
-#include "config/nm-lynx.h"
-
-#endif /* NM_M68KLYNX_H */
+// OBSOLETE /* Native-dependent definitions for Motorola 680x0 running LynxOS.
+// OBSOLETE Copyright 1993 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #ifndef NM_M68KLYNX_H
+// OBSOLETE #define NM_M68KLYNX_H
+// OBSOLETE
+// OBSOLETE #include "config/nm-lynx.h"
+// OBSOLETE
+// OBSOLETE #endif /* NM_M68KLYNX_H */
diff --git a/gdb/config/m68k/nm-sun2.h b/gdb/config/m68k/nm-sun2.h
index 5d55caf2165..cce4a3e8ee0 100644
--- a/gdb/config/m68k/nm-sun2.h
+++ b/gdb/config/m68k/nm-sun2.h
@@ -1,34 +1,34 @@
-/* Parameters for execution on a Sun2, for GDB, the GNU debugger.
- Copyright (C) 1986, 1987, 1989, 1992 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. */
-
-/* Do implement the attach and detach commands. */
-
-#define ATTACH_DETACH
-
-/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
-#define FETCH_INFERIOR_REGISTERS
-
-/* This is a piece of magic that is given a register number REGNO
- and as BLOCKEND the address in the system of the end of the user structure
- and stores in ADDR the address in the kernel or core dump
- of that register. */
-
-#define REGISTER_U_ADDR(addr, blockend, regno) \
-{ addr = blockend + regno * 4; }
+// OBSOLETE /* Parameters for execution on a Sun2, for GDB, the GNU debugger.
+// OBSOLETE Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* Do implement the attach and detach commands. */
+// OBSOLETE
+// OBSOLETE #define ATTACH_DETACH
+// OBSOLETE
+// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
+// OBSOLETE #define FETCH_INFERIOR_REGISTERS
+// OBSOLETE
+// OBSOLETE /* This is a piece of magic that is given a register number REGNO
+// OBSOLETE and as BLOCKEND the address in the system of the end of the user structure
+// OBSOLETE and stores in ADDR the address in the kernel or core dump
+// OBSOLETE of that register. */
+// OBSOLETE
+// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
+// OBSOLETE { addr = blockend + regno * 4; }
diff --git a/gdb/config/m68k/nm-sun3.h b/gdb/config/m68k/nm-sun3.h
index 3c5d47ebb82..9e50707b9dc 100644
--- a/gdb/config/m68k/nm-sun3.h
+++ b/gdb/config/m68k/nm-sun3.h
@@ -1,34 +1,34 @@
-/* Native-only definitions for Sun-3 for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1991, 1992, 1996
- 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 "regcache.h"
-
-/* Do implement the attach and detach commands. */
-
-#define ATTACH_DETACH
-
-/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
-
-#define FETCH_INFERIOR_REGISTERS
-
-/* We have to grab the regs since we store all regs at once. */
-
-#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, DEPRECATED_REGISTER_BYTES)
+// OBSOLETE /* Native-only definitions for Sun-3 for GDB, the GNU debugger.
+// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1996
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "regcache.h"
+// OBSOLETE
+// OBSOLETE /* Do implement the attach and detach commands. */
+// OBSOLETE
+// OBSOLETE #define ATTACH_DETACH
+// OBSOLETE
+// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
+// OBSOLETE
+// OBSOLETE #define FETCH_INFERIOR_REGISTERS
+// OBSOLETE
+// OBSOLETE /* We have to grab the regs since we store all regs at once. */
+// OBSOLETE
+// OBSOLETE #define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, DEPRECATED_REGISTER_BYTES)
diff --git a/gdb/config/m68k/nm-sysv4.h b/gdb/config/m68k/nm-sysv4.h
index b9cb591f389..6e3a45205c7 100644
--- a/gdb/config/m68k/nm-sysv4.h
+++ b/gdb/config/m68k/nm-sysv4.h
@@ -1,23 +1,23 @@
-/* Native-dependent definitions for Motorola 680x0 running SVR4.
- Copyright 1994 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 the generic SVR4 definitions. */
-
-#include "config/nm-sysv4.h"
+// OBSOLETE /* Native-dependent definitions for Motorola 680x0 running SVR4.
+// OBSOLETE Copyright 1994 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* Include the generic SVR4 definitions. */
+// OBSOLETE
+// OBSOLETE #include "config/nm-sysv4.h"
diff --git a/gdb/config/m68k/sun2os3.mh b/gdb/config/m68k/sun2os3.mh
index 3d868daa4d6..2243a280e34 100644
--- a/gdb/config/m68k/sun2os3.mh
+++ b/gdb/config/m68k/sun2os3.mh
@@ -1,4 +1,4 @@
-# Host: Sun 2, running SunOS 3
-XM_FILE= xm-sun2.h
-NAT_FILE= nm-sun2.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o sun3-nat.o
+# OBSOLETE # Host: Sun 2, running SunOS 3
+# OBSOLETE XM_FILE= xm-sun2.h
+# OBSOLETE NAT_FILE= nm-sun2.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o sun3-nat.o
diff --git a/gdb/config/m68k/sun2os3.mt b/gdb/config/m68k/sun2os3.mt
index 12b7c7fec8a..343bccd16f0 100644
--- a/gdb/config/m68k/sun2os3.mt
+++ b/gdb/config/m68k/sun2os3.mt
@@ -1,7 +1,7 @@
-# Target: Sun 2, running SunOS 3
-# The system-supplied assembler re-orders the symbols so that gdb
-# can't find "gcc_compiled.".
-#msg If you compile your program with GCC, use the GNU assembler.
-#msg
-TDEPFILES= m68k-tdep.o
-TM_FILE= tm-sun2.h
+# OBSOLETE # Target: Sun 2, running SunOS 3
+# OBSOLETE # The system-supplied assembler re-orders the symbols so that gdb
+# OBSOLETE # can't find "gcc_compiled.".
+# OBSOLETE #msg If you compile your program with GCC, use the GNU assembler.
+# OBSOLETE #msg
+# OBSOLETE TDEPFILES= m68k-tdep.o
+# OBSOLETE TM_FILE= tm-sun2.h
diff --git a/gdb/config/m68k/sun2os4.mh b/gdb/config/m68k/sun2os4.mh
index 29fe1e89c82..ab9c7204938 100644
--- a/gdb/config/m68k/sun2os4.mh
+++ b/gdb/config/m68k/sun2os4.mh
@@ -1,4 +1,4 @@
-# Host: Sun 2, running SunOS 4
-XM_FILE= xm-sun2.h
-NAT_FILE= nm-sun2.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o sun3-nat.o
+# OBSOLETE # Host: Sun 2, running SunOS 4
+# OBSOLETE XM_FILE= xm-sun2.h
+# OBSOLETE NAT_FILE= nm-sun2.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o sun3-nat.o
diff --git a/gdb/config/m68k/sun2os4.mt b/gdb/config/m68k/sun2os4.mt
index 4d8e6decebe..30ff4e3971a 100644
--- a/gdb/config/m68k/sun2os4.mt
+++ b/gdb/config/m68k/sun2os4.mt
@@ -1,3 +1,3 @@
-# Target: Sun 2, running SunOS 4
-TDEPFILES= solib.o solib-sunos.o m68k-tdep.o
-TM_FILE= tm-sun2os4.h
+# OBSOLETE # Target: Sun 2, running SunOS 4
+# OBSOLETE TDEPFILES= solib.o solib-sunos.o m68k-tdep.o
+# OBSOLETE TM_FILE= tm-sun2os4.h
diff --git a/gdb/config/m68k/sun3os3.mh b/gdb/config/m68k/sun3os3.mh
index bf036229216..e7c820f43a0 100644
--- a/gdb/config/m68k/sun3os3.mh
+++ b/gdb/config/m68k/sun3os3.mh
@@ -1,4 +1,4 @@
-# Host: Sun 3, running SunOS 3
-XM_FILE= xm-sun3.h
-NAT_FILE= nm-sun3.h
-NATDEPFILES= fork-child.o inftarg.o infptrace.o corelow.o sun3-nat.o
+# OBSOLETE # Host: Sun 3, running SunOS 3
+# OBSOLETE XM_FILE= xm-sun3.h
+# OBSOLETE NAT_FILE= nm-sun3.h
+# OBSOLETE NATDEPFILES= fork-child.o inftarg.o infptrace.o corelow.o sun3-nat.o
diff --git a/gdb/config/m68k/sun3os3.mt b/gdb/config/m68k/sun3os3.mt
index 8f9dac85e0e..4ea0d2741ae 100644
--- a/gdb/config/m68k/sun3os3.mt
+++ b/gdb/config/m68k/sun3os3.mt
@@ -1,8 +1,8 @@
-# Target: Sun 3, running SunOS 3
-# The system-supplied assembler re-orders the symbols so that gdb
-# can't find "gcc_compiled.".
-#msg If you compile your program with GCC, use the GNU assembler.
-#msg
-
-TDEPFILES= m68k-tdep.o
-TM_FILE= tm-sun3.h
+# OBSOLETE # Target: Sun 3, running SunOS 3
+# OBSOLETE # The system-supplied assembler re-orders the symbols so that gdb
+# OBSOLETE # can't find "gcc_compiled.".
+# OBSOLETE #msg If you compile your program with GCC, use the GNU assembler.
+# OBSOLETE #msg
+# OBSOLETE
+# OBSOLETE TDEPFILES= m68k-tdep.o
+# OBSOLETE TM_FILE= tm-sun3.h
diff --git a/gdb/config/m68k/sun3os4.mh b/gdb/config/m68k/sun3os4.mh
index 18b1f081258..dc3f9afde76 100644
--- a/gdb/config/m68k/sun3os4.mh
+++ b/gdb/config/m68k/sun3os4.mh
@@ -1,4 +1,4 @@
-# Host: Sun 3, running SunOS 4
-XM_FILE= xm-sun3os4.h
-NAT_FILE= nm-sun3.h
-NATDEPFILES= fork-child.o inftarg.o infptrace.o corelow.o sun3-nat.o
+# OBSOLETE # Host: Sun 3, running SunOS 4
+# OBSOLETE XM_FILE= xm-sun3os4.h
+# OBSOLETE NAT_FILE= nm-sun3.h
+# OBSOLETE NATDEPFILES= fork-child.o inftarg.o infptrace.o corelow.o sun3-nat.o
diff --git a/gdb/config/m68k/sun3os4.mt b/gdb/config/m68k/sun3os4.mt
index 64f1a300dbc..decf0b30d4d 100644
--- a/gdb/config/m68k/sun3os4.mt
+++ b/gdb/config/m68k/sun3os4.mt
@@ -1,3 +1,3 @@
-# Target: Sun 3, running SunOS 4, as a target system
-TDEPFILES= solib.o solib-sunos.o m68k-tdep.o
-TM_FILE= tm-sun3os4.h
+# OBSOLETE # Target: Sun 3, running SunOS 4, as a target system
+# OBSOLETE TDEPFILES= solib.o solib-sunos.o m68k-tdep.o
+# OBSOLETE TM_FILE= tm-sun3os4.h
diff --git a/gdb/config/m68k/tm-3b1.h b/gdb/config/m68k/tm-3b1.h
index 90888c66655..df845bd30ac 100644
--- a/gdb/config/m68k/tm-3b1.h
+++ b/gdb/config/m68k/tm-3b1.h
@@ -1,33 +1,33 @@
-/* Parameters for targeting GDB to a 3b1.
- Copyright 1986, 1987, 1989, 1991, 1993 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. */
-
-/* The child target can't deal with floating registers. */
-#define CANNOT_STORE_REGISTER(regno) ((regno) >= FP0_REGNUM)
-
-/* Define BPT_VECTOR if it is different than the default.
- This is the vector number used by traps to indicate a breakpoint. */
-
-#define BPT_VECTOR 0x1
-
-/* Address of end of stack space. */
-
-#define STACK_END_ADDR 0x300000
-
-#include "m68k/tm-m68k.h"
+// OBSOLETE /* Parameters for targeting GDB to a 3b1.
+// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1993 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* The child target can't deal with floating registers. */
+// OBSOLETE #define CANNOT_STORE_REGISTER(regno) ((regno) >= FP0_REGNUM)
+// OBSOLETE
+// OBSOLETE /* Define BPT_VECTOR if it is different than the default.
+// OBSOLETE This is the vector number used by traps to indicate a breakpoint. */
+// OBSOLETE
+// OBSOLETE #define BPT_VECTOR 0x1
+// OBSOLETE
+// OBSOLETE /* Address of end of stack space. */
+// OBSOLETE
+// OBSOLETE #define STACK_END_ADDR 0x300000
+// OBSOLETE
+// OBSOLETE #include "m68k/tm-m68k.h"
diff --git a/gdb/config/m68k/tm-delta68.h b/gdb/config/m68k/tm-delta68.h
index a360a785227..c041060a8a6 100644
--- a/gdb/config/m68k/tm-delta68.h
+++ b/gdb/config/m68k/tm-delta68.h
@@ -1,109 +1,109 @@
-/* Target definitions for delta68.
- Copyright 1993, 1994, 1998, 1999, 2000 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. */
-
-struct frame_info;
-
-#include "regcache.h"
-
-/* Define BPT_VECTOR if it is different than the default.
- This is the vector number used by traps to indicate a breakpoint. */
-
-#define BPT_VECTOR 0x1
-
-#define GCC_COMPILED_FLAG_SYMBOL "gcc_compiled%"
-#define GCC2_COMPILED_FLAG_SYMBOL "gcc2_compiled%"
-
-/* Amount PC must be decremented by after a breakpoint.
- On the Delta, the kernel decrements it for us. */
-
-#define DECR_PC_AFTER_BREAK 0
-
-/* Not sure what happens if we try to store this register, but
- phdm@info.ucl.ac.be says we need this define. */
-
-#define CANNOT_STORE_REGISTER(regno) (regno == FPI_REGNUM)
-
-/* 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. */
-
-/* When it returns a float/double value, use fp0 in sysV68. */
-/* When it returns a pointer value, use a0 in sysV68. */
-
-#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
- if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
- DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE, \
- &REGBUF[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)], \
- VALBUF); \
- else \
- memcpy ((VALBUF), \
- (char *) ((REGBUF) + \
- (TYPE_CODE(TYPE) == TYPE_CODE_PTR ? 8 * 4 : \
- (TYPE_LENGTH(TYPE) >= 4 ? 0 : 4 - TYPE_LENGTH(TYPE)))), \
- TYPE_LENGTH(TYPE))
-
-/* Write into appropriate registers a function return value
- of type TYPE, given in virtual format. */
-
-/* When it returns a float/double value, use fp0 in sysV68. */
-/* When it returns a pointer value, use a0 in sysV68. */
-
-#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
- if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
- { \
- char raw_buf[DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM)]; \
- DEPRECATED_REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf); \
- deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (FP0_REGNUM), \
- raw_buf, DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM)); \
- } \
- else \
- deprecated_write_register_bytes ((TYPE_CODE(TYPE) == TYPE_CODE_PTR ? 8 * 4 : 0), \
- VALBUF, TYPE_LENGTH (TYPE))
-
-/* Return number of args passed to a frame.
- Can return -1, meaning no way to tell. */
-
-extern int delta68_frame_num_args (struct frame_info *fi);
-#define FRAME_NUM_ARGS(fi) (delta68_frame_num_args ((fi)))
-
-/* On M68040 versions of sysV68 R3V7.1, ptrace(PT_WRITE_I) does not clear
- the processor's instruction cache as it should. */
-#define CLEAR_INSN_CACHE() clear_insn_cache()
-
-#include "m68k/tm-m68k.h"
-
-/* 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 (or an expression that can be used as one). */
-
-#undef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
-#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF)\
- (*(CORE_ADDR *)((char*)(REGBUF) + 8 * 4))
-
-extern int delta68_in_sigtramp (CORE_ADDR pc, char *name);
-#define IN_SIGTRAMP(pc,name) delta68_in_sigtramp (pc, name)
-
-extern CORE_ADDR delta68_frame_saved_pc (struct frame_info *fi);
-#undef DEPRECATED_FRAME_SAVED_PC
-#define DEPRECATED_FRAME_SAVED_PC(fi) delta68_frame_saved_pc (fi)
-
-extern CORE_ADDR delta68_frame_args_address (struct frame_info *fi);
-#undef DEPRECATED_FRAME_ARGS_ADDRESS
-#define DEPRECATED_FRAME_ARGS_ADDRESS(fi) delta68_frame_args_address (fi)
+// OBSOLETE /* Target definitions for delta68.
+// OBSOLETE Copyright 1993, 1994, 1998, 1999, 2000 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE struct frame_info;
+// OBSOLETE
+// OBSOLETE #include "regcache.h"
+// OBSOLETE
+// OBSOLETE /* Define BPT_VECTOR if it is different than the default.
+// OBSOLETE This is the vector number used by traps to indicate a breakpoint. */
+// OBSOLETE
+// OBSOLETE #define BPT_VECTOR 0x1
+// OBSOLETE
+// OBSOLETE #define GCC_COMPILED_FLAG_SYMBOL "gcc_compiled%"
+// OBSOLETE #define GCC2_COMPILED_FLAG_SYMBOL "gcc2_compiled%"
+// OBSOLETE
+// OBSOLETE /* Amount PC must be decremented by after a breakpoint.
+// OBSOLETE On the Delta, the kernel decrements it for us. */
+// OBSOLETE
+// OBSOLETE #define DECR_PC_AFTER_BREAK 0
+// OBSOLETE
+// OBSOLETE /* Not sure what happens if we try to store this register, but
+// OBSOLETE phdm@info.ucl.ac.be says we need this define. */
+// OBSOLETE
+// OBSOLETE #define CANNOT_STORE_REGISTER(regno) (regno == FPI_REGNUM)
+// OBSOLETE
+// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
+// OBSOLETE a function return value of type TYPE, and copy that, in virtual format,
+// OBSOLETE into VALBUF. */
+// OBSOLETE
+// OBSOLETE /* When it returns a float/double value, use fp0 in sysV68. */
+// OBSOLETE /* When it returns a pointer value, use a0 in sysV68. */
+// OBSOLETE
+// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+// OBSOLETE if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
+// OBSOLETE DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE, \
+// OBSOLETE &REGBUF[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)], \
+// OBSOLETE VALBUF); \
+// OBSOLETE else \
+// OBSOLETE memcpy ((VALBUF), \
+// OBSOLETE (char *) ((REGBUF) + \
+// OBSOLETE (TYPE_CODE(TYPE) == TYPE_CODE_PTR ? 8 * 4 : \
+// OBSOLETE (TYPE_LENGTH(TYPE) >= 4 ? 0 : 4 - TYPE_LENGTH(TYPE)))), \
+// OBSOLETE TYPE_LENGTH(TYPE))
+// OBSOLETE
+// OBSOLETE /* Write into appropriate registers a function return value
+// OBSOLETE of type TYPE, given in virtual format. */
+// OBSOLETE
+// OBSOLETE /* When it returns a float/double value, use fp0 in sysV68. */
+// OBSOLETE /* When it returns a pointer value, use a0 in sysV68. */
+// OBSOLETE
+// OBSOLETE #define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
+// OBSOLETE if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
+// OBSOLETE { \
+// OBSOLETE char raw_buf[DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM)]; \
+// OBSOLETE DEPRECATED_REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf); \
+// OBSOLETE deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (FP0_REGNUM), \
+// OBSOLETE raw_buf, DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM)); \
+// OBSOLETE } \
+// OBSOLETE else \
+// OBSOLETE deprecated_write_register_bytes ((TYPE_CODE(TYPE) == TYPE_CODE_PTR ? 8 * 4 : 0), \
+// OBSOLETE VALBUF, TYPE_LENGTH (TYPE))
+// OBSOLETE
+// OBSOLETE /* Return number of args passed to a frame.
+// OBSOLETE Can return -1, meaning no way to tell. */
+// OBSOLETE
+// OBSOLETE extern int delta68_frame_num_args (struct frame_info *fi);
+// OBSOLETE #define FRAME_NUM_ARGS(fi) (delta68_frame_num_args ((fi)))
+// OBSOLETE
+// OBSOLETE /* On M68040 versions of sysV68 R3V7.1, ptrace(PT_WRITE_I) does not clear
+// OBSOLETE the processor's instruction cache as it should. */
+// OBSOLETE #define CLEAR_INSN_CACHE() clear_insn_cache()
+// OBSOLETE
+// OBSOLETE #include "m68k/tm-m68k.h"
+// OBSOLETE
+// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
+// OBSOLETE the address in which a function should return its structure value,
+// OBSOLETE as a CORE_ADDR (or an expression that can be used as one). */
+// OBSOLETE
+// OBSOLETE #undef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
+// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF)\
+// OBSOLETE (*(CORE_ADDR *)((char*)(REGBUF) + 8 * 4))
+// OBSOLETE
+// OBSOLETE extern int delta68_in_sigtramp (CORE_ADDR pc, char *name);
+// OBSOLETE #define IN_SIGTRAMP(pc,name) delta68_in_sigtramp (pc, name)
+// OBSOLETE
+// OBSOLETE extern CORE_ADDR delta68_frame_saved_pc (struct frame_info *fi);
+// OBSOLETE #undef DEPRECATED_FRAME_SAVED_PC
+// OBSOLETE #define DEPRECATED_FRAME_SAVED_PC(fi) delta68_frame_saved_pc (fi)
+// OBSOLETE
+// OBSOLETE extern CORE_ADDR delta68_frame_args_address (struct frame_info *fi);
+// OBSOLETE #undef DEPRECATED_FRAME_ARGS_ADDRESS
+// OBSOLETE #define DEPRECATED_FRAME_ARGS_ADDRESS(fi) delta68_frame_args_address (fi)
diff --git a/gdb/config/m68k/tm-dpx2.h b/gdb/config/m68k/tm-dpx2.h
index 96b1c324d5a..f641ad3cad1 100644
--- a/gdb/config/m68k/tm-dpx2.h
+++ b/gdb/config/m68k/tm-dpx2.h
@@ -1,35 +1,35 @@
-/* Parameters for targeting to a Bull DPX2.
- Copyright 1986, 1987, 1989, 1991, 1993, 1994
- 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. */
-
-/* Define BPT_VECTOR if it is different than the default.
- This is the vector number used by traps to indicate a breakpoint. */
-
-#define BPT_VECTOR 0xe
-
-/* Need to get function ends by adding this to epilogue address from .bf
- record, not using x_fsize field. */
-#define FUNCTION_EPILOGUE_SIZE 4
-
-/* The child target can't deal with writing floating registers. */
-#define CANNOT_STORE_REGISTER(regno) ((regno) >= FP0_REGNUM)
-
-#include <sys/types.h>
-#include "m68k/tm-m68k.h"
+// OBSOLETE /* Parameters for targeting to a Bull DPX2.
+// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1993, 1994
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* Define BPT_VECTOR if it is different than the default.
+// OBSOLETE This is the vector number used by traps to indicate a breakpoint. */
+// OBSOLETE
+// OBSOLETE #define BPT_VECTOR 0xe
+// OBSOLETE
+// OBSOLETE /* Need to get function ends by adding this to epilogue address from .bf
+// OBSOLETE record, not using x_fsize field. */
+// OBSOLETE #define FUNCTION_EPILOGUE_SIZE 4
+// OBSOLETE
+// OBSOLETE /* The child target can't deal with writing floating registers. */
+// OBSOLETE #define CANNOT_STORE_REGISTER(regno) ((regno) >= FP0_REGNUM)
+// OBSOLETE
+// OBSOLETE #include <sys/types.h>
+// OBSOLETE #include "m68k/tm-m68k.h"
diff --git a/gdb/config/m68k/tm-m68klynx.h b/gdb/config/m68k/tm-m68klynx.h
index 71ed690545c..e82fbee9e93 100644
--- a/gdb/config/m68k/tm-m68klynx.h
+++ b/gdb/config/m68k/tm-m68klynx.h
@@ -1,39 +1,39 @@
-/* Macro definitions for Motorola 680x0 running under LynxOS.
- Copyright 1993 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. */
-
-#ifndef TM_M68KLYNX_H
-#define TM_M68KLYNX_H
-
-#include "config/tm-lynx.h"
-
-/* If PC-2 contains this instruction, then we know what we are in a system
- call stub, and the return PC is is at SP+4, instead of SP. */
-
-#define SYSCALL_TRAP 0x4e4a /* trap #10 */
-#define SYSCALL_TRAP_OFFSET 2 /* PC is after trap instruction */
-
-/* Use the generic 68k definitions. */
-
-#include "m68k/tm-m68k.h"
-
-/* Disable dumbshit alternate breakpoint mechanism needed by 68k stub. */
-#undef DEPRECATED_REMOTE_BREAKPOINT
-
-#endif /* TM_M68KLYNX_H */
+// OBSOLETE /* Macro definitions for Motorola 680x0 running under LynxOS.
+// OBSOLETE Copyright 1993 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #ifndef TM_M68KLYNX_H
+// OBSOLETE #define TM_M68KLYNX_H
+// OBSOLETE
+// OBSOLETE #include "config/tm-lynx.h"
+// OBSOLETE
+// OBSOLETE /* If PC-2 contains this instruction, then we know what we are in a system
+// OBSOLETE call stub, and the return PC is is at SP+4, instead of SP. */
+// OBSOLETE
+// OBSOLETE #define SYSCALL_TRAP 0x4e4a /* trap #10 */
+// OBSOLETE #define SYSCALL_TRAP_OFFSET 2 /* PC is after trap instruction */
+// OBSOLETE
+// OBSOLETE /* Use the generic 68k definitions. */
+// OBSOLETE
+// OBSOLETE #include "m68k/tm-m68k.h"
+// OBSOLETE
+// OBSOLETE /* Disable dumbshit alternate breakpoint mechanism needed by 68k stub. */
+// OBSOLETE #undef DEPRECATED_REMOTE_BREAKPOINT
+// OBSOLETE
+// OBSOLETE #endif /* TM_M68KLYNX_H */
diff --git a/gdb/config/m68k/tm-m68kv4.h b/gdb/config/m68k/tm-m68kv4.h
index 11bb122dfa4..95696b60b49 100644
--- a/gdb/config/m68k/tm-m68kv4.h
+++ b/gdb/config/m68k/tm-m68kv4.h
@@ -1,67 +1,67 @@
-/* Target definitions for GDB on a Motorola 680x0 running SVR4.
- (Commodore Amiga with amix or Atari TT with ASV)
- Copyright 1991, 1994, 1995, 1996, 1998, 1999, 2000, 2003
- Free Software Foundation, Inc.
- Written by Fred Fish at Cygnus Support (fnf@cygint)
-
- 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. */
-
-/* Define BPT_VECTOR if it is different than the default.
- This is the vector number used by traps to indicate a breakpoint. */
-
-#define BPT_VECTOR 0x1
-
-/* How much to decrement the PC after a trap. Depends on kernel. */
-
-#define DECR_PC_AFTER_BREAK 0 /* No decrement required */
-
-#include "config/tm-sysv4.h"
-#include "m68k/tm-m68k.h"
-
-/* Offsets (in target ints) into jmp_buf. Not defined in any system header
- file, so we have to step through setjmp/longjmp with a debugger and figure
- them out. As a double check, note that <setjmp> defines _JBLEN as 13,
- which matches the number of elements we see saved by setjmp(). */
-
-#define JB_ELEMENT_SIZE sizeof(int) /* jmp_buf[_JBLEN] is array of ints */
-
-#define JB_D2 0
-#define JB_D3 1
-#define JB_D4 2
-#define JB_D5 3
-#define JB_D6 4
-#define JB_D7 5
-#define JB_A1 6
-#define JB_A2 7
-#define JB_A3 8
-#define JB_A4 9
-#define JB_A5 10
-#define JB_A6 11
-#define JB_A7 12
-
-#define JB_PC JB_A1 /* Setjmp()'s return PC saved in A1 */
-
-/* Figure out where the longjmp will land. Slurp the args out of the stack.
- We expect the first arg to be a pointer to the jmp_buf structure from which
- we extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
- This routine returns true on success */
-
-#define GET_LONGJMP_TARGET(ADDR) m68k_get_longjmp_target(ADDR)
-
-/* Convert a DWARF register number to a gdb REGNUM. */
-#define DWARF_REG_TO_REGNUM(num) ((num) < 16 ? (num) : (num)+FP0_REGNUM-16)
+// OBSOLETE /* Target definitions for GDB on a Motorola 680x0 running SVR4.
+// OBSOLETE (Commodore Amiga with amix or Atari TT with ASV)
+// OBSOLETE Copyright 1991, 1994, 1995, 1996, 1998, 1999, 2000, 2003
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE Written by Fred Fish at Cygnus Support (fnf@cygint)
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* Define BPT_VECTOR if it is different than the default.
+// OBSOLETE This is the vector number used by traps to indicate a breakpoint. */
+// OBSOLETE
+// OBSOLETE #define BPT_VECTOR 0x1
+// OBSOLETE
+// OBSOLETE /* How much to decrement the PC after a trap. Depends on kernel. */
+// OBSOLETE
+// OBSOLETE #define DECR_PC_AFTER_BREAK 0 /* No decrement required */
+// OBSOLETE
+// OBSOLETE #include "config/tm-sysv4.h"
+// OBSOLETE #include "m68k/tm-m68k.h"
+// OBSOLETE
+// OBSOLETE /* Offsets (in target ints) into jmp_buf. Not defined in any system header
+// OBSOLETE file, so we have to step through setjmp/longjmp with a debugger and figure
+// OBSOLETE them out. As a double check, note that <setjmp> defines _JBLEN as 13,
+// OBSOLETE which matches the number of elements we see saved by setjmp(). */
+// OBSOLETE
+// OBSOLETE #define JB_ELEMENT_SIZE sizeof(int) /* jmp_buf[_JBLEN] is array of ints */
+// OBSOLETE
+// OBSOLETE #define JB_D2 0
+// OBSOLETE #define JB_D3 1
+// OBSOLETE #define JB_D4 2
+// OBSOLETE #define JB_D5 3
+// OBSOLETE #define JB_D6 4
+// OBSOLETE #define JB_D7 5
+// OBSOLETE #define JB_A1 6
+// OBSOLETE #define JB_A2 7
+// OBSOLETE #define JB_A3 8
+// OBSOLETE #define JB_A4 9
+// OBSOLETE #define JB_A5 10
+// OBSOLETE #define JB_A6 11
+// OBSOLETE #define JB_A7 12
+// OBSOLETE
+// OBSOLETE #define JB_PC JB_A1 /* Setjmp()'s return PC saved in A1 */
+// OBSOLETE
+// OBSOLETE /* Figure out where the longjmp will land. Slurp the args out of the stack.
+// OBSOLETE We expect the first arg to be a pointer to the jmp_buf structure from which
+// OBSOLETE we extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
+// OBSOLETE This routine returns true on success */
+// OBSOLETE
+// OBSOLETE #define GET_LONGJMP_TARGET(ADDR) m68k_get_longjmp_target(ADDR)
+// OBSOLETE
+// OBSOLETE /* Convert a DWARF register number to a gdb REGNUM. */
+// OBSOLETE #define DWARF_REG_TO_REGNUM(num) ((num) < 16 ? (num) : (num)+FP0_REGNUM-16)
diff --git a/gdb/config/m68k/tm-sun2.h b/gdb/config/m68k/tm-sun2.h
index e839bea7f5a..199530abe20 100644
--- a/gdb/config/m68k/tm-sun2.h
+++ b/gdb/config/m68k/tm-sun2.h
@@ -1,24 +1,24 @@
-/* Parameters for execution on a Sun, for GDB, the GNU debugger.
- Copyright (C) 1986, 1987, 1989, 1992 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. */
-
-/* The child target can't deal with floating registers. */
-#define CANNOT_STORE_REGISTER(regno) ((regno) >= FP0_REGNUM)
-
-#include "m68k/tm-m68k.h"
+// OBSOLETE /* Parameters for execution on a Sun, for GDB, the GNU debugger.
+// OBSOLETE Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* The child target can't deal with floating registers. */
+// OBSOLETE #define CANNOT_STORE_REGISTER(regno) ((regno) >= FP0_REGNUM)
+// OBSOLETE
+// OBSOLETE #include "m68k/tm-m68k.h"
diff --git a/gdb/config/m68k/tm-sun2os4.h b/gdb/config/m68k/tm-sun2os4.h
index d5fe5315267..83beb6cf665 100644
--- a/gdb/config/m68k/tm-sun2os4.h
+++ b/gdb/config/m68k/tm-sun2os4.h
@@ -1,21 +1,21 @@
-/* Copyright (C) 1990, 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 "m68k/tm-sun2.h"
-#include "config/tm-sunos.h"
+// OBSOLETE /* Copyright (C) 1990, Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "m68k/tm-sun2.h"
+// OBSOLETE #include "config/tm-sunos.h"
diff --git a/gdb/config/m68k/tm-sun3.h b/gdb/config/m68k/tm-sun3.h
index 93fea353951..f51666dc044 100644
--- a/gdb/config/m68k/tm-sun3.h
+++ b/gdb/config/m68k/tm-sun3.h
@@ -1,89 +1,89 @@
-/* Parameters for execution on a Sun, for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1992, 1993, 1994, 1996, 2000
- 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. */
-
-#ifndef TM_SUN3_H
-#define TM_SUN3_H
-
-/* Sun3 status includes fpflags, which shows whether the FPU has been used
- by the process, and whether the FPU was done with an instruction or
- was interrupted in the middle of a long instruction. See
- <machine/reg.h>. */
-/* a&d, pc,sr, fp, fpstat, fpflags */
-
-#define DEPRECATED_REGISTER_BYTES (16*4 + 8 + 8*12 + 3*4 + 4)
-
-#define NUM_REGS 31
-
-#define REGISTER_BYTES_OK(b) \
- ((b) == DEPRECATED_REGISTER_BYTES \
- || (b) == REGISTER_BYTES_FP \
- || (b) == REGISTER_BYTES_NOFP)
-
-/* If PC contains this instruction, then we know what we are in a system
- call stub, and the return PC is is at SP+4, instead of SP. */
-
-#define SYSCALL_TRAP 0x4e40 /* trap #0 */
-#define SYSCALL_TRAP_OFFSET 0 /* PC points at trap instruction */
-
-#include "m68k/tm-m68k.h"
-
-/* Disable alternate breakpoint mechanism needed by 68k stub. */
-#undef DEPRECATED_REMOTE_BREAKPOINT
-
-/* Offsets (in target ints) into jmp_buf. Not defined by Sun, but at least
- documented in a comment in <machine/setjmp.h>! */
-
-#define JB_ELEMENT_SIZE 4
-
-#define JB_ONSSTACK 0
-#define JB_SIGMASK 1
-#define JB_SP 2
-#define JB_PC 3
-#define JB_PSL 4
-#define JB_D2 5
-#define JB_D3 6
-#define JB_D4 7
-#define JB_D5 8
-#define JB_D6 9
-#define JB_D7 10
-#define JB_A2 11
-#define JB_A3 12
-#define JB_A4 13
-#define JB_A5 14
-#define JB_A6 15
-
-/* Figure out where the longjmp will land. Slurp the args out of the stack.
- We expect the first arg to be a pointer to the jmp_buf structure from which
- we extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
- This routine returns true on success */
-
-#define GET_LONGJMP_TARGET(ADDR) m68k_get_longjmp_target(ADDR)
-
-/* If sun3 pcc says that a parameter is a short, it's a short. */
-#define BELIEVE_PCC_PROMOTION_TYPE 1
-
-/* Can't define BELIEVE_PCC_PROMOTION for SunOS /bin/cc of SunOS 4.1.1.
- Apparently Sun fixed this for the sparc but not the sun3. */
-
-/* The code which tries to deal with this bug is never harmful on a sun3. */
-#define SUN_FIXED_LBRAC_BUG (0)
-
-#endif /* TM_SUN3_H */
+// OBSOLETE /* Parameters for execution on a Sun, for GDB, the GNU debugger.
+// OBSOLETE Copyright 1986, 1987, 1989, 1992, 1993, 1994, 1996, 2000
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #ifndef TM_SUN3_H
+// OBSOLETE #define TM_SUN3_H
+// OBSOLETE
+// OBSOLETE /* Sun3 status includes fpflags, which shows whether the FPU has been used
+// OBSOLETE by the process, and whether the FPU was done with an instruction or
+// OBSOLETE was interrupted in the middle of a long instruction. See
+// OBSOLETE <machine/reg.h>. */
+// OBSOLETE /* a&d, pc,sr, fp, fpstat, fpflags */
+// OBSOLETE
+// OBSOLETE #define DEPRECATED_REGISTER_BYTES (16*4 + 8 + 8*12 + 3*4 + 4)
+// OBSOLETE
+// OBSOLETE #define NUM_REGS 31
+// OBSOLETE
+// OBSOLETE #define REGISTER_BYTES_OK(b) \
+// OBSOLETE ((b) == DEPRECATED_REGISTER_BYTES \
+// OBSOLETE || (b) == REGISTER_BYTES_FP \
+// OBSOLETE || (b) == REGISTER_BYTES_NOFP)
+// OBSOLETE
+// OBSOLETE /* If PC contains this instruction, then we know what we are in a system
+// OBSOLETE call stub, and the return PC is is at SP+4, instead of SP. */
+// OBSOLETE
+// OBSOLETE #define SYSCALL_TRAP 0x4e40 /* trap #0 */
+// OBSOLETE #define SYSCALL_TRAP_OFFSET 0 /* PC points at trap instruction */
+// OBSOLETE
+// OBSOLETE #include "m68k/tm-m68k.h"
+// OBSOLETE
+// OBSOLETE /* Disable alternate breakpoint mechanism needed by 68k stub. */
+// OBSOLETE #undef DEPRECATED_REMOTE_BREAKPOINT
+// OBSOLETE
+// OBSOLETE /* Offsets (in target ints) into jmp_buf. Not defined by Sun, but at least
+// OBSOLETE documented in a comment in <machine/setjmp.h>! */
+// OBSOLETE
+// OBSOLETE #define JB_ELEMENT_SIZE 4
+// OBSOLETE
+// OBSOLETE #define JB_ONSSTACK 0
+// OBSOLETE #define JB_SIGMASK 1
+// OBSOLETE #define JB_SP 2
+// OBSOLETE #define JB_PC 3
+// OBSOLETE #define JB_PSL 4
+// OBSOLETE #define JB_D2 5
+// OBSOLETE #define JB_D3 6
+// OBSOLETE #define JB_D4 7
+// OBSOLETE #define JB_D5 8
+// OBSOLETE #define JB_D6 9
+// OBSOLETE #define JB_D7 10
+// OBSOLETE #define JB_A2 11
+// OBSOLETE #define JB_A3 12
+// OBSOLETE #define JB_A4 13
+// OBSOLETE #define JB_A5 14
+// OBSOLETE #define JB_A6 15
+// OBSOLETE
+// OBSOLETE /* Figure out where the longjmp will land. Slurp the args out of the stack.
+// OBSOLETE We expect the first arg to be a pointer to the jmp_buf structure from which
+// OBSOLETE we extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
+// OBSOLETE This routine returns true on success */
+// OBSOLETE
+// OBSOLETE #define GET_LONGJMP_TARGET(ADDR) m68k_get_longjmp_target(ADDR)
+// OBSOLETE
+// OBSOLETE /* If sun3 pcc says that a parameter is a short, it's a short. */
+// OBSOLETE #define BELIEVE_PCC_PROMOTION_TYPE 1
+// OBSOLETE
+// OBSOLETE /* Can't define BELIEVE_PCC_PROMOTION for SunOS /bin/cc of SunOS 4.1.1.
+// OBSOLETE Apparently Sun fixed this for the sparc but not the sun3. */
+// OBSOLETE
+// OBSOLETE /* The code which tries to deal with this bug is never harmful on a sun3. */
+// OBSOLETE #define SUN_FIXED_LBRAC_BUG (0)
+// OBSOLETE
+// OBSOLETE #endif /* TM_SUN3_H */
diff --git a/gdb/config/m68k/tm-sun3os4.h b/gdb/config/m68k/tm-sun3os4.h
index ced43761b38..7e1ffb21fe2 100644
--- a/gdb/config/m68k/tm-sun3os4.h
+++ b/gdb/config/m68k/tm-sun3os4.h
@@ -1,22 +1,22 @@
-/* Target machine parameters for Sun-3 under SunOS 4.x, for GDB.
- Copyright (C) 1986, 1987, 1989, 1992 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 "m68k/tm-sun3.h"
-#include "config/tm-sunos.h"
+// OBSOLETE /* Target machine parameters for Sun-3 under SunOS 4.x, for GDB.
+// OBSOLETE Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "m68k/tm-sun3.h"
+// OBSOLETE #include "config/tm-sunos.h"
diff --git a/gdb/config/m68k/xm-3b1.h b/gdb/config/m68k/xm-3b1.h
index acf72e98201..7257b69dc9a 100644
--- a/gdb/config/m68k/xm-3b1.h
+++ b/gdb/config/m68k/xm-3b1.h
@@ -1,82 +1,82 @@
-/* Parameters for execution on a 3b1.
- Copyright 1986, 1987, 1989, 1999 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. */
-
-#define HAVE_TERMIO
-#define USG
-
-/* This is the amount to subtract from u.u_ar0
- to get the offset in the core file of the register values. */
-
-#define KERNEL_U_ADDR 0x70000
-
-#define REGISTER_U_ADDR(addr, blockend, regno) \
-{ addr = blockend + regno * 4; }
-
-/* Interface definitions for kernel debugger KDB. */
-
-/* Map machine fault codes into signal numbers.
- First subtract 0, divide by 4, then index in a table.
- Faults for which the entry in this table is 0
- are not handled by KDB; the program's own trap handler
- gets to handle then. */
-
-#define FAULT_CODE_ORIGIN 0
-#define FAULT_CODE_UNITS 4
-#define FAULT_TABLE \
-{ 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \
- 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- SIGILL }
-
-/* Start running with a stack stretching from BEG to END.
- BEG and END should be symbols meaningful to the assembler.
- This is used only for kdb. */
-
-#define INIT_STACK(beg, end) \
-{ asm (".globl end"); \
- asm ("movel $ end, sp"); \
- asm ("clrl fp"); }
-
-/* Push the frame pointer register on the stack. */
-#define PUSH_FRAME_PTR \
- asm ("movel fp, -(sp)");
-
-/* Copy the top-of-stack to the frame pointer register. */
-#define POP_FRAME_PTR \
- asm ("movl (sp), fp");
-
-/* After KDB is entered by a fault, push all registers
- that GDB thinks about (all NUM_REGS of them),
- so that they appear in order of ascending GDB register number.
- The fault code will be on the stack beyond the last register. */
-
-#define PUSH_REGISTERS \
-{ asm ("clrw -(sp)"); \
- asm ("pea 10(sp)"); \
- asm ("movem $ 0xfffe,-(sp)"); }
-
-/* Assuming the registers (including processor status) have been
- pushed on the stack in order of ascending GDB register number,
- restore them and return to the address in the saved PC register. */
-
-#define POP_REGISTERS \
-{ asm ("subil $8,28(sp)"); \
- asm ("movem (sp),$ 0xffff"); \
- asm ("rte"); }
+// OBSOLETE /* Parameters for execution on a 3b1.
+// OBSOLETE Copyright 1986, 1987, 1989, 1999 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #define HAVE_TERMIO
+// OBSOLETE #define USG
+// OBSOLETE
+// OBSOLETE /* This is the amount to subtract from u.u_ar0
+// OBSOLETE to get the offset in the core file of the register values. */
+// OBSOLETE
+// OBSOLETE #define KERNEL_U_ADDR 0x70000
+// OBSOLETE
+// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
+// OBSOLETE { addr = blockend + regno * 4; }
+// OBSOLETE
+// OBSOLETE /* Interface definitions for kernel debugger KDB. */
+// OBSOLETE
+// OBSOLETE /* Map machine fault codes into signal numbers.
+// OBSOLETE First subtract 0, divide by 4, then index in a table.
+// OBSOLETE Faults for which the entry in this table is 0
+// OBSOLETE are not handled by KDB; the program's own trap handler
+// OBSOLETE gets to handle then. */
+// OBSOLETE
+// OBSOLETE #define FAULT_CODE_ORIGIN 0
+// OBSOLETE #define FAULT_CODE_UNITS 4
+// OBSOLETE #define FAULT_TABLE \
+// OBSOLETE { 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \
+// OBSOLETE 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \
+// OBSOLETE 0, 0, 0, 0, 0, 0, 0, 0, \
+// OBSOLETE SIGILL }
+// OBSOLETE
+// OBSOLETE /* Start running with a stack stretching from BEG to END.
+// OBSOLETE BEG and END should be symbols meaningful to the assembler.
+// OBSOLETE This is used only for kdb. */
+// OBSOLETE
+// OBSOLETE #define INIT_STACK(beg, end) \
+// OBSOLETE { asm (".globl end"); \
+// OBSOLETE asm ("movel $ end, sp"); \
+// OBSOLETE asm ("clrl fp"); }
+// OBSOLETE
+// OBSOLETE /* Push the frame pointer register on the stack. */
+// OBSOLETE #define PUSH_FRAME_PTR \
+// OBSOLETE asm ("movel fp, -(sp)");
+// OBSOLETE
+// OBSOLETE /* Copy the top-of-stack to the frame pointer register. */
+// OBSOLETE #define POP_FRAME_PTR \
+// OBSOLETE asm ("movl (sp), fp");
+// OBSOLETE
+// OBSOLETE /* After KDB is entered by a fault, push all registers
+// OBSOLETE that GDB thinks about (all NUM_REGS of them),
+// OBSOLETE so that they appear in order of ascending GDB register number.
+// OBSOLETE The fault code will be on the stack beyond the last register. */
+// OBSOLETE
+// OBSOLETE #define PUSH_REGISTERS \
+// OBSOLETE { asm ("clrw -(sp)"); \
+// OBSOLETE asm ("pea 10(sp)"); \
+// OBSOLETE asm ("movem $ 0xfffe,-(sp)"); }
+// OBSOLETE
+// OBSOLETE /* Assuming the registers (including processor status) have been
+// OBSOLETE pushed on the stack in order of ascending GDB register number,
+// OBSOLETE restore them and return to the address in the saved PC register. */
+// OBSOLETE
+// OBSOLETE #define POP_REGISTERS \
+// OBSOLETE { asm ("subil $8,28(sp)"); \
+// OBSOLETE asm ("movem (sp),$ 0xffff"); \
+// OBSOLETE asm ("rte"); }
diff --git a/gdb/config/m68k/xm-delta68.h b/gdb/config/m68k/xm-delta68.h
index f691c387db2..9b8f0af39ce 100644
--- a/gdb/config/m68k/xm-delta68.h
+++ b/gdb/config/m68k/xm-delta68.h
@@ -1,35 +1,35 @@
-/* Macro definitions for a Delta.
- Copyright (C) 1986, 1987, 1989, 1992 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. */
-
-/* I'm running gdb 4.9 under sysV68 R3V7.1.
-
- On some machines, gdb crashes when it's starting up while calling the
- vendor's termio tgetent() routine. It always works when run under
- itself (actually, under 3.2, it's not an infinitely recursive bug.)
- After some poking around, it appears that depending on the environment
- size, or whether you're running YP, or the phase of the moon or something,
- the stack is not always long-aligned when main() is called, and tgetent()
- takes strong offense at that. On some machines this bug never appears, but
- on those where it does, it occurs quite reliably. */
-#define ALIGN_STACK_ON_STARTUP
-
-#define USG
-
-#define HAVE_TERMIO
+// OBSOLETE /* Macro definitions for a Delta.
+// OBSOLETE Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* I'm running gdb 4.9 under sysV68 R3V7.1.
+// OBSOLETE
+// OBSOLETE On some machines, gdb crashes when it's starting up while calling the
+// OBSOLETE vendor's termio tgetent() routine. It always works when run under
+// OBSOLETE itself (actually, under 3.2, it's not an infinitely recursive bug.)
+// OBSOLETE After some poking around, it appears that depending on the environment
+// OBSOLETE size, or whether you're running YP, or the phase of the moon or something,
+// OBSOLETE the stack is not always long-aligned when main() is called, and tgetent()
+// OBSOLETE takes strong offense at that. On some machines this bug never appears, but
+// OBSOLETE on those where it does, it occurs quite reliably. */
+// OBSOLETE #define ALIGN_STACK_ON_STARTUP
+// OBSOLETE
+// OBSOLETE #define USG
+// OBSOLETE
+// OBSOLETE #define HAVE_TERMIO
diff --git a/gdb/config/m68k/xm-dpx2.h b/gdb/config/m68k/xm-dpx2.h
index 4083c9dbc19..0a42203ef67 100644
--- a/gdb/config/m68k/xm-dpx2.h
+++ b/gdb/config/m68k/xm-dpx2.h
@@ -1,22 +1,22 @@
-/* Parameters for execution on a Bull DPX2.
- Copyright 1986, 1987, 1989, 1993 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. */
-
-#define HAVE_TERMIOS
-#define USG
+// OBSOLETE /* Parameters for execution on a Bull DPX2.
+// OBSOLETE Copyright 1986, 1987, 1989, 1993 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #define HAVE_TERMIOS
+// OBSOLETE #define USG
diff --git a/gdb/config/m68k/xm-m68kv4.h b/gdb/config/m68k/xm-m68kv4.h
index 542cd106814..044371cfa79 100644
--- a/gdb/config/m68k/xm-m68kv4.h
+++ b/gdb/config/m68k/xm-m68kv4.h
@@ -1,29 +1,29 @@
-/* Host definitions for GDB on a Motorola 680x0 running SVR4.
- (Commodore Amiga with amix or Atari TT with ASV)
- Copyright 1991, 1992, 1994, 1996 Free Software Foundation, Inc.
- Written by Fred Fish at Cygnus Support (fnf@cygnus.com)
-
- 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. */
-
-/* Pick up most of what we need from the generic m68k host include file. */
-
-#include "m68k/xm-m68k.h"
-
-/* Pick up more stuff from the generic SVR4 host include file. */
-
-#include "config/xm-sysv4.h"
+// OBSOLETE /* Host definitions for GDB on a Motorola 680x0 running SVR4.
+// OBSOLETE (Commodore Amiga with amix or Atari TT with ASV)
+// OBSOLETE Copyright 1991, 1992, 1994, 1996 Free Software Foundation, Inc.
+// OBSOLETE Written by Fred Fish at Cygnus Support (fnf@cygnus.com)
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* Pick up most of what we need from the generic m68k host include file. */
+// OBSOLETE
+// OBSOLETE #include "m68k/xm-m68k.h"
+// OBSOLETE
+// OBSOLETE /* Pick up more stuff from the generic SVR4 host include file. */
+// OBSOLETE
+// OBSOLETE #include "config/xm-sysv4.h"
diff --git a/gdb/config/m68k/xm-sun2.h b/gdb/config/m68k/xm-sun2.h
index cf846192491..f17ad3cb6a1 100644
--- a/gdb/config/m68k/xm-sun2.h
+++ b/gdb/config/m68k/xm-sun2.h
@@ -1,77 +1,77 @@
-/* Parameters for execution on a Sun, for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1996 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. */
-
-/* This is the amount to subtract from u.u_ar0
- to get the offset in the core file of the register values. */
-
-#define KERNEL_U_ADDR 0x2800
-
-
-/* Interface definitions for kernel debugger KDB. */
-
-/* Map machine fault codes into signal numbers.
- First subtract 0, divide by 4, then index in a table.
- Faults for which the entry in this table is 0
- are not handled by KDB; the program's own trap handler
- gets to handle then. */
-
-#define FAULT_CODE_ORIGIN 0
-#define FAULT_CODE_UNITS 4
-#define FAULT_TABLE \
-{ 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \
- 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- SIGILL }
-
-/* Start running with a stack stretching from BEG to END.
- BEG and END should be symbols meaningful to the assembler.
- This is used only for kdb. */
-
-#define INIT_STACK(beg, end) \
-{ asm (".globl end"); \
- asm ("movel $ end, sp"); \
- asm ("clrl fp"); }
-
-/* Push the frame pointer register on the stack. */
-#define PUSH_FRAME_PTR \
- asm ("movel fp, -(sp)");
-
-/* Copy the top-of-stack to the frame pointer register. */
-#define POP_FRAME_PTR \
- asm ("movl (sp), fp");
-
-/* After KDB is entered by a fault, push all registers
- that GDB thinks about (all NUM_REGS of them),
- so that they appear in order of ascending GDB register number.
- The fault code will be on the stack beyond the last register. */
-
-#define PUSH_REGISTERS \
-{ asm ("clrw -(sp)"); \
- asm ("pea 10(sp)"); \
- asm ("movem $ 0xfffe,-(sp)"); }
-
-/* Assuming the registers (including processor status) have been
- pushed on the stack in order of ascending GDB register number,
- restore them and return to the address in the saved PC register. */
-
-#define POP_REGISTERS \
-{ asm ("subil $8,28(sp)"); \
- asm ("movem (sp),$ 0xffff"); \
- asm ("rte"); }
+// OBSOLETE /* Parameters for execution on a Sun, for GDB, the GNU debugger.
+// OBSOLETE Copyright 1986, 1987, 1989, 1996 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* This is the amount to subtract from u.u_ar0
+// OBSOLETE to get the offset in the core file of the register values. */
+// OBSOLETE
+// OBSOLETE #define KERNEL_U_ADDR 0x2800
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* Interface definitions for kernel debugger KDB. */
+// OBSOLETE
+// OBSOLETE /* Map machine fault codes into signal numbers.
+// OBSOLETE First subtract 0, divide by 4, then index in a table.
+// OBSOLETE Faults for which the entry in this table is 0
+// OBSOLETE are not handled by KDB; the program's own trap handler
+// OBSOLETE gets to handle then. */
+// OBSOLETE
+// OBSOLETE #define FAULT_CODE_ORIGIN 0
+// OBSOLETE #define FAULT_CODE_UNITS 4
+// OBSOLETE #define FAULT_TABLE \
+// OBSOLETE { 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \
+// OBSOLETE 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \
+// OBSOLETE 0, 0, 0, 0, 0, 0, 0, 0, \
+// OBSOLETE SIGILL }
+// OBSOLETE
+// OBSOLETE /* Start running with a stack stretching from BEG to END.
+// OBSOLETE BEG and END should be symbols meaningful to the assembler.
+// OBSOLETE This is used only for kdb. */
+// OBSOLETE
+// OBSOLETE #define INIT_STACK(beg, end) \
+// OBSOLETE { asm (".globl end"); \
+// OBSOLETE asm ("movel $ end, sp"); \
+// OBSOLETE asm ("clrl fp"); }
+// OBSOLETE
+// OBSOLETE /* Push the frame pointer register on the stack. */
+// OBSOLETE #define PUSH_FRAME_PTR \
+// OBSOLETE asm ("movel fp, -(sp)");
+// OBSOLETE
+// OBSOLETE /* Copy the top-of-stack to the frame pointer register. */
+// OBSOLETE #define POP_FRAME_PTR \
+// OBSOLETE asm ("movl (sp), fp");
+// OBSOLETE
+// OBSOLETE /* After KDB is entered by a fault, push all registers
+// OBSOLETE that GDB thinks about (all NUM_REGS of them),
+// OBSOLETE so that they appear in order of ascending GDB register number.
+// OBSOLETE The fault code will be on the stack beyond the last register. */
+// OBSOLETE
+// OBSOLETE #define PUSH_REGISTERS \
+// OBSOLETE { asm ("clrw -(sp)"); \
+// OBSOLETE asm ("pea 10(sp)"); \
+// OBSOLETE asm ("movem $ 0xfffe,-(sp)"); }
+// OBSOLETE
+// OBSOLETE /* Assuming the registers (including processor status) have been
+// OBSOLETE pushed on the stack in order of ascending GDB register number,
+// OBSOLETE restore them and return to the address in the saved PC register. */
+// OBSOLETE
+// OBSOLETE #define POP_REGISTERS \
+// OBSOLETE { asm ("subil $8,28(sp)"); \
+// OBSOLETE asm ("movem (sp),$ 0xffff"); \
+// OBSOLETE asm ("rte"); }
diff --git a/gdb/config/m68k/xm-sun3.h b/gdb/config/m68k/xm-sun3.h
index 6a5a560e1c3..5f04e024b07 100644
--- a/gdb/config/m68k/xm-sun3.h
+++ b/gdb/config/m68k/xm-sun3.h
@@ -1,71 +1,71 @@
-/* Parameters for execution on a Sun, for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1996 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. */
-
-/* Interface definitions for kernel debugger KDB. */
-
-/* Map machine fault codes into signal numbers.
- First subtract 0, divide by 4, then index in a table.
- Faults for which the entry in this table is 0
- are not handled by KDB; the program's own trap handler
- gets to handle then. */
-
-#define FAULT_CODE_ORIGIN 0
-#define FAULT_CODE_UNITS 4
-#define FAULT_TABLE \
-{ 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \
- 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- SIGILL }
-
-/* Start running with a stack stretching from BEG to END.
- BEG and END should be symbols meaningful to the assembler.
- This is used only for kdb. */
-
-#define INIT_STACK(beg, end) \
-{ asm (".globl end"); \
- asm ("movel #end, sp"); \
- asm ("movel #0,a6"); }
-
-/* Push the frame pointer register on the stack. */
-#define PUSH_FRAME_PTR \
- asm ("movel a6,sp@-");
-
-/* Copy the top-of-stack to the frame pointer register. */
-#define POP_FRAME_PTR \
- asm ("movl sp@,a6");
-
-/* After KDB is entered by a fault, push all registers
- that GDB thinks about (all NUM_REGS of them),
- so that they appear in order of ascending GDB register number.
- The fault code will be on the stack beyond the last register. */
-
-#define PUSH_REGISTERS \
-{ asm ("clrw -(sp)"); \
- asm ("pea sp@(10)"); \
- asm ("movem #0xfffe,sp@-"); }
-
-/* Assuming the registers (including processor status) have been
- pushed on the stack in order of ascending GDB register number,
- restore them and return to the address in the saved PC register. */
-
-#define POP_REGISTERS \
-{ asm ("subil #8,sp@(28)"); \
- asm ("movem sp@,#0xffff"); \
- asm ("rte"); }
+// OBSOLETE /* Parameters for execution on a Sun, for GDB, the GNU debugger.
+// OBSOLETE Copyright 1986, 1987, 1989, 1996 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* Interface definitions for kernel debugger KDB. */
+// OBSOLETE
+// OBSOLETE /* Map machine fault codes into signal numbers.
+// OBSOLETE First subtract 0, divide by 4, then index in a table.
+// OBSOLETE Faults for which the entry in this table is 0
+// OBSOLETE are not handled by KDB; the program's own trap handler
+// OBSOLETE gets to handle then. */
+// OBSOLETE
+// OBSOLETE #define FAULT_CODE_ORIGIN 0
+// OBSOLETE #define FAULT_CODE_UNITS 4
+// OBSOLETE #define FAULT_TABLE \
+// OBSOLETE { 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \
+// OBSOLETE 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \
+// OBSOLETE 0, 0, 0, 0, 0, 0, 0, 0, \
+// OBSOLETE SIGILL }
+// OBSOLETE
+// OBSOLETE /* Start running with a stack stretching from BEG to END.
+// OBSOLETE BEG and END should be symbols meaningful to the assembler.
+// OBSOLETE This is used only for kdb. */
+// OBSOLETE
+// OBSOLETE #define INIT_STACK(beg, end) \
+// OBSOLETE { asm (".globl end"); \
+// OBSOLETE asm ("movel #end, sp"); \
+// OBSOLETE asm ("movel #0,a6"); }
+// OBSOLETE
+// OBSOLETE /* Push the frame pointer register on the stack. */
+// OBSOLETE #define PUSH_FRAME_PTR \
+// OBSOLETE asm ("movel a6,sp@-");
+// OBSOLETE
+// OBSOLETE /* Copy the top-of-stack to the frame pointer register. */
+// OBSOLETE #define POP_FRAME_PTR \
+// OBSOLETE asm ("movl sp@,a6");
+// OBSOLETE
+// OBSOLETE /* After KDB is entered by a fault, push all registers
+// OBSOLETE that GDB thinks about (all NUM_REGS of them),
+// OBSOLETE so that they appear in order of ascending GDB register number.
+// OBSOLETE The fault code will be on the stack beyond the last register. */
+// OBSOLETE
+// OBSOLETE #define PUSH_REGISTERS \
+// OBSOLETE { asm ("clrw -(sp)"); \
+// OBSOLETE asm ("pea sp@(10)"); \
+// OBSOLETE asm ("movem #0xfffe,sp@-"); }
+// OBSOLETE
+// OBSOLETE /* Assuming the registers (including processor status) have been
+// OBSOLETE pushed on the stack in order of ascending GDB register number,
+// OBSOLETE restore them and return to the address in the saved PC register. */
+// OBSOLETE
+// OBSOLETE #define POP_REGISTERS \
+// OBSOLETE { asm ("subil #8,sp@(28)"); \
+// OBSOLETE asm ("movem sp@,#0xffff"); \
+// OBSOLETE asm ("rte"); }
diff --git a/gdb/config/m68k/xm-sun3os4.h b/gdb/config/m68k/xm-sun3os4.h
index 1a819c32a9a..5062071999a 100644
--- a/gdb/config/m68k/xm-sun3os4.h
+++ b/gdb/config/m68k/xm-sun3os4.h
@@ -1,22 +1,22 @@
-/* Macro definitions for a sun 3 running os 4.
- Copyright 1989, 1996, 1998 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 "m68k/xm-sun3.h"
-#define FPU
+// OBSOLETE /* Macro definitions for a sun 3 running os 4.
+// OBSOLETE Copyright 1989, 1996, 1998 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "m68k/xm-sun3.h"
+// OBSOLETE #define FPU
diff --git a/gdb/config/mips/decstation.mh b/gdb/config/mips/decstation.mh
index 89ce310b6fa..63de3da10b5 100644
--- a/gdb/config/mips/decstation.mh
+++ b/gdb/config/mips/decstation.mh
@@ -1,4 +1,4 @@
-# Host: Little-endian MIPS machine such as DECstation.
-XM_FILE= xm-mips.h
-NAT_FILE= nm-mips.h
-NATDEPFILES= infptrace.o inftarg.o corelow.o mips-nat.o fork-child.o
+# OBSOLETE # Host: Little-endian MIPS machine such as DECstation.
+# OBSOLETE XM_FILE= xm-mips.h
+# OBSOLETE NAT_FILE= nm-mips.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o corelow.o mips-nat.o fork-child.o
diff --git a/gdb/config/mips/embed64.mt b/gdb/config/mips/embed64.mt
deleted file mode 100644
index 2944be10e45..00000000000
--- a/gdb/config/mips/embed64.mt
+++ /dev/null
@@ -1,4 +0,0 @@
-TDEPFILES= mips-tdep.o remote-mips.o
-TM_FILE= tm-mips64.h
-SIM_OBS = remote-sim.o
-SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/linux64.mt b/gdb/config/mips/linux64.mt
deleted file mode 100644
index 985d8f57c15..00000000000
--- a/gdb/config/mips/linux64.mt
+++ /dev/null
@@ -1,7 +0,0 @@
-# Target: Linux/MIPS w/ support for 64-bit ABIs
-TDEPFILES= mips-tdep.o mips-linux-tdep.o corelow.o \
- solib.o solib-svr4.o
-TM_FILE= tm-linux64.h
-
-SIM_OBS = remote-sim.o
-SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/littlemips.mh b/gdb/config/mips/littlemips.mh
index 581a9084e3f..30c40ad847c 100644
--- a/gdb/config/mips/littlemips.mh
+++ b/gdb/config/mips/littlemips.mh
@@ -1,3 +1,3 @@
-# Host: Little-endian MIPS machine such as DECstation.
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
-XM_FILE= xm-mips.h
+# OBSOLETE # Host: Little-endian MIPS machine such as DECstation.
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
+# OBSOLETE XM_FILE= xm-mips.h
diff --git a/gdb/config/mips/mipsv4.mt b/gdb/config/mips/mipsv4.mt
index 6d3b47d024a..13320c20ae6 100644
--- a/gdb/config/mips/mipsv4.mt
+++ b/gdb/config/mips/mipsv4.mt
@@ -1,3 +1,3 @@
-# Target: MIPS running SVR4
-TDEPFILES= mips-tdep.o
-TM_FILE= tm-mipsv4.h
+# OBSOLETE # Target: MIPS running SVR4
+# OBSOLETE TDEPFILES= mips-tdep.o
+# OBSOLETE TM_FILE= tm-mipsv4.h
diff --git a/gdb/config/mips/news-mips.mh b/gdb/config/mips/news-mips.mh
index 5cc138f38e4..f2c7f89b3ed 100644
--- a/gdb/config/mips/news-mips.mh
+++ b/gdb/config/mips/news-mips.mh
@@ -1,3 +1,3 @@
-# Host: Big-endian MIPS machine such as Sony News
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o mips-nat.o
-NAT_FILE= nm-news-mips.h
+# OBSOLETE # Host: Big-endian MIPS machine such as Sony News
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o mips-nat.o
+# OBSOLETE NAT_FILE= nm-news-mips.h
diff --git a/gdb/config/mips/nm-mips.h b/gdb/config/mips/nm-mips.h
index 7b61d83e6b9..f20ddf1d466 100644
--- a/gdb/config/mips/nm-mips.h
+++ b/gdb/config/mips/nm-mips.h
@@ -1,34 +1,34 @@
-/* Native definitions for GDB on DECstations, Sony News. and MIPS Riscos systems
- Copyright 1986, 1987, 1989, 1992, 1995, 1996, 2000
- Free Software Foundation, Inc.
- Contributed by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin
- and by Alessandro Forin(af@cs.cmu.edu) at CMU
-
- 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. */
-
-/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
-#define FETCH_INFERIOR_REGISTERS
-
-/* Figure out where the longjmp will land. We expect that we have just entered
- longjmp and haven't yet setup the stack frame, so the args are still in the
- argument regs. a0 (CALL_ARG0) points at the jmp_buf structure from which we
- extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
- This routine returns true on success */
-
-#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
-extern int get_longjmp_target (CORE_ADDR *);
+// OBSOLETE /* Native definitions for GDB on DECstations, Sony News. and MIPS Riscos systems
+// OBSOLETE Copyright 1986, 1987, 1989, 1992, 1995, 1996, 2000
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE Contributed by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin
+// OBSOLETE and by Alessandro Forin(af@cs.cmu.edu) at CMU
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
+// OBSOLETE #define FETCH_INFERIOR_REGISTERS
+// OBSOLETE
+// OBSOLETE /* Figure out where the longjmp will land. We expect that we have just entered
+// OBSOLETE longjmp and haven't yet setup the stack frame, so the args are still in the
+// OBSOLETE argument regs. a0 (CALL_ARG0) points at the jmp_buf structure from which we
+// OBSOLETE extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
+// OBSOLETE This routine returns true on success */
+// OBSOLETE
+// OBSOLETE #define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
+// OBSOLETE extern int get_longjmp_target (CORE_ADDR *);
diff --git a/gdb/config/mips/nm-news-mips.h b/gdb/config/mips/nm-news-mips.h
index 9f80eb55709..15d9b7b2c36 100644
--- a/gdb/config/mips/nm-news-mips.h
+++ b/gdb/config/mips/nm-news-mips.h
@@ -1,43 +1,43 @@
-/* Definitions to make GDB run on a mips box under 4.3bsd.
- Copyright 1986, 1987, 1989, 1993, 1996 Free Software Foundation, Inc.
- Contributed by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin
- and by Alessandro Forin(af@cs.cmu.edu) at CMU
-
- 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 NM_NEWS_MIPS_H
-#define NM_NEWS_MIPS_H 1
-
-/* Needed for RISC NEWS core files. */
-#include <machine/machparam.h>
-#include <sys/types.h>
-#define KERNEL_U_ADDR UADDR
-
-#define REGISTER_U_ADDR(addr, blockend, regno) \
- if (regno < 38) addr = (NBPG*UPAGES) + (regno - 38)*sizeof(int);\
- else addr = 0; /* ..somewhere in the pcb */
-
-/* Kernel is a bit tenacious about sharing text segments, disallowing bpts. */
-#define ONE_PROCESS_WRITETEXT
-
-#include "mips/nm-mips.h"
-
-/* Apparently not in <sys/types.h> */
-typedef int pid_t;
-
-#endif /* NM_NEWS_MIPS_H */
+// OBSOLETE /* Definitions to make GDB run on a mips box under 4.3bsd.
+// OBSOLETE Copyright 1986, 1987, 1989, 1993, 1996 Free Software Foundation, Inc.
+// OBSOLETE Contributed by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin
+// OBSOLETE and by Alessandro Forin(af@cs.cmu.edu) at CMU
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #ifndef NM_NEWS_MIPS_H
+// OBSOLETE #define NM_NEWS_MIPS_H 1
+// OBSOLETE
+// OBSOLETE /* Needed for RISC NEWS core files. */
+// OBSOLETE #include <machine/machparam.h>
+// OBSOLETE #include <sys/types.h>
+// OBSOLETE #define KERNEL_U_ADDR UADDR
+// OBSOLETE
+// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
+// OBSOLETE if (regno < 38) addr = (NBPG*UPAGES) + (regno - 38)*sizeof(int);\
+// OBSOLETE else addr = 0; /* ..somewhere in the pcb */
+// OBSOLETE
+// OBSOLETE /* Kernel is a bit tenacious about sharing text segments, disallowing bpts. */
+// OBSOLETE #define ONE_PROCESS_WRITETEXT
+// OBSOLETE
+// OBSOLETE #include "mips/nm-mips.h"
+// OBSOLETE
+// OBSOLETE /* Apparently not in <sys/types.h> */
+// OBSOLETE typedef int pid_t;
+// OBSOLETE
+// OBSOLETE #endif /* NM_NEWS_MIPS_H */
diff --git a/gdb/config/mips/nm-riscos.h b/gdb/config/mips/nm-riscos.h
index 7f68b677092..dba51b2775c 100644
--- a/gdb/config/mips/nm-riscos.h
+++ b/gdb/config/mips/nm-riscos.h
@@ -1,60 +1,60 @@
-/* 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. */
-
-/* MIPS running RISC/os 4.52C. */
-
-#define PCB_OFFSET(FIELD) ((int)&((struct user*)0)->u_pcb.FIELD)
-
-/* RISC/os 5.0 defines this in machparam.h. */
-#include <bsd43/machine/machparam.h>
-#define NBPG BSD43_NBPG
-#define UPAGES BSD43_UPAGES
-
-/* Where is this used? I don't see any uses in mips-nat.c, and I don't think
- the uses in infptrace.c are used if FETCH_INFERIOR_REGISTERS is defined.
- Does the compiler react badly to "extern CORE_ADDR kernel_u_addr" (even
- if never referenced)? */
-#define KERNEL_U_ADDR BSD43_UADDR
-
-#define REGISTER_U_ADDR(addr, blockend, regno) \
- if (regno < FP0_REGNUM) \
- addr = UPAGES*NBPG-EF_SIZE+4*((regno)+EF_AT-1); \
- else if (regno < PC_REGNUM) \
- addr = PCB_OFFSET(pcb_fpregs[0]) + 4*(regno-FP0_REGNUM); \
- else if (regno == PS_REGNUM) \
- addr = UPAGES*NBPG-EF_SIZE+4*EF_SR; \
- else if (regno == BADVADDR_REGNUM) \
- addr = UPAGES*NBPG-EF_SIZE+4*EF_BADVADDR; \
- else if (regno == LO_REGNUM) \
- addr = UPAGES*NBPG-EF_SIZE+4*EF_MDLO; \
- else if (regno == HI_REGNUM) \
- addr = UPAGES*NBPG-EF_SIZE+4*EF_MDHI; \
- else if (regno == CAUSE_REGNUM) \
- addr = UPAGES*NBPG-EF_SIZE+4*EF_CAUSE; \
- else if (regno == PC_REGNUM) \
- addr = UPAGES*NBPG-EF_SIZE+4*EF_EPC; \
- else if (regno < FCRCS_REGNUM) \
- addr = PCB_OFFSET(pcb_fpregs[0]) + 4*(regno-FP0_REGNUM); \
- else if (regno == FCRCS_REGNUM) \
- addr = PCB_OFFSET(pcb_fpc_csr); \
- else if (regno == FCRIR_REGNUM) \
- addr = PCB_OFFSET(pcb_fpc_eir); \
- else \
- addr = 0;
-
-#include "mips/nm-mips.h"
-
-/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
-#define FETCH_INFERIOR_REGISTERS
+// OBSOLETE /* This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* MIPS running RISC/os 4.52C. */
+// OBSOLETE
+// OBSOLETE #define PCB_OFFSET(FIELD) ((int)&((struct user*)0)->u_pcb.FIELD)
+// OBSOLETE
+// OBSOLETE /* RISC/os 5.0 defines this in machparam.h. */
+// OBSOLETE #include <bsd43/machine/machparam.h>
+// OBSOLETE #define NBPG BSD43_NBPG
+// OBSOLETE #define UPAGES BSD43_UPAGES
+// OBSOLETE
+// OBSOLETE /* Where is this used? I don't see any uses in mips-nat.c, and I don't think
+// OBSOLETE the uses in infptrace.c are used if FETCH_INFERIOR_REGISTERS is defined.
+// OBSOLETE Does the compiler react badly to "extern CORE_ADDR kernel_u_addr" (even
+// OBSOLETE if never referenced)? */
+// OBSOLETE #define KERNEL_U_ADDR BSD43_UADDR
+// OBSOLETE
+// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
+// OBSOLETE if (regno < FP0_REGNUM) \
+// OBSOLETE addr = UPAGES*NBPG-EF_SIZE+4*((regno)+EF_AT-1); \
+// OBSOLETE else if (regno < PC_REGNUM) \
+// OBSOLETE addr = PCB_OFFSET(pcb_fpregs[0]) + 4*(regno-FP0_REGNUM); \
+// OBSOLETE else if (regno == PS_REGNUM) \
+// OBSOLETE addr = UPAGES*NBPG-EF_SIZE+4*EF_SR; \
+// OBSOLETE else if (regno == mips_regnum (current_gdbarch)->badvaddr) \
+// OBSOLETE addr = UPAGES*NBPG-EF_SIZE+4*EF_BADVADDR; \
+// OBSOLETE else if (regno == mips_regnum (current_gdbarch)->lo) \
+// OBSOLETE addr = UPAGES*NBPG-EF_SIZE+4*EF_MDLO; \
+// OBSOLETE else if (regno == mips_regnum (current_gdbarch)->hi) \
+// OBSOLETE addr = UPAGES*NBPG-EF_SIZE+4*EF_MDHI; \
+// OBSOLETE else if (regno == mips_regnum (current_gdbarch)->cause) \
+// OBSOLETE addr = UPAGES*NBPG-EF_SIZE+4*EF_CAUSE; \
+// OBSOLETE else if (regno == mips_regnum (current_gdbarch)->pc) \
+// OBSOLETE addr = UPAGES*NBPG-EF_SIZE+4*EF_EPC; \
+// OBSOLETE else if (regno < mips_regnum (current_gdbarch)->fp_control_status) \
+// OBSOLETE addr = PCB_OFFSET(pcb_fpregs[0]) + 4*(regno-FP0_REGNUM); \
+// OBSOLETE else if (regno == mips_regnum (current_gdbarch)->fp_control_status) \
+// OBSOLETE addr = PCB_OFFSET(pcb_fpc_csr); \
+// OBSOLETE else if (regno == mips_regnum (current_gdbarch)->fp_implementation_revision) \
+// OBSOLETE addr = PCB_OFFSET(pcb_fpc_eir); \
+// OBSOLETE else \
+// OBSOLETE addr = 0;
+// OBSOLETE
+// OBSOLETE #include "mips/nm-mips.h"
+// OBSOLETE
+// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
+// OBSOLETE #define FETCH_INFERIOR_REGISTERS
diff --git a/gdb/config/mips/riscos.mh b/gdb/config/mips/riscos.mh
index 6a3192f382b..0a1c31c65f1 100644
--- a/gdb/config/mips/riscos.mh
+++ b/gdb/config/mips/riscos.mh
@@ -1,16 +1,16 @@
-# Host: MIPS running RISC/os
-
-XM_FILE= xm-riscos.h
-
-NAT_FILE= nm-riscos.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o mips-nat.o
-
-MH_CFLAGS=-Wf,-XNh10000
-
-# ptrace(2) apparently has problems in the BSD environment. No workaround is
-# known except to select the sysv environment. Could we use /proc instead?
-# These "sysv environments" and "bsd environments" often end up being a pain.
-#
-# This is not part of CFLAGS because perhaps not all C compilers have this
-# option.
-CC= cc -systype sysv
+# OBSOLETE # Host: MIPS running RISC/os
+# OBSOLETE
+# OBSOLETE XM_FILE= xm-riscos.h
+# OBSOLETE
+# OBSOLETE NAT_FILE= nm-riscos.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o mips-nat.o
+# OBSOLETE
+# OBSOLETE MH_CFLAGS=-Wf,-XNh10000
+# OBSOLETE
+# OBSOLETE # ptrace(2) apparently has problems in the BSD environment. No workaround is
+# OBSOLETE # known except to select the sysv environment. Could we use /proc instead?
+# OBSOLETE # These "sysv environments" and "bsd environments" often end up being a pain.
+# OBSOLETE #
+# OBSOLETE # This is not part of CFLAGS because perhaps not all C compilers have this
+# OBSOLETE # option.
+# OBSOLETE CC= cc -systype sysv
diff --git a/gdb/config/mips/tm-irix5.h b/gdb/config/mips/tm-irix5.h
index 61e809debd1..fdc17567af5 100644
--- a/gdb/config/mips/tm-irix5.h
+++ b/gdb/config/mips/tm-irix5.h
@@ -1,6 +1,7 @@
/* Target machine description for SGI Iris under Irix 5, for GDB.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1998, 2000
- Free Software Foundation, Inc.
+
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2003 Free
+ Software Foundation, Inc.
This file is part of GDB.
@@ -21,45 +22,6 @@
#include "mips/tm-mips.h"
-/* Redefine register numbers for SGI. */
-
-#undef MIPS_REGISTER_NAMES
-#undef FP0_REGNUM
-#undef PC_REGNUM
-#undef HI_REGNUM
-#undef LO_REGNUM
-#undef CAUSE_REGNUM
-#undef BADVADDR_REGNUM
-#undef FCRCS_REGNUM
-#undef FCRIR_REGNUM
-
-/* Initializer for an array of names for registers 32 and above.
- There should be NUM_REGS-32 strings in this initializer. */
-
-#define MIPS_REGISTER_NAMES \
- { "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
- "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
- "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",\
- "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",\
- "pc", "cause", "bad", "hi", "lo", "fsr", "fir" \
- }
-
-/* Register numbers of various important registers.
- Note that some of these values are "real" register numbers,
- and correspond to the general registers of the machine,
- and some are "phony" register numbers which are too large
- to be actual register numbers as far as the user is concerned
- but do serve to get the desired values when passed to read_register. */
-
-#define FP0_REGNUM 32 /* Floating point register 0 (single float) */
-#define PC_REGNUM 64 /* Contains program counter */
-#define CAUSE_REGNUM 65 /* describes last exception */
-#define BADVADDR_REGNUM 66 /* bad vaddr for addressing exception */
-#define HI_REGNUM 67 /* Multiple/divide temp */
-#define LO_REGNUM 68 /* ... */
-#define FCRCS_REGNUM 69 /* FP control/status */
-#define FCRIR_REGNUM 70 /* FP implementation/revision */
-
/* Offsets for register values in _sigtramp frame.
sigcontext is immediately above the _sigtramp frame on Irix. */
#define SIGFRAME_BASE 0x0
@@ -67,36 +29,9 @@
#define SIGFRAME_REGSAVE_OFF (SIGFRAME_BASE + 3 * 4)
#define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 3 * 4 + 32 * 4 + 4)
-/* FIXME: cagney/2000-04-04: Testing the _MIPS_SIM_NABI32 and
- _MIPS_SIM in a tm-*.h file is simply wrong! Those are
- host-dependant macros (provided by /usr/include) and stop any
- chance of the target being cross compiled */
-#if defined (_MIPS_SIM_NABI32) && _MIPS_SIM == _MIPS_SIM_NABI32
-/*
- * Irix 6 (n32 ABI) has 32-bit GP regs and 64-bit FP regs
- */
-
-#undef MIPS_REGISTER_BYTE
-#define MIPS_REGISTER_BYTE(N) \
- (((N) < FP0_REGNUM) ? (N) * MIPS_REGSIZE : \
- ((N) < FP0_REGNUM + 32) ? \
- FP0_REGNUM * MIPS_REGSIZE + \
- ((N) - FP0_REGNUM) * sizeof(double) : \
- 32 * sizeof(double) + ((N) - 32) * MIPS_REGSIZE)
-
-#undef MIPS_REGISTER_TYPE
-#define MIPS_REGISTER_TYPE(N) \
- (((N) >= FP0_REGNUM && (N) < FP0_REGNUM+32) ? builtin_type_double \
- : ((N) == 32 /*SR*/) ? builtin_type_uint32 \
- : ((N) >= 70 && (N) <= 89) ? builtin_type_uint32 \
- : builtin_type_int)
-
-#endif /* N32 */
-
-
/* The signal handler trampoline is called _sigtramp. */
#undef IN_SIGTRAMP
-#define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigtramp", name))
+#define IN_SIGTRAMP(pc, name) ((name) && DEPRECATED_STREQ ("_sigtramp", name))
/* Irix 5 saves a full 64 bits for each register. We skip 2 * 4 to
get to the saved PC (the register mask and status register are both
@@ -110,4 +45,3 @@
#define SIGFRAME_REGSAVE_OFF (SIGFRAME_BASE + 2 * 4 + 8 + 4)
#undef SIGFRAME_FPREGSAVE_OFF
#define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 2 * 4 + 8 + 32 * 8 + 4)
-#define SIGFRAME_REG_SIZE 8
diff --git a/gdb/config/mips/tm-irix6.h b/gdb/config/mips/tm-irix6.h
index 0d4fc0c2a35..272cafeac07 100644
--- a/gdb/config/mips/tm-irix6.h
+++ b/gdb/config/mips/tm-irix6.h
@@ -1,6 +1,6 @@
/* Target machine description for SGI Iris under Irix 6.x, for GDB.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,60 +19,12 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "mips/tm-mips64.h"
+#include "mips/tm-mips.h"
#include "solib.h"
-/* Redefine register numbers for SGI. */
-
-#undef MIPS_REGISTER_NAMES
-#undef FP0_REGNUM
-#undef PC_REGNUM
-#undef HI_REGNUM
-#undef LO_REGNUM
-#undef CAUSE_REGNUM
-#undef BADVADDR_REGNUM
-#undef FCRCS_REGNUM
-#undef FCRIR_REGNUM
-
-/* Initializer for an array of names for registers 32 and above.
- There should be NUM_REGS-32 strings in this initializer. */
-
-#define MIPS_REGISTER_NAMES \
- { "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
- "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
- "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",\
- "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",\
- "pc", "cause", "bad", "hi", "lo", "fsr", "fir" \
- }
-
-/* Register numbers of various important registers.
- Note that some of these values are "real" register numbers,
- and correspond to the general registers of the machine,
- and some are "phony" register numbers which are too large
- to be actual register numbers as far as the user is concerned
- but do serve to get the desired values when passed to read_register. */
-
-#define FP0_REGNUM 32 /* Floating point register 0 (single float) */
-#define PC_REGNUM 64 /* Contains program counter */
-#define CAUSE_REGNUM 65 /* describes last exception */
-#define BADVADDR_REGNUM 66 /* bad vaddr for addressing exception */
-#define HI_REGNUM 67 /* Multiple/divide temp */
-#define LO_REGNUM 68 /* ... */
-#define FCRCS_REGNUM 69 /* FP control/status */
-#define FCRIR_REGNUM 70 /* FP implementation/revision */
-
-
-#undef MIPS_REGISTER_BYTE
-#define MIPS_REGISTER_BYTE(N) \
- (((N) < FP0_REGNUM) ? (N) * MIPS_REGSIZE : \
- ((N) < FP0_REGNUM + 32) ? \
- FP0_REGNUM * MIPS_REGSIZE + \
- ((N) - FP0_REGNUM) * sizeof(double) : \
- 32 * sizeof(double) + ((N) - 32) * MIPS_REGSIZE)
-
/* The signal handler trampoline is called _sigtramp. */
#undef IN_SIGTRAMP
-#define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigtramp", name))
+#define IN_SIGTRAMP(pc, name) ((name) && DEPRECATED_STREQ ("_sigtramp", name))
/* Offsets for register values in _sigtramp frame.
sigcontext is immediately above the _sigtramp frame on Irix. */
@@ -91,11 +43,3 @@
#define SIGFRAME_REGSAVE_OFF (SIGFRAME_BASE + 2 * 4 + 8 + 4)
#undef SIGFRAME_FPREGSAVE_OFF
#define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 2 * 4 + 8 + 32 * 8 + 4)
-#define SIGFRAME_REG_SIZE 8
-
-/* Undefine those methods which have been multiarched. */
-
-/* Undefine MIPS_REGISTER_TYPE, so that GDB uses real C code in
- mips_register_type() to return the register type, instead of
- relying on this macro. */
-#undef MIPS_REGISTER_TYPE
diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h
index 59aeb5dcc2a..be0d6b75eb1 100644
--- a/gdb/config/mips/tm-mips.h
+++ b/gdb/config/mips/tm-mips.h
@@ -45,28 +45,6 @@ extern int mips_step_skips_delay (CORE_ADDR);
#define STEP_SKIPS_DELAY_P (1)
#define STEP_SKIPS_DELAY(pc) (mips_step_skips_delay (pc))
-/* The size of a register. This is predefined in tm-mips64.h. */
-
-#ifndef MIPS_REGSIZE
-#define MIPS_REGSIZE 4
-#endif
-
-/* Initializer for an array of names for registers 32 and above.
- There should be NUM_REGS-32 strings in this initializer. */
-
-#ifndef MIPS_REGISTER_NAMES
-#define MIPS_REGISTER_NAMES \
- { "sr", "lo", "hi", "bad", "cause","pc", \
- "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
- "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
- "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",\
- "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",\
- "fsr", "fir", ""/*"fp"*/, "", \
- "", "", "", "", "", "", "", "", \
- "", "", "", "", "", "", "", "", \
- }
-#endif
-
/* Register numbers of various important registers.
Note that some of these values are "real" register numbers,
and correspond to the general registers of the machine,
@@ -81,36 +59,11 @@ extern int mips_step_skips_delay (CORE_ADDR);
#define SP_REGNUM 29 /* Contains address of top of stack */
#define RA_REGNUM 31 /* Contains return address value */
#define PS_REGNUM 32 /* Contains processor status */
-#define HI_REGNUM 34 /* Multiple/divide temp */
-#define LO_REGNUM 33 /* ... */
-#define BADVADDR_REGNUM 35 /* bad vaddr for addressing exception */
-#define CAUSE_REGNUM 36 /* describes last exception */
-#define PC_REGNUM 37 /* Contains program counter */
-#define FP0_REGNUM 38 /* Floating point register 0 (single float) */
-#define FPA0_REGNUM (FP0_REGNUM+12) /* First float argument register */
-#define FCRCS_REGNUM 70 /* FP control/status */
-#define FCRIR_REGNUM 71 /* FP implementation/revision */
#define UNUSED_REGNUM 73 /* Never used, FIXME */
#define FIRST_EMBED_REGNUM 74 /* First CP0 register for embedded use */
#define PRID_REGNUM 89 /* Processor ID */
#define LAST_EMBED_REGNUM 89 /* Last one */
-/* Index within `registers' of the first byte of the space for
- register N. */
-
-#define MIPS_REGISTER_BYTE(N) ((N) * MIPS_REGSIZE)
-
-/* Return the GDB type object for the "standard" data type of data in
- register N. */
-
-#ifndef MIPS_REGISTER_TYPE
-#define MIPS_REGISTER_TYPE(N) \
- (((N) >= FP0_REGNUM && (N) < FP0_REGNUM+32) ? builtin_type_float \
- : ((N) == 32 /*SR*/) ? builtin_type_uint32 \
- : ((N) >= 70 && (N) <= 89) ? builtin_type_uint32 \
- : builtin_type_int)
-#endif
-
/* Special symbol found in blocks associated with routines. We can hang
mips_extra_func_info_t's off of this. */
@@ -150,9 +103,6 @@ extern struct frame_info *setup_arbitrary_frame (int, CORE_ADDR *);
extern CORE_ADDR sigtramp_address, sigtramp_end;
extern void fixup_sigtramp (void);
-/* Defined in mips-tdep.c and used in remote-mips.c */
-extern char *mips_read_processor_type (void);
-
/* Functions for dealing with MIPS16 call and return stubs. */
#define IGNORE_HELPER_CALL(pc) mips_ignore_helper (pc)
extern int mips_ignore_helper (CORE_ADDR pc);
@@ -165,8 +115,5 @@ typedef unsigned long t_inst; /* Integer big enough to hold an instruction */
#endif /* TM_MIPS_H */
-/* Command to set the processor type. */
-extern void mips_set_processor_type_command (char *, int);
-
/* Single step based on where the current instruction will take us. */
extern void mips_software_single_step (enum target_signal, int);
diff --git a/gdb/config/mips/tm-mips64.h b/gdb/config/mips/tm-mips64.h
deleted file mode 100644
index 2547e86f482..00000000000
--- a/gdb/config/mips/tm-mips64.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Target machine parameters for MIPS r4000
- Copyright 1994, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
- Contributed by Ian Lance Taylor (ian@cygnus.com)
-
- 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. */
-
-/* Use eight byte registers. */
-#define MIPS_REGSIZE 8
-
-/* define 8 byte register type */
-#define MIPS_REGISTER_TYPE(N) \
- (((N) >= FP0_REGNUM && (N) < FP0_REGNUM+32) ? builtin_type_double \
- : ((N) == 32 /*SR*/) ? builtin_type_uint32 \
- : ((N) >= 70 && (N) <= 89) ? builtin_type_uint32 \
- : builtin_type_long_long)
-
-/* Load double words in CALL_DUMMY. */
-#define OP_LDFPR 065 /* ldc1 */
-#define OP_LDGPR 067 /* ld */
-
-/* Get the basic MIPS definitions. */
-#include "mips/tm-mips.h"
diff --git a/gdb/config/mips/tm-mipsv4.h b/gdb/config/mips/tm-mipsv4.h
index 37f9e464790..94607414f3b 100644
--- a/gdb/config/mips/tm-mipsv4.h
+++ b/gdb/config/mips/tm-mipsv4.h
@@ -1,37 +1,37 @@
-/* Target machine description for MIPS running SVR4, for GDB.
- Copyright 1994, 1995, 1998, 1999, 2000 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 "mips/tm-mips.h"
-#include "config/tm-sysv4.h"
-
-/* The signal handler trampoline is called _sigtramp. */
-#undef IN_SIGTRAMP
-#define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigtramp", name))
-
-/* On entry to the signal handler trampoline, an ucontext is already
- pushed on the stack. We can get at the saved registers via the
- mcontext which is contained within the ucontext. */
-#define SIGFRAME_BASE 0
-#define SIGFRAME_REGSAVE_OFF (SIGFRAME_BASE + 40)
-#define SIGFRAME_PC_OFF (SIGFRAME_BASE + 40 + 35 * 4)
-#define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 40 + 36 * 4)
-
-/* Convert a DWARF register number to a gdb REGNUM. */
-#define DWARF_REG_TO_REGNUM(num) ((num) < 32 ? (num) : (num)+FP0_REGNUM-32)
+// OBSOLETE /* Target machine description for MIPS running SVR4, for GDB.
+// OBSOLETE Copyright 1994, 1995, 1998, 1999, 2000 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "mips/tm-mips.h"
+// OBSOLETE #include "config/tm-sysv4.h"
+// OBSOLETE
+// OBSOLETE /* The signal handler trampoline is called _sigtramp. */
+// OBSOLETE #undef IN_SIGTRAMP
+// OBSOLETE #define IN_SIGTRAMP(pc, name) ((name) && DEPRECATED_STREQ ("_sigtramp", name))
+// OBSOLETE
+// OBSOLETE /* On entry to the signal handler trampoline, an ucontext is already
+// OBSOLETE pushed on the stack. We can get at the saved registers via the
+// OBSOLETE mcontext which is contained within the ucontext. */
+// OBSOLETE #define SIGFRAME_BASE 0
+// OBSOLETE #define SIGFRAME_REGSAVE_OFF (SIGFRAME_BASE + 40)
+// OBSOLETE #define SIGFRAME_PC_OFF (SIGFRAME_BASE + 40 + 35 * 4)
+// OBSOLETE #define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 40 + 36 * 4)
+// OBSOLETE
+// OBSOLETE /* Convert a DWARF register number to a gdb REGNUM. */
+// OBSOLETE #define DWARF_REG_TO_REGNUM(num) ((num) < 32 ? (num) : (num)+FP0_REGNUM-32)
diff --git a/gdb/config/mips/tx39.mt b/gdb/config/mips/tx39.mt
deleted file mode 100644
index 8b4c1a92c24..00000000000
--- a/gdb/config/mips/tx39.mt
+++ /dev/null
@@ -1,5 +0,0 @@
-# Target: Big-endian mips board, typically an IDT.
-TDEPFILES= mips-tdep.o remote-mips.o dve3900-rom.o monitor.o dsrec.o
-TM_FILE= tm-tx39.h
-SIM_OBS = remote-sim.o
-SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/tx39l.mt b/gdb/config/mips/tx39l.mt
deleted file mode 100644
index 8b4c1a92c24..00000000000
--- a/gdb/config/mips/tx39l.mt
+++ /dev/null
@@ -1,5 +0,0 @@
-# Target: Big-endian mips board, typically an IDT.
-TDEPFILES= mips-tdep.o remote-mips.o dve3900-rom.o monitor.o dsrec.o
-TM_FILE= tm-tx39.h
-SIM_OBS = remote-sim.o
-SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/xm-mips.h b/gdb/config/mips/xm-mips.h
index c1f53b53ed9..bc3aa6e40c4 100644
--- a/gdb/config/mips/xm-mips.h
+++ b/gdb/config/mips/xm-mips.h
@@ -1,59 +1,59 @@
-/* Definitions to make GDB run on a mips box under 4.3bsd.
- Copyright 1986, 1987, 1989, 1993, 1994, 1995, 1996, 1998
- Free Software Foundation, Inc.
- Contributed by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin
- and by Alessandro Forin(af@cs.cmu.edu) at CMU
-
- 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. */
-
-#ifdef ultrix
-/* Needed for DECstation core files. */
-#include <machine/param.h>
-#define KERNEL_U_ADDR UADDR
-
-/* Native Ultrix cc has broken long long support. */
-#ifndef __GNUC__
-#undef CC_HAS_LONG_LONG
-#endif
-#endif
-
-#if ! defined (__GNUC__) && ! defined (offsetof)
-#define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
-#endif
-
-/* Only used for core files on DECstations.
- First four registers at u.u_ar0 are saved arguments, and
- there is no r0 saved. Float registers are saved
- in u_pcb.pcb_fpregs, not relative to u.u_ar0. */
-
-#define REGISTER_U_ADDR(addr, blockend, regno) \
- { \
- if (regno < FP0_REGNUM) \
- addr = blockend + sizeof(int) * (4 + regno - 1); \
- else \
- addr = offsetof (struct user, u_pcb.pcb_fpregs[0]) + \
- sizeof (int) * (regno - FP0_REGNUM); \
- }
-
-/* Kernel is a bit tenacious about sharing text segments, disallowing bpts. */
-#define ONE_PROCESS_WRITETEXT
-
-/* HAVE_SGTTY also works, last we tried.
-
- But we have termios, at least as of Ultrix 4.2A, so use it. */
-#define HAVE_TERMIOS
+// OBSOLETE /* Definitions to make GDB run on a mips box under 4.3bsd.
+// OBSOLETE Copyright 1986, 1987, 1989, 1993, 1994, 1995, 1996, 1998
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE Contributed by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin
+// OBSOLETE and by Alessandro Forin(af@cs.cmu.edu) at CMU
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #ifdef ultrix
+// OBSOLETE /* Needed for DECstation core files. */
+// OBSOLETE #include <machine/param.h>
+// OBSOLETE #define KERNEL_U_ADDR UADDR
+// OBSOLETE
+// OBSOLETE /* Native Ultrix cc has broken long long support. */
+// OBSOLETE #ifndef __GNUC__
+// OBSOLETE #undef CC_HAS_LONG_LONG
+// OBSOLETE #endif
+// OBSOLETE #endif
+// OBSOLETE
+// OBSOLETE #if ! defined (__GNUC__) && ! defined (offsetof)
+// OBSOLETE #define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
+// OBSOLETE #endif
+// OBSOLETE
+// OBSOLETE /* Only used for core files on DECstations.
+// OBSOLETE First four registers at u.u_ar0 are saved arguments, and
+// OBSOLETE there is no r0 saved. Float registers are saved
+// OBSOLETE in u_pcb.pcb_fpregs, not relative to u.u_ar0. */
+// OBSOLETE
+// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
+// OBSOLETE { \
+// OBSOLETE if (regno < FP0_REGNUM) \
+// OBSOLETE addr = blockend + sizeof(int) * (4 + regno - 1); \
+// OBSOLETE else \
+// OBSOLETE addr = offsetof (struct user, u_pcb.pcb_fpregs[0]) + \
+// OBSOLETE sizeof (int) * (regno - FP0_REGNUM); \
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Kernel is a bit tenacious about sharing text segments, disallowing bpts. */
+// OBSOLETE #define ONE_PROCESS_WRITETEXT
+// OBSOLETE
+// OBSOLETE /* HAVE_SGTTY also works, last we tried.
+// OBSOLETE
+// OBSOLETE But we have termios, at least as of Ultrix 4.2A, so use it. */
+// OBSOLETE #define HAVE_TERMIOS
diff --git a/gdb/config/mips/xm-mipsv4.h b/gdb/config/mips/xm-mipsv4.h
index eccb2964d05..1f39e31ae1d 100644
--- a/gdb/config/mips/xm-mipsv4.h
+++ b/gdb/config/mips/xm-mipsv4.h
@@ -1,22 +1,22 @@
-/* Definitions for MIPS running SVR4 hosting support.
-
- Copyright 1994 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 "config/xm-sysv4.h"
+// OBSOLETE /* Definitions for MIPS running SVR4 hosting support.
+// OBSOLETE
+// OBSOLETE Copyright 1994 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "config/xm-sysv4.h"
diff --git a/gdb/config/mips/xm-riscos.h b/gdb/config/mips/xm-riscos.h
index 1f03c5a00a8..d8a65334a66 100644
--- a/gdb/config/mips/xm-riscos.h
+++ b/gdb/config/mips/xm-riscos.h
@@ -1,25 +1,25 @@
-/* Copyright 1993, 1994, 1995 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. */
-
-#define HAVE_TERMIO
-
-#define USG 1
-
-/* setjmp.h requires uid_t. */
-#include <sys/types.h>
+// OBSOLETE /* Copyright 1993, 1994, 1995 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #define HAVE_TERMIO
+// OBSOLETE
+// OBSOLETE #define USG 1
+// OBSOLETE
+// OBSOLETE /* setjmp.h requires uid_t. */
+// OBSOLETE #include <sys/types.h>
diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h
index 9d4b1346ccb..b8c971c5dc5 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -109,24 +109,6 @@ extern int hppa_instruction_nullified (void);
#define INSTRUCTION_NULLIFIED hppa_instruction_nullified ()
#endif
-/* elz: Return a large value, which is stored on the stack at addr.
- This is defined only for the hppa, at this moment. The above macro
- DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS is not called anymore,
- because it assumes that on exit from a called function which
- returns a large structure on the stack, the address of the ret
- structure is still in register 28. Unfortunately this register is
- usually overwritten by the called function itself, on hppa. This is
- specified in the calling convention doc. As far as I know, the only
- way to get the return value is to have the caller tell us where it
- told the callee to put it, rather than have the callee tell us. */
-struct value *hppa_value_returned_from_stack (struct type *valtype,
- CORE_ADDR addr);
-/* FIXME: cagney/2003-09-27: This method should now be redundant.
- Instead, when "struct return convention", the inferior function
- call code always saves and uses the struct return's stack address. */
-#define DEPRECATED_VALUE_RETURNED_FROM_STACK(valtype,addr) \
- hppa_value_returned_from_stack (valtype, addr)
-
extern void hppa_frame_init_saved_regs (struct frame_info *);
#define DEPRECATED_FRAME_INIT_SAVED_REGS(FI) \
hppa_frame_init_saved_regs (FI)
diff --git a/gdb/config/powerpc/tm-linux.h b/gdb/config/powerpc/tm-linux.h
index 25b99049fba..364e1f96280 100644
--- a/gdb/config/powerpc/tm-linux.h
+++ b/gdb/config/powerpc/tm-linux.h
@@ -43,13 +43,6 @@ extern int ppc_linux_in_sigtramp (CORE_ADDR pc, char *func_name);
#define CANNOT_STORE_REGISTER(regno) ((regno) >= MQ_REGNUM)
#endif
-#if 0 /* If skip_prologue() isn't too greedy, we don't need this */
-/* There is some problem with the debugging symbols generated by the
- compiler such that the debugging symbol for the first line of a
- function overlap with the function prologue. */
-#define PROLOGUE_FIRSTLINE_OVERLAP
-#endif
-
/* N_FUN symbols in shared libaries have 0 for their values and need
to be relocated. */
#define SOFUN_ADDRESS_MAYBE_MISSING
diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h
index e8deebc44ad..af8feccdc2f 100644
--- a/gdb/config/sparc/tm-sparc.h
+++ b/gdb/config/sparc/tm-sparc.h
@@ -143,7 +143,7 @@ extern CORE_ADDR sparc_pc_adjust (CORE_ADDR);
never saving it onto the stack. So we better not believe the "p" symbol
descriptor stab. */
-#define USE_REGISTER_NOT_ARG
+#define DEPRECATE_USE_REGISTER_NOT_ARG
/* For acc, there's no need to correct LBRAC entries by guessing how
they should work. In fact, this is harmful because the LBRAC
diff --git a/gdb/config/sparc/tm-sun4sol2.h b/gdb/config/sparc/tm-sun4sol2.h
index 506e9370de6..2247914c50d 100644
--- a/gdb/config/sparc/tm-sun4sol2.h
+++ b/gdb/config/sparc/tm-sun4sol2.h
@@ -30,7 +30,7 @@
/* There are two different signal handler trampolines in Solaris2. */
#define IN_SIGTRAMP(pc, name) \
((name) \
- && (STREQ ("sigacthandler", name) || STREQ ("ucbsigvechandler", name)))
+ && (DEPRECATED_STREQ ("sigacthandler", name) || DEPRECATED_STREQ ("ucbsigvechandler", name)))
/* The signal handler gets a pointer to an ucontext as third argument
if it is called from sigacthandler. This is the offset to the saved
@@ -74,7 +74,5 @@ extern char *sunpro_static_transform_name (char *);
#define STATIC_TRANSFORM_NAME(x) sunpro_static_transform_name (x)
#define IS_STATIC_TRANSFORM_NAME(name) ((name)[0] == '$')
-#define FAULTED_USE_SIGINFO
-
/* Enable handling of shared libraries for a.out executables. */
#define HANDLE_SVR4_EXEC_EMULATORS
diff --git a/gdb/configure b/gdb/configure
index cb1d915f9f4..be034a64dc5 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -29,6 +29,8 @@ ac_help="$ac_help
ac_help="$ac_help
--enable-gdbtk enable gdbtk graphical user interface (GUI)"
ac_help="$ac_help
+ --with-libunwind Use libunwind frame unwinding support"
+ac_help="$ac_help
--enable-profiling enable profiling of GDB"
ac_help="$ac_help
--without-included-regex don't use included regex; this is the default
@@ -585,7 +587,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:589: 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"
@@ -611,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:615: 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
@@ -641,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:645: 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
@@ -692,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:696: 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
@@ -724,7 +726,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:728: 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.
@@ -735,12 +737,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 739 "configure"
+#line 741 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:744: \"$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
@@ -766,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:770: 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:775: 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
@@ -780,7 +782,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$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
@@ -799,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:803: 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
@@ -836,7 +838,7 @@ EOF
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:840: checking how to run the C preprocessor" >&5
+echo "configure:842: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -851,13 +853,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 855 "configure"
+#line 857 "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:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:863: \"$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
:
@@ -868,13 +870,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 872 "configure"
+#line 874 "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:878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:880: \"$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
:
@@ -885,13 +887,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 889 "configure"
+#line 891 "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:895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:897: \"$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
:
@@ -916,9 +918,9 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:920: checking for AIX" >&5
+echo "configure:922: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
-#line 922 "configure"
+#line 924 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
@@ -940,7 +942,7 @@ rm -f conftest*
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:944: checking for POSIXized ISC" >&5
+echo "configure:946: 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
@@ -964,7 +966,7 @@ fi
echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
-echo "configure:968: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:970: 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
@@ -981,7 +983,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 985 "configure"
+#line 987 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
@@ -1018,7 +1020,7 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
; return 0; }
EOF
-if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_prog_cc_stdc="$ac_arg"; break
else
@@ -1089,7 +1091,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:1093: checking host system type" >&5
+echo "configure:1095: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -1110,7 +1112,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:1114: checking target system type" >&5
+echo "configure:1116: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -1128,7 +1130,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:1132: checking build system type" >&5
+echo "configure:1134: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -1166,7 +1168,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:1170: checking for $ac_word" >&5
+echo "configure:1172: 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
@@ -1198,7 +1200,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:1202: checking for $ac_word" >&5
+echo "configure:1204: 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
@@ -1233,7 +1235,7 @@ fi
ALL_LINGUAS=
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1237: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1239: 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
@@ -1262,7 +1264,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:1266: checking for $ac_word" >&5
+echo "configure:1268: 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
@@ -1290,12 +1292,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1294: checking for ANSI C header files" >&5
+echo "configure:1296: 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 1299 "configure"
+#line 1301 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1303,7 +1305,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1309: \"$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*
@@ -1320,7 +1322,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 1324 "configure"
+#line 1326 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1338,7 +1340,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 1342 "configure"
+#line 1344 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1359,7 +1361,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1363 "configure"
+#line 1365 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1370,7 +1372,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1394,12 +1396,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1398: checking for working const" >&5
+echo "configure:1400: 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 1403 "configure"
+#line 1405 "configure"
#include "confdefs.h"
int main() {
@@ -1448,7 +1450,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1469,21 +1471,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1473: checking for inline" >&5
+echo "configure:1475: 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 1480 "configure"
+#line 1482 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -1509,12 +1511,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1513: checking for off_t" >&5
+echo "configure:1515: 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 1518 "configure"
+#line 1520 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1542,12 +1544,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1546: checking for size_t" >&5
+echo "configure:1548: 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 1551 "configure"
+#line 1553 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1577,19 +1579,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:1581: checking for working alloca.h" >&5
+echo "configure:1583: 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 1586 "configure"
+#line 1588 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1595: \"$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
@@ -1610,12 +1612,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1614: checking for alloca" >&5
+echo "configure:1616: 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 1619 "configure"
+#line 1621 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -1643,7 +1645,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1649: \"$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
@@ -1675,12 +1677,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1679: checking whether alloca needs Cray hooks" >&5
+echo "configure:1681: 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 1684 "configure"
+#line 1686 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -1705,12 +1707,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:1709: checking for $ac_func" >&5
+echo "configure:1711: 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 1714 "configure"
+#line 1716 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1733,7 +1735,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1739: \"$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
@@ -1760,7 +1762,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1764: checking stack direction for C alloca" >&5
+echo "configure:1766: 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
@@ -1768,7 +1770,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1772 "configure"
+#line 1774 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -1787,7 +1789,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1793: \"$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
@@ -1812,17 +1814,17 @@ 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:1816: checking for $ac_hdr" >&5
+echo "configure:1818: 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 1821 "configure"
+#line 1823 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1828: \"$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*
@@ -1851,12 +1853,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1855: checking for $ac_func" >&5
+echo "configure:1857: 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 1860 "configure"
+#line 1862 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1879,7 +1881,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1885: \"$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
@@ -1904,7 +1906,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1908: checking for working mmap" >&5
+echo "configure:1910: 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
@@ -1912,7 +1914,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 1916 "configure"
+#line 1918 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2052,7 +2054,7 @@ main()
}
EOF
-if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2058: \"$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
@@ -2080,17 +2082,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:2084: checking for $ac_hdr" >&5
+echo "configure:2086: 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 2089 "configure"
+#line 2091 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2096: \"$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*
@@ -2120,12 +2122,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2124: checking for $ac_func" >&5
+echo "configure:2126: 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 2129 "configure"
+#line 2131 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2148,7 +2150,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2154: \"$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
@@ -2177,12 +2179,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2181: checking for $ac_func" >&5
+echo "configure:2183: 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 2186 "configure"
+#line 2188 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2205,7 +2207,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2211: \"$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
@@ -2239,19 +2241,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2243: checking for LC_MESSAGES" >&5
+echo "configure:2245: 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 2248 "configure"
+#line 2250 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2257: \"$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
@@ -2272,7 +2274,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2276: checking whether NLS is requested" >&5
+echo "configure:2278: 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"
@@ -2292,7 +2294,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2296: checking whether included gettext is requested" >&5
+echo "configure:2298: 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"
@@ -2311,17 +2313,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2315: checking for libintl.h" >&5
+echo "configure:2317: 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 2320 "configure"
+#line 2322 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2327: \"$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*
@@ -2338,19 +2340,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:2342: checking for gettext in libc" >&5
+echo "configure:2344: 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 2347 "configure"
+#line 2349 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2356: \"$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
@@ -2366,7 +2368,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:2370: checking for bindtextdomain in -lintl" >&5
+echo "configure:2372: 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
@@ -2374,7 +2376,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2378 "configure"
+#line 2380 "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
@@ -2385,7 +2387,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2391: \"$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
@@ -2401,19 +2403,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:2405: checking for gettext in libintl" >&5
+echo "configure:2407: 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 2410 "configure"
+#line 2412 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2419: \"$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
@@ -2441,7 +2443,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:2445: checking for $ac_word" >&5
+echo "configure:2447: 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
@@ -2475,12 +2477,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2479: checking for $ac_func" >&5
+echo "configure:2481: 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 2484 "configure"
+#line 2486 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2503,7 +2505,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2509: \"$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
@@ -2530,7 +2532,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:2534: checking for $ac_word" >&5
+echo "configure:2536: 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
@@ -2566,7 +2568,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:2570: checking for $ac_word" >&5
+echo "configure:2572: 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
@@ -2598,7 +2600,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 2602 "configure"
+#line 2604 "configure"
#include "confdefs.h"
int main() {
@@ -2606,7 +2608,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -2638,7 +2640,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:2642: checking for $ac_word" >&5
+echo "configure:2644: 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
@@ -2672,7 +2674,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:2676: checking for $ac_word" >&5
+echo "configure:2678: 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
@@ -2708,7 +2710,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:2712: checking for $ac_word" >&5
+echo "configure:2714: 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
@@ -2798,7 +2800,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2802: checking for catalogs to be installed" >&5
+echo "configure:2804: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -2826,17 +2828,17 @@ echo "configure:2802: 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:2830: checking for linux/version.h" >&5
+echo "configure:2832: 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 2835 "configure"
+#line 2837 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2842: \"$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*
@@ -3095,6 +3097,194 @@ case $host_os in
enable_gdbtk=no ;;
esac
+# Libunwind support.
+# Check whether --with-libunwind or --without-libunwind was given.
+if test "${with_libunwind+set}" = set; then
+ withval="$with_libunwind"
+ case "${withval}" in
+ yes) enable_libunwind=yes ;;
+ no) enable_libunwind=no ;;
+ *) { echo "configure: error: bad value ${withval} for GDB with-libunwind option" 1>&2; exit 1; } ;;
+esac
+else
+
+ for ac_hdr in libunwind.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3116: 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 3121 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3126: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_hdr in libunwind-ia64.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3156: 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 3161 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3166: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
+ enable_libunwind=yes;
+ fi
+
+fi
+
+
+if test x"$enable_libunwind" = xyes; then
+ for ac_hdr in libunwind.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3204: 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 3209 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3214: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_hdr in libunwind-ia64.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3244: 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 3249 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3254: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_LIBUNWIND 1
+EOF
+
+ CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
+ CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
+ CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
+fi
+
# Profiling support.
# Check whether --enable-profiling or --disable-profiling was given.
if test "${enable_profiling+set}" = set; then
@@ -3113,12 +3303,12 @@ fi
for ac_func in monstartup _mcleanup
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3117: checking for $ac_func" >&5
+echo "configure:3307: 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 3122 "configure"
+#line 3312 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3141,7 +3331,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3335: \"$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
@@ -3166,12 +3356,12 @@ fi
done
echo $ac_n "checking for _etext""... $ac_c" 1>&6
-echo "configure:3170: checking for _etext" >&5
+echo "configure:3360: checking for _etext" >&5
if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3175 "configure"
+#line 3365 "configure"
#include "confdefs.h"
#include <stdlib.h>
extern char _etext;
@@ -3180,7 +3370,7 @@ int main() {
free (&_etext);
; return 0; }
EOF
-if { (eval echo configure:3184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_var__etext=yes
else
@@ -3208,19 +3398,19 @@ if test "$enable_profiling" = yes ; then
CFLAGS="$CFLAGS $PROFILE_CFLAGS"
echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
-echo "configure:3212: checking whether $CC supports -pg" >&5
+echo "configure:3402: checking whether $CC supports -pg" >&5
if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3217 "configure"
+#line 3407 "configure"
#include "confdefs.h"
int main() {
int x;
; return 0; }
EOF
-if { (eval echo configure:3224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cc_supports_pg=yes
else
@@ -3250,7 +3440,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:3254: checking for $ac_word" >&5
+echo "configure:3444: 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
@@ -3291,7 +3481,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:3295: checking for a BSD compatible install" >&5
+echo "configure:3485: 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
@@ -3344,7 +3534,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:3348: checking whether ln -s works" >&5
+echo "configure:3538: 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
@@ -3367,7 +3557,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:3371: checking for $ac_word" >&5
+echo "configure:3561: 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
@@ -3399,7 +3589,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:3403: checking for $ac_word" >&5
+echo "configure:3593: 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
@@ -3433,7 +3623,7 @@ test -n "$YACC" || YACC="yacc"
# 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:3437: checking for $ac_word" >&5
+echo "configure:3627: 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
@@ -3465,7 +3655,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:3469: checking for $ac_word" >&5
+echo "configure:3659: 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
@@ -3497,7 +3687,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:3501: checking for $ac_word" >&5
+echo "configure:3691: 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
@@ -3531,7 +3721,7 @@ fi
# 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:3535: checking for $ac_word" >&5
+echo "configure:3725: 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
@@ -3567,7 +3757,7 @@ fi
# We might need to link with -lm; most simulators need it.
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:3571: checking for main in -lm" >&5
+echo "configure:3761: 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
@@ -3575,14 +3765,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3579 "configure"
+#line 3769 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:3586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3776: \"$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
@@ -3615,12 +3805,12 @@ fi
# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
# is known to have this problem). Therefore we avoid libw if we can.
echo $ac_n "checking for wctype""... $ac_c" 1>&6
-echo "configure:3619: checking for wctype" >&5
+echo "configure:3809: checking for wctype" >&5
if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3624 "configure"
+#line 3814 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char wctype(); below. */
@@ -3643,7 +3833,7 @@ wctype();
; 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:3837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_wctype=yes"
else
@@ -3661,7 +3851,7 @@ if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
-echo "configure:3665: checking for wctype in -lw" >&5
+echo "configure:3855: 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
@@ -3669,7 +3859,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lw $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3673 "configure"
+#line 3863 "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
@@ -3680,7 +3870,7 @@ int main() {
wctype()
; return 0; }
EOF
-if { (eval echo configure:3684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3874: \"$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
@@ -3713,14 +3903,14 @@ fi
# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
-echo "configure:3717: checking for library containing gethostbyname" >&5
+echo "configure:3907: checking for library containing gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_gethostbyname="no"
cat > conftest.$ac_ext <<EOF
-#line 3724 "configure"
+#line 3914 "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
@@ -3731,7 +3921,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:3735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_gethostbyname="none required"
else
@@ -3742,7 +3932,7 @@ rm -f conftest*
test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3746 "configure"
+#line 3936 "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
@@ -3753,7 +3943,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:3757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_gethostbyname="-l$i"
break
@@ -3777,14 +3967,14 @@ fi
# Some systems (e.g. Solaris) have `socketpair' in libsocket.
echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
-echo "configure:3781: checking for library containing socketpair" >&5
+echo "configure:3971: checking for library containing socketpair" >&5
if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_socketpair="no"
cat > conftest.$ac_ext <<EOF
-#line 3788 "configure"
+#line 3978 "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
@@ -3795,7 +3985,7 @@ int main() {
socketpair()
; return 0; }
EOF
-if { (eval echo configure:3799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_socketpair="none required"
else
@@ -3806,7 +3996,7 @@ rm -f conftest*
test "$ac_cv_search_socketpair" = "no" && for i in socket; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3810 "configure"
+#line 4000 "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
@@ -3817,7 +4007,7 @@ int main() {
socketpair()
; return 0; }
EOF
-if { (eval echo configure:3821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_socketpair="-l$i"
break
@@ -3853,14 +4043,14 @@ fi
if test "$need_curses" = yes; then
echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
-echo "configure:3857: checking for library containing initscr" >&5
+echo "configure:4047: checking for library containing initscr" >&5
if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_initscr="no"
cat > conftest.$ac_ext <<EOF
-#line 3864 "configure"
+#line 4054 "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
@@ -3871,7 +4061,7 @@ int main() {
initscr()
; return 0; }
EOF
-if { (eval echo configure:3875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_initscr="none required"
else
@@ -3882,7 +4072,7 @@ rm -f conftest*
test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3886 "configure"
+#line 4076 "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
@@ -3893,7 +4083,7 @@ int main() {
initscr()
; return 0; }
EOF
-if { (eval echo configure:3897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_initscr="-l$i"
break
@@ -3930,14 +4120,14 @@ case $host_os in
# ??? Why?
echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
-echo "configure:3934: checking for library containing tgetent" >&5
+echo "configure:4124: checking for library containing tgetent" >&5
if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_tgetent="no"
cat > conftest.$ac_ext <<EOF
-#line 3941 "configure"
+#line 4131 "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
@@ -3948,7 +4138,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:3952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_tgetent="none required"
else
@@ -3959,7 +4149,7 @@ rm -f conftest*
test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3963 "configure"
+#line 4153 "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
@@ -3970,7 +4160,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:3974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_tgetent="-l$i"
break
@@ -3997,14 +4187,14 @@ esac
# Readline doesn't, so I think we're safe with leaving them out.
echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
-echo "configure:4001: checking for library containing tgetent" >&5
+echo "configure:4191: checking for library containing tgetent" >&5
if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_tgetent="no"
cat > conftest.$ac_ext <<EOF
-#line 4008 "configure"
+#line 4198 "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
@@ -4015,7 +4205,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:4019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_tgetent="none required"
else
@@ -4026,7 +4216,7 @@ rm -f conftest*
test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4030 "configure"
+#line 4220 "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
@@ -4037,7 +4227,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:4041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_tgetent="-l$i"
break
@@ -4071,12 +4261,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:4075: checking for $ac_hdr that defines DIR" >&5
+echo "configure:4265: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4080 "configure"
+#line 4270 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -4084,7 +4274,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:4088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -4109,7 +4299,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:4113: checking for opendir in -ldir" >&5
+echo "configure:4303: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4117,7 +4307,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4121 "configure"
+#line 4311 "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
@@ -4128,7 +4318,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4322: \"$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
@@ -4150,7 +4340,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4154: checking for opendir in -lx" >&5
+echo "configure:4344: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4158,7 +4348,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4162 "configure"
+#line 4352 "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
@@ -4169,7 +4359,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4363: \"$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
@@ -4192,12 +4382,12 @@ fi
fi
echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:4196: checking whether stat file-mode macros are broken" >&5
+echo "configure:4386: 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 4201 "configure"
+#line 4391 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -4248,12 +4438,12 @@ EOF
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:4252: checking for ANSI C header files" >&5
+echo "configure:4442: 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 4257 "configure"
+#line 4447 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -4261,7 +4451,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4455: \"$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*
@@ -4278,7 +4468,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 4282 "configure"
+#line 4472 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -4296,7 +4486,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 4300 "configure"
+#line 4490 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -4317,7 +4507,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 4321 "configure"
+#line 4511 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -4328,7 +4518,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:4332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -4355,17 +4545,17 @@ for ac_hdr in link.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4359: checking for $ac_hdr" >&5
+echo "configure:4549: 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 4364 "configure"
+#line 4554 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4559: \"$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*
@@ -4395,17 +4585,17 @@ for ac_hdr in nlist.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4399: checking for $ac_hdr" >&5
+echo "configure:4589: 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 4404 "configure"
+#line 4594 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4599: \"$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*
@@ -4435,17 +4625,17 @@ for ac_hdr in poll.h sys/poll.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4439: checking for $ac_hdr" >&5
+echo "configure:4629: 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 4444 "configure"
+#line 4634 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4639: \"$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*
@@ -4475,17 +4665,17 @@ for ac_hdr in proc_service.h thread_db.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4479: checking for $ac_hdr" >&5
+echo "configure:4669: 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 4484 "configure"
+#line 4674 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4679: \"$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*
@@ -4515,17 +4705,17 @@ for ac_hdr in stddef.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4519: checking for $ac_hdr" >&5
+echo "configure:4709: 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 4524 "configure"
+#line 4714 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4719: \"$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*
@@ -4555,17 +4745,17 @@ for ac_hdr in stdlib.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4559: checking for $ac_hdr" >&5
+echo "configure:4749: 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 4564 "configure"
+#line 4754 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4759: \"$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*
@@ -4595,17 +4785,17 @@ for ac_hdr in stdint.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4599: checking for $ac_hdr" >&5
+echo "configure:4789: 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 4604 "configure"
+#line 4794 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4799: \"$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*
@@ -4635,17 +4825,17 @@ for ac_hdr in string.h memory.h strings.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4639: checking for $ac_hdr" >&5
+echo "configure:4829: 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 4644 "configure"
+#line 4834 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4839: \"$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*
@@ -4675,17 +4865,17 @@ for ac_hdr in sys/fault.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4679: checking for $ac_hdr" >&5
+echo "configure:4869: 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 4684 "configure"
+#line 4874 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4879: \"$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*
@@ -4715,17 +4905,17 @@ for ac_hdr in sys/file.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4719: checking for $ac_hdr" >&5
+echo "configure:4909: 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 4724 "configure"
+#line 4914 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4919: \"$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*
@@ -4755,17 +4945,17 @@ for ac_hdr in sys/filio.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4759: checking for $ac_hdr" >&5
+echo "configure:4949: 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 4764 "configure"
+#line 4954 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4959: \"$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*
@@ -4795,17 +4985,17 @@ for ac_hdr in sys/ioctl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4799: checking for $ac_hdr" >&5
+echo "configure:4989: 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 4804 "configure"
+#line 4994 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4999: \"$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*
@@ -4835,17 +5025,17 @@ for ac_hdr in 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:4839: checking for $ac_hdr" >&5
+echo "configure:5029: 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 4844 "configure"
+#line 5034 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5039: \"$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*
@@ -4875,17 +5065,17 @@ for ac_hdr in sys/proc.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4879: checking for $ac_hdr" >&5
+echo "configure:5069: 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 4884 "configure"
+#line 5074 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5079: \"$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*
@@ -4915,17 +5105,17 @@ for ac_hdr in sys/procfs.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4919: checking for $ac_hdr" >&5
+echo "configure:5109: 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 4924 "configure"
+#line 5114 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5119: \"$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*
@@ -4955,17 +5145,17 @@ for ac_hdr in sys/ptrace.h ptrace.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4959: checking for $ac_hdr" >&5
+echo "configure:5149: 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 4964 "configure"
+#line 5154 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5159: \"$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*
@@ -4995,17 +5185,17 @@ for ac_hdr in sys/reg.h sys/debugreg.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4999: checking for $ac_hdr" >&5
+echo "configure:5189: 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 5004 "configure"
+#line 5194 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5199: \"$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*
@@ -5035,17 +5225,17 @@ for ac_hdr in sys/select.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5039: checking for $ac_hdr" >&5
+echo "configure:5229: 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 5044 "configure"
+#line 5234 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5239: \"$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*
@@ -5075,17 +5265,17 @@ for ac_hdr in sys/syscall.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5079: checking for $ac_hdr" >&5
+echo "configure:5269: 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 5084 "configure"
+#line 5274 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5279: \"$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*
@@ -5115,17 +5305,17 @@ for ac_hdr in sys/user.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5119: checking for $ac_hdr" >&5
+echo "configure:5309: 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 5124 "configure"
+#line 5314 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5319: \"$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*
@@ -5155,17 +5345,17 @@ for ac_hdr in sys/wait.h wait.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5159: checking for $ac_hdr" >&5
+echo "configure:5349: 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 5164 "configure"
+#line 5354 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5359: \"$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*
@@ -5195,17 +5385,17 @@ for ac_hdr in termios.h termio.h sgtty.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5199: checking for $ac_hdr" >&5
+echo "configure:5389: 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 5204 "configure"
+#line 5394 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5399: \"$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*
@@ -5235,17 +5425,17 @@ 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:5239: checking for $ac_hdr" >&5
+echo "configure:5429: 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 5244 "configure"
+#line 5434 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5439: \"$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*
@@ -5288,17 +5478,17 @@ for ac_hdr in curses.h ncurses.h term.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5292: checking for $ac_hdr" >&5
+echo "configure:5482: 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 5297 "configure"
+#line 5487 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5492: \"$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*
@@ -5331,17 +5521,17 @@ for ac_hdr in ctype.h time.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5335: checking for $ac_hdr" >&5
+echo "configure:5525: 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 5340 "configure"
+#line 5530 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5535: \"$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*
@@ -5376,12 +5566,12 @@ for ac_func in getopt
do
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
-echo "configure:5380: checking whether $ac_func is declared" >&5
+echo "configure:5570: checking whether $ac_func is declared" >&5
if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5385 "configure"
+#line 5575 "configure"
#include "confdefs.h"
#undef $ac_tr_decl
#define $ac_tr_decl 1
@@ -5393,7 +5583,7 @@ char *(*pfn) = (char *(*)) $ac_func ;
#endif
; return 0; }
EOF
-if { (eval echo configure:5397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "gcc_cv_have_decl_$ac_func=yes"
else
@@ -5430,12 +5620,12 @@ fi
# ------------------ #
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:5434: checking return type of signal handlers" >&5
+echo "configure:5624: 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 5439 "configure"
+#line 5629 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -5452,7 +5642,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:5456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -5476,12 +5666,12 @@ EOF
# ------------------------------------- #
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:5480: checking for working const" >&5
+echo "configure:5670: 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 5485 "configure"
+#line 5675 "configure"
#include "confdefs.h"
int main() {
@@ -5530,7 +5720,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:5534: \"$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*
ac_cv_c_const=yes
else
@@ -5551,21 +5741,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:5555: checking for inline" >&5
+echo "configure:5745: 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 5562 "configure"
+#line 5752 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:5569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -5598,19 +5788,19 @@ esac
# 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:5602: checking for working alloca.h" >&5
+echo "configure:5792: 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 5607 "configure"
+#line 5797 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:5614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5804: \"$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
@@ -5631,12 +5821,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:5635: checking for alloca" >&5
+echo "configure:5825: 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 5640 "configure"
+#line 5830 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -5664,7 +5854,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:5668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5858: \"$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
@@ -5696,12 +5886,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:5700: checking whether alloca needs Cray hooks" >&5
+echo "configure:5890: 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 5705 "configure"
+#line 5895 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -5726,12 +5916,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:5730: checking for $ac_func" >&5
+echo "configure:5920: 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 5735 "configure"
+#line 5925 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5754,7 +5944,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5948: \"$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
@@ -5781,7 +5971,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:5785: checking stack direction for C alloca" >&5
+echo "configure:5975: 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
@@ -5789,7 +5979,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 5793 "configure"
+#line 5983 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -5808,7 +5998,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:5812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6002: \"$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
@@ -5833,17 +6023,17 @@ 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:5837: checking for $ac_hdr" >&5
+echo "configure:6027: 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 5842 "configure"
+#line 6032 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6037: \"$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*
@@ -5872,12 +6062,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5876: checking for $ac_func" >&5
+echo "configure:6066: 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 5881 "configure"
+#line 6071 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5900,7 +6090,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6094: \"$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
@@ -5925,7 +6115,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:5929: checking for working mmap" >&5
+echo "configure:6119: 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
@@ -5933,7 +6123,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 5937 "configure"
+#line 6127 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6073,7 +6263,7 @@ main()
}
EOF
-if { (eval echo configure:6077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6267: \"$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
@@ -6096,12 +6286,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:6100: checking for pid_t" >&5
+echo "configure:6290: 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 6105 "configure"
+#line 6295 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -6130,17 +6320,17 @@ fi
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:6134: checking for vfork.h" >&5
+echo "configure:6324: 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 6139 "configure"
+#line 6329 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6334: \"$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*
@@ -6165,18 +6355,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:6169: checking for working vfork" >&5
+echo "configure:6359: 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:6175: checking for vfork" >&5
+echo "configure:6365: 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 6180 "configure"
+#line 6370 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -6199,7 +6389,7 @@ vfork();
; return 0; }
EOF
-if { (eval echo configure:6203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6393: \"$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
@@ -6221,7 +6411,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
-#line 6225 "configure"
+#line 6415 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -6316,7 +6506,7 @@ main() {
}
}
EOF
-if { (eval echo configure:6320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6510: \"$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
@@ -6341,12 +6531,12 @@ fi
for ac_func in canonicalize_file_name realpath
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6345: checking for $ac_func" >&5
+echo "configure:6535: 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 6350 "configure"
+#line 6540 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6369,7 +6559,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6563: \"$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
@@ -6396,12 +6586,12 @@ done
for ac_func in poll
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6400: checking for $ac_func" >&5
+echo "configure:6590: 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 6405 "configure"
+#line 6595 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6424,7 +6614,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6618: \"$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
@@ -6451,12 +6641,12 @@ done
for ac_func in pread64
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6455: checking for $ac_func" >&5
+echo "configure:6645: 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 6460 "configure"
+#line 6650 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6479,7 +6669,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6673: \"$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
@@ -6506,12 +6696,12 @@ done
for ac_func in sbrk
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6510: checking for $ac_func" >&5
+echo "configure:6700: 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 6515 "configure"
+#line 6705 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6534,7 +6724,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6728: \"$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
@@ -6561,12 +6751,12 @@ done
for ac_func in setpgid setpgrp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6565: checking for $ac_func" >&5
+echo "configure:6755: 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 6570 "configure"
+#line 6760 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6589,7 +6779,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6783: \"$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
@@ -6616,12 +6806,12 @@ done
for ac_func in sigaction sigprocmask sigsetmask
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6620: checking for $ac_func" >&5
+echo "configure:6810: 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 6625 "configure"
+#line 6815 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6644,7 +6834,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6838: \"$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
@@ -6671,12 +6861,12 @@ done
for ac_func in socketpair
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6675: checking for $ac_func" >&5
+echo "configure:6865: 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 6680 "configure"
+#line 6870 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6699,7 +6889,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6893: \"$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
@@ -6726,12 +6916,12 @@ done
for ac_func in syscall
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6730: checking for $ac_func" >&5
+echo "configure:6920: 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 6735 "configure"
+#line 6925 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6754,7 +6944,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6948: \"$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
@@ -6781,7 +6971,7 @@ done
if test "$cross_compiling" = no; then
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:6785: checking whether setpgrp takes no argument" >&5
+echo "configure:6975: 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
@@ -6789,7 +6979,7 @@ else
{ echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 6793 "configure"
+#line 6983 "configure"
#include "confdefs.h"
#ifdef HAVE_UNISTD_H
@@ -6809,7 +6999,7 @@ main()
}
EOF
-if { (eval echo configure:6813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7003: \"$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
@@ -6834,12 +7024,12 @@ fi
else
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:6838: checking whether setpgrp takes no argument" >&5
+echo "configure:7028: 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 6843 "configure"
+#line 7033 "configure"
#include "confdefs.h"
#include <unistd.h>
@@ -6853,7 +7043,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:6857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_func_setpgrp_void=no
else
@@ -6877,12 +7067,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:6881: checking for sigsetjmp" >&5
+echo "configure:7071: 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 6886 "configure"
+#line 7076 "configure"
#include "confdefs.h"
#include <setjmp.h>
@@ -6891,7 +7081,7 @@ int main() {
sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
; return 0; }
EOF
-if { (eval echo configure:6895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_func_sigsetjmp=yes
else
@@ -6917,12 +7107,12 @@ gdb_use_included_regex=yes
# However, if the system regex is GNU regex, then default to *not*
# using the included regex.
echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
-echo "configure:6921: checking for GNU regex" >&5
+echo "configure:7111: 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 6926 "configure"
+#line 7116 "configure"
#include "confdefs.h"
#include <gnu-versions.h>
int main() {
@@ -6932,7 +7122,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:6936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_gnu_regex=yes
else
@@ -6967,19 +7157,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:6971: checking for r_fs in struct reg" >&5
+echo "configure:7161: 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 6976 "configure"
+#line 7166 "configure"
#include "confdefs.h"
#include <machine/reg.h>
int main() {
struct reg r; r.r_fs;
; return 0; }
EOF
-if { (eval echo configure:6983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_struct_reg_r_fs=yes
else
@@ -6999,19 +7189,19 @@ EOF
fi
echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
-echo "configure:7003: checking for r_gs in struct reg" >&5
+echo "configure:7193: 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 7008 "configure"
+#line 7198 "configure"
#include "confdefs.h"
#include <machine/reg.h>
int main() {
struct reg r; r.r_gs;
; return 0; }
EOF
-if { (eval echo configure:7015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_struct_reg_r_gs=yes
else
@@ -7033,19 +7223,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:7037: checking for PTRACE_GETREGS" >&5
+echo "configure:7227: 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 7042 "configure"
+#line 7232 "configure"
#include "confdefs.h"
#include <sys/ptrace.h>
int main() {
PTRACE_GETREGS;
; return 0; }
EOF
-if { (eval echo configure:7049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_ptrace_getregs=yes
else
@@ -7067,19 +7257,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:7071: checking for PTRACE_GETFPXREGS" >&5
+echo "configure:7261: 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 7076 "configure"
+#line 7266 "configure"
#include "confdefs.h"
#include <sys/ptrace.h>
int main() {
PTRACE_GETFPXREGS;
; return 0; }
EOF
-if { (eval echo configure:7083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_ptrace_getfpxregs=yes
else
@@ -7101,12 +7291,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:7105: checking for PT_GETDBREGS" >&5
+echo "configure:7295: 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 7110 "configure"
+#line 7300 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ptrace.h>
@@ -7114,7 +7304,7 @@ int main() {
PT_GETDBREGS;
; return 0; }
EOF
-if { (eval echo configure:7118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_pt_getdbregs=yes
else
@@ -7136,12 +7326,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:7140: checking for PT_GETXMMREGS" >&5
+echo "configure:7330: 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 7145 "configure"
+#line 7335 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ptrace.h>
@@ -7149,7 +7339,7 @@ int main() {
PT_GETXMMREGS;
; return 0; }
EOF
-if { (eval echo configure:7153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_pt_getxmmregs=yes
else
@@ -7172,19 +7362,19 @@ fi
# See if stdint.h provides the uintptr_t type.
# Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6
-echo "configure:7176: checking for uintptr_t in stdint.h" >&5
+echo "configure:7366: checking for uintptr_t in stdint.h" >&5
if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7181 "configure"
+#line 7371 "configure"
#include "confdefs.h"
#include <stdint.h>
int main() {
uintptr_t foo = 0;
; return 0; }
EOF
-if { (eval echo configure:7188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_uintptr_t=yes
else
@@ -7205,12 +7395,12 @@ EOF
fi
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:7209: checking whether malloc must be declared" >&5
+echo "configure:7399: 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 7214 "configure"
+#line 7404 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7231,7 +7421,7 @@ int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:7235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_malloc=no
else
@@ -7252,12 +7442,12 @@ EOF
fi
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:7256: checking whether realloc must be declared" >&5
+echo "configure:7446: 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 7261 "configure"
+#line 7451 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7278,7 +7468,7 @@ int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:7282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_realloc=no
else
@@ -7299,12 +7489,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:7303: checking whether free must be declared" >&5
+echo "configure:7493: 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 7308 "configure"
+#line 7498 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7325,7 +7515,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:7329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -7346,12 +7536,12 @@ EOF
fi
echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
-echo "configure:7350: checking whether strerror must be declared" >&5
+echo "configure:7540: 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 7355 "configure"
+#line 7545 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7372,7 +7562,7 @@ int main() {
char *(*pfn) = (char *(*)) strerror
; return 0; }
EOF
-if { (eval echo configure:7376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strerror=no
else
@@ -7393,12 +7583,12 @@ EOF
fi
echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
-echo "configure:7397: checking whether strdup must be declared" >&5
+echo "configure:7587: 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 7402 "configure"
+#line 7592 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7419,7 +7609,7 @@ int main() {
char *(*pfn) = (char *(*)) strdup
; return 0; }
EOF
-if { (eval echo configure:7423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strdup=no
else
@@ -7440,12 +7630,12 @@ EOF
fi
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:7444: checking whether strstr must be declared" >&5
+echo "configure:7634: 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 7449 "configure"
+#line 7639 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7466,7 +7656,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:7470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -7487,12 +7677,12 @@ EOF
fi
echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
-echo "configure:7491: checking whether canonicalize_file_name must be declared" >&5
+echo "configure:7681: 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 7496 "configure"
+#line 7686 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7513,7 +7703,7 @@ int main() {
char *(*pfn) = (char *(*)) canonicalize_file_name
; return 0; }
EOF
-if { (eval echo configure:7517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_canonicalize_file_name=no
else
@@ -7539,9 +7729,9 @@ fi
# could be expunged. --jsm 1999-03-22
echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
-echo "configure:7543: checking for HPUX save_state structure" >&5
+echo "configure:7733: checking for HPUX save_state structure" >&5
cat > conftest.$ac_ext <<EOF
-#line 7545 "configure"
+#line 7735 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -7556,7 +7746,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 7560 "configure"
+#line 7750 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -7626,12 +7816,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:7630: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:7820: 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 7635 "configure"
+#line 7825 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7640,7 +7830,7 @@ int main() {
pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:7644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
@@ -7662,12 +7852,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:7666: checking for prrun_t in sys/procfs.h" >&5
+echo "configure:7856: 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 7671 "configure"
+#line 7861 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7676,7 +7866,7 @@ int main() {
prrun_t avar
; return 0; }
EOF
-if { (eval echo configure:7680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prrun_t=yes
else
@@ -7698,12 +7888,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:7702: checking for gregset_t in sys/procfs.h" >&5
+echo "configure:7892: 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 7707 "configure"
+#line 7897 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7712,7 +7902,7 @@ int main() {
gregset_t avar
; return 0; }
EOF
-if { (eval echo configure:7716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_gregset_t=yes
else
@@ -7734,12 +7924,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:7738: checking for fpregset_t in sys/procfs.h" >&5
+echo "configure:7928: 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 7743 "configure"
+#line 7933 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7748,7 +7938,7 @@ int main() {
fpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:7752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_fpregset_t=yes
else
@@ -7770,12 +7960,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:7774: checking for prgregset_t in sys/procfs.h" >&5
+echo "configure:7964: 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 7779 "configure"
+#line 7969 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7784,7 +7974,7 @@ int main() {
prgregset_t avar
; return 0; }
EOF
-if { (eval echo configure:7788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prgregset_t=yes
else
@@ -7806,12 +7996,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:7810: checking for prfpregset_t in sys/procfs.h" >&5
+echo "configure:8000: 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 7815 "configure"
+#line 8005 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7820,7 +8010,7 @@ int main() {
prfpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:7824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prfpregset_t=yes
else
@@ -7842,12 +8032,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:7846: checking for prgregset32_t in sys/procfs.h" >&5
+echo "configure:8036: 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 7851 "configure"
+#line 8041 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7856,7 +8046,7 @@ int main() {
prgregset32_t avar
; return 0; }
EOF
-if { (eval echo configure:7860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prgregset32_t=yes
else
@@ -7878,12 +8068,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:7882: checking for prfpregset32_t in sys/procfs.h" >&5
+echo "configure:8072: 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 7887 "configure"
+#line 8077 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7892,7 +8082,7 @@ int main() {
prfpregset32_t avar
; return 0; }
EOF
-if { (eval echo configure:7896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
else
@@ -7914,12 +8104,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:7918: checking for lwpid_t in sys/procfs.h" >&5
+echo "configure:8108: 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 7923 "configure"
+#line 8113 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7928,7 +8118,7 @@ int main() {
lwpid_t avar
; return 0; }
EOF
-if { (eval echo configure:7932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpid_t=yes
else
@@ -7950,12 +8140,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:7954: checking for psaddr_t in sys/procfs.h" >&5
+echo "configure:8144: 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 7959 "configure"
+#line 8149 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7964,7 +8154,7 @@ int main() {
psaddr_t avar
; return 0; }
EOF
-if { (eval echo configure:7968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psaddr_t=yes
else
@@ -7986,12 +8176,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:7990: checking for prsysent_t in sys/procfs.h" >&5
+echo "configure:8180: 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 7995 "configure"
+#line 8185 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -8000,7 +8190,7 @@ int main() {
prsysent_t avar
; return 0; }
EOF
-if { (eval echo configure:8004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prsysent_t=yes
else
@@ -8022,12 +8212,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:8026: checking for pr_sigset_t in sys/procfs.h" >&5
+echo "configure:8216: 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 8031 "configure"
+#line 8221 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -8036,7 +8226,7 @@ int main() {
pr_sigset_t avar
; return 0; }
EOF
-if { (eval echo configure:8040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
else
@@ -8058,12 +8248,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:8062: checking for pr_sigaction64_t in sys/procfs.h" >&5
+echo "configure:8252: 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 8067 "configure"
+#line 8257 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -8072,7 +8262,7 @@ int main() {
pr_sigaction64_t avar
; return 0; }
EOF
-if { (eval echo configure:8076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
else
@@ -8094,12 +8284,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:8098: checking for pr_siginfo64_t in sys/procfs.h" >&5
+echo "configure:8288: 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 8103 "configure"
+#line 8293 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -8108,7 +8298,7 @@ int main() {
pr_siginfo64_t avar
; return 0; }
EOF
-if { (eval echo configure:8112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
else
@@ -8135,7 +8325,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:8139: checking whether prfpregset_t type is broken" >&5
+echo "configure:8329: 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
@@ -8143,7 +8333,7 @@ else
gdb_cv_prfpregset_t_broken=yes
else
cat > conftest.$ac_ext <<EOF
-#line 8147 "configure"
+#line 8337 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main ()
@@ -8153,7 +8343,7 @@ else
return 0;
}
EOF
-if { (eval echo configure:8157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8347: \"$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
@@ -8178,12 +8368,12 @@ EOF
echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:8182: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
+echo "configure:8372: 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 8187 "configure"
+#line 8377 "configure"
#include "confdefs.h"
#include <unistd.h>
#include <sys/types.h>
@@ -8196,7 +8386,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:8200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_procfs_piocset=yes
else
@@ -8220,19 +8410,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:8224: checking for member l_addr in struct link_map" >&5
+echo "configure:8414: 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 8229 "configure"
+#line 8419 "configure"
#include "confdefs.h"
#include <link.h>
int main() {
struct link_map lm; (void) lm.l_addr;
; return 0; }
EOF
-if { (eval echo configure:8236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map_with_l_members=yes
else
@@ -8254,12 +8444,12 @@ EOF
echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:8258: checking for member lm_addr in struct link_map" >&5
+echo "configure:8448: 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 8263 "configure"
+#line 8453 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <link.h>
@@ -8267,7 +8457,7 @@ int main() {
struct link_map lm; (void) lm.lm_addr;
; return 0; }
EOF
-if { (eval echo configure:8271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map_with_lm_members=yes
else
@@ -8289,12 +8479,12 @@ EOF
echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
-echo "configure:8293: checking for member som_addr in struct so_map" >&5
+echo "configure:8483: 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 8298 "configure"
+#line 8488 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_NLIST_H
@@ -8305,7 +8495,7 @@ int main() {
struct so_map lm; (void) lm.som_addr;
; return 0; }
EOF
-if { (eval echo configure:8309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_so_map_with_som_members=yes
else
@@ -8327,12 +8517,12 @@ EOF
echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
-echo "configure:8331: checking for struct link_map32 in sys/link.h" >&5
+echo "configure:8521: 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 8336 "configure"
+#line 8526 "configure"
#include "confdefs.h"
#define _SYSCALL32
#include <sys/link.h>
@@ -8340,7 +8530,7 @@ int main() {
struct link_map32 l;
; return 0; }
EOF
-if { (eval echo configure:8344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map32=yes
else
@@ -8367,12 +8557,12 @@ fi
echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
-echo "configure:8371: checking for long long support in compiler" >&5
+echo "configure:8561: 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 8376 "configure"
+#line 8566 "configure"
#include "confdefs.h"
int main() {
@@ -8382,7 +8572,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:8386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_c_long_long=yes
else
@@ -8404,7 +8594,7 @@ fi
echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
-echo "configure:8408: checking for long long support in printf" >&5
+echo "configure:8598: 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
@@ -8412,7 +8602,7 @@ else
gdb_cv_printf_has_long_long=no
else
cat > conftest.$ac_ext <<EOF
-#line 8416 "configure"
+#line 8606 "configure"
#include "confdefs.h"
int main () {
@@ -8426,7 +8616,7 @@ int main () {
return (strcmp ("0x0123456789abcdef", buf));
}
EOF
-if { (eval echo configure:8430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8620: \"$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
@@ -8450,19 +8640,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:8454: checking for long double support in compiler" >&5
+echo "configure:8644: 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 8459 "configure"
+#line 8649 "configure"
#include "confdefs.h"
int main() {
long double foo;
; return 0; }
EOF
-if { (eval echo configure:8466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_long_double=yes
else
@@ -8484,7 +8674,7 @@ fi
echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
-echo "configure:8488: checking for long double support in printf" >&5
+echo "configure:8678: 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
@@ -8492,7 +8682,7 @@ else
gdb_cv_printf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 8496 "configure"
+#line 8686 "configure"
#include "confdefs.h"
int main () {
@@ -8502,7 +8692,7 @@ int main () {
return (strncmp ("3.14159", buf, 7));
}
EOF
-if { (eval echo configure:8506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8696: \"$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
@@ -8526,7 +8716,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:8530: checking for long double support in scanf" >&5
+echo "configure:8720: 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
@@ -8534,7 +8724,7 @@ else
gdb_cv_scanf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 8538 "configure"
+#line 8728 "configure"
#include "confdefs.h"
int main () {
@@ -8544,7 +8734,7 @@ int main () {
return !(f > 3.14159 && f < 3.14160);
}
EOF
-if { (eval echo configure:8548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8738: \"$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
@@ -8569,7 +8759,7 @@ echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
case ${host_os} in
aix*)
echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
-echo "configure:8573: checking for -bbigtoc option" >&5
+echo "configure:8763: checking for -bbigtoc option" >&5
if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8583,14 +8773,14 @@ else
LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
cat > conftest.$ac_ext <<EOF
-#line 8587 "configure"
+#line 8777 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:8594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
:
else
echo "configure: failed program was:" >&5
@@ -8613,7 +8803,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:8617: checking for HPUX/OSF thread support" >&5
+echo "configure:8807: 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
@@ -8636,7 +8826,7 @@ EOF
# because version 0 (present on Solaris 2.4 or earlier) doesn't have
# the same API.
echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
-echo "configure:8640: checking for Solaris thread debugging library" >&5
+echo "configure:8830: 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
@@ -8646,7 +8836,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:8650: checking for dlopen in -ldl" >&5
+echo "configure:8840: 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
@@ -8654,7 +8844,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 8658 "configure"
+#line 8848 "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
@@ -8665,7 +8855,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:8669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8859: \"$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
@@ -8697,17 +8887,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:8701: checking for the ld -export-dynamic flag" >&5
+echo "configure:8891: checking for the ld -export-dynamic flag" >&5
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
cat > conftest.$ac_ext <<EOF
-#line 8704 "configure"
+#line 8894 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:8711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
found=yes
else
@@ -8726,13 +8916,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:8730: checking if <proc_service.h> is old" >&5
+echo "configure:8920: 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 8736 "configure"
+#line 8926 "configure"
#include "confdefs.h"
#include <proc_service.h>
@@ -8743,7 +8933,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:8747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_proc_service_is_old=no
else
@@ -8769,12 +8959,12 @@ EOF
;;
aix*)
echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
-echo "configure:8773: checking for AiX thread debugging library" >&5
+echo "configure:8963: checking for AiX thread debugging library" >&5
if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8778 "configure"
+#line 8968 "configure"
#include "confdefs.h"
#include <sys/pthdebug.h>
int main() {
@@ -8783,7 +8973,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:8787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_aix_thread_debug=yes
else
@@ -8808,19 +8998,19 @@ fi
if test "x$ac_cv_header_thread_db_h" = "xyes"; then
echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
-echo "configure:8812: checking whether <thread_db.h> has TD_NOTALLOC" >&5
+echo "configure:9002: checking whether <thread_db.h> has TD_NOTALLOC" >&5
if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8817 "configure"
+#line 9007 "configure"
#include "confdefs.h"
#include <thread_db.h>
int main() {
int i = TD_NOTALLOC;
; return 0; }
EOF
-if { (eval echo configure:8824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_thread_db_h_has_td_notalloc=yes
else
@@ -8845,19 +9035,19 @@ fi
if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6
-echo "configure:8849: checking whether <sys/syscall.h> has __NR_tkill" >&5
+echo "configure:9039: checking whether <sys/syscall.h> has __NR_tkill" >&5
if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8854 "configure"
+#line 9044 "configure"
#include "confdefs.h"
#include <sys/syscall.h>
int main() {
int i = __NR_tkill;
; return 0; }
EOF
-if { (eval echo configure:8861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_sys_syscall_h_has_tkill=yes
else
@@ -8968,7 +9158,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:8972: checking compiler warning flags" >&5
+echo "configure:9162: 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
@@ -8978,14 +9168,14 @@ echo "configure:8972: checking compiler warning flags" >&5
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $w"
cat > conftest.$ac_ext <<EOF
-#line 8982 "configure"
+#line 9172 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:8989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
WARN_CFLAGS="${WARN_CFLAGS} $w"
else
@@ -9033,12 +9223,12 @@ fi
# In the Cygwin environment, we need some additional flags.
echo $ac_n "checking for cygwin""... $ac_c" 1>&6
-echo "configure:9037: checking for cygwin" >&5
+echo "configure:9227: 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 9042 "configure"
+#line 9232 "configure"
#include "confdefs.h"
#if defined (__CYGWIN__) || defined (__CYGWIN32__)
@@ -9116,7 +9306,7 @@ if test "${with_tclconfig+set}" = set; then
fi
echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:9120: checking for Tcl configuration" >&5
+echo "configure:9310: 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
@@ -9225,7 +9415,7 @@ if test "${with_tkconfig+set}" = set; then
fi
echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:9229: checking for Tk configuration" >&5
+echo "configure:9419: 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
@@ -9334,7 +9524,7 @@ fi
no_tcl=true
echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
-echo "configure:9338: checking for Tcl private headers. dir=${configdir}" >&5
+echo "configure:9528: 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"
@@ -9400,17 +9590,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:9404: checking for tclInt.h" >&5
+echo "configure:9594: 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 9409 "configure"
+#line 9599 "configure"
#include "confdefs.h"
#include <tclInt.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9604: \"$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*
@@ -9470,7 +9660,7 @@ fi
#
no_tk=true
echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
-echo "configure:9474: checking for Tk private headers" >&5
+echo "configure:9664: 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"
@@ -9536,17 +9726,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:9540: checking for tk.h" >&5
+echo "configure:9730: 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 9545 "configure"
+#line 9735 "configure"
#include "confdefs.h"
#include <tk.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9740: \"$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*
@@ -9592,7 +9782,7 @@ fi
echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:9596: checking for Itcl private headers. srcdir=${srcdir}" >&5
+echo "configure:9786: 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
@@ -9615,7 +9805,7 @@ fi
echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:9619: checking for Itk private headers. srcdir=${srcdir}" >&5
+echo "configure:9809: 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
@@ -9670,7 +9860,7 @@ if test "${with_itclconfig+set}" = set; then
fi
echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
-echo "configure:9674: checking for Itcl configuration" >&5
+echo "configure:9864: 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
@@ -9773,7 +9963,7 @@ if test "${with_itkconfig+set}" = set; then
fi
echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
-echo "configure:9777: checking for Itk configuration" >&5
+echo "configure:9967: 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
@@ -9916,7 +10106,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:9920: checking for X" >&5
+echo "configure:10110: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -9978,12 +10168,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 9982 "configure"
+#line 10172 "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:9987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10177: \"$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*
@@ -10052,14 +10242,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 10056 "configure"
+#line 10246 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:10063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10253: \"$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.
@@ -10273,7 +10463,7 @@ fi
# We only build gdbserver automatically if host and target are the same.
if test "x$target" = "x$host"; then
echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
-echo "configure:10277: checking whether gdbserver is supported on this host" >&5
+echo "configure:10467: checking whether gdbserver is supported on this host" >&5
if test "x$build_gdbserver" = xyes; then
configdirs="$configdirs gdbserver"
echo "$ac_t""yes" 1>&6
@@ -10337,12 +10527,12 @@ fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:10341: checking for Cygwin environment" >&5
+echo "configure:10531: 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 10346 "configure"
+#line 10536 "configure"
#include "confdefs.h"
int main() {
@@ -10353,7 +10543,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:10357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -10370,19 +10560,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:10374: checking for mingw32 environment" >&5
+echo "configure:10564: 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 10379 "configure"
+#line 10569 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:10386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -10401,7 +10591,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:10405: checking for executable suffix" >&5
+echo "configure:10595: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10411,7 +10601,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:10415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:10605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -10453,7 +10643,7 @@ fi
echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:10457: checking for iconv" >&5
+echo "configure:10647: checking for iconv" >&5
if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10461,7 +10651,7 @@ else
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
cat > conftest.$ac_ext <<EOF
-#line 10465 "configure"
+#line 10655 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -10471,7 +10661,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:10475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_func_iconv=yes
else
@@ -10483,7 +10673,7 @@ rm -f conftest*
am_save_LIBS="$LIBS"
LIBS="$LIBS -liconv"
cat > conftest.$ac_ext <<EOF
-#line 10487 "configure"
+#line 10677 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -10493,7 +10683,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:10497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10687: \"$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
@@ -10514,13 +10704,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6
EOF
echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:10518: checking for iconv declaration" >&5
+echo "configure:10708: 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 10524 "configure"
+#line 10714 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -10539,7 +10729,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:10543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_proto_iconv_arg1=""
else
diff --git a/gdb/configure.host b/gdb/configure.host
index 1c0f9c70044..723d87c601e 100644
--- a/gdb/configure.host
+++ b/gdb/configure.host
@@ -77,31 +77,31 @@ i[34567]86-*-cygwin*) gdb_host=cygwin ;;
ia64-*-aix*) gdb_host=aix ;;
ia64-*-linux*) gdb_host=linux ;;
-m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
-m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
+# OBSOLETE m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
+# OBSOLETE m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
-m68*-att-*) gdb_host=3b1 ;;
-m68*-bull*-sysv*) gdb_host=dpx2 ;;
+# OBSOLETE m68*-att-*) gdb_host=3b1 ;;
+# OBSOLETE m68*-bull*-sysv*) gdb_host=dpx2 ;;
m68*-*-linux*) gdb_host=linux ;;
-m68*-*-lynxos*) gdb_host=m68klynx ;;
+# OBSOLETE m68*-*-lynxos*) gdb_host=m68klynx ;;
m68*-*-netbsd*) gdb_host=nbsdaout ;;
-m68*-*-sysv4*) gdb_host=m68kv4 ;;
-m68*-motorola-*) gdb_host=delta68 ;;
-m68*-sun-sunos3*) gdb_host=sun3os3 ;;
-m68*-sun-sunos4*) gdb_host=sun3os4 ;;
-m68*-sun-*) gdb_host=sun3os4 ;;
-
-mips-dec-*) gdb_host=decstation ;;
-mips-little-*) gdb_host=littlemips ;;
+# OBSOLETE m68*-*-sysv4*) gdb_host=m68kv4 ;;
+# OBSOLETE m68*-motorola-*) gdb_host=delta68 ;;
+# OBSOLETE m68*-sun-sunos3*) gdb_host=sun3os3 ;;
+# OBSOLETE m68*-sun-sunos4*) gdb_host=sun3os4 ;;
+# OBSOLETE m68*-sun-*) gdb_host=sun3os4 ;;
+
+# OBSOLETE mips-dec-*) gdb_host=decstation ;;
+# OBSOLETE mips-little-*) gdb_host=littlemips ;;
mips-sgi-irix5*) gdb_host=irix5 ;;
mips-sgi-irix6*) gdb_host=irix6 ;;
-mips-sony-*) gdb_host=news-mips ;;
+# OBSOLETE mips-sony-*) gdb_host=news-mips ;;
mips*-*-linux*) gdb_host=linux ;;
mips*-*-netbsd*) gdb_host=nbsd ;;
-mips-*-mach3*) gdb_host=mipsm3 ;;
-mips-*-sysv4*) gdb_host=mipsv4 ;;
-mips-*-sysv*) gdb_host=riscos ;;
-mips-*-riscos*) gdb_host=riscos ;;
+# OBSOLETE mips-*-mach3*) gdb_host=mipsm3 ;;
+# OBSOLETE mips-*-sysv4*) gdb_host=mipsv4 ;;
+# OBSOLETE mips-*-sysv*) gdb_host=riscos ;;
+# OBSOLETE mips-*-riscos*) gdb_host=riscos ;;
none-*-*) gdb_host=none ;;
diff --git a/gdb/configure.in b/gdb/configure.in
index e5bccdf64be..da44f30826e 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -192,6 +192,30 @@ case $host_os in
enable_gdbtk=no ;;
esac
+# Libunwind support.
+AC_ARG_WITH(libunwind,
+[ --with-libunwind Use libunwind frame unwinding support],
+[case "${withval}" in
+ yes) enable_libunwind=yes ;;
+ no) enable_libunwind=no ;;
+ *) AC_MSG_ERROR(bad value ${withval} for GDB with-libunwind option) ;;
+esac],[
+ AC_CHECK_HEADERS(libunwind.h)
+ AC_CHECK_HEADERS(libunwind-ia64.h)
+ if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
+ enable_libunwind=yes;
+ fi
+])
+
+if test x"$enable_libunwind" = xyes; then
+ AC_CHECK_HEADERS(libunwind.h)
+ AC_CHECK_HEADERS(libunwind-ia64.h)
+ AC_DEFINE(HAVE_LIBUNWIND, 1)
+ CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
+ CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
+ CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
+fi
+
# Profiling support.
AC_ARG_ENABLE(profiling,
[ --enable-profiling enable profiling of GDB],
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index fdaf9ec3eb6..d150ccfb3b9 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -108,13 +108,13 @@ m32r-*-*) gdb_target=m32r ;;
m68hc11*-*-*|m6811*-*-*) gdb_target=m68hc11 ;;
-m68000-*-sunos3*) gdb_target=sun2os3 ;;
-m68000-*-sunos4*) gdb_target=sun2os4 ;;
+# OBSOLETE m68000-*-sunos3*) gdb_target=sun2os3 ;;
+# OBSOLETE m68000-*-sunos4*) gdb_target=sun2os4 ;;
-m68*-bull-sysv*) gdb_target=dpx2 ;;
-m68*-att-*) gdb_target=3b1 ;;
+# OBSOLETE m68*-bull-sysv*) gdb_target=dpx2 ;;
+# OBSOLETE m68*-att-*) gdb_target=3b1 ;;
m68*-cisco*-*) gdb_target=cisco ;;
-m68*-motorola-*) gdb_target=delta68 ;;
+# OBSOLETE m68*-motorola-*) gdb_target=delta68 ;;
m68*-netx-*) gdb_target=vxworks68 ;;
m68*-tandem-*) gdb_target=st2000 ;;
m68*-*-aout*) gdb_target=monitor ;;
@@ -123,33 +123,25 @@ m68*-*-elf*) gdb_target=monitor ;;
m68*-*-linux*) gdb_target=linux
build_gdbserver=yes
;;
-m68*-*-lynxos*) gdb_target=m68klynx ;;
+# OBSOLETE m68*-*-lynxos*) gdb_target=m68klynx ;;
m68*-*-netbsd*) gdb_target=nbsdaout ;;
m68*-*-os68k*) gdb_target=os68k ;;
-m68*-*-sunos3*) gdb_target=sun3os3 ;;
-m68*-*-sunos4*) gdb_target=sun3os4 ;;
-m68*-*-sysv4*) gdb_target=m68kv4 ;;
+# OBSOLETE m68*-*-sunos3*) gdb_target=sun3os3 ;;
+# OBSOLETE m68*-*-sunos4*) gdb_target=sun3os4 ;;
+# OBSOLETE m68*-*-sysv4*) gdb_target=m68kv4 ;;
m68*-*-vxworks*) gdb_target=vxworks68 ;;
mcore*-*-*) gdb_target=mcore ;;
-# "mipsisa64" targets are 64-bit MIPS, MIPS64 ISA. They need these
-# special cases because otherwise they (obviously) are not matched by
-# the "mips64" target cases, and would therefore be treated as 32-bit.
-mipsisa64*-*-linux*) gdb_target=linux64 ;;
-mipsisa64*-*-*) gdb_target=embed64 ;;
mips*-*-pe) gdb_target=wince ;;
-mips*tx39*-elf*) gdb_target=tx39 ;;
-mips64*-*-linux*) gdb_target=linux64 ;;
mips*-sgi-irix5*) gdb_target=irix5 ;;
mips*-sgi-irix6*) gdb_target=irix6 ;;
mips*-*-linux*) gdb_target=linux
build_gdbserver=yes
;;
mips*-*-netbsd*) gdb_target=nbsd ;;
-mips*-*-sysv4*) gdb_target=mipsv4 ;;
+# OBSOLETE mips*-*-sysv4*) gdb_target=mipsv4 ;;
mips*-*-vxworks*) gdb_target=vxmips ;;
-mips64*-*-*) gdb_target=embed64 ;;
mips*-*-*) gdb_target=embed ;;
mn10300-*-*) gdb_target=mn10300 ;;
diff --git a/gdb/cp-abi.c b/gdb/cp-abi.c
index 43361fca2ea..a8530209c9b 100644
--- a/gdb/cp-abi.c
+++ b/gdb/cp-abi.c
@@ -1,5 +1,5 @@
/* Generic code for supporting multiple C++ ABI's
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index f7ec530ee6e..d7714efb3ae 100644
--- a/gdb/cp-namespace.c
+++ b/gdb/cp-namespace.c
@@ -349,7 +349,7 @@ cp_lookup_symbol_nonlocal (const char *name,
cp_lookup_symbol_nonlocal.
For example, if we're within a function A::B::f and looking for a
- symbol f, this will get called with NAME = "f", SCOPE = "A::B", and
+ symbol x, this will get called with NAME = "x", SCOPE = "A::B", and
SCOPE_LEN = 0. It then calls itself with NAME and SCOPE the same,
but with SCOPE_LEN = 1. And then it calls itself with NAME and
SCOPE the same, but with SCOPE_LEN = 4. This third call looks for
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index 037f355825d..662df37f9d8 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -34,6 +34,7 @@
#include "symtab.h"
#include "block.h"
#include "complaints.h"
+#include "gdbtypes.h"
/* Functions related to demangled name parsing. */
@@ -153,7 +154,7 @@ class_name_from_physname (const char *physname)
char *ret = NULL;
const char *end;
int depth = 0;
- char *demangled_name = cplus_demangle (physname, DMGL_ANSI);
+ char *demangled_name = cplus_demangle (physname, DMGL_ANSI | DMGL_PARAMS);
if (demangled_name == NULL)
return NULL;
@@ -178,7 +179,7 @@ method_name_from_physname (const char *physname)
char *ret = NULL;
const char *end;
int depth = 0;
- char *demangled_name = cplus_demangle (physname, DMGL_ANSI);
+ char *demangled_name = cplus_demangle (physname, DMGL_ANSI | DMGL_PARAMS);
if (demangled_name == NULL)
return NULL;
@@ -687,6 +688,49 @@ read_in_psymtabs (const char *func_name)
}
}
+/* Lookup the rtti type for a class name. */
+
+struct type *
+cp_lookup_rtti_type (const char *name, struct block *block)
+{
+ struct symbol * rtti_sym;
+ struct type * rtti_type;
+
+ rtti_sym = lookup_symbol (name, block, STRUCT_DOMAIN, NULL, NULL);
+
+ if (rtti_sym == NULL)
+ {
+ warning ("RTTI symbol not found for class '%s'", name);
+ return NULL;
+ }
+
+ if (SYMBOL_CLASS (rtti_sym) != LOC_TYPEDEF)
+ {
+ warning ("RTTI symbol for class '%s' is not a type", name);
+ return NULL;
+ }
+
+ rtti_type = SYMBOL_TYPE (rtti_sym);
+
+ switch (TYPE_CODE (rtti_type))
+ {
+ case TYPE_CODE_CLASS:
+ break;
+ case TYPE_CODE_NAMESPACE:
+ /* chastain/2003-11-26: the symbol tables often contain fake
+ symbols for namespaces with the same name as the struct.
+ This warning is an indication of a bug in the lookup order
+ or a bug in the way that the symbol tables are populated. */
+ warning ("RTTI symbol for class '%s' is a namespace", name);
+ return NULL;
+ default:
+ warning ("RTTI symbol for class '%s' has bad type", name);
+ return NULL;
+ }
+
+ return rtti_type;
+}
+
/* Don't allow just "maintenance cplus". */
static void
diff --git a/gdb/cp-support.h b/gdb/cp-support.h
index a4edf0c49a8..ed315925405 100644
--- a/gdb/cp-support.h
+++ b/gdb/cp-support.h
@@ -34,6 +34,7 @@ struct symbol;
struct obstack;
struct block;
struct objfile;
+struct type;
/* This struct is designed to store data from using directives. It
says that names from namespace INNER should be visible within
@@ -66,6 +67,9 @@ extern char *remove_params (const char *demangled_name);
extern struct symbol **make_symbol_overload_list (const char *,
const char *);
+extern struct type *cp_lookup_rtti_type (const char *name,
+ struct block *block);
+
/* Functions/variables from cp-namespace.c. */
extern unsigned char processing_has_namespace_info;
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 59c5d79c049..5d02367f9be 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -64,14 +64,6 @@
#include "aout/stab_gnu.h" /* We always use GNU stabs, not native, now */
-/* This macro returns the size field of a minimal symbol, which is normally
- stored in the "info" field. The macro can be overridden for specific
- targets (e.g. MIPS16) that use the info field for other purposes. */
-#ifndef MSYMBOL_SIZE
-#define MSYMBOL_SIZE(msym) ((long) MSYMBOL_INFO (msym))
-#endif
-
-
/* We put a pointer to this structure in the read_symtab_private field
of the psymtab. */
@@ -491,7 +483,7 @@ record_minimal_symbol (char *name, CORE_ADDR address, int type,
Record it as global even if it's local, not global, so
lookup_minimal_symbol can find it. We don't check symbol_leading_char
because for SunOS4 it always is '_'. */
- if (name[8] == 'C' && STREQ ("__DYNAMIC", name))
+ if (name[8] == 'C' && DEPRECATED_STREQ ("__DYNAMIC", name))
ms_type = mst_data;
/* Same with virtual function tables, both global and static. */
@@ -2519,13 +2511,13 @@ read_ofile_symtab (struct partial_symtab *pst)
{
const char *tempstring = namestring;
- if (STREQ (namestring, GCC_COMPILED_FLAG_SYMBOL))
+ if (DEPRECATED_STREQ (namestring, GCC_COMPILED_FLAG_SYMBOL))
processing_gcc_compilation = 1;
- else if (STREQ (namestring, GCC2_COMPILED_FLAG_SYMBOL))
+ else if (DEPRECATED_STREQ (namestring, GCC2_COMPILED_FLAG_SYMBOL))
processing_gcc_compilation = 2;
if (tempstring[0] == bfd_get_symbol_leading_char (symfile_bfd))
++tempstring;
- if (STREQN (tempstring, "__gnu_compiled", 14))
+ if (DEPRECATED_STREQN (tempstring, "__gnu_compiled", 14))
processing_gcc_compilation = 2;
}
@@ -2591,9 +2583,9 @@ read_ofile_symtab (struct partial_symtab *pst)
However, there is no reason not to accept
the GCC_COMPILED_FLAG_SYMBOL anywhere. */
- if (STREQ (namestring, GCC_COMPILED_FLAG_SYMBOL))
+ if (DEPRECATED_STREQ (namestring, GCC_COMPILED_FLAG_SYMBOL))
processing_gcc_compilation = 1;
- else if (STREQ (namestring, GCC2_COMPILED_FLAG_SYMBOL))
+ else if (DEPRECATED_STREQ (namestring, GCC2_COMPILED_FLAG_SYMBOL))
processing_gcc_compilation = 2;
#if 0
diff --git a/gdb/defs.h b/gdb/defs.h
index 78beb3c45c6..eac3e4a987f 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -154,8 +154,19 @@ typedef bfd_vma CORE_ADDR;
issue is found that we spend the effort on algorithmic
optimizations than micro-optimizing.'' J.T. */
-#define STREQ(a,b) (*(a) == *(b) ? !strcmp ((a), (b)) : 0)
-#define STREQN(a,b,c) (*(a) == *(b) ? !strncmp ((a), (b), (c)) : 0)
+/* NOTE: cagney/2003-11-23: All instances of STREQ[N] covered by
+ testing GDB on a stabs system have been replaced by equivalent
+ str[n]cmp calls. To avoid the possability of introducing bugs when
+ making untested changes, the remaining references were deprecated
+ rather than replaced. */
+
+/* DISCLAIMER: cagney/2003-11-23: Simplified definition of these
+ macros so that they just map directly onto strcmp equivalent. I'm
+ not responsible for any breakage due to code that relied on the old
+ underlying implementation. */
+
+#define DEPRECATED_STREQ(a,b) (strcmp ((a), (b)) == 0)
+#define DEPRECATED_STREQN(a,b,c) (strncmp ((a), (b), (c)) == 0)
/* Check if a character is one of the commonly used C++ marker characters. */
extern int is_cplus_marker (int);
diff --git a/gdb/dve3900-rom.c b/gdb/dve3900-rom.c
index 665179ff327..fe2fcedce65 100644
--- a/gdb/dve3900-rom.c
+++ b/gdb/dve3900-rom.c
@@ -29,6 +29,7 @@
#include "gdb_string.h"
#include <time.h>
#include "regcache.h"
+#include "mips-tdep.h"
/* Type of function passed to bfd_map_over_sections. */
@@ -121,11 +122,11 @@ static char *r3900_regnames[] =
"r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",
"S", /* PS_REGNUM */
- "l", /* LO_REGNUM */
- "h", /* HI_REGNUM */
- "B", /* BADVADDR_REGNUM */
- "Pcause", /* CAUSE_REGNUM */
- "p" /* PC_REGNUM */
+ "l", /* MIPS_EMBED_LO_REGNUM */
+ "h", /* MIPS_EMBED_HI_REGNUM */
+ "B", /* MIPS_EMBED_BADVADDR_REGNUM */
+ "Pcause", /* MIPS_EMBED_CAUSE_REGNUM */
+ "p" /* MIPS_EMBED_PC_REGNUM */
};
@@ -267,19 +268,19 @@ reg_table[] =
}
,
{
- "HI", HI_REGNUM
+ "HI", MIPS_EMBED_HI_REGNUM
}
,
{
- "LO", LO_REGNUM
+ "LO", MIPS_EMBED_LO_REGNUM
}
,
{
- "PC", PC_REGNUM
+ "PC", MIPS_EMBED_PC_REGNUM
}
,
{
- "BadV", BADVADDR_REGNUM
+ "BadV", MIPS_EMBED_BADVADDR_REGNUM
}
,
{
@@ -420,7 +421,7 @@ fetch_bad_vaddr (void)
monitor_printf ("xB\r");
monitor_expect ("BadV=", NULL, 0);
monitor_expect_prompt (buf, sizeof (buf));
- monitor_supply_register (BADVADDR_REGNUM, buf);
+ monitor_supply_register (mips_regnum (current_gdbarch)->badvaddr, buf);
}
@@ -485,20 +486,15 @@ fetch_bitmapped_register (int regno, struct bit_field *bf)
static void
r3900_fetch_registers (int regno)
{
- switch (regno)
- {
- case BADVADDR_REGNUM:
- fetch_bad_vaddr ();
- return;
- case PS_REGNUM:
- fetch_bitmapped_register (PS_REGNUM, status_fields);
- return;
- case CAUSE_REGNUM:
- fetch_bitmapped_register (CAUSE_REGNUM, cause_fields);
- return;
- default:
- orig_monitor_fetch_registers (regno);
- }
+ if (regno == mips_regnum (current_gdbarch)->badvaddr)
+ fetch_bad_vaddr ();
+ else if (regno == PS_REGNUM)
+ fetch_bitmapped_register (PS_REGNUM, status_fields);
+ else if (regno == mips_regnum (current_gdbarch)->cause)
+ fetch_bitmapped_register (mips_regnum (current_gdbarch)->cause,
+ cause_fields);
+ else
+ orig_monitor_fetch_registers (regno);
}
@@ -544,17 +540,13 @@ store_bitmapped_register (int regno, struct bit_field *bf)
static void
r3900_store_registers (int regno)
{
- switch (regno)
- {
- case PS_REGNUM:
- store_bitmapped_register (PS_REGNUM, status_fields);
- return;
- case CAUSE_REGNUM:
- store_bitmapped_register (CAUSE_REGNUM, cause_fields);
- return;
- default:
- orig_monitor_store_registers (regno);
- }
+ if (regno == PS_REGNUM)
+ store_bitmapped_register (PS_REGNUM, status_fields);
+ else if (regno == mips_regnum (current_gdbarch)->cause)
+ store_bitmapped_register (mips_regnum (current_gdbarch)->cause,
+ cause_fields);
+ else
+ orig_monitor_store_registers (regno);
}
@@ -648,7 +640,7 @@ debug_write (unsigned char *buf, int buflen)
static void
ignore_packet (void)
{
- int c;
+ int c = -1;
int len;
/* Ignore lots of trash (messages about section addresses, for example)
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index 6e420cdb89e..59f4481bef3 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -99,19 +99,18 @@ static struct dwarf2_fde *dwarf2_frame_find_fde (CORE_ADDR *pc);
enum dwarf2_reg_rule
{
- /* Make certain that 0 maps onto the correct enum value - the
+ /* Make certain that 0 maps onto the correct enum value; the
corresponding structure is being initialized using memset zero.
This indicates that CFI didn't provide any information at all
- about a register - leaving how to obtain it's value totally
+ about a register, leaving how to obtain its value totally
unspecified. */
REG_UNSPECIFIED = 0,
/* The term "undefined" comes from the DWARF2 CFI spec which this
- code is moddeling - it indicates that the register's value is
- "undefined". */
- /* NOTE: cagney/2003-09-08: GCC uses the less formal term "unsaved"
- - it's definition is a combination of REG_UNDEFINED and
- REG_UNSPECIFIED - the failure to differentiate the two helps
- explain a few problems with the CFI GCC outputs. */
+ code is moddeling; it indicates that the register's value is
+ "undefined". GCC uses the less formal term "unsaved". Its
+ definition is a combination of REG_UNDEFINED and REG_UNSPECIFIED.
+ The failure to differentiate the two helps explain a few problems
+ with the CFI generated by GCC. */
REG_UNDEFINED,
REG_SAVED_OFFSET,
REG_SAVED_REG,
@@ -500,18 +499,15 @@ dwarf2_frame_cache (struct frame_info *next_frame, void **this_cache)
to abort), the compiler might optimize away the instruction at
NEXT_FRAME's return address. As a result the return address will
point at some random instruction, and the CFI for that
- instruction is probably wortless to us. GCC's unwinder solves
+ instruction is probably worthless to us. GCC's unwinder solves
this problem by substracting 1 from the return address to get an
address in the middle of a presumed call instruction (or the
instruction in the associated delay slot). This should only be
done for "normal" frames and not for resume-type frames (signal
- handlers, sentinel frames, dummy frames).
-
- frame_unwind_address_in_block does just this.
-
- It's not clear how reliable the method is though - there is the
- potential for the register state pre-call being different to that
- on return. */
+ handlers, sentinel frames, dummy frames). The function
+ frame_unwind_address_in_block does just this. It's not clear how
+ reliable the method is though; there is the potential for the
+ register state pre-call being different to that on return. */
fs->pc = frame_unwind_address_in_block (next_frame);
/* Find the correct FDE. */
@@ -555,6 +551,7 @@ dwarf2_frame_cache (struct frame_info *next_frame, void **this_cache)
unspecified. */
{
int regnum;
+
for (regnum = 0; regnum < num_regs; regnum++)
cache->reg[regnum].how = REG_UNSPECIFIED;
}
@@ -563,6 +560,7 @@ dwarf2_frame_cache (struct frame_info *next_frame, void **this_cache)
location information in the cache. */
{
int column; /* CFI speak for "register number". */
+
for (column = 0; column < fs->regs.num_regs; column++)
{
int regnum;
@@ -573,9 +571,10 @@ dwarf2_frame_cache (struct frame_info *next_frame, void **this_cache)
RETADDR_COLUMN corresponds to a real register (and,
worse, that isn't the PC_REGNUM)? I'm guessing that the
PC_REGNUM further down is trying to handle this. That
- can't be right though - PC_REGNUM may not be valid (it
- can be -ve). I think, instead when RETADDR_COLUM isn't a
- real register, it should map itself onto frame_pc_unwind. */
+ can't be right though; PC_REGNUM may not be valid (it can
+ be negative). I think, instead when RETADDR_COLUM isn't
+ a real register, it should map itself onto
+ frame_pc_unwind. */
continue;
/* Use the GDB register number as the destination index. */
@@ -586,15 +585,15 @@ dwarf2_frame_cache (struct frame_info *next_frame, void **this_cache)
continue;
/* NOTE: cagney/2003-09-05: CFI should specify the disposition
- of all debug info registers. If it doesn't complain (but
- not too loudly). It turns out that GCC, assumes that an
+ of all debug info registers. If it doesn't, complain (but
+ not too loudly). It turns out that GCC assumes that an
unspecified register implies "same value" when CFI (draft
7) specifies nothing at all. Such a register could equally
be interpreted as "undefined". Also note that this check
- isn't sufficient - it only checks that all registers in the
- range [0 .. max column] are specified - and won't detect
+ isn't sufficient; it only checks that all registers in the
+ range [0 .. max column] are specified, and won't detect
problems when a debug info register falls outside of the
- table. Need a way of iterating through all the valid
+ table. We need a way of iterating through all the valid
DWARF2 register numbers. */
if (fs->regs.reg[column].how == REG_UNSPECIFIED)
complaint (&symfile_complaints,
@@ -606,27 +605,26 @@ dwarf2_frame_cache (struct frame_info *next_frame, void **this_cache)
}
/* Store the location of the return addess. If the return address
- column (adjusted) is not the same as gdb's PC_REGNUM, then this
- implies a copy from the ra column register. */
+ column (adjusted) is not the same as GDB's PC_REGNUM, then this
+ implies a copy from the return address column register. */
if (fs->retaddr_column < fs->regs.num_regs
&& fs->regs.reg[fs->retaddr_column].how != REG_UNDEFINED)
{
- /* See comment above about a possibly -ve PC_REGNUM. If this
- assertion fails, it's a problem with this code and not the
- architecture. */
+ /* See comment above about a possibly negative PC_REGNUM. If
+ this assertion fails, it's a problem with this code and not
+ the architecture. */
gdb_assert (PC_REGNUM >= 0);
cache->reg[PC_REGNUM] = fs->regs.reg[fs->retaddr_column];
}
else
{
- int reg = DWARF2_REG_TO_REGNUM (fs->retaddr_column);
- if (reg != PC_REGNUM)
+ if (DWARF2_REG_TO_REGNUM (fs->retaddr_column) != PC_REGNUM)
{
- /* See comment above about PC_REGNUM being -ve. If this
- assertion fails, it's a problem with this code and not
- the architecture. */
+ /* See comment above about PC_REGNUM being negative. If
+ this assertion fails, it's a problem with this code and
+ not the architecture. */
gdb_assert (PC_REGNUM >= 0);
- cache->reg[PC_REGNUM].loc.reg = reg;
+ cache->reg[PC_REGNUM].loc.reg = fs->retaddr_column;
cache->reg[PC_REGNUM].how = REG_SAVED_REG;
}
}
@@ -660,7 +658,7 @@ dwarf2_frame_prev_register (struct frame_info *next_frame, void **this_cache,
{
case REG_UNDEFINED:
/* If CFI explicitly specified that the value isn't defined,
- mark it as optimized away - the value isn't available. */
+ mark it as optimized away; the value isn't available. */
*optimizedp = 1;
*lvalp = not_lval;
*addrp = 0;
@@ -681,8 +679,8 @@ dwarf2_frame_prev_register (struct frame_info *next_frame, void **this_cache,
/* FIXME: cagney/2003-07-07: I don't understand this. The
CFI info should have provided unwind information for the
SP register and then pointed ->cfa_reg at it, not the
- reverse. Assuming that SP_REGNUM is !-ve, there is a
- very real posibility that CFA is an offset from some
+ reverse. Assuming that SP_REGNUM isn't negative, there
+ is a very real posibility that CFA is an offset from some
other register, having nothing to do with the unwound SP
value. */
/* FIXME: cagney/2003-09-05: I think I understand. GDB was
@@ -770,7 +768,7 @@ dwarf2_frame_prev_register (struct frame_info *next_frame, void **this_cache,
defines the rule which computes the CFA value; it may be
either a register and a signed offset that are added
together or a DWARF expression that is evaluated. */
- /* NOTE: cagney/2003-09-05: Should issue a complain.
+ /* NOTE: cagney/2003-09-05: Should issue a complaint.
Unfortunately it turns out that DWARF2 CFI has a problem.
Since CFI specifies the location at which a register was
saved (not its value) it isn't possible to specify
@@ -1508,16 +1506,11 @@ decode_frame_entry (struct comp_unit *unit, char *start, int eh_frame_p)
dwarf2read.c in a better way. */
/* Imported from dwarf2read.c. */
-extern file_ptr dwarf_frame_offset;
-extern unsigned int dwarf_frame_size;
extern asection *dwarf_frame_section;
-extern file_ptr dwarf_eh_frame_offset;
-extern unsigned int dwarf_eh_frame_size;
extern asection *dwarf_eh_frame_section;
/* Imported from dwarf2read.c. */
-extern char *dwarf2_read_section (struct objfile *objfile, file_ptr offset,
- unsigned int size, asection *sectp);
+extern char *dwarf2_read_section (struct objfile *objfile, asection *sectp);
void
dwarf2_build_frame_info (struct objfile *objfile)
@@ -1534,17 +1527,16 @@ dwarf2_build_frame_info (struct objfile *objfile)
/* First add the information from the .eh_frame section. That way,
the FDEs from that section are searched last. */
- if (dwarf_eh_frame_offset)
+ if (dwarf_eh_frame_section)
{
asection *got, *txt;
unit.cie = NULL;
unit.dwarf_frame_buffer = dwarf2_read_section (objfile,
- dwarf_eh_frame_offset,
- dwarf_eh_frame_size,
dwarf_eh_frame_section);
- unit.dwarf_frame_size = dwarf_eh_frame_size;
+ unit.dwarf_frame_size
+ = bfd_get_section_size_before_reloc (dwarf_eh_frame_section);
unit.dwarf_frame_section = dwarf_eh_frame_section;
/* FIXME: kettenis/20030602: This is the DW_EH_PE_datarel base
@@ -1566,14 +1558,13 @@ dwarf2_build_frame_info (struct objfile *objfile)
frame_ptr = decode_frame_entry (&unit, frame_ptr, 1);
}
- if (dwarf_frame_offset)
+ if (dwarf_frame_section)
{
unit.cie = NULL;
unit.dwarf_frame_buffer = dwarf2_read_section (objfile,
- dwarf_frame_offset,
- dwarf_frame_size,
dwarf_frame_section);
- unit.dwarf_frame_size = dwarf_frame_size;
+ unit.dwarf_frame_size
+ = bfd_get_section_size_before_reloc (dwarf_frame_section);
unit.dwarf_frame_section = dwarf_frame_section;
frame_ptr = unit.dwarf_frame_buffer;
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 33146a899ee..807432473a5 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -128,18 +128,6 @@ _STATEMENT_PROLOGUE;
/* offsets and sizes of debugging sections */
-static file_ptr dwarf_info_offset;
-static file_ptr dwarf_abbrev_offset;
-static file_ptr dwarf_line_offset;
-static file_ptr dwarf_pubnames_offset;
-static file_ptr dwarf_aranges_offset;
-static file_ptr dwarf_loc_offset;
-static file_ptr dwarf_macinfo_offset;
-static file_ptr dwarf_str_offset;
-static file_ptr dwarf_ranges_offset;
-file_ptr dwarf_frame_offset;
-file_ptr dwarf_eh_frame_offset;
-
static unsigned int dwarf_info_size;
static unsigned int dwarf_abbrev_size;
static unsigned int dwarf_line_size;
@@ -230,6 +218,20 @@ struct comp_unit_head
int base_known;
};
+/* Internal state when decoding a particular compilation unit. */
+struct dwarf2_cu
+{
+ /* The objfile containing this compilation unit. */
+ struct objfile *objfile;
+
+ /* The header of the compilation unit.
+
+ FIXME drow/2003-11-10: Some of the things from the comp_unit_head
+ should be moved to the dwarf2_cu structure; for instance the abbrevs
+ hash table. */
+ struct comp_unit_head header;
+};
+
/* The line number information for a compilation unit (found in the
.debug_line section) begins with a "statement program header",
which contains the following information. */
@@ -429,31 +431,9 @@ static struct pending **list_in_scope = &file_symbols;
none of the flags are set, the object lives at the address returned
by decode_locdesc. */
-static int optimized_out; /* No ops in location in expression,
- so object was optimized out. */
static int isreg; /* Object lives in register.
decode_locdesc's return value is
the register number. */
-static int offreg; /* Object's address is the sum of the
- register specified by basereg, plus
- the offset returned. */
-static int basereg; /* See `offreg'. */
-static int isderef; /* Value described by flags above is
- the address of a pointer to the object. */
-static int islocal; /* Variable is at the returned offset
- from the frame start, but there's
- no identified frame pointer for
- this function, so we can't say
- which register it's relative to;
- use LOC_LOCAL. */
-
-/* DW_AT_frame_base values for the current function.
- frame_base_reg is -1 if DW_AT_frame_base is missing, otherwise it
- contains the register number for the frame register.
- frame_base_offset is the offset from the frame register to the
- virtual stack frame. */
-static int frame_base_reg;
-static CORE_ADDR frame_base_offset;
/* This value is added to each symbol value. FIXME: Generalize to
the section_offsets structure used by dbxread (once this is done,
@@ -678,67 +658,60 @@ static void dwarf2_build_psymtabs_easy (struct objfile *, int);
static void dwarf2_build_psymtabs_hard (struct objfile *, int);
-static char *scan_partial_symbols (char *, struct objfile *,
- CORE_ADDR *, CORE_ADDR *,
- const struct comp_unit_head *,
+static char *scan_partial_symbols (char *, CORE_ADDR *, CORE_ADDR *,
+ struct dwarf2_cu *,
const char *namespace);
-static void add_partial_symbol (struct partial_die_info *, struct objfile *,
- const struct comp_unit_head *,
+static void add_partial_symbol (struct partial_die_info *, struct dwarf2_cu *,
const char *namespace);
static int pdi_needs_namespace (enum dwarf_tag tag, const char *namespace);
static char *add_partial_namespace (struct partial_die_info *pdi,
char *info_ptr,
- struct objfile *objfile,
CORE_ADDR *lowpc, CORE_ADDR *highpc,
- const struct comp_unit_head *cu_header,
+ struct dwarf2_cu *cu,
const char *namespace);
static char *add_partial_structure (struct partial_die_info *struct_pdi,
char *info_ptr,
- struct objfile *objfile,
- const struct comp_unit_head *cu_header,
+ struct dwarf2_cu *cu,
const char *namespace);
static char *add_partial_enumeration (struct partial_die_info *enum_pdi,
char *info_ptr,
- struct objfile *objfile,
- const struct comp_unit_head *cu_header,
+ struct dwarf2_cu *cu,
const char *namespace);
static char *locate_pdi_sibling (struct partial_die_info *orig_pdi,
char *info_ptr,
bfd *abfd,
- const struct comp_unit_head *cu_header);
+ struct dwarf2_cu *cu);
static void dwarf2_psymtab_to_symtab (struct partial_symtab *);
static void psymtab_to_symtab_1 (struct partial_symtab *);
-char *dwarf2_read_section (struct objfile *, file_ptr, unsigned int,
- asection *);
+char *dwarf2_read_section (struct objfile *, asection *);
-static void dwarf2_read_abbrevs (bfd *abfd, struct comp_unit_head *cu_header);
+static void dwarf2_read_abbrevs (bfd *abfd, struct dwarf2_cu *cu);
static void dwarf2_empty_abbrev_table (void *);
static struct abbrev_info *dwarf2_lookup_abbrev (unsigned int,
- const struct comp_unit_head *cu_header);
+ struct dwarf2_cu *);
static char *read_partial_die (struct partial_die_info *,
- bfd *, char *,
- const struct comp_unit_head *);
+ bfd *, char *, struct dwarf2_cu *);
static char *read_full_die (struct die_info **, bfd *, char *,
- const struct comp_unit_head *, int *);
+ struct dwarf2_cu *, int *);
static char *read_attribute (struct attribute *, struct attr_abbrev *,
- bfd *, char *, const struct comp_unit_head *);
+ bfd *, char *, struct dwarf2_cu *);
static char *read_attribute_value (struct attribute *, unsigned,
- bfd *, char *, const struct comp_unit_head *);
+ bfd *, char *, struct dwarf2_cu *);
static unsigned int read_1_byte (bfd *, char *);
@@ -750,7 +723,7 @@ static unsigned int read_4_bytes (bfd *, char *);
static unsigned long read_8_bytes (bfd *, char *);
-static CORE_ADDR read_address (bfd *, char *ptr, const struct comp_unit_head *,
+static CORE_ADDR read_address (bfd *, char *ptr, struct dwarf2_cu *,
int *bytes_read);
static LONGEST read_initial_length (bfd *, char *,
@@ -782,39 +755,35 @@ static void free_line_header (struct line_header *lh);
static struct line_header *(dwarf_decode_line_header
(unsigned int offset,
- bfd *abfd,
- const struct comp_unit_head *cu_header));
+ bfd *abfd, struct dwarf2_cu *cu));
static void dwarf_decode_lines (struct line_header *, char *, bfd *,
- const struct comp_unit_head *);
+ struct dwarf2_cu *);
static void dwarf2_start_subfile (char *, char *);
static struct symbol *new_symbol (struct die_info *, struct type *,
- struct objfile *, const struct comp_unit_head *);
+ struct dwarf2_cu *);
static void dwarf2_const_value (struct attribute *, struct symbol *,
- struct objfile *, const struct comp_unit_head *);
+ struct dwarf2_cu *);
static void dwarf2_const_value_data (struct attribute *attr,
struct symbol *sym,
int bits);
-static struct type *die_type (struct die_info *, struct objfile *,
- const struct comp_unit_head *);
+static struct type *die_type (struct die_info *, struct dwarf2_cu *);
-static struct type *die_containing_type (struct die_info *, struct objfile *,
- const struct comp_unit_head *);
+static struct type *die_containing_type (struct die_info *,
+ struct dwarf2_cu *);
#if 0
static struct type *type_at_offset (unsigned int, struct objfile *);
#endif
-static struct type *tag_type_to_type (struct die_info *, struct objfile *,
- const struct comp_unit_head *);
+static struct type *tag_type_to_type (struct die_info *, struct dwarf2_cu *);
-static void read_type_die (struct die_info *, struct objfile *,
- const struct comp_unit_head *);
+static void read_type_die (struct die_info *, struct dwarf2_cu *);
static char *determine_prefix (struct die_info *die);
@@ -822,95 +791,77 @@ static char *typename_concat (const char *prefix, const char *suffix);
static char *class_name (struct die_info *die);
-static void read_typedef (struct die_info *, struct objfile *,
- const struct comp_unit_head *);
+static void read_typedef (struct die_info *, struct dwarf2_cu *);
-static void read_base_type (struct die_info *, struct objfile *);
+static void read_base_type (struct die_info *, struct dwarf2_cu *);
-static void read_file_scope (struct die_info *, struct objfile *,
- const struct comp_unit_head *);
+static void read_file_scope (struct die_info *, struct dwarf2_cu *);
-static void read_func_scope (struct die_info *, struct objfile *,
- const struct comp_unit_head *);
+static void read_func_scope (struct die_info *, struct dwarf2_cu *);
-static void read_lexical_block_scope (struct die_info *, struct objfile *,
- const struct comp_unit_head *);
+static void read_lexical_block_scope (struct die_info *, struct dwarf2_cu *);
static int dwarf2_get_pc_bounds (struct die_info *,
- CORE_ADDR *, CORE_ADDR *, struct objfile *,
- const struct comp_unit_head *);
+ CORE_ADDR *, CORE_ADDR *, struct dwarf2_cu *);
static void get_scope_pc_bounds (struct die_info *,
- CORE_ADDR *, CORE_ADDR *, struct objfile *,
- const struct comp_unit_head *);
+ CORE_ADDR *, CORE_ADDR *,
+ struct dwarf2_cu *);
static void dwarf2_add_field (struct field_info *, struct die_info *,
- struct objfile *, const struct comp_unit_head *);
+ struct dwarf2_cu *);
static void dwarf2_attach_fields_to_type (struct field_info *,
- struct type *, struct objfile *);
+ struct type *, struct dwarf2_cu *);
static void dwarf2_add_member_fn (struct field_info *,
struct die_info *, struct type *,
- struct objfile *objfile,
- const struct comp_unit_head *);
+ struct dwarf2_cu *);
static void dwarf2_attach_fn_fields_to_type (struct field_info *,
- struct type *, struct objfile *);
+ struct type *, struct dwarf2_cu *);
-static void read_structure_scope (struct die_info *, struct objfile *,
- const struct comp_unit_head *);
+static void read_structure_scope (struct die_info *, struct dwarf2_cu *);
-static void read_common_block (struct die_info *, struct objfile *,
- const struct comp_unit_head *);
+static void read_common_block (struct die_info *, struct dwarf2_cu *);
-static void read_namespace (struct die_info *die, struct objfile *objfile,
- const struct comp_unit_head *cu_header);
+static void read_namespace (struct die_info *die, struct dwarf2_cu *);
static const char *namespace_name (struct die_info *die,
int *is_anonymous);
-static void read_enumeration (struct die_info *, struct objfile *,
- const struct comp_unit_head *);
+static void read_enumeration (struct die_info *, struct dwarf2_cu *);
-static struct type *dwarf_base_type (int, int, struct objfile *);
+static struct type *dwarf_base_type (int, int, struct dwarf2_cu *);
-static CORE_ADDR decode_locdesc (struct dwarf_block *, struct objfile *,
- const struct comp_unit_head *);
+static CORE_ADDR decode_locdesc (struct dwarf_block *, struct dwarf2_cu *);
-static void read_array_type (struct die_info *, struct objfile *,
- const struct comp_unit_head *);
+static void read_array_type (struct die_info *, struct dwarf2_cu *);
-static void read_tag_pointer_type (struct die_info *, struct objfile *,
- const struct comp_unit_head *);
+static void read_tag_pointer_type (struct die_info *, struct dwarf2_cu *);
-static void read_tag_ptr_to_member_type (struct die_info *, struct objfile *,
- const struct comp_unit_head *);
+static void read_tag_ptr_to_member_type (struct die_info *,
+ struct dwarf2_cu *);
-static void read_tag_reference_type (struct die_info *, struct objfile *,
- const struct comp_unit_head *);
+static void read_tag_reference_type (struct die_info *, struct dwarf2_cu *);
-static void read_tag_const_type (struct die_info *, struct objfile *,
- const struct comp_unit_head *);
+static void read_tag_const_type (struct die_info *, struct dwarf2_cu *);
-static void read_tag_volatile_type (struct die_info *, struct objfile *,
- const struct comp_unit_head *);
+static void read_tag_volatile_type (struct die_info *, struct dwarf2_cu *);
-static void read_tag_string_type (struct die_info *, struct objfile *);
+static void read_tag_string_type (struct die_info *, struct dwarf2_cu *);
-static void read_subroutine_type (struct die_info *, struct objfile *,
- const struct comp_unit_head *);
+static void read_subroutine_type (struct die_info *, struct dwarf2_cu *);
-static struct die_info *read_comp_unit (char *, bfd *,
- const struct comp_unit_head *);
+static struct die_info *read_comp_unit (char *, bfd *, struct dwarf2_cu *);
static struct die_info *read_die_and_children (char *info_ptr, bfd *abfd,
- const struct comp_unit_head *,
+ struct dwarf2_cu *,
char **new_info_ptr,
struct die_info *parent);
static struct die_info *read_die_and_siblings (char *info_ptr, bfd *abfd,
- const struct comp_unit_head *,
+ struct dwarf2_cu *,
char **new_info_ptr,
struct die_info *parent);
@@ -918,8 +869,7 @@ static void free_die_list (struct die_info *);
static struct cleanup *make_cleanup_free_die_list (struct die_info *);
-static void process_die (struct die_info *, struct objfile *,
- const struct comp_unit_head *);
+static void process_die (struct die_info *, struct dwarf2_cu *);
static char *dwarf2_linkage_name (struct die_info *);
@@ -976,15 +926,13 @@ static void initialize_cu_func_list (void);
static void add_to_cu_func_list (char *, CORE_ADDR, CORE_ADDR);
static void dwarf_decode_macros (struct line_header *, unsigned int,
- char *, bfd *, const struct comp_unit_head *,
- struct objfile *);
+ char *, bfd *, struct dwarf2_cu *);
static int attr_form_is_block (struct attribute *);
static void
dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym,
- const struct comp_unit_head *,
- struct objfile *objfile);
+ struct dwarf2_cu *cu);
/* Try to locate the sections we need for DWARF 2 debugging
information and return true if we have enough to do something. */
@@ -992,25 +940,18 @@ dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym,
int
dwarf2_has_info (bfd *abfd)
{
- dwarf_info_offset = 0;
- dwarf_abbrev_offset = 0;
- dwarf_line_offset = 0;
- dwarf_str_offset = 0;
- dwarf_macinfo_offset = 0;
- dwarf_frame_offset = 0;
- dwarf_eh_frame_offset = 0;
- dwarf_ranges_offset = 0;
- dwarf_loc_offset = 0;
+ dwarf_info_section = 0;
+ dwarf_abbrev_section = 0;
+ dwarf_line_section = 0;
+ dwarf_str_section = 0;
+ dwarf_macinfo_section = 0;
+ dwarf_frame_section = 0;
+ dwarf_eh_frame_section = 0;
+ dwarf_ranges_section = 0;
+ dwarf_loc_section = 0;
bfd_map_over_sections (abfd, dwarf2_locate_sections, NULL);
- if (dwarf_info_offset && dwarf_abbrev_offset)
- {
- return 1;
- }
- else
- {
- return 0;
- }
+ return (dwarf_info_section != NULL && dwarf_abbrev_section != NULL);
}
/* This function is mapped across the sections and remembers the
@@ -1022,55 +963,46 @@ dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, void *ignore_ptr)
{
if (strcmp (sectp->name, INFO_SECTION) == 0)
{
- dwarf_info_offset = sectp->filepos;
dwarf_info_size = bfd_get_section_size_before_reloc (sectp);
dwarf_info_section = sectp;
}
else if (strcmp (sectp->name, ABBREV_SECTION) == 0)
{
- dwarf_abbrev_offset = sectp->filepos;
dwarf_abbrev_size = bfd_get_section_size_before_reloc (sectp);
dwarf_abbrev_section = sectp;
}
else if (strcmp (sectp->name, LINE_SECTION) == 0)
{
- dwarf_line_offset = sectp->filepos;
dwarf_line_size = bfd_get_section_size_before_reloc (sectp);
dwarf_line_section = sectp;
}
else if (strcmp (sectp->name, PUBNAMES_SECTION) == 0)
{
- dwarf_pubnames_offset = sectp->filepos;
dwarf_pubnames_size = bfd_get_section_size_before_reloc (sectp);
dwarf_pubnames_section = sectp;
}
else if (strcmp (sectp->name, ARANGES_SECTION) == 0)
{
- dwarf_aranges_offset = sectp->filepos;
dwarf_aranges_size = bfd_get_section_size_before_reloc (sectp);
dwarf_aranges_section = sectp;
}
else if (strcmp (sectp->name, LOC_SECTION) == 0)
{
- dwarf_loc_offset = sectp->filepos;
dwarf_loc_size = bfd_get_section_size_before_reloc (sectp);
dwarf_loc_section = sectp;
}
else if (strcmp (sectp->name, MACINFO_SECTION) == 0)
{
- dwarf_macinfo_offset = sectp->filepos;
dwarf_macinfo_size = bfd_get_section_size_before_reloc (sectp);
dwarf_macinfo_section = sectp;
}
else if (strcmp (sectp->name, STR_SECTION) == 0)
{
- dwarf_str_offset = sectp->filepos;
dwarf_str_size = bfd_get_section_size_before_reloc (sectp);
dwarf_str_section = sectp;
}
else if (strcmp (sectp->name, FRAME_SECTION) == 0)
{
- dwarf_frame_offset = sectp->filepos;
dwarf_frame_size = bfd_get_section_size_before_reloc (sectp);
dwarf_frame_section = sectp;
}
@@ -1079,14 +1011,12 @@ dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, void *ignore_ptr)
flagword aflag = bfd_get_section_flags (ignore_abfd, sectp);
if (aflag & SEC_HAS_CONTENTS)
{
- dwarf_eh_frame_offset = sectp->filepos;
dwarf_eh_frame_size = bfd_get_section_size_before_reloc (sectp);
dwarf_eh_frame_section = sectp;
}
}
else if (strcmp (sectp->name, RANGES_SECTION) == 0)
{
- dwarf_ranges_offset = sectp->filepos;
dwarf_ranges_size = bfd_get_section_size_before_reloc (sectp);
dwarf_ranges_section = sectp;
}
@@ -1100,52 +1030,32 @@ dwarf2_build_psymtabs (struct objfile *objfile, int mainline)
/* We definitely need the .debug_info and .debug_abbrev sections */
- dwarf_info_buffer = dwarf2_read_section (objfile,
- dwarf_info_offset,
- dwarf_info_size,
- dwarf_info_section);
- dwarf_abbrev_buffer = dwarf2_read_section (objfile,
- dwarf_abbrev_offset,
- dwarf_abbrev_size,
- dwarf_abbrev_section);
-
- if (dwarf_line_offset)
- dwarf_line_buffer = dwarf2_read_section (objfile,
- dwarf_line_offset,
- dwarf_line_size,
- dwarf_line_section);
+ dwarf_info_buffer = dwarf2_read_section (objfile, dwarf_info_section);
+ dwarf_abbrev_buffer = dwarf2_read_section (objfile, dwarf_abbrev_section);
+
+ if (dwarf_line_section)
+ dwarf_line_buffer = dwarf2_read_section (objfile, dwarf_line_section);
else
dwarf_line_buffer = NULL;
- if (dwarf_str_offset)
- dwarf_str_buffer = dwarf2_read_section (objfile,
- dwarf_str_offset,
- dwarf_str_size,
- dwarf_str_section);
+ if (dwarf_str_section)
+ dwarf_str_buffer = dwarf2_read_section (objfile, dwarf_str_section);
else
dwarf_str_buffer = NULL;
- if (dwarf_macinfo_offset)
+ if (dwarf_macinfo_section)
dwarf_macinfo_buffer = dwarf2_read_section (objfile,
- dwarf_macinfo_offset,
- dwarf_macinfo_size,
dwarf_macinfo_section);
else
dwarf_macinfo_buffer = NULL;
- if (dwarf_ranges_offset)
- dwarf_ranges_buffer = dwarf2_read_section (objfile,
- dwarf_ranges_offset,
- dwarf_ranges_size,
- dwarf_ranges_section);
+ if (dwarf_ranges_section)
+ dwarf_ranges_buffer = dwarf2_read_section (objfile, dwarf_ranges_section);
else
dwarf_ranges_buffer = NULL;
- if (dwarf_loc_offset)
- dwarf_loc_buffer = dwarf2_read_section (objfile,
- dwarf_loc_offset,
- dwarf_loc_size,
- dwarf_loc_section);
+ if (dwarf_loc_section)
+ dwarf_loc_buffer = dwarf2_read_section (objfile, dwarf_loc_section);
else
dwarf_loc_buffer = NULL;
@@ -1186,8 +1096,6 @@ dwarf2_build_psymtabs_easy (struct objfile *objfile, int mainline)
unsigned int entry_length, version, info_offset, info_size;
pubnames_buffer = dwarf2_read_section (objfile,
- dwarf_pubnames_offset,
- dwarf_pubnames_size,
dwarf_pubnames_section);
pubnames_ptr = pubnames_buffer;
while ((pubnames_ptr - pubnames_buffer) < dwarf_pubnames_size)
@@ -1207,8 +1115,6 @@ dwarf2_build_psymtabs_easy (struct objfile *objfile, int mainline)
}
aranges_buffer = dwarf2_read_section (objfile,
- dwarf_aranges_offset,
- dwarf_aranges_size,
dwarf_aranges_section);
}
@@ -1306,44 +1212,46 @@ dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline)
left at all should be sufficient. */
while (info_ptr < dwarf_info_buffer + dwarf_info_size)
{
- struct comp_unit_head cu_header;
+ struct dwarf2_cu cu;
beg_of_comp_unit = info_ptr;
- info_ptr = read_comp_unit_head (&cu_header, info_ptr, abfd);
- if (cu_header.version != 2)
+ cu.objfile = objfile;
+ info_ptr = read_comp_unit_head (&cu.header, info_ptr, abfd);
+
+ if (cu.header.version != 2)
{
- error ("Dwarf Error: wrong version in compilation unit header (is %d, should be %d) [in module %s]", cu_header.version, 2, bfd_get_filename (abfd));
+ error ("Dwarf Error: wrong version in compilation unit header (is %d, should be %d) [in module %s]", cu.header.version, 2, bfd_get_filename (abfd));
return;
}
- if (cu_header.abbrev_offset >= dwarf_abbrev_size)
+ if (cu.header.abbrev_offset >= dwarf_abbrev_size)
{
error ("Dwarf Error: bad offset (0x%lx) in compilation unit header (offset 0x%lx + 6) [in module %s]",
- (long) cu_header.abbrev_offset,
+ (long) cu.header.abbrev_offset,
(long) (beg_of_comp_unit - dwarf_info_buffer),
bfd_get_filename (abfd));
return;
}
- if (beg_of_comp_unit + cu_header.length + cu_header.initial_length_size
+ if (beg_of_comp_unit + cu.header.length + cu.header.initial_length_size
> dwarf_info_buffer + dwarf_info_size)
{
error ("Dwarf Error: bad length (0x%lx) in compilation unit header (offset 0x%lx + 0) [in module %s]",
- (long) cu_header.length,
+ (long) cu.header.length,
(long) (beg_of_comp_unit - dwarf_info_buffer),
bfd_get_filename (abfd));
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;
+ 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);
- make_cleanup (dwarf2_empty_abbrev_table, cu_header.dwarf2_abbrevs);
+ dwarf2_read_abbrevs (abfd, &cu);
+ 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,
- &cu_header);
+ &cu);
/* Set the language we're debugging */
set_cu_language (comp_unit_die.language);
@@ -1385,8 +1293,8 @@ dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline)
lowpc = ((CORE_ADDR) -1);
highpc = ((CORE_ADDR) 0);
- info_ptr = scan_partial_symbols (info_ptr, objfile, &lowpc, &highpc,
- &cu_header, NULL);
+ info_ptr = scan_partial_symbols (info_ptr, &lowpc, &highpc,
+ &cu, NULL);
/* If we didn't find a lowpc, set it to highpc to avoid
complaints from `maint check'. */
@@ -1415,8 +1323,8 @@ dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline)
also happen.) This happens in VxWorks. */
free_named_symtabs (pst->filename);
- info_ptr = beg_of_comp_unit + cu_header.length
- + cu_header.initial_length_size;
+ info_ptr = beg_of_comp_unit + cu.header.length
+ + cu.header.initial_length_size;
}
do_cleanups (back_to);
}
@@ -1429,11 +1337,11 @@ dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline)
previously encountered a DW_TAG_namespace. */
static char *
-scan_partial_symbols (char *info_ptr, struct objfile *objfile,
- CORE_ADDR *lowpc, CORE_ADDR *highpc,
- const struct comp_unit_head *cu_header,
+scan_partial_symbols (char *info_ptr, CORE_ADDR *lowpc,
+ CORE_ADDR *highpc, struct dwarf2_cu *cu,
const char *namespace)
{
+ struct objfile *objfile = cu->objfile;
bfd *abfd = objfile->obfd;
struct partial_die_info pdi;
@@ -1447,7 +1355,7 @@ scan_partial_symbols (char *info_ptr, struct objfile *objfile,
inside the loop. */
int info_ptr_updated = 0;
- info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu_header);
+ info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu);
/* Anonymous namespaces have no name but have interesting
children, so we need to look at them. Ditto for anonymous
@@ -1471,7 +1379,7 @@ scan_partial_symbols (char *info_ptr, struct objfile *objfile,
}
if (!pdi.is_declaration)
{
- add_partial_symbol (&pdi, objfile, cu_header, namespace);
+ add_partial_symbol (&pdi, cu, namespace);
}
}
break;
@@ -1480,15 +1388,14 @@ scan_partial_symbols (char *info_ptr, struct objfile *objfile,
case DW_TAG_union_type:
if (!pdi.is_declaration)
{
- add_partial_symbol (&pdi, objfile, cu_header, namespace);
+ add_partial_symbol (&pdi, cu, namespace);
}
break;
case DW_TAG_class_type:
case DW_TAG_structure_type:
if (!pdi.is_declaration)
{
- info_ptr = add_partial_structure (&pdi, info_ptr,
- objfile, cu_header,
+ info_ptr = add_partial_structure (&pdi, info_ptr, cu,
namespace);
info_ptr_updated = 1;
}
@@ -1496,8 +1403,7 @@ scan_partial_symbols (char *info_ptr, struct objfile *objfile,
case DW_TAG_enumeration_type:
if (!pdi.is_declaration)
{
- info_ptr = add_partial_enumeration (&pdi, info_ptr,
- objfile, cu_header,
+ info_ptr = add_partial_enumeration (&pdi, info_ptr, cu,
namespace);
info_ptr_updated = 1;
}
@@ -1505,7 +1411,7 @@ scan_partial_symbols (char *info_ptr, struct objfile *objfile,
case DW_TAG_base_type:
/* File scope base type definitions are added to the partial
symbol table. */
- add_partial_symbol (&pdi, objfile, cu_header, namespace);
+ add_partial_symbol (&pdi, cu, namespace);
break;
case DW_TAG_namespace:
/* We've hit a DW_TAG_namespace entry, so we know this
@@ -1513,9 +1419,8 @@ scan_partial_symbols (char *info_ptr, struct objfile *objfile,
generates them; update NAMESPACE to reflect that. */
if (namespace == NULL)
namespace = "";
- info_ptr = add_partial_namespace (&pdi, info_ptr, objfile,
- lowpc, highpc, cu_header,
- namespace);
+ info_ptr = add_partial_namespace (&pdi, info_ptr, lowpc, highpc,
+ cu, namespace);
info_ptr_updated = 1;
break;
default:
@@ -1535,17 +1440,17 @@ scan_partial_symbols (char *info_ptr, struct objfile *objfile,
this seems like the easiest way to handle the issue. */
if (!info_ptr_updated)
- info_ptr = locate_pdi_sibling (&pdi, info_ptr, abfd, cu_header);
+ info_ptr = locate_pdi_sibling (&pdi, info_ptr, abfd, cu);
}
return info_ptr;
}
static void
-add_partial_symbol (struct partial_die_info *pdi, struct objfile *objfile,
- const struct comp_unit_head *cu_header,
- const char *namespace)
+add_partial_symbol (struct partial_die_info *pdi,
+ struct dwarf2_cu *cu, const char *namespace)
{
+ struct objfile *objfile = cu->objfile;
CORE_ADDR addr = 0;
char *actual_name = pdi->name;
const struct partial_symbol *psym = NULL;
@@ -1602,7 +1507,7 @@ add_partial_symbol (struct partial_die_info *pdi, struct objfile *objfile,
table building. */
if (pdi->locdesc)
- addr = decode_locdesc (pdi->locdesc, objfile, cu_header);
+ addr = decode_locdesc (pdi->locdesc, cu);
if (pdi->locdesc || pdi->has_type)
psym = add_psymbol_to_list (actual_name, strlen (actual_name),
VAR_DOMAIN, LOC_STATIC,
@@ -1615,7 +1520,7 @@ add_partial_symbol (struct partial_die_info *pdi, struct objfile *objfile,
/* Static Variable. Skip symbols without location descriptors. */
if (pdi->locdesc == NULL)
return;
- addr = decode_locdesc (pdi->locdesc, objfile, cu_header);
+ addr = decode_locdesc (pdi->locdesc, cu);
/*prim_record_minimal_symbol (actual_name, addr + baseaddr,
mst_file_data, objfile); */
psym = add_psymbol_to_list (actual_name, strlen (actual_name),
@@ -1714,16 +1619,15 @@ pdi_needs_namespace (enum dwarf_tag tag, const char *namespace)
static char *
add_partial_namespace (struct partial_die_info *pdi, char *info_ptr,
- struct objfile *objfile,
CORE_ADDR *lowpc, CORE_ADDR *highpc,
- const struct comp_unit_head *cu_header,
- const char *namespace)
+ struct dwarf2_cu *cu, const char *namespace)
{
- /* Calculate the full name of the namespace that we just entered. */
-
+ struct objfile *objfile = cu->objfile;
const char *new_name = pdi->name;
char *full_name;
+ /* Calculate the full name of the namespace that we just entered. */
+
if (new_name == NULL)
new_name = "(anonymous namespace)";
full_name = alloca (strlen (namespace) + 2 + strlen (new_name) + 1);
@@ -1743,9 +1647,7 @@ add_partial_namespace (struct partial_die_info *pdi, char *info_ptr,
/* Now scan partial symbols in that namespace. */
if (pdi->has_children)
- info_ptr = scan_partial_symbols (info_ptr, objfile,
- lowpc, highpc,
- cu_header, full_name);
+ info_ptr = scan_partial_symbols (info_ptr, lowpc, highpc, cu, full_name);
return info_ptr;
}
@@ -1754,10 +1656,10 @@ add_partial_namespace (struct partial_die_info *pdi, char *info_ptr,
static char *
add_partial_structure (struct partial_die_info *struct_pdi, char *info_ptr,
- struct objfile *objfile,
- const struct comp_unit_head *cu_header,
+ struct dwarf2_cu *cu,
const char *namespace)
{
+ struct objfile *objfile = cu->objfile;
bfd *abfd = objfile->obfd;
char *actual_class_name = NULL;
@@ -1783,8 +1685,7 @@ add_partial_structure (struct partial_die_info *struct_pdi, char *info_ptr,
{
struct partial_die_info child_pdi;
- next_child = read_partial_die (&child_pdi, abfd, next_child,
- cu_header);
+ next_child = read_partial_die (&child_pdi, abfd, next_child, cu);
if (!child_pdi.tag)
break;
if (child_pdi.tag == DW_TAG_subprogram)
@@ -1797,40 +1698,39 @@ add_partial_structure (struct partial_die_info *struct_pdi, char *info_ptr,
else
{
next_child = locate_pdi_sibling (&child_pdi, next_child,
- abfd, cu_header);
+ abfd, cu);
}
}
}
- add_partial_symbol (struct_pdi, objfile, cu_header, namespace);
+ add_partial_symbol (struct_pdi, cu, namespace);
xfree(actual_class_name);
- return locate_pdi_sibling (struct_pdi, info_ptr, abfd, cu_header);
+ return locate_pdi_sibling (struct_pdi, info_ptr, abfd, cu);
}
/* Read a partial die corresponding to an enumeration type. */
static char *
add_partial_enumeration (struct partial_die_info *enum_pdi, char *info_ptr,
- struct objfile *objfile,
- const struct comp_unit_head *cu_header,
- const char *namespace)
+ struct dwarf2_cu *cu, const char *namespace)
{
+ struct objfile *objfile = cu->objfile;
bfd *abfd = objfile->obfd;
struct partial_die_info pdi;
if (enum_pdi->name != NULL)
- add_partial_symbol (enum_pdi, objfile, cu_header, namespace);
+ add_partial_symbol (enum_pdi, cu, namespace);
while (1)
{
- info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu_header);
+ info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu);
if (pdi.tag == 0)
break;
if (pdi.tag != DW_TAG_enumerator || pdi.name == NULL)
complaint (&symfile_complaints, "malformed enumerator DIE ignored");
else
- add_partial_symbol (&pdi, objfile, cu_header, namespace);
+ add_partial_symbol (&pdi, cu, namespace);
}
return info_ptr;
@@ -1841,7 +1741,7 @@ add_partial_enumeration (struct partial_die_info *enum_pdi, char *info_ptr,
static char *
locate_pdi_sibling (struct partial_die_info *orig_pdi, char *info_ptr,
- bfd *abfd, const struct comp_unit_head *cu_header)
+ bfd *abfd, struct dwarf2_cu *cu)
{
/* Do we know the sibling already? */
@@ -1861,12 +1761,12 @@ locate_pdi_sibling (struct partial_die_info *orig_pdi, char *info_ptr,
{
struct partial_die_info pdi;
- info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu_header);
+ info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu);
if (pdi.tag == 0)
return info_ptr;
else
- info_ptr = locate_pdi_sibling (&pdi, info_ptr, abfd, cu_header);
+ info_ptr = locate_pdi_sibling (&pdi, info_ptr, abfd, cu);
}
}
@@ -1904,7 +1804,7 @@ psymtab_to_symtab_1 (struct partial_symtab *pst)
{
struct objfile *objfile = pst->objfile;
bfd *abfd = objfile->obfd;
- struct comp_unit_head cu_header;
+ struct dwarf2_cu cu;
struct die_info *dies;
unsigned long offset;
CORE_ADDR lowpc, highpc;
@@ -1942,14 +1842,16 @@ psymtab_to_symtab_1 (struct partial_symtab *pst)
buildsym_init ();
make_cleanup (really_free_pendings, NULL);
+ cu.objfile = objfile;
+
/* read in the comp_unit header */
- info_ptr = read_comp_unit_head (&cu_header, info_ptr, abfd);
+ info_ptr = read_comp_unit_head (&cu.header, info_ptr, abfd);
/* Read the abbrevs for this compilation unit */
- dwarf2_read_abbrevs (abfd, &cu_header);
- make_cleanup (dwarf2_empty_abbrev_table, cu_header.dwarf2_abbrevs);
+ dwarf2_read_abbrevs (abfd, &cu);
+ make_cleanup (dwarf2_empty_abbrev_table, cu.header.dwarf2_abbrevs);
- dies = read_comp_unit (info_ptr, abfd, &cu_header);
+ dies = read_comp_unit (info_ptr, abfd, &cu);
make_cleanup_free_die_list (dies);
@@ -1959,29 +1861,29 @@ psymtab_to_symtab_1 (struct partial_symtab *pst)
DW_AT_entry_pc. It's been removed, but GCC still uses this for
compilation units with discontinuous ranges. */
- cu_header.base_known = 0;
- cu_header.base_address = 0;
+ cu.header.base_known = 0;
+ cu.header.base_address = 0;
attr = dwarf_attr (dies, DW_AT_entry_pc);
if (attr)
{
- cu_header.base_address = DW_ADDR (attr);
- cu_header.base_known = 1;
+ cu.header.base_address = DW_ADDR (attr);
+ cu.header.base_known = 1;
}
else
{
attr = dwarf_attr (dies, DW_AT_low_pc);
if (attr)
{
- cu_header.base_address = DW_ADDR (attr);
- cu_header.base_known = 1;
+ cu.header.base_address = DW_ADDR (attr);
+ cu.header.base_known = 1;
}
}
/* Do line number decoding in read_file_scope () */
- process_die (dies, objfile, &cu_header);
+ process_die (dies, &cu);
- get_scope_pc_bounds (dies, &lowpc, &highpc, objfile, &cu_header);
+ get_scope_pc_bounds (dies, &lowpc, &highpc, &cu);
symtab = end_symtab (highpc + baseaddr, objfile, SECT_OFF_TEXT (objfile));
/* Set symtab language to language from DW_AT_language.
@@ -2001,19 +1903,18 @@ psymtab_to_symtab_1 (struct partial_symtab *pst)
/* Process a die and its children. */
static void
-process_die (struct die_info *die, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+process_die (struct die_info *die, struct dwarf2_cu *cu)
{
switch (die->tag)
{
case DW_TAG_padding:
break;
case DW_TAG_compile_unit:
- read_file_scope (die, objfile, cu_header);
+ read_file_scope (die, cu);
break;
case DW_TAG_subprogram:
- read_subroutine_type (die, objfile, cu_header);
- read_func_scope (die, objfile, cu_header);
+ read_subroutine_type (die, cu);
+ read_func_scope (die, cu);
break;
case DW_TAG_inlined_subroutine:
/* FIXME: These are ignored for now.
@@ -2023,50 +1924,50 @@ process_die (struct die_info *die, struct objfile *objfile,
case DW_TAG_lexical_block:
case DW_TAG_try_block:
case DW_TAG_catch_block:
- read_lexical_block_scope (die, objfile, cu_header);
+ read_lexical_block_scope (die, cu);
break;
case DW_TAG_class_type:
case DW_TAG_structure_type:
case DW_TAG_union_type:
- read_structure_scope (die, objfile, cu_header);
+ read_structure_scope (die, cu);
break;
case DW_TAG_enumeration_type:
- read_enumeration (die, objfile, cu_header);
+ read_enumeration (die, cu);
break;
case DW_TAG_subroutine_type:
- read_subroutine_type (die, objfile, cu_header);
+ read_subroutine_type (die, cu);
break;
case DW_TAG_array_type:
- read_array_type (die, objfile, cu_header);
+ read_array_type (die, cu);
break;
case DW_TAG_pointer_type:
- read_tag_pointer_type (die, objfile, cu_header);
+ read_tag_pointer_type (die, cu);
break;
case DW_TAG_ptr_to_member_type:
- read_tag_ptr_to_member_type (die, objfile, cu_header);
+ read_tag_ptr_to_member_type (die, cu);
break;
case DW_TAG_reference_type:
- read_tag_reference_type (die, objfile, cu_header);
+ read_tag_reference_type (die, cu);
break;
case DW_TAG_string_type:
- read_tag_string_type (die, objfile);
+ read_tag_string_type (die, cu);
break;
case DW_TAG_base_type:
- read_base_type (die, objfile);
+ read_base_type (die, cu);
if (dwarf_attr (die, DW_AT_name))
{
/* Add a typedef symbol for the base type definition. */
- new_symbol (die, die->type, objfile, cu_header);
+ new_symbol (die, die->type, cu);
}
break;
case DW_TAG_common_block:
- read_common_block (die, objfile, cu_header);
+ read_common_block (die, cu);
break;
case DW_TAG_common_inclusion:
break;
case DW_TAG_namespace:
processing_has_namespace_info = 1;
- read_namespace (die, objfile, cu_header);
+ read_namespace (die, cu);
break;
case DW_TAG_imported_declaration:
case DW_TAG_imported_module:
@@ -2080,7 +1981,7 @@ process_die (struct die_info *die, struct objfile *objfile,
gdb_assert (die->child == NULL);
break;
default:
- new_symbol (die, NULL, objfile, cu_header);
+ new_symbol (die, NULL, cu);
break;
}
}
@@ -2092,9 +1993,10 @@ initialize_cu_func_list (void)
}
static void
-read_file_scope (struct die_info *die, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+read_file_scope (struct die_info *die, struct dwarf2_cu *cu)
{
+ struct objfile *objfile = cu->objfile;
+ struct comp_unit_head *cu_header = &cu->header;
struct cleanup *back_to = make_cleanup (null_cleanup, 0);
CORE_ADDR lowpc = ((CORE_ADDR) -1);
CORE_ADDR highpc = ((CORE_ADDR) 0);
@@ -2105,7 +2007,7 @@ read_file_scope (struct die_info *die, struct objfile *objfile,
bfd *abfd = objfile->obfd;
struct line_header *line_header = 0;
- get_scope_pc_bounds (die, &lowpc, &highpc, objfile, cu_header);
+ get_scope_pc_bounds (die, &lowpc, &highpc, cu);
/* If we didn't find a lowpc, set it to highpc to avoid complaints
from finish_block. */
@@ -2170,7 +2072,7 @@ read_file_scope (struct die_info *die, struct objfile *objfile,
child_die = die->child;
while (child_die && child_die->tag)
{
- process_die (child_die, objfile, cu_header);
+ process_die (child_die, cu);
child_die = sibling_die (child_die);
}
}
@@ -2180,13 +2082,12 @@ read_file_scope (struct die_info *die, struct objfile *objfile,
if (attr)
{
unsigned int line_offset = DW_UNSND (attr);
- line_header = dwarf_decode_line_header (line_offset,
- abfd, cu_header);
+ line_header = dwarf_decode_line_header (line_offset, abfd, cu);
if (line_header)
{
make_cleanup ((make_cleanup_ftype *) free_line_header,
(void *) line_header);
- dwarf_decode_lines (line_header, comp_dir, abfd, cu_header);
+ dwarf_decode_lines (line_header, comp_dir, abfd, cu);
}
}
@@ -2199,7 +2100,7 @@ read_file_scope (struct die_info *die, struct objfile *objfile,
{
unsigned int macro_offset = DW_UNSND (attr);
dwarf_decode_macros (line_header, macro_offset,
- comp_dir, abfd, cu_header, objfile);
+ comp_dir, abfd, cu);
}
do_cleanups (back_to);
}
@@ -2226,9 +2127,9 @@ add_to_cu_func_list (char *name, CORE_ADDR lowpc, CORE_ADDR highpc)
}
static void
-read_func_scope (struct die_info *die, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
{
+ struct objfile *objfile = cu->objfile;
struct context_stack *new;
CORE_ADDR lowpc;
CORE_ADDR highpc;
@@ -2240,7 +2141,7 @@ read_func_scope (struct die_info *die, struct objfile *objfile,
/* Ignore functions with missing or empty names and functions with
missing or invalid low and high pc attributes. */
- if (name == NULL || !dwarf2_get_pc_bounds (die, &lowpc, &highpc, objfile, cu_header))
+ if (name == NULL || !dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu))
return;
lowpc += baseaddr;
@@ -2256,52 +2157,14 @@ read_func_scope (struct die_info *die, struct objfile *objfile,
objfile->ei.entry_func_highpc = highpc;
}
- /* Decode DW_AT_frame_base location descriptor if present, keep result
- for DW_OP_fbreg operands in decode_locdesc. */
- frame_base_reg = -1;
- frame_base_offset = 0;
- attr = dwarf_attr (die, DW_AT_frame_base);
- if (attr)
- {
- CORE_ADDR addr;
-
- /* Support the .debug_loc offsets */
- if (attr_form_is_block (attr))
- {
- addr = decode_locdesc (DW_BLOCK (attr), objfile, cu_header);
- }
- else if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8)
- {
- dwarf2_complex_location_expr_complaint ();
- addr = 0;
- }
- else
- {
- dwarf2_invalid_attrib_class_complaint ("DW_AT_frame_base", name);
- addr = 0;
- }
-
- if (isderef)
- dwarf2_unsupported_at_frame_base_complaint (name);
- else if (isreg)
- frame_base_reg = addr;
- else if (offreg)
- {
- frame_base_reg = basereg;
- frame_base_offset = addr;
- }
- else
- dwarf2_unsupported_at_frame_base_complaint (name);
- }
-
new = push_context (0, lowpc);
- new->name = new_symbol (die, die->type, objfile, cu_header);
+ new->name = new_symbol (die, die->type, cu);
- /* If there was a location expression for DW_AT_frame_base above,
- record it. We still need to decode it above because not all
- symbols use location expressions exclusively. */
+ /* If there is a location expression for DW_AT_frame_base, record
+ it. */
+ attr = dwarf_attr (die, DW_AT_frame_base);
if (attr)
- dwarf2_symbol_mark_computed (attr, new->name, cu_header, objfile);
+ dwarf2_symbol_mark_computed (attr, new->name, cu);
list_in_scope = &local_symbols;
@@ -2310,7 +2173,7 @@ read_func_scope (struct die_info *die, struct objfile *objfile,
child_die = die->child;
while (child_die && child_die->tag)
{
- process_die (child_die, objfile, cu_header);
+ process_die (child_die, cu);
child_die = sibling_die (child_die);
}
}
@@ -2337,9 +2200,9 @@ read_func_scope (struct die_info *die, struct objfile *objfile,
a new scope, process the dies, and then close the scope. */
static void
-read_lexical_block_scope (struct die_info *die, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu)
{
+ struct objfile *objfile = cu->objfile;
struct context_stack *new;
CORE_ADDR lowpc, highpc;
struct die_info *child_die;
@@ -2349,7 +2212,7 @@ read_lexical_block_scope (struct die_info *die, struct objfile *objfile,
as multiple lexical blocks? Handling children in a sane way would
be nasty. Might be easier to properly extend generic blocks to
describe ranges. */
- if (!dwarf2_get_pc_bounds (die, &lowpc, &highpc, objfile, cu_header))
+ if (!dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu))
return;
lowpc += baseaddr;
highpc += baseaddr;
@@ -2360,7 +2223,7 @@ read_lexical_block_scope (struct die_info *die, struct objfile *objfile,
child_die = die->child;
while (child_die && child_die->tag)
{
- process_die (child_die, objfile, cu_header);
+ process_die (child_die, cu);
child_die = sibling_die (child_die);
}
}
@@ -2379,9 +2242,10 @@ read_lexical_block_scope (struct die_info *die, struct objfile *objfile,
discontinuous, i.e. derived from DW_AT_ranges information. */
static int
dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
- CORE_ADDR *highpc, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+ CORE_ADDR *highpc, struct dwarf2_cu *cu)
{
+ struct objfile *objfile = cu->objfile;
+ struct comp_unit_head *cu_header = &cu->header;
struct attribute *attr;
bfd *obfd = objfile->obfd;
CORE_ADDR low = 0;
@@ -2416,7 +2280,6 @@ dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
CORE_ADDR base;
int found_base;
int dummy;
- unsigned int i;
char *buffer;
CORE_ADDR marker;
int low_set;
@@ -2434,13 +2297,12 @@ dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
buffer = dwarf_ranges_buffer + offset;
/* Read in the largest possible address. */
- marker = read_address (obfd, buffer, cu_header, &dummy);
+ marker = read_address (obfd, buffer, cu, &dummy);
if ((marker & mask) == mask)
{
/* If we found the largest possible address, then
read the base address. */
- base = read_address (obfd, buffer + addr_size,
- cu_header, &dummy);
+ base = read_address (obfd, buffer + addr_size, cu, &dummy);
buffer += 2 * addr_size;
offset += 2 * addr_size;
found_base = 1;
@@ -2452,10 +2314,9 @@ dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
{
CORE_ADDR range_beginning, range_end;
- range_beginning = read_address (obfd, buffer,
- cu_header, &dummy);
+ range_beginning = read_address (obfd, buffer, cu, &dummy);
buffer += addr_size;
- range_end = read_address (obfd, buffer, cu_header, &dummy);
+ range_end = read_address (obfd, buffer, cu, &dummy);
buffer += addr_size;
offset += 2 * addr_size;
@@ -2471,8 +2332,7 @@ dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
{
/* If we found the largest possible address, then
read the base address. */
- base = read_address (obfd, buffer + addr_size,
- cu_header, &dummy);
+ base = read_address (obfd, buffer + addr_size, cu, &dummy);
found_base = 1;
continue;
}
@@ -2542,15 +2402,13 @@ dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
static void
get_scope_pc_bounds (struct die_info *die,
CORE_ADDR *lowpc, CORE_ADDR *highpc,
- struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+ struct dwarf2_cu *cu)
{
CORE_ADDR best_low = (CORE_ADDR) -1;
CORE_ADDR best_high = (CORE_ADDR) 0;
CORE_ADDR current_low, current_high;
- if (dwarf2_get_pc_bounds (die, &current_low, &current_high,
- objfile, cu_header))
+ if (dwarf2_get_pc_bounds (die, &current_low, &current_high, cu))
{
best_low = current_low;
best_high = current_high;
@@ -2563,8 +2421,7 @@ get_scope_pc_bounds (struct die_info *die,
{
switch (child->tag) {
case DW_TAG_subprogram:
- if (dwarf2_get_pc_bounds (child, &current_low, &current_high,
- objfile, cu_header));
+ if (dwarf2_get_pc_bounds (child, &current_low, &current_high, cu))
{
best_low = min (best_low, current_low);
best_high = max (best_high, current_high);
@@ -2579,8 +2436,7 @@ get_scope_pc_bounds (struct die_info *die,
the DIEs giving the declarations, which could be
anywhere). But I don't see any reason why they have to
be there. */
- get_scope_pc_bounds (child, &current_low, &current_high,
- objfile, cu_header);
+ get_scope_pc_bounds (child, &current_low, &current_high, cu);
if (current_low != ((CORE_ADDR) -1))
{
@@ -2605,9 +2461,9 @@ get_scope_pc_bounds (struct die_info *die,
static void
dwarf2_add_field (struct field_info *fip, struct die_info *die,
- struct objfile *objfile,
- const struct comp_unit_head *cu_header)
-{
+ struct dwarf2_cu *cu)
+{
+ struct objfile *objfile = cu->objfile;
struct nextfield *new_field;
struct attribute *attr;
struct field *fp;
@@ -2646,7 +2502,7 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
/* Data member other than a C++ static data member. */
/* Get type of field. */
- fp->type = die_type (die, objfile, cu_header);
+ fp->type = die_type (die, cu);
FIELD_STATIC_KIND (*fp) = 0;
@@ -2666,7 +2522,7 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
if (attr)
{
FIELD_BITPOS (*fp) =
- decode_locdesc (DW_BLOCK (attr), objfile, cu_header) * bits_per_byte;
+ decode_locdesc (DW_BLOCK (attr), cu) * bits_per_byte;
}
else
FIELD_BITPOS (*fp) = 0;
@@ -2750,7 +2606,7 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
SET_FIELD_PHYSNAME (*fp, obsavestring (physname, strlen (physname),
&objfile->type_obstack));
- FIELD_TYPE (*fp) = die_type (die, objfile, cu_header);
+ FIELD_TYPE (*fp) = die_type (die, cu);
FIELD_NAME (*fp) = obsavestring (fieldname, strlen (fieldname),
&objfile->type_obstack);
}
@@ -2759,11 +2615,11 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
/* C++ base class field. */
attr = dwarf_attr (die, DW_AT_data_member_location);
if (attr)
- FIELD_BITPOS (*fp) = (decode_locdesc (DW_BLOCK (attr), objfile, cu_header)
+ FIELD_BITPOS (*fp) = (decode_locdesc (DW_BLOCK (attr), cu)
* bits_per_byte);
FIELD_BITSIZE (*fp) = 0;
FIELD_STATIC_KIND (*fp) = 0;
- FIELD_TYPE (*fp) = die_type (die, objfile, cu_header);
+ FIELD_TYPE (*fp) = die_type (die, cu);
FIELD_NAME (*fp) = type_name_no_tag (fp->type);
fip->nbaseclasses++;
}
@@ -2773,7 +2629,7 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
static void
dwarf2_attach_fields_to_type (struct field_info *fip, struct type *type,
- struct objfile *objfile)
+ struct dwarf2_cu *cu)
{
int nfields = fip->nfields;
@@ -2860,9 +2716,9 @@ dwarf2_attach_fields_to_type (struct field_info *fip, struct type *type,
static void
dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
- struct type *type, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+ struct type *type, struct dwarf2_cu *cu)
{
+ struct objfile *objfile = cu->objfile;
struct attribute *attr;
struct fnfieldlist *flp;
int i;
@@ -2883,7 +2739,7 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
/* Look up member function name in fieldlist. */
for (i = 0; i < fip->nfnfields; i++)
{
- if (STREQ (fip->fnfieldlists[i].name, fieldname))
+ if (strcmp (fip->fnfieldlists[i].name, fieldname) == 0)
break;
}
@@ -2924,7 +2780,6 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
fnp->type = alloc_type (objfile);
if (die->type && TYPE_CODE (die->type) == TYPE_CODE_FUNC)
{
- struct type *return_type = TYPE_TARGET_TYPE (die->type);
int nparams = TYPE_NFIELDS (die->type);
/* TYPE is the domain of this method, and DIE->TYPE is the type
@@ -2950,7 +2805,7 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
/* Get fcontext from DW_AT_containing_type if present. */
if (dwarf_attr (die, DW_AT_containing_type) != NULL)
- fnp->fcontext = die_containing_type (die, objfile, cu_header);
+ fnp->fcontext = die_containing_type (die, cu);
/* dwarf2 doesn't have stubbed physical names, so the setting of is_const
and is_volatile is irrelevant, as it is needed by gdb_mangle_name only. */
@@ -2982,7 +2837,7 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
/* Support the .debug_loc offsets */
if (attr_form_is_block (attr))
{
- fnp->voffset = decode_locdesc (DW_BLOCK (attr), objfile, cu_header) + 2;
+ fnp->voffset = decode_locdesc (DW_BLOCK (attr), cu) + 2;
}
else if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8)
{
@@ -3000,7 +2855,7 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
static void
dwarf2_attach_fn_fields_to_type (struct field_info *fip, struct type *type,
- struct objfile *objfile)
+ struct dwarf2_cu *cu)
{
struct fnfieldlist *flp;
int total_length = 0;
@@ -3047,9 +2902,9 @@ dwarf2_attach_fn_fields_to_type (struct field_info *fip, struct type *type,
suppresses creating a symbol table entry itself). */
static void
-read_structure_scope (struct die_info *die, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+read_structure_scope (struct die_info *die, struct dwarf2_cu *cu)
{
+ struct objfile *objfile = cu->objfile;
struct type *type;
struct attribute *attr;
const char *name;
@@ -3151,13 +3006,13 @@ read_structure_scope (struct die_info *die, struct objfile *objfile,
all versions of G++ as of this writing (so through at
least 3.2.1) incorrectly generate DW_TAG_variable
tags for them instead. */
- dwarf2_add_field (&fi, child_die, objfile, cu_header);
+ dwarf2_add_field (&fi, child_die, cu);
}
else if (child_die->tag == DW_TAG_subprogram)
{
/* C++ member function. */
- process_die (child_die, objfile, cu_header);
- dwarf2_add_member_fn (&fi, child_die, type, objfile, cu_header);
+ process_die (child_die, cu);
+ dwarf2_add_member_fn (&fi, child_die, type, cu);
if (need_to_update_name)
{
/* The demangled names of member functions contain
@@ -3197,21 +3052,21 @@ read_structure_scope (struct die_info *die, struct objfile *objfile,
else if (child_die->tag == DW_TAG_inheritance)
{
/* C++ base class field. */
- dwarf2_add_field (&fi, child_die, objfile, cu_header);
+ dwarf2_add_field (&fi, child_die, cu);
}
else
{
- process_die (child_die, objfile, cu_header);
+ process_die (child_die, cu);
}
child_die = sibling_die (child_die);
}
/* Attach fields and member functions to the type. */
if (fi.nfields)
- dwarf2_attach_fields_to_type (&fi, type, objfile);
+ dwarf2_attach_fields_to_type (&fi, type, cu);
if (fi.nfnfields)
{
- dwarf2_attach_fn_fields_to_type (&fi, type, objfile);
+ dwarf2_attach_fn_fields_to_type (&fi, type, cu);
/* Get the type which refers to the base class (possibly this
class itself) which contains the vtable pointer for the current
@@ -3219,7 +3074,7 @@ read_structure_scope (struct die_info *die, struct objfile *objfile,
if (dwarf_attr (die, DW_AT_containing_type) != NULL)
{
- struct type *t = die_containing_type (die, objfile, cu_header);
+ struct type *t = die_containing_type (die, cu);
TYPE_VPTR_BASETYPE (type) = t;
if (type == t)
@@ -3235,7 +3090,9 @@ read_structure_scope (struct die_info *die, struct objfile *objfile,
{
char *fieldname = TYPE_FIELD_NAME (t, i);
- if (STREQN (fieldname, vptr_name, strlen (vptr_name) - 1)
+ if ((strncmp (fieldname, vptr_name,
+ strlen (vptr_name) - 1)
+ == 0)
&& is_cplus_marker (fieldname[strlen (vptr_name)]))
{
TYPE_VPTR_FIELDNO (type) = i;
@@ -3257,7 +3114,7 @@ read_structure_scope (struct die_info *die, struct objfile *objfile,
}
}
- new_symbol (die, type, objfile, cu_header);
+ new_symbol (die, type, cu);
do_cleanups (back_to);
}
@@ -3282,9 +3139,9 @@ read_structure_scope (struct die_info *die, struct objfile *objfile,
NOTE: We reverse the order of the element list. */
static void
-read_enumeration (struct die_info *die, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+read_enumeration (struct die_info *die, struct dwarf2_cu *cu)
{
+ struct objfile *objfile = cu->objfile;
struct die_info *child_die;
struct type *type;
struct field *fields;
@@ -3334,14 +3191,14 @@ read_enumeration (struct die_info *die, struct objfile *objfile,
{
if (child_die->tag != DW_TAG_enumerator)
{
- process_die (child_die, objfile, cu_header);
+ process_die (child_die, cu);
}
else
{
attr = dwarf_attr (child_die, DW_AT_name);
if (attr)
{
- sym = new_symbol (child_die, type, objfile, cu_header);
+ sym = new_symbol (child_die, type, cu);
if (SYMBOL_VALUE (sym) < 0)
unsigned_enum = 0;
@@ -3379,7 +3236,7 @@ read_enumeration (struct die_info *die, struct objfile *objfile,
TYPE_FLAGS (type) |= TYPE_FLAG_UNSIGNED;
}
die->type = type;
- new_symbol (die, type, objfile, cu_header);
+ new_symbol (die, type, cu);
}
/* Extract all information from a DW_TAG_array_type DIE and put it in
@@ -3387,9 +3244,9 @@ read_enumeration (struct die_info *die, struct objfile *objfile,
arrays. */
static void
-read_array_type (struct die_info *die, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+read_array_type (struct die_info *die, struct dwarf2_cu *cu)
{
+ struct objfile *objfile = cu->objfile;
struct die_info *child_die;
struct type *type = NULL;
struct type *element_type, *range_type, *index_type;
@@ -3404,7 +3261,7 @@ read_array_type (struct die_info *die, struct objfile *objfile,
return;
}
- element_type = die_type (die, objfile, cu_header);
+ element_type = die_type (die, cu);
/* Irix 6.2 native cc creates array types without children for
arrays with unspecified length. */
@@ -3433,7 +3290,7 @@ read_array_type (struct die_info *die, struct objfile *objfile,
low = 1;
}
- index_type = die_type (child_die, objfile, cu_header);
+ index_type = die_type (child_die, cu);
attr = dwarf_attr (child_die, DW_AT_lower_bound);
if (attr)
{
@@ -3543,8 +3400,7 @@ read_array_type (struct die_info *die, struct objfile *objfile,
/* First cut: install each common block member as a global variable. */
static void
-read_common_block (struct die_info *die, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+read_common_block (struct die_info *die, struct dwarf2_cu *cu)
{
struct die_info *child_die;
struct attribute *attr;
@@ -3557,7 +3413,7 @@ read_common_block (struct die_info *die, struct objfile *objfile,
/* Support the .debug_loc offsets */
if (attr_form_is_block (attr))
{
- base = decode_locdesc (DW_BLOCK (attr), objfile, cu_header);
+ base = decode_locdesc (DW_BLOCK (attr), cu);
}
else if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8)
{
@@ -3574,12 +3430,12 @@ read_common_block (struct die_info *die, struct objfile *objfile,
child_die = die->child;
while (child_die && child_die->tag)
{
- sym = new_symbol (child_die, NULL, objfile, cu_header);
+ sym = new_symbol (child_die, NULL, cu);
attr = dwarf_attr (child_die, DW_AT_data_member_location);
if (attr)
{
SYMBOL_VALUE_ADDRESS (sym) =
- base + decode_locdesc (DW_BLOCK (attr), objfile, cu_header);
+ base + decode_locdesc (DW_BLOCK (attr), cu);
add_symbol_to_list (sym, &global_symbols);
}
child_die = sibling_die (child_die);
@@ -3590,9 +3446,9 @@ read_common_block (struct die_info *die, struct objfile *objfile,
/* Read a C++ namespace. */
static void
-read_namespace (struct die_info *die, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+read_namespace (struct die_info *die, struct dwarf2_cu *cu)
{
+ struct objfile *objfile = cu->objfile;
const char *previous_prefix = processing_current_prefix;
const char *name;
int is_anonymous;
@@ -3634,7 +3490,7 @@ read_namespace (struct die_info *die, struct objfile *objfile,
objfile);
TYPE_TAG_NAME (type) = TYPE_NAME (type);
- new_symbol (die, type, objfile, cu_header);
+ new_symbol (die, type, cu);
if (is_anonymous)
cp_add_using_directive (processing_current_prefix,
@@ -3648,7 +3504,7 @@ read_namespace (struct die_info *die, struct objfile *objfile,
while (child_die && child_die->tag)
{
- process_die (child_die, objfile, cu_header);
+ process_die (child_die, cu);
child_die = sibling_die (child_die);
}
}
@@ -3686,9 +3542,9 @@ namespace_name (struct die_info *die, int *is_anonymous)
the user defined type vector. */
static void
-read_tag_pointer_type (struct die_info *die, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+read_tag_pointer_type (struct die_info *die, struct dwarf2_cu *cu)
{
+ struct comp_unit_head *cu_header = &cu->header;
struct type *type;
struct attribute *attr_byte_size;
struct attribute *attr_address_class;
@@ -3699,7 +3555,7 @@ read_tag_pointer_type (struct die_info *die, struct objfile *objfile,
return;
}
- type = lookup_pointer_type (die_type (die, objfile, cu_header));
+ type = lookup_pointer_type (die_type (die, cu));
attr_byte_size = dwarf_attr (die, DW_AT_byte_size);
if (attr_byte_size)
@@ -3743,9 +3599,9 @@ read_tag_pointer_type (struct die_info *die, struct objfile *objfile,
the user defined type vector. */
static void
-read_tag_ptr_to_member_type (struct die_info *die, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+read_tag_ptr_to_member_type (struct die_info *die, struct dwarf2_cu *cu)
{
+ struct objfile *objfile = cu->objfile;
struct type *type;
struct type *to_type;
struct type *domain;
@@ -3756,8 +3612,8 @@ read_tag_ptr_to_member_type (struct die_info *die, struct objfile *objfile,
}
type = alloc_type (objfile);
- to_type = die_type (die, objfile, cu_header);
- domain = die_containing_type (die, objfile, cu_header);
+ to_type = die_type (die, cu);
+ domain = die_containing_type (die, cu);
smash_to_member_type (type, domain, to_type);
die->type = type;
@@ -3767,9 +3623,9 @@ read_tag_ptr_to_member_type (struct die_info *die, struct objfile *objfile,
the user defined type vector. */
static void
-read_tag_reference_type (struct die_info *die, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+read_tag_reference_type (struct die_info *die, struct dwarf2_cu *cu)
{
+ struct comp_unit_head *cu_header = &cu->header;
struct type *type;
struct attribute *attr;
@@ -3778,7 +3634,7 @@ read_tag_reference_type (struct die_info *die, struct objfile *objfile,
return;
}
- type = lookup_reference_type (die_type (die, objfile, cu_header));
+ type = lookup_reference_type (die_type (die, cu));
attr = dwarf_attr (die, DW_AT_byte_size);
if (attr)
{
@@ -3792,8 +3648,7 @@ read_tag_reference_type (struct die_info *die, struct objfile *objfile,
}
static void
-read_tag_const_type (struct die_info *die, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+read_tag_const_type (struct die_info *die, struct dwarf2_cu *cu)
{
struct type *base_type;
@@ -3802,13 +3657,12 @@ read_tag_const_type (struct die_info *die, struct objfile *objfile,
return;
}
- base_type = die_type (die, objfile, cu_header);
+ base_type = die_type (die, cu);
die->type = make_cv_type (1, TYPE_VOLATILE (base_type), base_type, 0);
}
static void
-read_tag_volatile_type (struct die_info *die, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+read_tag_volatile_type (struct die_info *die, struct dwarf2_cu *cu)
{
struct type *base_type;
@@ -3817,7 +3671,7 @@ read_tag_volatile_type (struct die_info *die, struct objfile *objfile,
return;
}
- base_type = die_type (die, objfile, cu_header);
+ base_type = die_type (die, cu);
die->type = make_cv_type (TYPE_CONST (base_type), 1, base_type, 0);
}
@@ -3827,8 +3681,9 @@ read_tag_volatile_type (struct die_info *die, struct objfile *objfile,
attribute to reference it. */
static void
-read_tag_string_type (struct die_info *die, struct objfile *objfile)
+read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
{
+ struct objfile *objfile = cu->objfile;
struct type *type, *range_type, *index_type, *char_type;
struct attribute *attr;
unsigned int length;
@@ -3884,8 +3739,7 @@ read_tag_string_type (struct die_info *die, struct objfile *objfile)
*/
static void
-read_subroutine_type (struct die_info *die, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+read_subroutine_type (struct die_info *die, struct dwarf2_cu *cu)
{
struct type *type; /* Type that this function returns */
struct type *ftype; /* Function that returns above type */
@@ -3896,7 +3750,7 @@ read_subroutine_type (struct die_info *die, struct objfile *objfile,
{
return;
}
- type = die_type (die, objfile, cu_header);
+ type = die_type (die, cu);
ftype = lookup_function_type (type);
/* All functions in C++ have prototypes. */
@@ -3944,8 +3798,7 @@ read_subroutine_type (struct die_info *die, struct objfile *objfile,
TYPE_FIELD_ARTIFICIAL (ftype, iparams) = DW_UNSND (attr);
else
TYPE_FIELD_ARTIFICIAL (ftype, iparams) = 0;
- TYPE_FIELD_TYPE (ftype, iparams) = die_type (child_die, objfile,
- cu_header);
+ TYPE_FIELD_TYPE (ftype, iparams) = die_type (child_die, cu);
iparams++;
}
child_die = sibling_die (child_die);
@@ -3956,9 +3809,9 @@ read_subroutine_type (struct die_info *die, struct objfile *objfile,
}
static void
-read_typedef (struct die_info *die, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+read_typedef (struct die_info *die, struct dwarf2_cu *cu)
{
+ struct objfile *objfile = cu->objfile;
struct attribute *attr;
char *name = NULL;
@@ -3967,7 +3820,7 @@ read_typedef (struct die_info *die, struct objfile *objfile,
name = dwarf2_name (die);
die->type = init_type (TYPE_CODE_TYPEDEF, 0, TYPE_FLAG_TARGET_STUB,
name, objfile);
- TYPE_TARGET_TYPE (die->type) = die_type (die, objfile, cu_header);
+ TYPE_TARGET_TYPE (die->type) = die_type (die, cu);
}
}
@@ -3975,8 +3828,9 @@ read_typedef (struct die_info *die, struct objfile *objfile,
it in the TYPE field of the die. */
static void
-read_base_type (struct die_info *die, struct objfile *objfile)
+read_base_type (struct die_info *die, struct dwarf2_cu *cu)
{
+ struct objfile *objfile = cu->objfile;
struct type *type;
struct attribute *attr;
int encoding = 0, size = 0;
@@ -4050,7 +3904,7 @@ read_base_type (struct die_info *die, struct objfile *objfile)
}
else
{
- type = dwarf_base_type (encoding, size, objfile);
+ type = dwarf_base_type (encoding, size, cu);
}
die->type = type;
}
@@ -4058,14 +3912,13 @@ read_base_type (struct die_info *die, struct objfile *objfile)
/* Read a whole compilation unit into a linked list of dies. */
static struct die_info *
-read_comp_unit (char *info_ptr, bfd *abfd,
- const struct comp_unit_head *cu_header)
+read_comp_unit (char *info_ptr, bfd *abfd, struct dwarf2_cu *cu)
{
/* Reset die reference table; we are
building new ones now. */
dwarf2_empty_hash_tables ();
- return read_die_and_children (info_ptr, abfd, cu_header, &info_ptr, NULL);
+ return read_die_and_children (info_ptr, abfd, cu, &info_ptr, NULL);
}
/* Read a single die and all its descendents. Set the die's sibling
@@ -4076,7 +3929,7 @@ read_comp_unit (char *info_ptr, bfd *abfd,
static struct die_info *
read_die_and_children (char *info_ptr, bfd *abfd,
- const struct comp_unit_head *cu_header,
+ struct dwarf2_cu *cu,
char **new_info_ptr,
struct die_info *parent)
{
@@ -4084,12 +3937,12 @@ read_die_and_children (char *info_ptr, bfd *abfd,
char *cur_ptr;
int has_children;
- cur_ptr = read_full_die (&die, abfd, info_ptr, cu_header, &has_children);
+ cur_ptr = read_full_die (&die, abfd, info_ptr, cu, &has_children);
store_in_ref_table (die->offset, die);
if (has_children)
{
- die->child = read_die_and_siblings (cur_ptr, abfd, cu_header,
+ die->child = read_die_and_siblings (cur_ptr, abfd, cu,
new_info_ptr, die);
}
else
@@ -4109,7 +3962,7 @@ read_die_and_children (char *info_ptr, bfd *abfd,
static struct die_info *
read_die_and_siblings (char *info_ptr, bfd *abfd,
- const struct comp_unit_head *cu_header,
+ struct dwarf2_cu *cu,
char **new_info_ptr,
struct die_info *parent)
{
@@ -4122,8 +3975,7 @@ read_die_and_siblings (char *info_ptr, bfd *abfd,
while (1)
{
struct die_info *die
- = read_die_and_children (cur_ptr, abfd, cu_header,
- &cur_ptr, parent);
+ = read_die_and_children (cur_ptr, abfd, cu, &cur_ptr, parent);
if (!first_die)
{
@@ -4182,11 +4034,11 @@ make_cleanup_free_die_list (struct die_info *dies)
object file specified by OBJFILE into the psymbol_obstack and return it. */
char *
-dwarf2_read_section (struct objfile *objfile, file_ptr offset,
- unsigned int size, asection *sectp)
+dwarf2_read_section (struct objfile *objfile, asection *sectp)
{
bfd *abfd = objfile->obfd;
char *buf, *retbuf;
+ bfd_size_type size = bfd_get_section_size_before_reloc (sectp);
if (size == 0)
return NULL;
@@ -4197,13 +4049,11 @@ dwarf2_read_section (struct objfile *objfile, file_ptr offset,
if (retbuf != NULL)
return retbuf;
- if ((bfd_seek (abfd, offset, SEEK_SET) != 0) ||
- (bfd_bread (buf, size, abfd) != size))
- {
- buf = NULL;
- error ("Dwarf Error: Can't read DWARF data from '%s'",
- bfd_get_filename (abfd));
- }
+ if (bfd_seek (abfd, sectp->filepos, SEEK_SET) != 0
+ || bfd_bread (buf, size, abfd) != size)
+ error ("Dwarf Error: Can't read DWARF data from '%s'",
+ bfd_get_filename (abfd));
+
return buf;
}
@@ -4213,8 +4063,9 @@ dwarf2_read_section (struct objfile *objfile, file_ptr offset,
in a hash table. */
static void
-dwarf2_read_abbrevs (bfd *abfd, struct comp_unit_head *cu_header)
+dwarf2_read_abbrevs (bfd *abfd, struct dwarf2_cu *cu)
{
+ struct comp_unit_head *cu_header = &cu->header;
char *abbrev_ptr;
struct abbrev_info *cur_abbrev;
unsigned int abbrev_number, bytes_read, abbrev_name;
@@ -4278,7 +4129,7 @@ dwarf2_read_abbrevs (bfd *abfd, struct comp_unit_head *cu_header)
break;
abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
abbrev_ptr += bytes_read;
- if (dwarf2_lookup_abbrev (abbrev_number, cu_header) != NULL)
+ if (dwarf2_lookup_abbrev (abbrev_number, cu) != NULL)
break;
}
}
@@ -4312,8 +4163,9 @@ dwarf2_empty_abbrev_table (void *ptr_to_abbrevs_table)
/* Lookup an abbrev_info structure in the abbrev hash table. */
static struct abbrev_info *
-dwarf2_lookup_abbrev (unsigned int number, const struct comp_unit_head *cu_header)
+dwarf2_lookup_abbrev (unsigned int number, struct dwarf2_cu *cu)
{
+ struct comp_unit_head *cu_header = &cu->header;
unsigned int hash_number;
struct abbrev_info *abbrev;
@@ -4334,7 +4186,7 @@ dwarf2_lookup_abbrev (unsigned int number, const struct comp_unit_head *cu_heade
static char *
read_partial_die (struct partial_die_info *part_die, bfd *abfd,
- char *info_ptr, const struct comp_unit_head *cu_header)
+ char *info_ptr, struct dwarf2_cu *cu)
{
unsigned int abbrev_number, bytes_read, i;
struct abbrev_info *abbrev;
@@ -4350,7 +4202,7 @@ read_partial_die (struct partial_die_info *part_die, bfd *abfd,
if (!abbrev_number)
return info_ptr;
- abbrev = dwarf2_lookup_abbrev (abbrev_number, cu_header);
+ abbrev = dwarf2_lookup_abbrev (abbrev_number, cu);
if (!abbrev)
{
error ("Dwarf Error: Could not find abbrev number %d [in module %s]", abbrev_number,
@@ -4363,8 +4215,7 @@ read_partial_die (struct partial_die_info *part_die, bfd *abfd,
for (i = 0; i < abbrev->num_attrs; ++i)
{
- info_ptr = read_attribute (&attr, &abbrev->attrs[i], abfd,
- info_ptr, cu_header);
+ info_ptr = read_attribute (&attr, &abbrev->attrs[i], abfd, info_ptr, cu);
/* Store the data if it is of an attribute we want to keep in a
partial symbol table. */
@@ -4441,10 +4292,9 @@ read_partial_die (struct partial_die_info *part_die, bfd *abfd,
{
struct partial_die_info spec_die;
char *spec_ptr;
- int dummy;
spec_ptr = dwarf_info_buffer + dwarf2_get_ref_die_offset (&spec_attr);
- read_partial_die (&spec_die, abfd, spec_ptr, cu_header);
+ read_partial_die (&spec_die, abfd, spec_ptr, cu);
if (spec_die.name)
{
part_die->name = spec_die.name;
@@ -4478,7 +4328,7 @@ read_partial_die (struct partial_die_info *part_die, bfd *abfd,
static char *
read_full_die (struct die_info **diep, bfd *abfd, char *info_ptr,
- const struct comp_unit_head *cu_header, int *has_children)
+ struct dwarf2_cu *cu, int *has_children)
{
unsigned int abbrev_number, bytes_read, i, offset;
struct abbrev_info *abbrev;
@@ -4498,7 +4348,7 @@ read_full_die (struct die_info **diep, bfd *abfd, char *info_ptr,
return info_ptr;
}
- abbrev = dwarf2_lookup_abbrev (abbrev_number, cu_header);
+ abbrev = dwarf2_lookup_abbrev (abbrev_number, cu);
if (!abbrev)
{
error ("Dwarf Error: could not find abbrev number %d [in module %s]",
@@ -4518,7 +4368,7 @@ read_full_die (struct die_info **diep, bfd *abfd, char *info_ptr,
for (i = 0; i < abbrev->num_attrs; ++i)
{
info_ptr = read_attribute (&die->attrs[i], &abbrev->attrs[i],
- abfd, info_ptr, cu_header);
+ abfd, info_ptr, cu);
}
*diep = die;
@@ -4530,9 +4380,10 @@ read_full_die (struct die_info **diep, bfd *abfd, char *info_ptr,
static char *
read_attribute_value (struct attribute *attr, unsigned form,
- bfd *abfd, char *info_ptr,
- const struct comp_unit_head *cu_header)
+ bfd *abfd, char *info_ptr,
+ struct dwarf2_cu *cu)
{
+ struct comp_unit_head *cu_header = &cu->header;
unsigned int bytes_read;
struct dwarf_block *blk;
@@ -4541,7 +4392,7 @@ read_attribute_value (struct attribute *attr, unsigned form,
{
case DW_FORM_addr:
case DW_FORM_ref_addr:
- DW_ADDR (attr) = read_address (abfd, info_ptr, cu_header, &bytes_read);
+ DW_ADDR (attr) = read_address (abfd, info_ptr, cu, &bytes_read);
info_ptr += bytes_read;
break;
case DW_FORM_block2:
@@ -4636,7 +4487,7 @@ read_attribute_value (struct attribute *attr, unsigned form,
case DW_FORM_indirect:
form = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
info_ptr += bytes_read;
- info_ptr = read_attribute_value (attr, form, abfd, info_ptr, cu_header);
+ info_ptr = read_attribute_value (attr, form, abfd, info_ptr, cu);
break;
default:
error ("Dwarf Error: Cannot handle %s in DWARF reader [in module %s]",
@@ -4650,11 +4501,10 @@ read_attribute_value (struct attribute *attr, unsigned form,
static char *
read_attribute (struct attribute *attr, struct attr_abbrev *abbrev,
- bfd *abfd, char *info_ptr,
- const struct comp_unit_head *cu_header)
+ bfd *abfd, char *info_ptr, struct dwarf2_cu *cu)
{
attr->name = abbrev->name;
- return read_attribute_value (attr, abbrev->form, abfd, info_ptr, cu_header);
+ return read_attribute_value (attr, abbrev->form, abfd, info_ptr, cu);
}
/* read dwarf information from a buffer */
@@ -4702,9 +4552,9 @@ read_8_bytes (bfd *abfd, char *buf)
}
static CORE_ADDR
-read_address (bfd *abfd, char *buf, const struct comp_unit_head *cu_header,
- int *bytes_read)
+read_address (bfd *abfd, char *buf, struct dwarf2_cu *cu, int *bytes_read)
{
+ struct comp_unit_head *cu_header = &cu->header;
CORE_ADDR retval = 0;
if (cu_header->signed_addr_p)
@@ -5149,7 +4999,7 @@ add_file_name (struct line_header *lh,
freed. */
static struct line_header *
dwarf_decode_line_header (unsigned int offset, bfd *abfd,
- const struct comp_unit_head *cu_header)
+ struct dwarf2_cu *cu)
{
struct cleanup *back_to;
struct line_header *lh;
@@ -5190,7 +5040,7 @@ dwarf_decode_line_header (unsigned int offset, bfd *abfd,
lh->statement_program_end = line_ptr + lh->total_length;
lh->version = read_2_bytes (abfd, line_ptr);
line_ptr += 2;
- lh->header_length = read_offset (abfd, line_ptr, cu_header, &bytes_read);
+ lh->header_length = read_offset (abfd, line_ptr, &cu->header, &bytes_read);
line_ptr += bytes_read;
lh->minimum_instruction_length = read_1_byte (abfd, line_ptr);
line_ptr += 1;
@@ -5298,12 +5148,11 @@ check_cu_functions (CORE_ADDR address)
static void
dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
- const struct comp_unit_head *cu_header)
+ struct dwarf2_cu *cu)
{
char *line_ptr;
char *line_end;
- unsigned int i, bytes_read;
- char *cur_dir;
+ unsigned int bytes_read;
unsigned char op_code, extended_op, adj_opcode;
line_ptr = lh->statement_program_start;
@@ -5366,7 +5215,7 @@ dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd,
record_line (current_subfile, 0, address);
break;
case DW_LNE_set_address:
- address = read_address (abfd, line_ptr, cu_header, &bytes_read);
+ address = read_address (abfd, line_ptr, cu, &bytes_read);
line_ptr += bytes_read;
address += baseaddr;
break;
@@ -5510,9 +5359,11 @@ dwarf2_start_subfile (char *filename, char *dirname)
static void
var_decode_location (struct attribute *attr, struct symbol *sym,
- struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+ struct dwarf2_cu *cu)
{
+ struct objfile *objfile = cu->objfile;
+ struct comp_unit_head *cu_header = &cu->header;
+
/* NOTE drow/2003-01-30: There used to be a comment and some special
code here to turn a symbol with DW_AT_external and a
SYMBOL_VALUE_ADDRESS of 0 into a LOC_UNRESOLVED symbol. This was
@@ -5543,8 +5394,7 @@ var_decode_location (struct attribute *attr, struct symbol *sym,
int dummy;
SYMBOL_VALUE_ADDRESS (sym) =
- read_address (objfile->obfd, DW_BLOCK (attr)->data + 1, cu_header,
- &dummy);
+ read_address (objfile->obfd, DW_BLOCK (attr)->data + 1, cu, &dummy);
fixup_symbol_section (sym, objfile);
SYMBOL_VALUE_ADDRESS (sym) += ANOFFSET (objfile->section_offsets,
SYMBOL_SECTION (sym));
@@ -5559,7 +5409,7 @@ var_decode_location (struct attribute *attr, struct symbol *sym,
not be worthwhile. I'm assuming that it isn't unless performance
or memory numbers show me otherwise. */
- dwarf2_symbol_mark_computed (attr, sym, cu_header, objfile);
+ dwarf2_symbol_mark_computed (attr, sym, cu);
SYMBOL_CLASS (sym) = LOC_COMPUTED;
}
@@ -5570,14 +5420,13 @@ var_decode_location (struct attribute *attr, struct symbol *sym,
used the passed type. */
static struct symbol *
-new_symbol (struct die_info *die, struct type *type, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
{
+ struct objfile *objfile = cu->objfile;
struct symbol *sym = NULL;
char *name;
struct attribute *attr = NULL;
struct attribute *attr2 = NULL;
- CORE_ADDR addr = 0;
if (die->tag != DW_TAG_namespace)
name = dwarf2_linkage_name (die);
@@ -5602,7 +5451,7 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile,
if (type != NULL)
SYMBOL_TYPE (sym) = type;
else
- SYMBOL_TYPE (sym) = die_type (die, objfile, cu_header);
+ SYMBOL_TYPE (sym) = die_type (die, cu);
attr = dwarf_attr (die, DW_AT_decl_line);
if (attr)
{
@@ -5644,7 +5493,7 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile,
attr = dwarf_attr (die, DW_AT_const_value);
if (attr)
{
- dwarf2_const_value (attr, sym, objfile, cu_header);
+ dwarf2_const_value (attr, sym, cu);
attr2 = dwarf_attr (die, DW_AT_external);
if (attr2 && (DW_UNSND (attr2) != 0))
add_symbol_to_list (sym, &global_symbols);
@@ -5655,7 +5504,7 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile,
attr = dwarf_attr (die, DW_AT_location);
if (attr)
{
- var_decode_location (attr, sym, objfile, cu_header);
+ var_decode_location (attr, sym, cu);
attr2 = dwarf_attr (die, DW_AT_external);
if (attr2 && (DW_UNSND (attr2) != 0))
add_symbol_to_list (sym, &global_symbols);
@@ -5683,7 +5532,7 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile,
attr = dwarf_attr (die, DW_AT_location);
if (attr)
{
- var_decode_location (attr, sym, objfile, cu_header);
+ var_decode_location (attr, sym, cu);
/* FIXME drow/2003-07-31: Is LOC_COMPUTED_ARG necessary? */
if (SYMBOL_CLASS (sym) == LOC_COMPUTED)
SYMBOL_CLASS (sym) = LOC_COMPUTED_ARG;
@@ -5691,7 +5540,7 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile,
attr = dwarf_attr (die, DW_AT_const_value);
if (attr)
{
- dwarf2_const_value (attr, sym, objfile, cu_header);
+ dwarf2_const_value (attr, sym, cu);
}
add_symbol_to_list (sym, list_in_scope);
break;
@@ -5794,7 +5643,7 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile,
attr = dwarf_attr (die, DW_AT_const_value);
if (attr)
{
- dwarf2_const_value (attr, sym, objfile, cu_header);
+ dwarf2_const_value (attr, sym, cu);
}
{
/* NOTE: carlton/2002-11-29: See comment above in the
@@ -5830,9 +5679,10 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile,
static void
dwarf2_const_value (struct attribute *attr, struct symbol *sym,
- struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+ struct dwarf2_cu *cu)
{
+ struct objfile *objfile = cu->objfile;
+ struct comp_unit_head *cu_header = &cu->header;
struct dwarf_block *blk;
switch (attr->form)
@@ -5931,8 +5781,7 @@ dwarf2_const_value_data (struct attribute *attr,
/* Return the type of the die in question using its DW_AT_type attribute. */
static struct type *
-die_type (struct die_info *die, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+die_type (struct die_info *die, struct dwarf2_cu *cu)
{
struct type *type;
struct attribute *type_attr;
@@ -5943,7 +5792,7 @@ die_type (struct die_info *die, struct objfile *objfile,
if (!type_attr)
{
/* A missing DW_AT_type represents a void type. */
- return dwarf2_fundamental_type (objfile, FT_VOID);
+ return dwarf2_fundamental_type (cu->objfile, FT_VOID);
}
else
{
@@ -5952,16 +5801,16 @@ die_type (struct die_info *die, struct objfile *objfile,
if (!type_die)
{
error ("Dwarf Error: Cannot find referent at offset %d [in module %s]",
- ref, objfile->name);
+ ref, cu->objfile->name);
return NULL;
}
}
- type = tag_type_to_type (type_die, objfile, cu_header);
+ type = tag_type_to_type (type_die, cu);
if (!type)
{
dump_die (type_die);
error ("Dwarf Error: Problem turning type die at offset into gdb type [in module %s]",
- objfile->name);
+ cu->objfile->name);
}
return type;
}
@@ -5970,8 +5819,7 @@ die_type (struct die_info *die, struct objfile *objfile,
DW_AT_containing_type attribute. */
static struct type *
-die_containing_type (struct die_info *die, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+die_containing_type (struct die_info *die, struct dwarf2_cu *cu)
{
struct type *type = NULL;
struct attribute *type_attr;
@@ -5986,24 +5834,24 @@ die_containing_type (struct die_info *die, struct objfile *objfile,
if (!type_die)
{
error ("Dwarf Error: Cannot find referent at offset %d [in module %s]", ref,
- objfile->name);
+ cu->objfile->name);
return NULL;
}
- type = tag_type_to_type (type_die, objfile, cu_header);
+ type = tag_type_to_type (type_die, cu);
}
if (!type)
{
if (type_die)
dump_die (type_die);
error ("Dwarf Error: Problem turning containing type into gdb type [in module %s]",
- objfile->name);
+ cu->objfile->name);
}
return type;
}
#if 0
static struct type *
-type_at_offset (unsigned int offset, struct objfile *objfile)
+type_at_offset (unsigned int offset, struct dwarf2_cu *cu)
{
struct die_info *die;
struct type *type;
@@ -6014,14 +5862,13 @@ type_at_offset (unsigned int offset, struct objfile *objfile)
error ("Dwarf Error: Cannot find type referent at offset %d.", offset);
return NULL;
}
- type = tag_type_to_type (die, objfile);
+ type = tag_type_to_type (die, cu);
return type;
}
#endif
static struct type *
-tag_type_to_type (struct die_info *die, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+tag_type_to_type (struct die_info *die, struct dwarf2_cu *cu)
{
if (die->type)
{
@@ -6029,20 +5876,19 @@ tag_type_to_type (struct die_info *die, struct objfile *objfile,
}
else
{
- read_type_die (die, objfile, cu_header);
+ read_type_die (die, cu);
if (!die->type)
{
dump_die (die);
error ("Dwarf Error: Cannot find type of die [in module %s]",
- objfile->name);
+ cu->objfile->name);
}
return die->type;
}
}
static void
-read_type_die (struct die_info *die, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+read_type_die (struct die_info *die, struct dwarf2_cu *cu)
{
char *prefix = determine_prefix (die);
const char *old_prefix = processing_current_prefix;
@@ -6054,41 +5900,41 @@ read_type_die (struct die_info *die, struct objfile *objfile,
case DW_TAG_class_type:
case DW_TAG_structure_type:
case DW_TAG_union_type:
- read_structure_scope (die, objfile, cu_header);
+ read_structure_scope (die, cu);
break;
case DW_TAG_enumeration_type:
- read_enumeration (die, objfile, cu_header);
+ read_enumeration (die, cu);
break;
case DW_TAG_subprogram:
case DW_TAG_subroutine_type:
- read_subroutine_type (die, objfile, cu_header);
+ read_subroutine_type (die, cu);
break;
case DW_TAG_array_type:
- read_array_type (die, objfile, cu_header);
+ read_array_type (die, cu);
break;
case DW_TAG_pointer_type:
- read_tag_pointer_type (die, objfile, cu_header);
+ read_tag_pointer_type (die, cu);
break;
case DW_TAG_ptr_to_member_type:
- read_tag_ptr_to_member_type (die, objfile, cu_header);
+ read_tag_ptr_to_member_type (die, cu);
break;
case DW_TAG_reference_type:
- read_tag_reference_type (die, objfile, cu_header);
+ read_tag_reference_type (die, cu);
break;
case DW_TAG_const_type:
- read_tag_const_type (die, objfile, cu_header);
+ read_tag_const_type (die, cu);
break;
case DW_TAG_volatile_type:
- read_tag_volatile_type (die, objfile, cu_header);
+ read_tag_volatile_type (die, cu);
break;
case DW_TAG_string_type:
- read_tag_string_type (die, objfile);
+ read_tag_string_type (die, cu);
break;
case DW_TAG_typedef:
- read_typedef (die, objfile, cu_header);
+ read_typedef (die, cu);
break;
case DW_TAG_base_type:
- read_base_type (die, objfile);
+ read_base_type (die, cu);
break;
default:
complaint (&symfile_complaints, "unexepected tag in read_type_die: '%s'",
@@ -6206,8 +6052,10 @@ class_name (struct die_info *die)
}
static struct type *
-dwarf_base_type (int encoding, int size, struct objfile *objfile)
+dwarf_base_type (int encoding, int size, struct dwarf2_cu *cu)
{
+ struct objfile *objfile = cu->objfile;
+
/* FIXME - this should not produce a new (struct type *)
every time. It should cache base types. */
struct type *type;
@@ -7346,34 +7194,32 @@ dwarf2_fundamental_type (struct objfile *objfile, int typeid)
Given a pointer to a dwarf block that defines a location, compute
the location and return the value.
- FIXME: This is a kludge until we figure out a better
- way to handle the location descriptions.
- Gdb's design does not mesh well with the DWARF2 notion of a location
- computing interpreter, which is a shame because the flexibility goes unused.
- FIXME: Implement more operations as necessary.
+ NOTE drow/2003-11-18: This function is called in two situations
+ now: for the address of static or global variables (partial symbols
+ only) and for offsets into structures which are expected to be
+ (more or less) constant. The partial symbol case should go away,
+ and only the constant case should remain. That will let this
+ function complain more accurately. A few special modes are allowed
+ without complaint for global variables (for instance, global
+ register values and thread-local values).
A location description containing no operations indicates that the
- object is optimized out. The global optimized_out flag is set for
- those, the return value is meaningless.
+ object is optimized out. The return value is 0 for that case.
+ FIXME drow/2003-11-16: No callers check for this case any more; soon all
+ callers will only want a very basic result and this can become a
+ complaint.
When the result is a register number, the global isreg flag is set,
otherwise it is cleared.
- When the result is a base register offset, the global offreg flag is set
- and the register number is returned in basereg, otherwise it is cleared.
-
- When the DW_OP_fbreg operation is encountered without a corresponding
- DW_AT_frame_base attribute, the global islocal flag is set.
- Hopefully the machine dependent code knows how to set up a virtual
- frame pointer for the local references.
-
Note that stack[0] is unused except as a default error return.
Note that stack overflow is not yet handled. */
static CORE_ADDR
-decode_locdesc (struct dwarf_block *blk, struct objfile *objfile,
- const struct comp_unit_head *cu_header)
+decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu)
{
+ struct objfile *objfile = cu->objfile;
+ struct comp_unit_head *cu_header = &cu->header;
int i;
int size = blk->size;
char *data = blk->data;
@@ -7386,14 +7232,9 @@ decode_locdesc (struct dwarf_block *blk, struct objfile *objfile,
stacki = 0;
stack[stacki] = 0;
isreg = 0;
- offreg = 0;
- isderef = 0;
- islocal = 0;
- optimized_out = 1;
while (i < size)
{
- optimized_out = 0;
op = data[i++];
switch (op)
{
@@ -7466,6 +7307,8 @@ decode_locdesc (struct dwarf_block *blk, struct objfile *objfile,
case DW_OP_reg31:
isreg = 1;
stack[++stacki] = op - DW_OP_reg0;
+ if (i < size)
+ dwarf2_complex_location_expr_complaint ();
break;
case DW_OP_regx:
@@ -7473,74 +7316,13 @@ decode_locdesc (struct dwarf_block *blk, struct objfile *objfile,
unsnd = read_unsigned_leb128 (NULL, (data + i), &bytes_read);
i += bytes_read;
stack[++stacki] = unsnd;
- break;
-
- case DW_OP_breg0:
- case DW_OP_breg1:
- case DW_OP_breg2:
- case DW_OP_breg3:
- case DW_OP_breg4:
- case DW_OP_breg5:
- case DW_OP_breg6:
- case DW_OP_breg7:
- case DW_OP_breg8:
- case DW_OP_breg9:
- case DW_OP_breg10:
- case DW_OP_breg11:
- case DW_OP_breg12:
- case DW_OP_breg13:
- case DW_OP_breg14:
- case DW_OP_breg15:
- case DW_OP_breg16:
- case DW_OP_breg17:
- case DW_OP_breg18:
- case DW_OP_breg19:
- case DW_OP_breg20:
- case DW_OP_breg21:
- case DW_OP_breg22:
- case DW_OP_breg23:
- case DW_OP_breg24:
- case DW_OP_breg25:
- case DW_OP_breg26:
- case DW_OP_breg27:
- case DW_OP_breg28:
- case DW_OP_breg29:
- case DW_OP_breg30:
- case DW_OP_breg31:
- offreg = 1;
- basereg = op - DW_OP_breg0;
- stack[++stacki] = read_signed_leb128 (NULL, (data + i), &bytes_read);
- i += bytes_read;
- break;
-
- case DW_OP_bregx:
- offreg = 1;
- basereg = read_unsigned_leb128 (NULL, (data + i), &bytes_read);
- i += bytes_read;
- stack[++stacki] = read_signed_leb128 (NULL, (data + i), &bytes_read);
- i += bytes_read;
- break;
-
- case DW_OP_fbreg:
- stack[++stacki] = read_signed_leb128 (NULL, (data + i), &bytes_read);
- i += bytes_read;
- if (frame_base_reg >= 0)
- {
- offreg = 1;
- basereg = frame_base_reg;
- stack[stacki] += frame_base_offset;
- }
- else
- {
- complaint (&symfile_complaints,
- "DW_AT_frame_base missing for DW_OP_fbreg");
- islocal = 1;
- }
+ if (i < size)
+ dwarf2_complex_location_expr_complaint ();
break;
case DW_OP_addr:
stack[++stacki] = read_address (objfile->obfd, &data[i],
- cu_header, &bytes_read);
+ cu, &bytes_read);
i += bytes_read;
break;
@@ -7606,9 +7388,10 @@ decode_locdesc (struct dwarf_block *blk, struct objfile *objfile,
break;
case DW_OP_deref:
- isderef = 1;
/* If we're not the last op, then we definitely can't encode
- this using GDB's address_class enum. */
+ this using GDB's address_class enum. This is valid for partial
+ global symbols, although the variable's address will be bogus
+ in the psymtab. */
if (i < size)
dwarf2_complex_location_expr_complaint ();
break;
@@ -7618,6 +7401,8 @@ decode_locdesc (struct dwarf_block *blk, struct objfile *objfile,
of the thread control block at which the variable is located. */
/* Nothing should follow this operator, so the top of stack would
be returned. */
+ /* This is valid for partial global symbols, but the variable's
+ address will be bogus in the psymtab. */
if (i < size)
dwarf2_complex_location_expr_complaint ();
break;
@@ -7912,8 +7697,7 @@ parse_macro_definition (struct macro_source_file *file, int line,
static void
dwarf_decode_macros (struct line_header *lh, unsigned int offset,
char *comp_dir, bfd *abfd,
- const struct comp_unit_head *cu_header,
- struct objfile *objfile)
+ struct dwarf2_cu *cu)
{
char *mac_ptr, *mac_end;
struct macro_source_file *current_file = 0;
@@ -7989,7 +7773,7 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
current_file = macro_start_file (file, line,
current_file, comp_dir,
- lh, objfile);
+ lh, cu->objfile);
}
break;
@@ -8060,23 +7844,22 @@ attr_form_is_block (struct attribute *attr)
static void
dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym,
- const struct comp_unit_head *cu_header,
- struct objfile *objfile)
+ struct dwarf2_cu *cu)
{
if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8)
{
struct dwarf2_loclist_baton *baton;
- baton = obstack_alloc (&objfile->symbol_obstack,
+ baton = obstack_alloc (&cu->objfile->symbol_obstack,
sizeof (struct dwarf2_loclist_baton));
- baton->objfile = objfile;
+ baton->objfile = cu->objfile;
/* We don't know how long the location list is, but make sure we
don't run off the edge of the section. */
baton->size = dwarf_loc_size - DW_UNSND (attr);
baton->data = dwarf_loc_buffer + DW_UNSND (attr);
- baton->base_address = cu_header->base_address;
- if (cu_header->base_known == 0)
+ baton->base_address = cu->header.base_address;
+ if (cu->header.base_known == 0)
complaint (&symfile_complaints,
"Location list used without specifying the CU base address.");
@@ -8087,9 +7870,9 @@ dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym,
{
struct dwarf2_locexpr_baton *baton;
- baton = obstack_alloc (&objfile->symbol_obstack,
+ baton = obstack_alloc (&cu->objfile->symbol_obstack,
sizeof (struct dwarf2_locexpr_baton));
- baton->objfile = objfile;
+ baton->objfile = cu->objfile;
if (attr_form_is_block (attr))
{
diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c
index 5c1848707ab..5d1518de543 100644
--- a/gdb/dwarfread.c
+++ b/gdb/dwarfread.c
@@ -24,42 +24,60 @@
/*
If you are looking for DWARF-2 support, you are in the wrong file.
- Go look in dwarf2read.c. This file is for the original DWARF.
-
- DWARF (also known as DWARF-1) is headed for obsoletion.
-
- In gcc 3.2.1, these targets prefer dwarf-1:
-
- i[34567]86-sequent-ptx4* # TD-R2
- i[34567]86-sequent-sysv4* # TD-R2
- i[34567]86-dg-dgux* # obsolete in gcc 3.2.1, to be removed in 3.3
- m88k-dg-dgux* # TD-R2
- mips-sni-sysv4 # TD-R2
- sparc-hal-solaris2* # TD-R2
-
- Configurations marked with "# TD-R2" are on Zach Weinberg's list
- of "Target Deprecation, Round 2". This is a candidate list of
- targets to be deprecated in gcc 3.3 and removed in gcc 3.4.
-
- http://gcc.gnu.org/ml/gcc/2002-12/msg00702.html
-
- gcc 2.95.3 had many configurations which prefer dwarf-1.
- We may have to support dwarf-1 as long as we support gcc 2.95.3.
- This could use more analysis.
-
- DG/UX (Data General Unix) used dwarf-1 for its native format.
- DG/UX uses gcc for its system C compiler, but they have their
- own linker and their own debuggers.
-
- Takis Psarogiannakopoulos has a complete gnu toolchain for DG/UX
- with gcc 2.95.3, gdb 5.1, and debug formats of dwarf-2 and stabs.
- For more info, see PR gdb/979 and PR gdb/1013; also:
-
- http://sources.redhat.com/ml/gdb/2003-02/msg00074.html
-
- There may be non-gcc compilers that still emit dwarf-1.
-
- -- chastain 2003-02-04
+ Go look in dwarf2read.c. This file is for the original DWARF,
+ also known as DWARF-1.
+
+ DWARF-1 is slowly headed for obsoletion.
+
+ In gcc HEAD 2003-11-29 16:28:31 UTC, no targets prefer dwarf-1.
+
+ In gcc 3.3.2, these targets prefer dwarf-1:
+
+ i[34567]86-sequent-ptx4*
+ i[34567]86-sequent-sysv4*
+ mips-sni-sysv4
+ sparc-hal-solaris2*
+
+ In gcc 3.2.2, these targets prefer dwarf-1:
+
+ i[34567]86-dg-dgux*
+ i[34567]86-sequent-ptx4*
+ i[34567]86-sequent-sysv4*
+ m88k-dg-dgux*
+ mips-sni-sysv4
+ sparc-hal-solaris2*
+
+ In gcc 2.95.3, these targets prefer dwarf-1:
+
+ i[34567]86-dg-dgux*
+ i[34567]86-ncr-sysv4*
+ i[34567]86-sequent-ptx4*
+ i[34567]86-sequent-sysv4*
+ i[34567]86-*-osf1*
+ i[34567]86-*-sco3.2v5*
+ i[34567]86-*-sysv4*
+ i860-alliant-*
+ i860-*-sysv4*
+ m68k-atari-sysv4*
+ m68k-cbm-sysv4*
+ m68k-*-sysv4*
+ m88k-dg-dgux*
+ m88k-*-sysv4*
+ mips-sni-sysv4
+ mips-*-gnu*
+ sh-*-elf*
+ sh-*-rtemself*
+ sparc-hal-solaris2*
+ sparc-*-sysv4*
+
+ Some non-gcc compilers produce dwarf-1:
+
+ PR gdb/1179 was from a user with Diab C++ 4.3.
+ Other users have also reported using Diab compilers with dwarf-1.
+ On 2003-06-09 the gdb list received a report from a user
+ with Absoft ProFortran f77 which is dwarf-1.
+
+ -- chastain 2003-12-01
*/
/*
@@ -1802,7 +1820,7 @@ handle_producer (char *producer)
/* If this compilation unit was compiled with g++ or gcc, then set the
processing_gcc_compilation flag. */
- if (STREQN (producer, GCC_PRODUCER, strlen (GCC_PRODUCER)))
+ if (DEPRECATED_STREQN (producer, GCC_PRODUCER, strlen (GCC_PRODUCER)))
{
char version = producer[strlen (GCC_PRODUCER)];
processing_gcc_compilation = (version == '2' ? 2 : 1);
@@ -1820,7 +1838,7 @@ handle_producer (char *producer)
if (AUTO_DEMANGLING)
{
- if (STREQN (producer, GPLUS_PRODUCER, strlen (GPLUS_PRODUCER)))
+ if (DEPRECATED_STREQN (producer, GPLUS_PRODUCER, strlen (GPLUS_PRODUCER)))
{
#if 0
/* For now, stay with AUTO_DEMANGLING for g++ output, as we don't
@@ -1828,7 +1846,7 @@ handle_producer (char *producer)
set_demangling_style (GNU_DEMANGLING_STYLE_STRING);
#endif
}
- else if (STREQN (producer, LCC_PRODUCER, strlen (LCC_PRODUCER)))
+ else if (DEPRECATED_STREQN (producer, LCC_PRODUCER, strlen (LCC_PRODUCER)))
{
set_demangling_style (LUCID_DEMANGLING_STYLE_STRING);
}
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 8814f894b2b..d3779c07ec3 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -105,15 +105,15 @@ elf_locate_sections (bfd *ignore_abfd, asection *sectp, void *eip)
}
static struct minimal_symbol *
-record_minimal_symbol_and_info (char *name, CORE_ADDR address,
- enum minimal_symbol_type ms_type, char *info, /* FIXME, is this really char *? */
- asection *bfd_section, struct objfile *objfile)
+record_minimal_symbol (char *name, CORE_ADDR address,
+ enum minimal_symbol_type ms_type,
+ asection *bfd_section, struct objfile *objfile)
{
if (ms_type == mst_text || ms_type == mst_file_text)
address = SMASH_TEXT_ADDRESS (address);
return prim_record_minimal_symbol_and_info
- (name, address, ms_type, info, bfd_section->index, bfd_section, objfile);
+ (name, address, ms_type, NULL, bfd_section->index, bfd_section, objfile);
}
/*
@@ -163,7 +163,6 @@ elf_symtab_read (struct objfile *objfile, int dynamic)
char *filesymname = obsavestring ("", 0, &objfile->symbol_obstack);
#endif
struct dbx_symfile_info *dbx = objfile->sym_stab_info;
- unsigned long size;
int stripped = (bfd_get_symcount (objfile->obfd) == 0);
if (dynamic)
@@ -223,9 +222,9 @@ elf_symtab_read (struct objfile *objfile, int dynamic)
if (symaddr == 0)
continue;
symaddr += offset;
- msym = record_minimal_symbol_and_info
+ msym = record_minimal_symbol
((char *) sym->name, symaddr,
- mst_solib_trampoline, NULL, sym->section, objfile);
+ mst_solib_trampoline, sym->section, objfile);
#ifdef SOFUN_ADDRESS_MAYBE_MISSING
if (msym != NULL)
msym->filename = filesymname;
@@ -343,10 +342,7 @@ elf_symtab_read (struct objfile *objfile, int dynamic)
else if (sym->flags & BSF_LOCAL)
{
/* Named Local variable in a Data section.
- Check its name for stabs-in-elf. The STREQ
- macro checks the first character inline, so
- we only actually do a strcmp function call on
- names that start with 'B' or 'D'. */
+ Check its name for stabs-in-elf. */
int special_local_sect;
if (strcmp ("Bbss.bss", sym->name) == 0)
special_local_sect = SECT_OFF_BSS (objfile);
@@ -436,11 +432,15 @@ elf_symtab_read (struct objfile *objfile, int dynamic)
/* ms_type = mst_unknown; */
continue; /* Skip this symbol. */
}
- /* Pass symbol size field in via BFD. FIXME!!! */
- size = ((elf_symbol_type *) sym)->internal_elf_sym.st_size;
- msym = record_minimal_symbol_and_info
+ msym = record_minimal_symbol
((char *) sym->name, symaddr,
- ms_type, (void *) size, sym->section, objfile);
+ ms_type, sym->section, objfile);
+ if (msym)
+ {
+ /* Pass symbol size field in via BFD. FIXME!!! */
+ unsigned long size = ((elf_symbol_type *) sym)->internal_elf_sym.st_size;
+ MSYMBOL_SIZE(msym) = size;
+ }
#ifdef SOFUN_ADDRESS_MAYBE_MISSING
if (msym != NULL)
msym->filename = filesymname;
diff --git a/gdb/environ.c b/gdb/environ.c
index 01eb57a3658..b62938851b9 100644
--- a/gdb/environ.c
+++ b/gdb/environ.c
@@ -170,7 +170,7 @@ unset_in_environ (struct environ *e, char *var)
for (; (s = *vector) != NULL; vector++)
{
- if (STREQN (s, var, len) && s[len] == '=')
+ if (DEPRECATED_STREQN (s, var, len) && s[len] == '=')
{
xfree (s);
/* Walk through the vector, shuffling args down by one, including
diff --git a/gdb/eval.c b/gdb/eval.c
index a83c6fa88e7..3cca80bb5af 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -227,7 +227,7 @@ evaluate_struct_tuple (struct value *struct_val,
fieldno++)
{
char *field_name = TYPE_FIELD_NAME (struct_type, fieldno);
- if (field_name != NULL && STREQ (field_name, label))
+ if (field_name != NULL && DEPRECATED_STREQ (field_name, label))
{
variantno = -1;
subfieldno = fieldno;
@@ -255,7 +255,7 @@ evaluate_struct_tuple (struct value *struct_val,
subfieldno < TYPE_NFIELDS (substruct_type);
subfieldno++)
{
- if (STREQ (TYPE_FIELD_NAME (substruct_type,
+ if (DEPRECATED_STREQ (TYPE_FIELD_NAME (substruct_type,
subfieldno),
label))
{
diff --git a/gdb/exec.c b/gdb/exec.c
index 1c51917a851..b849533e0c4 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -384,14 +384,14 @@ bfdsec_to_vmap (struct bfd *abfd, struct bfd_section *sect, void *arg3)
if ((bfd_get_section_flags (abfd, sect) & SEC_LOAD) == 0)
return;
- if (STREQ (bfd_section_name (abfd, sect), ".text"))
+ if (DEPRECATED_STREQ (bfd_section_name (abfd, sect), ".text"))
{
vp->tstart = bfd_section_vma (abfd, sect);
vp->tend = vp->tstart + bfd_section_size (abfd, sect);
vp->tvma = bfd_section_vma (abfd, sect);
vp->toffs = sect->filepos;
}
- else if (STREQ (bfd_section_name (abfd, sect), ".data"))
+ else if (DEPRECATED_STREQ (bfd_section_name (abfd, sect), ".data"))
{
vp->dstart = bfd_section_vma (abfd, sect);
vp->dend = vp->dstart + bfd_section_size (abfd, sect);
diff --git a/gdb/f-lang.c b/gdb/f-lang.c
index 9ad4792dcb9..37ca92c7d43 100644
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -799,7 +799,8 @@ find_common_for_function (char *name, char *funcname)
while (tmp != NULL)
{
- if (STREQ (tmp->name, name) && STREQ (tmp->owning_function, funcname))
+ if (DEPRECATED_STREQ (tmp->name, name)
+ && DEPRECATED_STREQ (tmp->owning_function, funcname))
return (tmp);
else
tmp = tmp->next;
diff --git a/gdb/frame.c b/gdb/frame.c
index a405a6b736b..1d378913fb4 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -86,10 +86,6 @@ struct frame_info
initialized by DEPRECATED_INIT_EXTRA_FRAME_INFO */
struct frame_extra_info *extra_info;
- /* If dwarf2 unwind frame informations is used, this structure holds
- all related unwind data. */
- struct context *context;
-
/* The frame's low-level unwinder and corresponding cache. The
low-level unwinder is responsible for unwinding register values
for the previous frame. The low-level unwind methods are
@@ -668,15 +664,6 @@ get_frame_register_unsigned (struct frame_info *frame, int regnum)
}
void
-frame_unwind_signed_register (struct frame_info *frame, int regnum,
- LONGEST *val)
-{
- char buf[MAX_REGISTER_SIZE];
- frame_unwind_register (frame, regnum, buf);
- (*val) = extract_signed_integer (buf, DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum));
-}
-
-void
frame_unwind_unsigned_register (struct frame_info *frame, int regnum,
ULONGEST *val)
{
@@ -930,7 +917,13 @@ select_frame (struct frame_info *fi)
source language of this frame, and switch to it if desired. */
if (fi)
{
- s = find_pc_symtab (get_frame_pc (fi));
+ /* We retrieve the frame's symtab by using the frame PC. However
+ we cannot use the frame pc as is, because it usually points to
+ the instruction following the "call", which is sometimes the
+ first instruction of another function. So we rely on
+ get_frame_address_in_block() which provides us with a PC which
+ is guaranteed to be inside the frame's code block. */
+ s = find_pc_symtab (get_frame_address_in_block (fi));
if (s
&& s->language != current_language->la_language
&& s->language != language_unknown
@@ -1790,9 +1783,13 @@ get_prev_frame (struct frame_info *this_frame)
get_current_frame(). */
gdb_assert (this_frame != NULL);
+ /* Make sure we pass an address within THIS_FRAME's code block to
+ inside_main_func. Otherwise, we might stop unwinding at a
+ function which has a call instruction as its last instruction if
+ that function immediately precedes main(). */
if (this_frame->level >= 0
&& !backtrace_past_main
- && inside_main_func (get_frame_pc (this_frame)))
+ && inside_main_func (get_frame_address_in_block (this_frame)))
/* Don't unwind past main(), bug always unwind the sentinel frame.
Note, this is done _before_ the frame has been marked as
previously unwound. That way if the user later decides to
@@ -2223,61 +2220,13 @@ deprecated_update_frame_base_hack (struct frame_info *frame, CORE_ADDR base)
frame->this_id.value.stack_addr = base;
}
-void
-deprecated_set_frame_saved_regs_hack (struct frame_info *frame,
- CORE_ADDR *saved_regs)
-{
- frame->saved_regs = saved_regs;
-}
-
-void
-deprecated_set_frame_extra_info_hack (struct frame_info *frame,
- struct frame_extra_info *extra_info)
-{
- frame->extra_info = extra_info;
-}
-
-void
-deprecated_set_frame_next_hack (struct frame_info *fi,
- struct frame_info *next)
-{
- fi->next = next;
-}
-
-void
-deprecated_set_frame_prev_hack (struct frame_info *fi,
- struct frame_info *prev)
-{
- fi->prev = prev;
-}
-
-struct context *
-deprecated_get_frame_context (struct frame_info *fi)
-{
- return fi->context;
-}
-
-void
-deprecated_set_frame_context (struct frame_info *fi,
- struct context *context)
-{
- fi->context = context;
-}
-
struct frame_info *
-deprecated_frame_xmalloc (void)
+deprecated_frame_xmalloc_with_cleanup (long sizeof_saved_regs,
+ long sizeof_extra_info)
{
struct frame_info *frame = XMALLOC (struct frame_info);
memset (frame, 0, sizeof (*frame));
frame->this_id.p = 1;
- return frame;
-}
-
-struct frame_info *
-deprecated_frame_xmalloc_with_cleanup (long sizeof_saved_regs,
- long sizeof_extra_info)
-{
- struct frame_info *frame = deprecated_frame_xmalloc ();
make_cleanup (xfree, frame);
if (sizeof_saved_regs > 0)
{
diff --git a/gdb/frame.h b/gdb/frame.h
index c31f41e7096..982c81eeb93 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -408,10 +408,6 @@ extern ULONGEST get_frame_register_unsigned (struct frame_info *frame,
/* Use frame_unwind_register_signed. */
-extern void frame_unwind_signed_register (struct frame_info *frame,
- int regnum, LONGEST *val);
-
-/* Use frame_unwind_register_signed. */
extern void frame_unwind_unsigned_register (struct frame_info *frame,
int regnum, ULONGEST *val);
@@ -572,9 +568,7 @@ extern void show_frame_info (struct frame_info *, int, int, int);
extern struct frame_info *block_innermost_frame (const struct block *);
-/* NOTE: cagney/2002-09-13: There is no need for this function.
- Instead either of frame_unwind_signed_register() or
- frame_unwind_unsigned_register() can be used. */
+/* NOTE: cagney/2002-09-13: There is no need for this function. */
extern CORE_ADDR deprecated_read_register_dummy (CORE_ADDR pc,
CORE_ADDR fp, int);
extern void generic_push_dummy_frame (void);
@@ -702,25 +696,6 @@ extern void deprecated_update_frame_pc_hack (struct frame_info *frame,
extern void deprecated_update_frame_base_hack (struct frame_info *frame,
CORE_ADDR base);
-/* FIXME: cagney/2003-01-04: Explicitly set the frame's saved_regs
- and/or extra_info. Target code is allocating a fake frame and than
- initializing that to get around the problem of, when creating the
- inner most frame, there is no where to cache information such as
- the prologue analysis. This is fixed by the new unwind mechanism -
- even the inner most frame has somewhere to store things like the
- prolog analysis (or at least will once the frame overhaul is
- finished). */
-extern void deprecated_set_frame_saved_regs_hack (struct frame_info *frame,
- CORE_ADDR *saved_regs);
-extern void deprecated_set_frame_extra_info_hack (struct frame_info *frame,
- struct frame_extra_info *extra_info);
-
-/* FIXME: cagney/2003-01-04: Allocate a frame from the heap (rather
- than the frame obstack). Targets do this as a way of saving the
- prologue analysis from the inner most frame before that frame has
- been created. By always creating a frame, this problem goes away. */
-extern struct frame_info *deprecated_frame_xmalloc (void);
-
/* FIXME: cagney/2003-01-05: Allocate a frame, along with the
saved_regs and extra_info. Set up cleanups for all three. Same as
for deprecated_frame_xmalloc, targets are calling this when
@@ -730,26 +705,6 @@ extern struct frame_info *deprecated_frame_xmalloc (void);
extern struct frame_info *deprecated_frame_xmalloc_with_cleanup (long sizeof_saved_regs,
long sizeof_extra_info);
-/* FIXME: cagney/2003-01-07: These are just nasty. Code shouldn't be
- doing this. I suspect it dates back to the days when every field
- of an allocated structure was explicitly initialized. */
-extern void deprecated_set_frame_next_hack (struct frame_info *fi,
- struct frame_info *next);
-extern void deprecated_set_frame_prev_hack (struct frame_info *fi,
- struct frame_info *prev);
-
-/* FIXME: cagney/2003-01-07: Instead of the dwarf2cfi having its own
- dedicated `struct frame_info . context' field, the code should use
- the per frame `unwind_cache' that is passed to the
- frame_pc_unwind(), frame_register_unwind() and frame_id_unwind()
- methods.
-
- See "dummy-frame.c" for an example of how a cfi-frame object can be
- implemented using this. */
-extern struct context *deprecated_get_frame_context (struct frame_info *fi);
-extern void deprecated_set_frame_context (struct frame_info *fi,
- struct context *context);
-
/* Return non-zero if the architecture is relying on legacy frame
code. */
extern int legacy_frame_p (struct gdbarch *gdbarch);
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index e08ebe4aa84..4fc8740d25c 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -1101,11 +1101,6 @@ frv_frame_this_id (struct frame_info *next_frame,
/* The FUNC is easy. */
func = frame_func_unwind (next_frame);
- /* This is meant to halt the backtrace at "_start". Make sure we
- don't halt it at a generic dummy frame. */
- if (inside_entry_func (func))
- return;
-
/* Check if the stack is empty. */
msym_stack = lookup_minimal_symbol ("_stack", NULL, NULL);
if (msym_stack && info->base == SYMBOL_VALUE_ADDRESS (msym_stack))
@@ -1212,6 +1207,7 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
case bfd_mach_frvsimple:
case bfd_mach_fr500:
case bfd_mach_frvtomcat:
+ case bfd_mach_fr550:
set_variant_num_gprs (var, 64);
set_variant_num_fprs (var, 64);
break;
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index f73a4f6f3ae..bac577b1ad1 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -420,7 +420,7 @@ struct gdbarch startup_gdbarch =
0, /* software_single_step */
0, /* print_insn */
0, /* skip_trampoline_code */
- 0, /* skip_solib_resolver */
+ generic_skip_solib_resolver, /* skip_solib_resolver */
0, /* in_solib_call_trampoline */
0, /* in_solib_return_trampoline */
0, /* pc_in_sigtramp */
@@ -2217,16 +2217,9 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
(long) current_gdbarch->skip_prologue
/*SKIP_PROLOGUE ()*/);
#endif
-#ifdef SKIP_SOLIB_RESOLVER
fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "SKIP_SOLIB_RESOLVER(pc)",
- XSTRING (SKIP_SOLIB_RESOLVER (pc)));
- fprintf_unfiltered (file,
- "gdbarch_dump: SKIP_SOLIB_RESOLVER = <0x%08lx>\n",
- (long) current_gdbarch->skip_solib_resolver
- /*SKIP_SOLIB_RESOLVER ()*/);
-#endif
+ "gdbarch_dump: skip_solib_resolver = 0x%08lx\n",
+ (long) current_gdbarch->skip_solib_resolver);
#ifdef SKIP_TRAMPOLINE_CODE
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -5220,7 +5213,7 @@ gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
gdb_assert (gdbarch->skip_solib_resolver != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
- return gdbarch->skip_solib_resolver (pc);
+ return gdbarch->skip_solib_resolver (gdbarch, pc);
}
void
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 3affac564f0..a9df6754327 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -2138,15 +2138,9 @@ extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_s
evaluates non-zero, this is the address where the debugger will place
a step-resume breakpoint to get us past the dynamic linker. */
-typedef CORE_ADDR (gdbarch_skip_solib_resolver_ftype) (CORE_ADDR pc);
+typedef CORE_ADDR (gdbarch_skip_solib_resolver_ftype) (struct gdbarch *gdbarch, CORE_ADDR pc);
extern CORE_ADDR gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc);
extern void set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, gdbarch_skip_solib_resolver_ftype *skip_solib_resolver);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_SOLIB_RESOLVER)
-#error "Non multi-arch definition of SKIP_SOLIB_RESOLVER"
-#endif
-#if !defined (SKIP_SOLIB_RESOLVER)
-#define SKIP_SOLIB_RESOLVER(pc) (gdbarch_skip_solib_resolver (current_gdbarch, pc))
-#endif
/* For SVR4 shared libraries, each call goes through a small piece of
trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates
@@ -2609,6 +2603,7 @@ extern void set_gdbarch_data (struct gdbarch *gdbarch,
extern void *gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *);
+
/* Register per-architecture memory region.
Provide a memory-region swap mechanism. Per-architecture memory
@@ -2627,33 +2622,6 @@ extern void register_gdbarch_swap (void *data, unsigned long size, gdbarch_swap_
-/* The target-system-dependent byte order is dynamic */
-
-extern int target_byte_order;
-#ifndef TARGET_BYTE_ORDER
-#define TARGET_BYTE_ORDER (target_byte_order + 0)
-#endif
-
-extern int target_byte_order_auto;
-#ifndef TARGET_BYTE_ORDER_AUTO
-#define TARGET_BYTE_ORDER_AUTO (target_byte_order_auto + 0)
-#endif
-
-
-
-/* The target-system-dependent BFD architecture is dynamic */
-
-extern int target_architecture_auto;
-#ifndef TARGET_ARCHITECTURE_AUTO
-#define TARGET_ARCHITECTURE_AUTO (target_architecture_auto + 0)
-#endif
-
-extern const struct bfd_arch_info *target_architecture;
-#ifndef TARGET_ARCHITECTURE
-#define TARGET_ARCHITECTURE (target_architecture + 0)
-#endif
-
-
/* Set the dynamic target-system-dependent parameters (architecture,
byte-order, ...) using information found in the BFD */
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 95db7112098..eb015b38d74 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -704,7 +704,7 @@ f:2:SKIP_TRAMPOLINE_CODE:CORE_ADDR:skip_trampoline_code:CORE_ADDR pc:pc:::generi
# If IN_SOLIB_DYNSYM_RESOLVE_CODE returns true, and SKIP_SOLIB_RESOLVER
# evaluates non-zero, this is the address where the debugger will place
# a step-resume breakpoint to get us past the dynamic linker.
-f:2:SKIP_SOLIB_RESOLVER:CORE_ADDR:skip_solib_resolver:CORE_ADDR pc:pc:::generic_skip_solib_resolver::0
+m:2:SKIP_SOLIB_RESOLVER:CORE_ADDR:skip_solib_resolver:CORE_ADDR pc:pc:::generic_skip_solib_resolver::0
# For SVR4 shared libraries, each call goes through a small piece of
# trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates
# to nonzero if we are currently stopped in one of these.
@@ -1215,6 +1215,7 @@ extern void set_gdbarch_data (struct gdbarch *gdbarch,
extern void *gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *);
+
/* Register per-architecture memory region.
Provide a memory-region swap mechanism. Per-architecture memory
@@ -1233,33 +1234,6 @@ extern void register_gdbarch_swap (void *data, unsigned long size, gdbarch_swap_
-/* The target-system-dependent byte order is dynamic */
-
-extern int target_byte_order;
-#ifndef TARGET_BYTE_ORDER
-#define TARGET_BYTE_ORDER (target_byte_order + 0)
-#endif
-
-extern int target_byte_order_auto;
-#ifndef TARGET_BYTE_ORDER_AUTO
-#define TARGET_BYTE_ORDER_AUTO (target_byte_order_auto + 0)
-#endif
-
-
-
-/* The target-system-dependent BFD architecture is dynamic */
-
-extern int target_architecture_auto;
-#ifndef TARGET_ARCHITECTURE_AUTO
-#define TARGET_ARCHITECTURE_AUTO (target_architecture_auto + 0)
-#endif
-
-extern const struct bfd_arch_info *target_architecture;
-#ifndef TARGET_ARCHITECTURE
-#define TARGET_ARCHITECTURE (target_architecture + 0)
-#endif
-
-
/* Set the dynamic target-system-dependent parameters (architecture,
byte-order, ...) using information found in the BFD */
diff --git a/gdb/glibc-tdep.c b/gdb/glibc-tdep.c
index 46aa74912e8..04bb6834ad1 100644
--- a/gdb/glibc-tdep.c
+++ b/gdb/glibc-tdep.c
@@ -66,7 +66,7 @@ find_minsym_and_objfile (char *name, struct objfile **objfile_p)
trigger when the dynamic linker is done. */
CORE_ADDR
-glibc_skip_solib_resolver (CORE_ADDR pc)
+glibc_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
{
/* The GNU dynamic linker is part of the GNU C library, and is used
by all GNU systems (GNU/Hurd, GNU/Linux). An unresolved PLT
diff --git a/gdb/glibc-tdep.h b/gdb/glibc-tdep.h
index 31c77b920e2..75598d5e08b 100644
--- a/gdb/glibc-tdep.h
+++ b/gdb/glibc-tdep.h
@@ -22,6 +22,9 @@
#ifndef GLIBC_TDEP_H
#define GLIBC_TDEP_H
-extern CORE_ADDR glibc_skip_solib_resolver (CORE_ADDR);
+struct gdbarch;
+
+extern CORE_ADDR glibc_skip_solib_resolver (struct gdbarch *gdbarch,
+ CORE_ADDR);
#endif /* glibc-tdep.h */
diff --git a/gdb/gnu-v2-abi.c b/gdb/gnu-v2-abi.c
index 2234d3bf8ef..8cb2a7e4494 100644
--- a/gdb/gnu-v2-abi.c
+++ b/gdb/gnu-v2-abi.c
@@ -1,6 +1,6 @@
/* Abstraction of GNU v2 abi.
- Copyright 2001, 2003 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Daniel Berlin <dberlin@redhat.com>
@@ -30,6 +30,7 @@
#include "value.h"
#include "demangle.h"
#include "cp-abi.h"
+#include "cp-support.h"
#include <ctype.h>
@@ -259,9 +260,9 @@ gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc)
*(strchr(demangled_name,' '))=0;
/* Lookup the type for the name */
- rtti_type=lookup_typename(demangled_name, (struct block *)0,1);
-
- if (rtti_type==NULL)
+ /* FIXME: chastain/2003-11-26: block=NULL is bogus. See pr gdb/1465. */
+ rtti_type = cp_lookup_rtti_type (demangled_name, NULL);
+ if (rtti_type == NULL)
return NULL;
if (TYPE_N_BASECLASSES(rtti_type) > 1 && full && (*full) != 1)
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c
index b18e644796e..0fbdd6eefbf 100644
--- a/gdb/gnu-v3-abi.c
+++ b/gdb/gnu-v3-abi.c
@@ -1,7 +1,7 @@
/* Abstraction of GNU v3 abi.
Contributed by Jim Blandy <jimb@redhat.com>
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -23,6 +23,7 @@
#include "defs.h"
#include "value.h"
#include "cp-abi.h"
+#include "cp-support.h"
#include "demangle.h"
#include "gdb_assert.h"
#include "gdb_string.h"
@@ -196,7 +197,6 @@ gnuv3_rtti_type (struct value *value,
struct minimal_symbol *vtable_symbol;
const char *vtable_symbol_name;
const char *class_name;
- struct symbol *class_symbol;
struct type *run_time_type;
struct type *base_type;
LONGEST offset_to_top;
@@ -255,26 +255,10 @@ gnuv3_rtti_type (struct value *value,
class_name = vtable_symbol_name + 11;
/* Try to look up the class name as a type name. */
- class_symbol = lookup_symbol (class_name, 0, STRUCT_DOMAIN, 0, 0);
- if (! class_symbol)
- {
- warning ("can't find class named `%s', as given by C++ RTTI", class_name);
- return NULL;
- }
-
- /* Make sure the type symbol is sane. (An earlier version of this
- code would find constructor functions, who have the same name as
- the class.) */
- if (SYMBOL_CLASS (class_symbol) != LOC_TYPEDEF
- || TYPE_CODE (SYMBOL_TYPE (class_symbol)) != TYPE_CODE_CLASS)
- {
- warning ("C++ RTTI gives a class name of `%s', but that isn't a type name",
- class_name);
- return NULL;
- }
-
- /* This is the object's run-time type! */
- run_time_type = SYMBOL_TYPE (class_symbol);
+ /* FIXME: chastain/2003-11-26: block=NULL is bogus. See pr gdb/1465. */
+ run_time_type = cp_lookup_rtti_type (class_name, NULL);
+ if (run_time_type == NULL)
+ return NULL;
/* Get the offset from VALUE to the top of the complete object.
NOTE: this is the reverse of the meaning of *TOP_P. */
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index ec05f013207..4a66d806a51 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -49,7 +49,14 @@ enum
h8300h_reg_size = 4,
h8300_max_reg_size = 4,
};
-#define BINWORD (h8300hmode && !h8300_normal_mode ? h8300h_reg_size : h8300_reg_size)
+
+static int is_h8300hmode (struct gdbarch *gdbarch);
+static int is_h8300smode (struct gdbarch *gdbarch);
+static int is_h8300sxmode (struct gdbarch *gdbarch);
+static int is_h8300_normal_mode (struct gdbarch *gdbarch);
+
+#define BINWORD (is_h8300hmode (current_gdbarch) && \
+ !is_h8300_normal_mode (current_gdbarch) ? h8300h_reg_size : h8300_reg_size)
enum gdb_regnum
{
@@ -350,7 +357,8 @@ h8300_examine_prologue (CORE_ADDR ip, CORE_ADDR limit,
}
/* If the PC isn't valid, quit now. */
- if (ip == 0 || ip & (h8300hmode && !h8300_normal_mode ? ~0xffffff : ~0xffff))
+ if (ip == 0 || ip & (is_h8300hmode (current_gdbarch) &&
+ !is_h8300_normal_mode (current_gdbarch) ? ~0xffffff : ~0xffff))
return 0;
next_ip = h8300_next_prologue_insn (ip, limit, &insn_word);
@@ -947,7 +955,8 @@ h8300_print_register (struct gdbarch *gdbarch, struct ui_file *file,
rval = get_frame_register_signed (frame, regno);
fprintf_filtered (file, "%-14s ", name);
- if (regno == E_PSEUDO_CCR_REGNUM || (regno == E_PSEUDO_EXR_REGNUM && h8300smode))
+ if (regno == E_PSEUDO_CCR_REGNUM ||
+ (regno == E_PSEUDO_EXR_REGNUM && is_h8300smode (current_gdbarch)))
{
fprintf_filtered (file, "0x%02x ", (unsigned char)rval);
print_longest (file, 'u', 1, rval);
@@ -996,7 +1005,7 @@ h8300_print_register (struct gdbarch *gdbarch, struct ui_file *file,
if ((Z | (N ^ V)) == 1)
fprintf_filtered (file, "<= ");
}
- else if (regno == E_PSEUDO_EXR_REGNUM && h8300smode)
+ else if (regno == E_PSEUDO_EXR_REGNUM && is_h8300smode (current_gdbarch))
{
/* EXR register */
unsigned char l = rval & 0xff;
@@ -1019,10 +1028,10 @@ h8300_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
h8300_print_register (gdbarch, file, frame, regno);
h8300_print_register (gdbarch, file, frame, E_PSEUDO_CCR_REGNUM);
h8300_print_register (gdbarch, file, frame, E_PC_REGNUM);
- if (h8300smode)
+ if (is_h8300smode (current_gdbarch))
{
h8300_print_register (gdbarch, file, frame, E_PSEUDO_EXR_REGNUM);
- if (h8300sxmode)
+ if (is_h8300sxmode (current_gdbarch))
{
h8300_print_register (gdbarch, file, frame, E_SBR_REGNUM);
h8300_print_register (gdbarch, file, frame, E_VBR_REGNUM);
@@ -1044,7 +1053,7 @@ h8300_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
{
if (regno == E_CCR_REGNUM)
h8300_print_register (gdbarch, file, frame, E_PSEUDO_CCR_REGNUM);
- else if (regno == E_PSEUDO_EXR_REGNUM && h8300smode)
+ else if (regno == E_PSEUDO_EXR_REGNUM && is_h8300smode (current_gdbarch))
h8300_print_register (gdbarch, file, frame, E_PSEUDO_EXR_REGNUM);
else
h8300_print_register (gdbarch, file, frame, regno);
@@ -1078,7 +1087,7 @@ h8300_register_type (struct gdbarch *gdbarch, int regno)
return builtin_type_uint8;
else if (regno == E_PSEUDO_EXR_REGNUM)
return builtin_type_uint8;
- else if (h8300hmode)
+ else if (is_h8300hmode (current_gdbarch))
return builtin_type_int32;
else
return builtin_type_int16;
@@ -1192,9 +1201,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
switch (info.bfd_arch_info->mach)
{
case bfd_mach_h8300:
- h8300sxmode = 0;
- h8300smode = 0;
- h8300hmode = 0;
set_gdbarch_num_regs (gdbarch, 13);
set_gdbarch_num_pseudo_regs (gdbarch, 1);
set_gdbarch_ecoff_reg_to_regnum (gdbarch, h8300_dbg_reg_to_regnum);
@@ -1210,9 +1216,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
case bfd_mach_h8300h:
case bfd_mach_h8300hn:
- h8300sxmode = 0;
- h8300smode = 0;
- h8300hmode = 1;
set_gdbarch_num_regs (gdbarch, 13);
set_gdbarch_num_pseudo_regs (gdbarch, 1);
set_gdbarch_ecoff_reg_to_regnum (gdbarch, h8300_dbg_reg_to_regnum);
@@ -1222,13 +1225,11 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_name (gdbarch, h8300_register_name);
if(info.bfd_arch_info->mach != bfd_mach_h8300hn)
{
- h8300_normal_mode = 0;
set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_addr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
}
else
{
- h8300_normal_mode = 1;
set_gdbarch_ptr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
set_gdbarch_addr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
}
@@ -1238,9 +1239,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
case bfd_mach_h8300s:
case bfd_mach_h8300sn:
- h8300sxmode = 0;
- h8300smode = 1;
- h8300hmode = 1;
set_gdbarch_num_regs (gdbarch, 16);
set_gdbarch_num_pseudo_regs (gdbarch, 2);
set_gdbarch_ecoff_reg_to_regnum (gdbarch, h8300s_dbg_reg_to_regnum);
@@ -1250,13 +1248,11 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_name (gdbarch, h8300s_register_name);
if(info.bfd_arch_info->mach != bfd_mach_h8300sn)
{
- h8300_normal_mode = 0;
set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_addr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
}
else
{
- h8300_normal_mode = 1;
set_gdbarch_ptr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
set_gdbarch_addr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
}
@@ -1266,9 +1262,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
case bfd_mach_h8300sx:
case bfd_mach_h8300sxn:
- h8300sxmode = 1;
- h8300smode = 1;
- h8300hmode = 1;
set_gdbarch_num_regs (gdbarch, 18);
set_gdbarch_num_pseudo_regs (gdbarch, 2);
set_gdbarch_ecoff_reg_to_regnum (gdbarch, h8300s_dbg_reg_to_regnum);
@@ -1278,13 +1271,11 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_name (gdbarch, h8300sx_register_name);
if(info.bfd_arch_info->mach != bfd_mach_h8300sxn)
{
- h8300_normal_mode = 0;
set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_addr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
}
else
{
- h8300_normal_mode = 1;
set_gdbarch_ptr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
set_gdbarch_addr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
}
@@ -1370,3 +1361,39 @@ _initialize_h8300_tdep (void)
{
register_gdbarch_init (bfd_arch_h8300, h8300_gdbarch_init);
}
+
+static int
+is_h8300hmode (struct gdbarch *gdbarch)
+{
+ return gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_h8300sx
+ || gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_h8300sxn
+ || gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_h8300s
+ || gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_h8300sn
+ || gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_h8300h
+ || gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_h8300hn;
+}
+
+static int
+is_h8300smode (struct gdbarch *gdbarch)
+{
+ return gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_h8300sx
+ || gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_h8300sxn
+ || gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_h8300s
+ || gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_h8300sn;
+}
+
+static int
+is_h8300sxmode (struct gdbarch *gdbarch)
+{
+ return gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_h8300sx
+ || gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_h8300sxn;
+}
+
+static int
+is_h8300_normal_mode (struct gdbarch *gdbarch)
+{
+ return gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_h8300sxn
+ || gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_h8300sn
+ || gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_h8300hn;
+}
+
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 7386e492924..57579bcfd9a 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -2060,30 +2060,6 @@ hppa_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
#endif
-/* elz: this function returns a value which is built looking at the given address.
- It is called from call_function_by_hand, in case we need to return a
- value which is larger than 64 bits, and it is stored in the stack rather than
- in the registers r28 and r29 or fr4.
- This function does the same stuff as value_being_returned in values.c, but
- gets the value from the stack rather than from the buffer where all the
- registers were saved when the function called completed. */
-/* FIXME: cagney/2003-09-27: This function is no longer needed. The
- inferior function call code now directly handles the case described
- above. */
-struct value *
-hppa_value_returned_from_stack (struct type *valtype, CORE_ADDR addr)
-{
- struct value *val;
-
- val = allocate_value (valtype);
- CHECK_TYPEDEF (valtype);
- target_read_memory (addr, VALUE_CONTENTS_RAW (val), TYPE_LENGTH (valtype));
-
- return val;
-}
-
-
-
/* elz: Used to lookup a symbol in the shared libraries.
This function calls shl_findsym, indirectly through a
call to __d_shl_get. __d_shl_get is in end.c, which is always
@@ -3402,7 +3378,7 @@ hppa_skip_trampoline_code (CORE_ADDR pc)
ALL_MSYMBOLS (objfile, msymbol)
{
if (MSYMBOL_TYPE (msymbol) == mst_text
- && STREQ (DEPRECATED_SYMBOL_NAME (msymbol), DEPRECATED_SYMBOL_NAME (msym)))
+ && DEPRECATED_STREQ (DEPRECATED_SYMBOL_NAME (msymbol), DEPRECATED_SYMBOL_NAME (msym)))
{
function_found = 1;
break;
diff --git a/gdb/hpread.c b/gdb/hpread.c
index daa5d5e45e2..40875f79377 100644
--- a/gdb/hpread.c
+++ b/gdb/hpread.c
@@ -3897,7 +3897,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
fn_p = fn_list;
while (fn_p)
{
- if (STREQ (fn_p->field.name, method_name))
+ if (DEPRECATED_STREQ (fn_p->field.name, method_name))
break;
fn_p = fn_p->next;
}
@@ -6303,7 +6303,7 @@ hpread_get_next_skip_over_anon_unions (int skip_fields, dnttpointer field,
/* Do we have another anonymous union? If so, adjust the bitoffsets
of its members and skip over its members. */
if ((TYPE_CODE (anon_type) == TYPE_CODE_UNION) &&
- (!name || STREQ (name, "")))
+ (!name || DEPRECATED_STREQ (name, "")))
{
hpread_adjust_bitoffsets (anon_type, bitoffset);
field = hpread_get_next_skip_over_anon_unions (TYPE_NFIELDS (anon_type), field, fieldp, objfile);
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index 48caf4da06f..50073b1239f 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -306,14 +306,6 @@ i386_linux_write_pc (CORE_ADDR pc, ptid_t ptid)
write_register_pid (I386_LINUX_ORIG_EAX_REGNUM, -1, ptid);
}
-/* Calling functions in shared libraries. */
-
-CORE_ADDR
-i386_linux_skip_solib_resolver (CORE_ADDR pc)
-{
- return glibc_skip_solib_resolver (pc);
-}
-
/* Fetch (and possibly build) an appropriate link_map_offsets
structure for native GNU/Linux x86 targets using the struct offsets
defined in link.h (but without actual reference to that file).
@@ -453,6 +445,7 @@ i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
to support backtracing through calls to signal handlers. */
set_gdbarch_pc_in_sigtramp (gdbarch, i386_linux_pc_in_sigtramp);
+ set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver);
set_solib_svr4_fetch_link_map_offsets (gdbarch,
i386_linux_svr4_fetch_link_map_offsets);
}
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 69db1fa820e..4ee9fa46f19 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -508,9 +508,13 @@ i386_analyze_frame_setup (CORE_ADDR pc, CORE_ADDR current_pc,
subl %edx, %edx
subl %eax, %eax
+ Because of the symmetry, there are actually two ways to
+ encode these instructions; with opcode bytes 0x29 and 0x2b
+ for `subl' and opcode bytes 0x31 and 0x33 for `xorl'.
+
Make sure we only skip these instructions if we later see the
`movl %esp, %ebp' that actually sets up the frame. */
- while (op == 0x29 || op == 0x31)
+ while (op == 0x29 || op == 0x2b || op == 0x31 || op == 0x33)
{
op = read_memory_unsigned_integer (pc + skip + 2, 1);
switch (op)
@@ -1151,26 +1155,17 @@ i386_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
#define LOW_RETURN_REGNUM I386_EAX_REGNUM /* %eax */
#define HIGH_RETURN_REGNUM I386_EDX_REGNUM /* %edx */
-/* Extract from an array REGBUF containing the (raw) register state, a
- function return value of TYPE, and copy that, in virtual format,
- into VALBUF. */
+/* Read, for architecture GDBARCH, a function return value of TYPE
+ from REGCACHE, and copy that into VALBUF. */
static void
-i386_extract_return_value (struct type *type, struct regcache *regcache,
- void *dst)
+i386_extract_return_value (struct gdbarch *gdbarch, struct type *type,
+ struct regcache *regcache, void *valbuf)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
- bfd_byte *valbuf = dst;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int len = TYPE_LENGTH (type);
char buf[I386_MAX_REGISTER_SIZE];
- if (TYPE_CODE (type) == TYPE_CODE_STRUCT
- && TYPE_NFIELDS (type) == 1)
- {
- i386_extract_return_value (TYPE_FIELD_TYPE (type, 0), regcache, valbuf);
- return;
- }
-
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
if (tdep->st0_regnum < 0)
@@ -1202,7 +1197,7 @@ i386_extract_return_value (struct type *type, struct regcache *regcache,
regcache_raw_read (regcache, LOW_RETURN_REGNUM, buf);
memcpy (valbuf, buf, low_size);
regcache_raw_read (regcache, HIGH_RETURN_REGNUM, buf);
- memcpy (valbuf + low_size, buf, len - low_size);
+ memcpy ((char *) valbuf + low_size, buf, len - low_size);
}
else
internal_error (__FILE__, __LINE__,
@@ -1210,27 +1205,20 @@ i386_extract_return_value (struct type *type, struct regcache *regcache,
}
}
-/* Write into the appropriate registers a function return value stored
- in VALBUF of type TYPE, given in virtual format. */
+/* Write, for architecture GDBARCH, a function return value of TYPE
+ from VALBUF into REGCACHE. */
static void
-i386_store_return_value (struct type *type, struct regcache *regcache,
- const void *valbuf)
+i386_store_return_value (struct gdbarch *gdbarch, struct type *type,
+ struct regcache *regcache, const void *valbuf)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int len = TYPE_LENGTH (type);
/* Define I387_ST0_REGNUM such that we use the proper definitions
for the architecture. */
#define I387_ST0_REGNUM I386_ST0_REGNUM
- if (TYPE_CODE (type) == TYPE_CODE_STRUCT
- && TYPE_NFIELDS (type) == 1)
- {
- i386_store_return_value (TYPE_FIELD_TYPE (type, 0), regcache, valbuf);
- return;
- }
-
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
ULONGEST fstat;
@@ -1315,20 +1303,62 @@ static const char *valid_conventions[] =
};
static const char *struct_convention = default_struct_convention;
+/* Return non-zero if TYPE, which is assumed to be a structure or
+ union type, should be returned in registers for architecture
+ GDBARCH. */
+
static int
-i386_use_struct_convention (int gcc_p, struct type *type)
+i386_reg_struct_return_p (struct gdbarch *gdbarch, struct type *type)
{
- enum struct_return struct_return;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ enum type_code code = TYPE_CODE (type);
+ int len = TYPE_LENGTH (type);
- if (struct_convention == default_struct_convention)
- struct_return = gdbarch_tdep (current_gdbarch)->struct_return;
- else if (struct_convention == pcc_struct_convention)
- struct_return = pcc_struct_return;
- else
- struct_return = reg_struct_return;
+ gdb_assert (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION);
+
+ if (struct_convention == pcc_struct_convention
+ || (struct_convention == default_struct_convention
+ && tdep->struct_return == pcc_struct_return))
+ return 0;
- return generic_use_struct_convention (struct_return == reg_struct_return,
- type);
+ return (len == 1 || len == 2 || len == 4 || len == 8);
+}
+
+/* Determine, for architecture GDBARCH, how a return value of TYPE
+ should be returned. If it is supposed to be returned in registers,
+ and READBUF is non-zero, read the appropriate value from REGCACHE,
+ and copy it into READBUF. If WRITEBUF is non-zero, write the value
+ from WRITEBUF into REGCACHE. */
+
+static enum return_value_convention
+i386_return_value (struct gdbarch *gdbarch, struct type *type,
+ struct regcache *regcache, void *readbuf,
+ const void *writebuf)
+{
+ enum type_code code = TYPE_CODE (type);
+
+ if ((code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION)
+ && !i386_reg_struct_return_p (gdbarch, type))
+ return RETURN_VALUE_STRUCT_CONVENTION;
+
+ /* This special case is for structures consisting of a single
+ `float' or `double' member. These structures are returned in
+ %st(0). For these structures, we call ourselves recursively,
+ changing TYPE into the type of the first member of the structure.
+ Since that should work for all structures that have only one
+ member, we don't bother to check the member's type here. */
+ if (code == TYPE_CODE_STRUCT && TYPE_NFIELDS (type) == 1)
+ {
+ type = check_typedef (TYPE_FIELD_TYPE (type, 0));
+ return i386_return_value (gdbarch, type, regcache, readbuf, writebuf);
+ }
+
+ if (readbuf)
+ i386_extract_return_value (gdbarch, type, regcache, readbuf);
+ if (writebuf)
+ i386_store_return_value (gdbarch, type, regcache, writebuf);
+
+ return RETURN_VALUE_REGISTER_CONVENTION;
}
@@ -1548,7 +1578,7 @@ i386_value_to_register (struct frame_info *frame, int regnum,
to register cache REGCACHE. If REGNUM is -1, do this for all
registers in REGSET. */
-static void
+void
i386_supply_gregset (const struct regset *regset, struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
@@ -1964,11 +1994,9 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_to_value (gdbarch, i386_register_to_value);
set_gdbarch_value_to_register (gdbarch, i386_value_to_register);
- set_gdbarch_extract_return_value (gdbarch, i386_extract_return_value);
- set_gdbarch_store_return_value (gdbarch, i386_store_return_value);
+ set_gdbarch_return_value (gdbarch, i386_return_value);
set_gdbarch_extract_struct_value_address (gdbarch,
i386_extract_struct_value_address);
- set_gdbarch_use_struct_convention (gdbarch, i386_use_struct_convention);
set_gdbarch_skip_prologue (gdbarch, i386_skip_prologue);
diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h
index 2c4897989e0..c261e38c61c 100644
--- a/gdb/i386-tdep.h
+++ b/gdb/i386-tdep.h
@@ -188,6 +188,13 @@ extern char const *i386_register_name (int reg);
extern int i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
struct reggroup *group);
+/* Supply register REGNUM from the general-purpose register set REGSET
+ to register cache REGCACHE. If REGNUM is -1, do this for all
+ registers in REGSET. */
+extern void i386_supply_gregset (const struct regset *regset,
+ struct regcache *regcache, int regnum,
+ const void *gregs, size_t len);
+
/* Return the appropriate register set for the core section identified
by SECT_NAME and SECT_SIZE. */
extern const struct regset *
diff --git a/gdb/i386nbsd-tdep.c b/gdb/i386nbsd-tdep.c
index dae0a1d5e20..c3efd1e1fca 100644
--- a/gdb/i386nbsd-tdep.c
+++ b/gdb/i386nbsd-tdep.c
@@ -21,129 +21,80 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
-#include "gdbtypes.h"
+#include "arch-utils.h"
#include "gdbcore.h"
#include "regcache.h"
-#include "arch-utils.h"
+#include "regset.h"
#include "osabi.h"
+#include "gdb_assert.h"
+#include "gdb_string.h"
+
#include "i386-tdep.h"
#include "i387-tdep.h"
#include "nbsd-tdep.h"
#include "solib-svr4.h"
-/* Map a GDB register number to an offset in the reg structure. */
-static int regmap[] =
+/* From <machine/reg.h>. */
+static int i386nbsd_r_reg_offset[] =
{
- ( 0 * 4), /* %eax */
- ( 1 * 4), /* %ecx */
- ( 2 * 4), /* %edx */
- ( 3 * 4), /* %ebx */
- ( 4 * 4), /* %esp */
- ( 5 * 4), /* %epb */
- ( 6 * 4), /* %esi */
- ( 7 * 4), /* %edi */
- ( 8 * 4), /* %eip */
- ( 9 * 4), /* %eflags */
- (10 * 4), /* %cs */
- (11 * 4), /* %ss */
- (12 * 4), /* %ds */
- (13 * 4), /* %es */
- (14 * 4), /* %fs */
- (15 * 4), /* %gs */
+ 0 * 4, /* %eax */
+ 1 * 4, /* %ecx */
+ 2 * 4, /* %edx */
+ 3 * 4, /* %ebx */
+ 4 * 4, /* %esp */
+ 5 * 4, /* %ebp */
+ 6 * 4, /* %esi */
+ 7 * 4, /* %edi */
+ 8 * 4, /* %eip */
+ 9 * 4, /* %eflags */
+ 10 * 4, /* %cs */
+ 11 * 4, /* %ss */
+ 12 * 4, /* %ds */
+ 13 * 4, /* %es */
+ 14 * 4, /* %fs */
+ 15 * 4 /* %gs */
};
-#define SIZEOF_STRUCT_REG (16 * 4)
-
static void
-i386nbsd_supply_reg (char *regs, int regno)
+i386nbsd_aout_supply_regset (const struct regset *regset,
+ struct regcache *regcache, int regnum,
+ const void *regs, size_t len)
{
- int i;
+ const struct gdbarch_tdep *tdep = regset->descr;
+
+ gdb_assert (len >= tdep->sizeof_gregset + I387_SIZEOF_FSAVE);
- for (i = 0; i <= 15; i++)
- if (regno == i || regno == -1)
- supply_register (i, regs + regmap[i]);
+ i386_supply_gregset (regset, regcache, regnum, regs, tdep->sizeof_gregset);
+ i387_supply_fsave (regcache, regnum, (char *) regs + tdep->sizeof_gregset);
}
-static void
-fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
- CORE_ADDR ignore)
+const struct regset *
+i386nbsd_aout_regset_from_core_section (struct gdbarch *gdbarch,
+ const char *sect_name,
+ size_t sect_size)
{
- char *regs, *fsave;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- /* We get everything from one section. */
- if (which != 0)
- return;
+ /* NetBSD a.out core dumps don't use seperate register sets for the
+ general-purpose and floating-point registers. */
- if (core_reg_size < (SIZEOF_STRUCT_REG + 108))
+ if (strcmp (sect_name, ".reg") == 0
+ && sect_size >= tdep->sizeof_gregset + I387_SIZEOF_FSAVE)
{
- warning ("Wrong size register set in core file.");
- return;
+ if (tdep->gregset == NULL)
+ {
+ tdep->gregset = XMALLOC (struct regset);
+ tdep->gregset->descr = tdep;
+ tdep->gregset->supply_regset = i386nbsd_aout_supply_regset;
+ }
+ return tdep->gregset;
}
- regs = core_reg_sect;
- fsave = core_reg_sect + SIZEOF_STRUCT_REG;
-
- /* Integer registers. */
- i386nbsd_supply_reg (regs, -1);
-
- /* Floating point registers. */
- i387_supply_fsave (current_regcache, -1, fsave);
-}
-
-static void
-fetch_elfcore_registers (char *core_reg_sect, unsigned core_reg_size,
- int which, CORE_ADDR ignore)
-{
- switch (which)
- {
- case 0: /* Integer registers. */
- if (core_reg_size != SIZEOF_STRUCT_REG)
- warning ("Wrong size register set in core file.");
- else
- i386nbsd_supply_reg (core_reg_sect, -1);
- break;
-
- case 2: /* Floating point registers. */
- if (core_reg_size != 108)
- warning ("Wrong size FP register set in core file.");
- else
- i387_supply_fsave (current_regcache, -1, core_reg_sect);
- break;
-
- case 3: /* "Extended" floating point registers. This is gdb-speak
- for SSE/SSE2. */
- if (core_reg_size != 512)
- warning ("Wrong size XMM register set in core file.");
- else
- i387_supply_fxsave (current_regcache, -1, core_reg_sect);
- break;
-
- default:
- /* Don't know what kind of register request this is; just ignore it. */
- break;
- }
+ return NULL;
}
-static struct core_fns i386nbsd_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 */
-};
-
-static struct core_fns i386nbsd_elfcore_fns =
-{
- bfd_target_elf_flavour, /* core_flavour */
- default_check_format, /* check_format */
- default_core_sniffer, /* core_sniffer */
- fetch_elfcore_registers, /* core_read_registers */
- NULL /* next */
-};
-
/* Under NetBSD/i386, signal handler invocations can be identified by the
designated code sequence that is used to return from a signal handler.
In particular, the return address of a signal handler points to the
@@ -240,7 +191,7 @@ i386nbsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
}
/* From <machine/signal.h>. */
-int i386nbsd_sc_reg_offset[I386_NUM_GREGS] =
+int i386nbsd_sc_reg_offset[] =
{
10 * 4, /* %eax */
9 * 4, /* %ecx */
@@ -268,6 +219,11 @@ i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* Obviously NetBSD is BSD-based. */
i386bsd_init_abi (info, gdbarch);
+ /* NetBSD has a different `struct reg'. */
+ tdep->gregset_reg_offset = i386nbsd_r_reg_offset;
+ tdep->gregset_num_regs = ARRAY_SIZE (i386nbsd_r_reg_offset);
+ tdep->sizeof_gregset = 16 * 4;
+
/* NetBSD has different signal trampoline conventions. */
set_gdbarch_pc_in_sigtramp (gdbarch, i386nbsd_pc_in_sigtramp);
/* FIXME: kettenis/20020906: We should probably provide
@@ -282,10 +238,23 @@ i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* NetBSD has a `struct sigcontext' that's different from the
origional 4.3 BSD. */
tdep->sc_reg_offset = i386nbsd_sc_reg_offset;
- tdep->sc_num_regs = I386_NUM_GREGS;
+ tdep->sc_num_regs = ARRAY_SIZE (i386nbsd_sc_reg_offset);
+}
+
+/* NetBSD a.out. */
+
+static void
+i386nbsdaout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ i386nbsd_init_abi (info, gdbarch);
+
+ /* NetBSD a.out has a single register set. */
+ set_gdbarch_regset_from_core_section
+ (gdbarch, i386nbsd_aout_regset_from_core_section);
}
/* NetBSD ELF. */
+
static void
i386nbsdelf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
@@ -300,26 +269,18 @@ i386nbsdelf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* NetBSD ELF uses SVR4-style shared libraries. */
set_gdbarch_in_solib_call_trampoline (gdbarch,
generic_in_solib_call_trampoline);
- set_solib_svr4_fetch_link_map_offsets (gdbarch,
- nbsd_ilp32_solib_svr4_fetch_link_map_offsets);
+ set_solib_svr4_fetch_link_map_offsets
+ (gdbarch, nbsd_ilp32_solib_svr4_fetch_link_map_offsets);
/* NetBSD ELF uses -fpcc-struct-return by default. */
tdep->struct_return = pcc_struct_return;
-
- /* We support the SSE registers on NetBSD ELF. */
- tdep->num_xmm_regs = I386_NUM_XREGS - 1;
- set_gdbarch_num_regs (gdbarch, I386_NUM_GREGS + I386_NUM_FREGS
- + I386_NUM_XREGS);
}
void
_initialize_i386nbsd_tdep (void)
{
- add_core_fns (&i386nbsd_core_fns);
- add_core_fns (&i386nbsd_elfcore_fns);
-
gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_NETBSD_AOUT,
- i386nbsd_init_abi);
+ i386nbsdaout_init_abi);
gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_NETBSD_ELF,
i386nbsdelf_init_abi);
}
diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c
index ff369f982fe..15525659bb8 100644
--- a/gdb/i387-tdep.c
+++ b/gdb/i387-tdep.c
@@ -734,3 +734,31 @@ i387_tag (const unsigned char *raw)
}
}
}
+
+/* Prepare the FPU stack in REGCACHE for a function return. */
+
+void
+i387_return_value (struct gdbarch *gdbarch, struct regcache *regcache)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ULONGEST fstat;
+
+ /* Define I387_ST0_REGNUM such that we use the proper
+ definitions for the architecture. */
+#define I387_ST0_REGNUM tdep->st0_regnum
+
+ /* Set the top of the floating-point register stack to 7. The
+ actual value doesn't really matter, but 7 is what a normal
+ function return would end up with if the program started out with
+ a freshly initialized FPU. */
+ regcache_raw_read_unsigned (regcache, I387_FSTAT_REGNUM, &fstat);
+ fstat |= (7 << 11);
+ regcache_raw_write_unsigned (regcache, I387_FSTAT_REGNUM, fstat);
+
+ /* Mark %st(1) through %st(7) as empty. Since we set the top of the
+ floating-point register stack to 7, the appropriate value for the
+ tag word is 0x3fff. */
+ regcache_raw_write_unsigned (regcache, I387_FTAG_REGNUM, 0x3fff);
+
+#undef I387_ST0_REGNUM
+}
diff --git a/gdb/i387-tdep.h b/gdb/i387-tdep.h
index 377e17ac7b3..fa94a486d81 100644
--- a/gdb/i387-tdep.h
+++ b/gdb/i387-tdep.h
@@ -102,4 +102,9 @@ extern void i387_supply_fxsave (struct regcache *regcache, int regnum,
extern void i387_fill_fxsave (void *fxsave, int regnum);
+/* Prepare the FPU stack in REGCACHE for a function return. */
+
+extern void i387_return_value (struct gdbarch *gdbarch,
+ struct regcache *regcache);
+
#endif /* i387-tdep.h */
diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c
index a2ca8fa9bce..00f66fb2e83 100644
--- a/gdb/ia64-linux-nat.c
+++ b/gdb/ia64-linux-nat.c
@@ -34,6 +34,7 @@
#ifdef HAVE_SYS_REG_H
#include <sys/reg.h>
#endif
+#include <sys/syscall.h>
#include <sys/user.h>
#include <asm/ptrace_offsets.h>
@@ -645,3 +646,13 @@ ia64_linux_stopped_by_watchpoint (ptid_t ptid)
return (CORE_ADDR) siginfo.si_addr;
}
+
+LONGEST
+ia64_linux_xfer_unwind_table (struct target_ops *ops,
+ enum target_object object,
+ const char *annex,
+ void *readbuf, const void *writebuf,
+ ULONGEST offset, LONGEST len)
+{
+ return syscall (__NR_getunwind, readbuf, len);
+}
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index 4d0f8a8ec89..88e0e20c072 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -36,8 +36,14 @@
#include "objfiles.h"
#include "elf/common.h" /* for DT_PLTGOT value */
#include "elf-bfd.h"
+#include "elf.h" /* for PT_IA64_UNWIND value */
#include "dis-asm.h"
+#ifdef HAVE_LIBUNWIND_IA64_H
+#include "libunwind-frame.h"
+#include "libunwind-ia64.h"
+#endif
+
/* Hook for determining the global pointer when calling functions in
the inferior under AIX. The initialization code in ia64-aix-nat.c
sets this hook to the address of a function which will find the
@@ -87,6 +93,7 @@ typedef enum instruction_type
/* FIXME: These extern declarations should go in ia64-tdep.h. */
extern CORE_ADDR ia64_linux_sigcontext_register_address (CORE_ADDR, int);
extern CORE_ADDR ia64_aix_sigcontext_register_address (CORE_ADDR, int);
+extern unsigned long ia64_linux_getunwind_table (void *, size_t);
static gdbarch_init_ftype ia64_gdbarch_init;
@@ -2099,6 +2106,609 @@ static const struct frame_base ia64_frame_base =
ia64_frame_base_address
};
+#ifdef HAVE_LIBUNWIND_IA64_H
+
+struct ia64_unwind_table_entry
+ {
+ unw_word_t start_offset;
+ unw_word_t end_offset;
+ unw_word_t info_offset;
+ };
+
+static __inline__ uint64_t
+ia64_rse_slot_num (uint64_t addr)
+{
+ return (addr >> 3) & 0x3f;
+}
+
+/* Skip over a designated number of registers in the backing
+ store, remembering every 64th position is for NAT. */
+static __inline__ uint64_t
+ia64_rse_skip_regs (uint64_t addr, long num_regs)
+{
+ long delta = ia64_rse_slot_num(addr) + num_regs;
+
+ if (num_regs < 0)
+ delta -= 0x3e;
+ return addr + ((num_regs + delta/0x3f) << 3);
+}
+
+/* Gdb libunwind-frame callback function to convert from an ia64 gdb register
+ number to a libunwind register number. */
+static int
+ia64_gdb2uw_regnum (int regnum)
+{
+ if (regnum == sp_regnum)
+ return UNW_IA64_SP;
+ else if (regnum == IA64_BSP_REGNUM)
+ return UNW_IA64_BSP;
+ else if ((unsigned) (regnum - IA64_GR0_REGNUM) < 128)
+ return UNW_IA64_GR + (regnum - IA64_GR0_REGNUM);
+ else if ((unsigned) (regnum - V32_REGNUM) < 95)
+ return UNW_IA64_GR + 32 + (regnum - V32_REGNUM);
+ else if ((unsigned) (regnum - IA64_FR0_REGNUM) < 128)
+ return UNW_IA64_FR + (regnum - IA64_FR0_REGNUM);
+ else if ((unsigned) (regnum - IA64_PR0_REGNUM) < 64)
+ return -1;
+ else if ((unsigned) (regnum - IA64_BR0_REGNUM) < 8)
+ return UNW_IA64_BR + (regnum - IA64_BR0_REGNUM);
+ else if (regnum == IA64_PR_REGNUM)
+ return UNW_IA64_PR;
+ else if (regnum == IA64_IP_REGNUM)
+ return UNW_REG_IP;
+ else if (regnum == IA64_CFM_REGNUM)
+ return UNW_IA64_CFM;
+ else if ((unsigned) (regnum - IA64_AR0_REGNUM) < 128)
+ return UNW_IA64_AR + (regnum - IA64_AR0_REGNUM);
+ else if ((unsigned) (regnum - IA64_NAT0_REGNUM) < 128)
+ return UNW_IA64_NAT + (regnum - IA64_NAT0_REGNUM);
+ else
+ return -1;
+}
+
+/* Gdb libunwind-frame callback function to convert from a libunwind register
+ number to a ia64 gdb register number. */
+static int
+ia64_uw2gdb_regnum (int uw_regnum)
+{
+ if (uw_regnum == UNW_IA64_SP)
+ return sp_regnum;
+ else if (uw_regnum == UNW_IA64_BSP)
+ return IA64_BSP_REGNUM;
+ else if ((unsigned) (uw_regnum - UNW_IA64_GR) < 32)
+ return IA64_GR0_REGNUM + (uw_regnum - UNW_IA64_GR);
+ else if ((unsigned) (uw_regnum - UNW_IA64_GR) < 128)
+ return V32_REGNUM + (uw_regnum - (IA64_GR0_REGNUM + 32));
+ else if ((unsigned) (uw_regnum - UNW_IA64_FR) < 128)
+ return IA64_FR0_REGNUM + (uw_regnum - UNW_IA64_FR);
+ else if ((unsigned) (uw_regnum - UNW_IA64_BR) < 8)
+ return IA64_BR0_REGNUM + (uw_regnum - UNW_IA64_BR);
+ else if (uw_regnum == UNW_IA64_PR)
+ return IA64_PR_REGNUM;
+ else if (uw_regnum == UNW_REG_IP)
+ return IA64_IP_REGNUM;
+ else if (uw_regnum == UNW_IA64_CFM)
+ return IA64_CFM_REGNUM;
+ else if ((unsigned) (uw_regnum - UNW_IA64_AR) < 128)
+ return IA64_AR0_REGNUM + (uw_regnum - UNW_IA64_AR);
+ else if ((unsigned) (uw_regnum - UNW_IA64_NAT) < 128)
+ return IA64_NAT0_REGNUM + (uw_regnum - UNW_IA64_NAT);
+ else
+ return -1;
+}
+
+/* Gdb libunwind-frame callback function to reveal if register is a float
+ register or not. */
+static int
+ia64_is_fpreg (int uw_regnum)
+{
+ return unw_is_fpreg (uw_regnum);
+}
+
+/* Libunwind callback accessor function for general registers. */
+static int
+ia64_access_reg (unw_addr_space_t as, unw_regnum_t uw_regnum, unw_word_t *val,
+ int write, void *arg)
+{
+ int regnum = ia64_uw2gdb_regnum (uw_regnum);
+ unw_word_t bsp, sof, sol, cfm, psr, ip;
+ struct frame_info *next_frame = arg;
+ long new_sof, old_sof;
+ char buf[MAX_REGISTER_SIZE];
+
+ if (write)
+ {
+ if (regnum < 0)
+ /* ignore writes to pseudo-registers such as UNW_IA64_PROC_STARTI. */
+ return 0;
+
+ switch (uw_regnum)
+ {
+ case UNW_REG_IP:
+ ia64_write_pc (*val, inferior_ptid);
+ break;
+
+ case UNW_IA64_AR_BSPSTORE:
+ write_register (IA64_BSP_REGNUM, *val);
+ break;
+
+ case UNW_IA64_AR_BSP:
+ case UNW_IA64_BSP:
+ /* Account for the fact that ptrace() expects bsp to point
+ after the current register frame. */
+ cfm = read_register (IA64_CFM_REGNUM);
+ sof = (cfm & 0x7f);
+ bsp = ia64_rse_skip_regs (*val, sof);
+ write_register (IA64_BSP_REGNUM, bsp);
+ break;
+
+ case UNW_IA64_CFM:
+ /* If we change CFM, we need to adjust ptrace's notion of
+ bsp accordingly, so that the real bsp remains
+ unchanged. */
+ bsp = read_register (IA64_BSP_REGNUM);
+ cfm = read_register (IA64_CFM_REGNUM);
+ old_sof = (cfm & 0x7f);
+ new_sof = (*val & 0x7f);
+ if (old_sof != new_sof)
+ {
+ bsp = ia64_rse_skip_regs (bsp, -old_sof + new_sof);
+ write_register (IA64_BSP_REGNUM, bsp);
+ }
+ write_register (IA64_CFM_REGNUM, *val);
+ break;
+
+ default:
+ write_register (regnum, *val);
+ break;
+ }
+ if (gdbarch_debug >= 1)
+ fprintf_unfiltered (gdb_stdlog,
+ " access_reg: to cache: %4s=%016lx\n",
+ (((unsigned) regnum <= IA64_NAT127_REGNUM)
+ ? ia64_register_names[regnum] : "r??"), *val);
+ }
+ else
+ {
+ switch (uw_regnum)
+ {
+ case UNW_REG_IP:
+ /* Libunwind expects to see the pc value which means the slot number
+ from the psr must be merged with the ip word address. */
+ frame_unwind_register (next_frame, IA64_IP_REGNUM, buf);
+ ip = extract_unsigned_integer (buf, 8);
+ frame_unwind_register (next_frame, IA64_PSR_REGNUM, buf);
+ psr = extract_unsigned_integer (buf, 8);
+ *val = ip | ((psr >> 41) & 0x3);
+ break;
+
+ case UNW_IA64_AR_BSP:
+ /* Libunwind expects to see the beginning of the current register
+ frame so we must account for the fact that ptrace() will return a value
+ for bsp that points *after* the current register frame. */
+ frame_unwind_register (next_frame, IA64_BSP_REGNUM, buf);
+ bsp = extract_unsigned_integer (buf, 8);
+ frame_unwind_register (next_frame, IA64_CFM_REGNUM, buf);
+ cfm = extract_unsigned_integer (buf, 8);
+ sof = (cfm & 0x7f);
+ *val = ia64_rse_skip_regs (bsp, -sof);
+ break;
+
+ case UNW_IA64_AR_BSPSTORE:
+ /* Libunwind wants bspstore to be after the current register frame.
+ This is what ptrace() and gdb treats as the regular bsp value. */
+ frame_unwind_register (next_frame, IA64_BSP_REGNUM, buf);
+ *val = extract_unsigned_integer (buf, 8);
+ break;
+
+ default:
+ /* For all other registers, just unwind the value directly. */
+ frame_unwind_register (next_frame, regnum, buf);
+ *val = extract_unsigned_integer (buf, 8);
+ break;
+ }
+
+ if (gdbarch_debug >= 1)
+ fprintf_unfiltered (gdb_stdlog,
+ " access_reg: from cache: %4s=%016lx\n",
+ (((unsigned) regnum <= IA64_NAT127_REGNUM)
+ ? ia64_register_names[regnum] : "r??"), *val);
+ }
+ return 0;
+}
+
+/* Libunwind callback accessor function for floating-point registers. */
+static int
+ia64_access_fpreg (unw_addr_space_t as, unw_regnum_t uw_regnum, unw_fpreg_t *val,
+ int write, void *arg)
+{
+ int regnum = ia64_uw2gdb_regnum (uw_regnum);
+
+ if (write)
+ regcache_cooked_write (current_regcache, regnum, (char *) val);
+ else
+ regcache_cooked_read (current_regcache, regnum, (char *) val);
+ return 0;
+}
+
+/* Libunwind callback accessor function for accessing memory. */
+static int
+ia64_access_mem (unw_addr_space_t as,
+ unw_word_t addr, unw_word_t *val,
+ int write, void *arg)
+{
+ /* XXX do we need to normalize byte-order here? */
+ if (write)
+ return target_write_memory (addr, (char *) val, sizeof (unw_word_t));
+ else
+ return target_read_memory (addr, (char *) val, sizeof (unw_word_t));
+}
+
+/* Call low-level function to access the kernel unwind table. */
+static int
+getunwind_table (void *buf, size_t len)
+{
+ LONGEST x;
+ x = target_read_partial (&current_target, TARGET_OBJECT_UNWIND_TABLE, NULL,
+ buf, 0, len);
+
+ return (int)x;
+}
+
+/* Get the kernel unwind table. */
+static int
+get_kernel_table (unw_word_t ip, unw_dyn_info_t *di)
+{
+ size_t size;
+ struct ia64_table_entry
+ {
+ uint64_t start_offset;
+ uint64_t end_offset;
+ uint64_t info_offset;
+ };
+ static struct ia64_table_entry *ktab = NULL, *etab;
+
+ if (!ktab)
+ {
+ size = getunwind_table (NULL, 0);
+ if ((int)size < 0)
+ return -UNW_ENOINFO;
+ ktab = xmalloc (size);
+ getunwind_table (ktab, size);
+
+ /* Determine length of kernel's unwind table and relocate
+ it's entries. */
+ for (etab = ktab; etab->start_offset; ++etab)
+ etab->info_offset += (uint64_t) ktab;
+ }
+
+ if (ip < ktab[0].start_offset || ip >= etab[-1].end_offset)
+ return -UNW_ENOINFO;
+
+ di->format = UNW_INFO_FORMAT_TABLE;
+ di->gp = 0;
+ di->start_ip = ktab[0].start_offset;
+ di->end_ip = etab[-1].end_offset;
+ di->u.ti.name_ptr = (unw_word_t) "<kernel>";
+ di->u.ti.segbase = 0;
+ di->u.ti.table_len = ((char *) etab - (char *) ktab) / sizeof (unw_word_t);
+ di->u.ti.table_data = (unw_word_t *) ktab;
+
+ if (gdbarch_debug >= 1)
+ fprintf_unfiltered (gdb_stdlog, "get_kernel_table: found table `%s': "
+ "segbase=%lx, length=%lu, gp=%lx\n",
+ (char *) di->u.ti.name_ptr, di->u.ti.segbase,
+ di->u.ti.table_len, di->gp);
+ return 0;
+}
+
+/* Find the unwind table entry for a specified address. */
+static int
+ia64_find_unwind_table (struct objfile *objfile, unw_word_t ip,
+ unw_dyn_info_t *dip, void **buf)
+{
+ Elf_Internal_Phdr *phdr, *p_text = NULL, *p_unwind = NULL;
+ Elf_Internal_Ehdr *ehdr;
+ unw_word_t segbase = 0;
+ CORE_ADDR load_base;
+ bfd *bfd;
+ int i;
+
+ bfd = objfile->obfd;
+
+ ehdr = elf_tdata (bfd)->elf_header;
+ phdr = elf_tdata (bfd)->phdr;
+
+ load_base = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+
+ for (i = 0; i < ehdr->e_phnum; ++i)
+ {
+ switch (phdr[i].p_type)
+ {
+ case PT_LOAD:
+ if ((unw_word_t) (ip - load_base - phdr[i].p_vaddr)
+ < phdr[i].p_memsz)
+ p_text = phdr + i;
+ break;
+
+ case PT_IA_64_UNWIND:
+ p_unwind = phdr + i;
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ if (!p_text || !p_unwind
+ /* Verify that the segment that contains the IP also contains
+ the static unwind table. If not, we are dealing with
+ runtime-generated code, for which we have no info here. */
+ || (p_unwind->p_vaddr - p_text->p_vaddr) >= p_text->p_memsz)
+ return -UNW_ENOINFO;
+
+ segbase = p_text->p_vaddr + load_base;
+
+ dip->start_ip = segbase;
+ dip->end_ip = dip->start_ip + p_text->p_memsz;
+ dip->gp = FIND_GLOBAL_POINTER (ip);
+ dip->format = UNW_INFO_FORMAT_REMOTE_TABLE;
+ dip->u.rti.name_ptr = (unw_word_t) bfd_get_filename (bfd);
+ dip->u.rti.segbase = segbase;
+ dip->u.rti.table_len = p_unwind->p_memsz / sizeof (unw_word_t);
+ dip->u.rti.table_data = p_unwind->p_vaddr + load_base;
+
+ return 0;
+}
+
+/* Libunwind callback accessor function to acquire procedure unwind-info. */
+static int
+ia64_find_proc_info_x (unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi,
+ int need_unwind_info, void *arg)
+{
+ struct obj_section *sec = find_pc_section (ip);
+ unw_dyn_info_t di;
+ int ret;
+ void *buf = NULL;
+
+ if (!sec)
+ {
+ /* XXX This only works if the host and the target architecture are
+ both ia64 and if the have (more or less) the same kernel
+ version. */
+ if (get_kernel_table (ip, &di) < 0)
+ return -UNW_ENOINFO;
+
+ if (gdbarch_debug >= 1)
+ fprintf_unfiltered (gdb_stdlog, "%s: %lx -> "
+ "(name=`%s',segbase=%lx,start=%lx,end=%lx,gp=%lx,"
+ "length=%lu,data=%p)\n", __FUNCTION__,
+ ip, (char *)di.u.ti.name_ptr,
+ di.u.ti.segbase, di.start_ip, di.end_ip,
+ di.gp, di.u.ti.table_len, di.u.ti.table_data);
+ }
+ else
+ {
+ ret = ia64_find_unwind_table (sec->objfile, ip, &di, &buf);
+ if (ret < 0)
+ return ret;
+
+ if (gdbarch_debug >= 1)
+ fprintf_unfiltered (gdb_stdlog, "%s: %lx -> "
+ "(name=`%s',segbase=%lx,start=%lx,end=%lx,gp=%lx,"
+ "length=%lu,data=%lx)\n", __FUNCTION__,
+ ip, (char *)di.u.rti.name_ptr,
+ di.u.rti.segbase, di.start_ip, di.end_ip,
+ di.gp, di.u.rti.table_len, di.u.rti.table_data);
+ }
+
+ ret = libunwind_search_unwind_table (&as, ip, &di, pi, need_unwind_info,
+ arg);
+
+ /* We no longer need the dyn info storage so free it. */
+ xfree (buf);
+
+ return ret;
+}
+
+/* Libunwind callback accessor function for cleanup. */
+static void
+ia64_put_unwind_info (unw_addr_space_t as,
+ unw_proc_info_t *pip, void *arg)
+{
+ /* Nothing required for now. */
+}
+
+/* Libunwind callback accessor function to get head of the dynamic
+ unwind-info registration list. */
+static int
+ia64_get_dyn_info_list (unw_addr_space_t as,
+ unw_word_t *dilap, void *arg)
+{
+ struct obj_section *text_sec;
+ struct objfile *objfile;
+ unw_word_t ip, addr;
+ unw_dyn_info_t di;
+ int ret;
+
+ if (!libunwind_is_initialized ())
+ return -UNW_ENOINFO;
+
+ for (objfile = object_files; objfile; objfile = objfile->next)
+ {
+ void *buf = NULL;
+
+ text_sec = objfile->sections + SECT_OFF_TEXT (objfile);
+ ip = text_sec->addr;
+ ret = ia64_find_unwind_table (objfile, ip, &di, &buf);
+ if (ret >= 0)
+ {
+ addr = libunwind_find_dyn_list (as, &di, arg);
+ /* We no longer need the dyn info storage so free it. */
+ xfree (buf);
+
+ if (addr)
+ {
+ if (gdbarch_debug >= 1)
+ fprintf_unfiltered (gdb_stdlog,
+ "dynamic unwind table in objfile %s "
+ "at %lx (gp=%lx)\n",
+ bfd_get_filename (objfile->obfd),
+ addr, di.gp);
+ *dilap = addr;
+ return 0;
+ }
+ }
+ }
+ return -UNW_ENOINFO;
+}
+
+
+/* Frame interface functions for libunwind. */
+
+static void
+ia64_libunwind_frame_this_id (struct frame_info *next_frame, void **this_cache,
+ struct frame_id *this_id)
+{
+ char buf[8];
+ CORE_ADDR bsp;
+ struct frame_id id;
+
+ libunwind_frame_this_id (next_frame, this_cache, &id);
+
+ /* We must add the bsp as the special address for frame comparison purposes. */
+ frame_unwind_register (next_frame, IA64_BSP_REGNUM, buf);
+ bsp = extract_unsigned_integer (buf, 8);
+
+ (*this_id) = frame_id_build_special (id.stack_addr, id.code_addr, bsp);
+
+ if (gdbarch_debug >= 1)
+ fprintf_unfiltered (gdb_stdlog,
+ "libunwind frame id: code %lx, stack %lx, special %lx, next_frame %p\n",
+ id.code_addr, id.stack_addr, bsp, next_frame);
+}
+
+static void
+ia64_libunwind_frame_prev_register (struct frame_info *next_frame,
+ void **this_cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *valuep)
+{
+ int reg = regnum;
+
+ if (VP0_REGNUM <= regnum && regnum <= VP63_REGNUM)
+ reg = IA64_PR_REGNUM;
+ else if (IA64_NAT0_REGNUM <= regnum && regnum <= IA64_NAT127_REGNUM)
+ reg = IA64_UNAT_REGNUM;
+
+ /* Let libunwind do most of the work. */
+ libunwind_frame_prev_register (next_frame, this_cache, reg,
+ optimizedp, lvalp, addrp, realnump, valuep);
+
+ if (VP0_REGNUM <= regnum && regnum <= VP63_REGNUM)
+ {
+ ULONGEST prN_val;
+
+ if (VP16_REGNUM <= regnum && regnum <= VP63_REGNUM)
+ {
+ int rrb_pr = 0;
+ ULONGEST cfm;
+ unsigned char buf[MAX_REGISTER_SIZE];
+
+ /* Fetch predicate register rename base from current frame
+ marker for this frame. */
+ frame_unwind_register (next_frame, IA64_CFM_REGNUM, buf);
+ cfm = extract_unsigned_integer (buf, 8);
+ rrb_pr = (cfm >> 32) & 0x3f;
+
+ /* Adjust the register number to account for register rotation. */
+ regnum = VP16_REGNUM
+ + ((regnum - VP16_REGNUM) + rrb_pr) % 48;
+ }
+ prN_val = extract_bit_field ((unsigned char *) valuep,
+ regnum - VP0_REGNUM, 1);
+ store_unsigned_integer (valuep, register_size (current_gdbarch, regnum), prN_val);
+ }
+ else if (IA64_NAT0_REGNUM <= regnum && regnum <= IA64_NAT127_REGNUM)
+ {
+ ULONGEST unatN_val;
+
+ unatN_val = extract_bit_field ((unsigned char *) valuep,
+ regnum - IA64_NAT0_REGNUM, 1);
+ store_unsigned_integer (valuep, register_size (current_gdbarch, regnum),
+ unatN_val);
+ }
+ else if (regnum == IA64_BSP_REGNUM)
+ {
+ char cfm_valuep[MAX_REGISTER_SIZE];
+ int cfm_optim;
+ int cfm_realnum;
+ enum lval_type cfm_lval;
+ CORE_ADDR cfm_addr;
+ CORE_ADDR bsp, prev_cfm, prev_bsp;
+
+ /* We want to calculate the previous bsp as the end of the previous register stack frame.
+ This corresponds to what the hardware bsp register will be if we pop the frame
+ back which is why we might have been called. We know that libunwind will pass us back
+ the beginning of the current frame so we should just add sof to it. */
+ prev_bsp = extract_unsigned_integer (valuep, 8);
+ libunwind_frame_prev_register (next_frame, this_cache, IA64_CFM_REGNUM,
+ &cfm_optim, &cfm_lval, &cfm_addr, &cfm_realnum, cfm_valuep);
+ prev_cfm = extract_unsigned_integer (cfm_valuep, 8);
+ prev_bsp = rse_address_add (prev_bsp, (prev_cfm & 0x7f));
+
+ store_unsigned_integer (valuep, register_size (current_gdbarch, regnum),
+ prev_bsp);
+ }
+
+ if (gdbarch_debug >= 1)
+ fprintf_unfiltered (gdb_stdlog,
+ "libunwind prev register <%s> is %lx\n",
+ (((unsigned) regnum <= IA64_NAT127_REGNUM)
+ ? ia64_register_names[regnum] : "r??"), extract_unsigned_integer (valuep, 8));
+}
+
+static const struct frame_unwind ia64_libunwind_frame_unwind =
+{
+ NORMAL_FRAME,
+ ia64_libunwind_frame_this_id,
+ ia64_libunwind_frame_prev_register
+};
+
+static const struct frame_unwind *
+ia64_libunwind_frame_sniffer (struct frame_info *next_frame)
+{
+ if (libunwind_is_initialized () && libunwind_frame_sniffer (next_frame))
+ return &ia64_libunwind_frame_unwind;
+
+ return NULL;
+}
+
+/* Set of libunwind callback acccessor functions. */
+static unw_accessors_t ia64_unw_accessors =
+{
+ ia64_find_proc_info_x,
+ ia64_put_unwind_info,
+ ia64_get_dyn_info_list,
+ ia64_access_mem,
+ ia64_access_reg,
+ ia64_access_fpreg,
+ /* resume */
+ /* get_proc_name */
+};
+
+/* Set of ia64 gdb libunwind-frame callbacks and data for generic libunwind-frame code to use. */
+static struct libunwind_descr ia64_libunwind_descr =
+{
+ ia64_gdb2uw_regnum,
+ ia64_uw2gdb_regnum,
+ ia64_is_fpreg,
+ &ia64_unw_accessors,
+};
+
+#endif /* HAVE_LIBUNWIND_IA64_H */
+
/* Should we use EXTRACT_STRUCT_VALUE_ADDRESS instead of
EXTRACT_RETURN_VALUE? GCC_P is true if compiled with gcc
and TYPE is the type (which is known to be struct, union or array). */
@@ -2746,6 +3356,14 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
0, "builtin_type_ia64_ext", NULL);
TYPE_FLOATFORMAT (builtin_type_ia64_ext) = &floatformat_ia64_ext;
+ /* According to the ia64 specs, instructions that store long double floats
+ in memory use a long-double format different than that used in the floating
+ registers. The memory format matches the x86 extended float format which is
+ 80 bits. An OS may choose to use this format (e.g. Linux) or choose to use
+ a different format for storing long doubles (e.g. HPUX). In the latter case,
+ the setting of the format may be moved/overridden in an OS-specific tdep file. */
+ set_gdbarch_long_double_format (gdbarch, &floatformat_i387_ext);
+
set_gdbarch_short_bit (gdbarch, 16);
set_gdbarch_int_bit (gdbarch, 32);
set_gdbarch_long_bit (gdbarch, 64);
@@ -2795,6 +3413,10 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_unwind_pc (gdbarch, ia64_unwind_pc);
frame_unwind_append_sniffer (gdbarch, ia64_sigtramp_frame_sniffer);
+#ifdef HAVE_LIBUNWIND_IA64_H
+ frame_unwind_append_sniffer (gdbarch, ia64_libunwind_frame_sniffer);
+ libunwind_frame_set_descr (gdbarch, &ia64_libunwind_descr);
+#endif
frame_unwind_append_sniffer (gdbarch, ia64_frame_sniffer);
frame_base_set_default (gdbarch, &ia64_frame_base);
diff --git a/gdb/infcall.c b/gdb/infcall.c
index 7695c6ab679..0956f343820 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -1075,22 +1075,6 @@ the function call).", name);
do_cleanups (inf_status_cleanup);
/* Figure out the value returned by the function. */
- /* elz: I defined this new macro for the hppa architecture only.
- this gives us a way to get the value returned by the function
- from the stack, at the same address we told the function to put
- it. We cannot assume on the pa that r28 still contains the
- address of the returned structure. Usually this will be
- overwritten by the callee. I don't know about other
- architectures, so I defined this macro */
- /* FIXME: cagney/2003-09-27: This is no longer needed. The problem
- is now handled directly be by the code below. */
-#ifdef DEPRECATED_VALUE_RETURNED_FROM_STACK
- if (struct_return)
- {
- do_cleanups (retbuf_cleanup);
- return DEPRECATED_VALUE_RETURNED_FROM_STACK (value_type, struct_addr);
- }
-#endif
if (struct_return)
{
/* NOTE: cagney/2003-09-27: This assumes that PUSH_DUMMY_CALL
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index a7e0e157dc4..2c8631eb3ba 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -1086,13 +1086,7 @@ print_return_value (int structure_return, struct type *value_type)
a more complicated case of what is already being done in in the
inferior function call code. In fact, when inferior function
calls are made async, this will likely be made the norm. */
-#ifdef DEPRECATED_VALUE_RETURNED_FROM_STACK
-#define DEPRECATED_VALUE_RETURNED_FROM_STACK_P 1
-#else
-#define DEPRECATED_VALUE_RETURNED_FROM_STACK_P 0
-#endif
- else if (gdbarch_return_value_p (current_gdbarch)
- || DEPRECATED_VALUE_RETURNED_FROM_STACK_P)
+ else if (gdbarch_return_value_p (current_gdbarch))
/* We cannot determine the contents of the structure because it is
on the stack, and we don't know where, since we did not
initiate the call, as opposed to the call_function_by_hand
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 6bc22a6531b..b16cc62091f 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -1362,7 +1362,22 @@ handle_inferior_event (struct execution_control_state *ecs)
terminal for any messages produced by
breakpoint_re_set. */
target_terminal_ours_for_output ();
- SOLIB_ADD (NULL, 0, NULL, auto_solib_add);
+ /* NOTE: cagney/2003-11-25: Make certain that the target
+ stack's section table is kept up-to-date. Architectures,
+ (e.g., PPC64), use the section table to perform
+ operations such as address => section name and hence
+ require the table to contain all sections (including
+ those found in shared libraries). */
+ /* NOTE: cagney/2003-11-25: Pass current_target and not
+ exec_ops to SOLIB_ADD. This is because current GDB is
+ only tooled to propagate section_table changes out from
+ the "current_target" (see target_resize_to_sections), and
+ not up from the exec stratum. This, of course, isn't
+ right. "infrun.c" should only interact with the
+ exec/process stratum, instead relying on the target stack
+ to propagate relevant changes (stop, section table
+ changed, ...) up to other layers. */
+ SOLIB_ADD (NULL, 0, &current_target, auto_solib_add);
target_terminal_inferior ();
/* Reinsert breakpoints and continue. */
@@ -2185,7 +2200,22 @@ process_event_stop_test:
terminal for any messages produced by
breakpoint_re_set. */
target_terminal_ours_for_output ();
- SOLIB_ADD (NULL, 0, NULL, auto_solib_add);
+ /* NOTE: cagney/2003-11-25: Make certain that the target
+ stack's section table is kept up-to-date. Architectures,
+ (e.g., PPC64), use the section table to perform
+ operations such as address => section name and hence
+ require the table to contain all sections (including
+ those found in shared libraries). */
+ /* NOTE: cagney/2003-11-25: Pass current_target and not
+ exec_ops to SOLIB_ADD. This is because current GDB is
+ only tooled to propagate section_table changes out from
+ the "current_target" (see target_resize_to_sections), and
+ not up from the exec stratum. This, of course, isn't
+ right. "infrun.c" should only interact with the
+ exec/process stratum, instead relying on the target stack
+ to propagate relevant changes (stop, section table
+ changed, ...) up to other layers. */
+ SOLIB_ADD (NULL, 0, &current_target, auto_solib_add);
target_terminal_inferior ();
/* Try to reenable shared library breakpoints, additional
@@ -2331,7 +2361,8 @@ process_event_stop_test:
if (step_over_calls == STEP_OVER_UNDEBUGGABLE
&& IN_SOLIB_DYNSYM_RESOLVE_CODE (stop_pc))
{
- CORE_ADDR pc_after_resolver = SKIP_SOLIB_RESOLVER (stop_pc);
+ CORE_ADDR pc_after_resolver =
+ gdbarch_skip_solib_resolver (current_gdbarch, stop_pc);
if (pc_after_resolver)
{
@@ -2726,15 +2757,10 @@ step_into_function (struct execution_control_state *ecs)
/* If the prologue ends in the middle of a source line, continue to
the end of that source line (if it is still within the function).
Otherwise, just go to end of prologue. */
-#ifdef PROLOGUE_FIRSTLINE_OVERLAP
- /* no, don't either. It skips any code that's legitimately on the
- first line. */
-#else
if (ecs->sal.end
&& ecs->sal.pc != ecs->stop_func_start
&& ecs->sal.end < ecs->stop_func_end)
ecs->stop_func_start = ecs->sal.end;
-#endif
if (ecs->stop_func_start == stop_pc)
{
diff --git a/gdb/inftarg.c b/gdb/inftarg.c
index 6829400b592..a20c39fd07a 100644
--- a/gdb/inftarg.c
+++ b/gdb/inftarg.c
@@ -571,14 +571,12 @@ child_xfer_partial (struct target_ops *ops, enum target_object object,
NULL, ops);
return -1;
-#if 0
case TARGET_OBJECT_UNWIND_TABLE:
#ifndef NATIVE_XFER_UNWIND_TABLE
#define NATIVE_XFER_UNWIND_TABLE(OPS,OBJECT,ANNEX,WRITEBUF,READBUF,OFFSET,LEN) (-1)
#endif
return NATIVE_XFER_UNWIND_TABLE (ops, object, annex, readbuf, writebuf,
offset, len);
-#endif
#if 0
case TARGET_OBJECT_AUXV:
diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c
index 224d376f97f..a4473899cb5 100644
--- a/gdb/irix5-nat.c
+++ b/gdb/irix5-nat.c
@@ -55,19 +55,23 @@ supply_gregset (gregset_t *gregsetp)
{
int regi;
greg_t *regp = &(*gregsetp)[0];
- int gregoff = sizeof (greg_t) - MIPS_REGSIZE;
+ int gregoff = sizeof (greg_t) - mips_regsize (current_gdbarch);
static char zerobuf[32] = {0};
for (regi = 0; regi <= CTX_RA; regi++)
supply_register (regi, (char *) (regp + regi) + gregoff);
- supply_register (PC_REGNUM, (char *) (regp + CTX_EPC) + gregoff);
- supply_register (HI_REGNUM, (char *) (regp + CTX_MDHI) + gregoff);
- supply_register (LO_REGNUM, (char *) (regp + CTX_MDLO) + gregoff);
- supply_register (CAUSE_REGNUM, (char *) (regp + CTX_CAUSE) + gregoff);
+ supply_register (mips_regnum (current_gdbarch)->pc,
+ (char *) (regp + CTX_EPC) + gregoff);
+ supply_register (mips_regnum (current_gdbarch)->hi,
+ (char *) (regp + CTX_MDHI) + gregoff);
+ supply_register (mips_regnum (current_gdbarch)->lo,
+ (char *) (regp + CTX_MDLO) + gregoff);
+ supply_register (mips_regnum (current_gdbarch)->cause,
+ (char *) (regp + CTX_CAUSE) + gregoff);
/* Fill inaccessible registers with zero. */
- supply_register (BADVADDR_REGNUM, zerobuf);
+ supply_register (mips_regnum (current_gdbarch)->badvaddr, zerobuf);
}
void
@@ -88,23 +92,24 @@ fill_gregset (gregset_t *gregsetp, int regno)
if ((regno == -1) || (regno == PC_REGNUM))
*(regp + CTX_EPC) =
- extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)],
- DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM));
+ extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->pc)],
+ DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->pc));
- if ((regno == -1) || (regno == CAUSE_REGNUM))
+ if ((regno == -1) || (regno == mips_regnum (current_gdbarch)->cause))
*(regp + CTX_CAUSE) =
- extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (CAUSE_REGNUM)],
- DEPRECATED_REGISTER_RAW_SIZE (CAUSE_REGNUM));
+ extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->cause)],
+ DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->cause));
- if ((regno == -1) || (regno == HI_REGNUM))
+ if ((regno == -1)
+ || (regno == mips_regnum (current_gdbarch)->hi))
*(regp + CTX_MDHI) =
- extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (HI_REGNUM)],
- DEPRECATED_REGISTER_RAW_SIZE (HI_REGNUM));
+ extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->hi)],
+ DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->hi));
- if ((regno == -1) || (regno == LO_REGNUM))
+ if ((regno == -1) || (regno == mips_regnum (current_gdbarch)->lo))
*(regp + CTX_MDLO) =
- extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (LO_REGNUM)],
- DEPRECATED_REGISTER_RAW_SIZE (LO_REGNUM));
+ extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->lo)],
+ DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->lo));
}
/*
@@ -127,10 +132,12 @@ supply_fpregset (fpregset_t *fpregsetp)
supply_register (FP0_REGNUM + regi,
(char *) &fpregsetp->fp_r.fp_regs[regi]);
- supply_register (FCRCS_REGNUM, (char *) &fpregsetp->fp_csr);
+ supply_register (mips_regnum (current_gdbarch)->fp_control_status,
+ (char *) &fpregsetp->fp_csr);
- /* FIXME: how can we supply FCRIR_REGNUM? SGI doesn't tell us. */
- supply_register (FCRIR_REGNUM, zerobuf);
+ /* FIXME: how can we supply FCRIR? SGI doesn't tell us. */
+ supply_register (mips_regnum (current_gdbarch)->fp_implementation_revision,
+ zerobuf);
}
void
@@ -151,8 +158,9 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
}
}
- if ((regno == -1) || (regno == FCRCS_REGNUM))
- fpregsetp->fp_csr = *(unsigned *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (FCRCS_REGNUM)];
+ if ((regno == -1)
+ || (regno == mips_regnum (current_gdbarch)->fp_control_status))
+ fpregsetp->fp_csr = *(unsigned *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->fp_control_status)];
}
@@ -200,8 +208,8 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
{
memcpy ((char *) deprecated_registers, core_reg_sect, core_reg_size);
}
- else if (MIPS_REGSIZE == 4 &&
- core_reg_size == (2 * MIPS_REGSIZE) * NUM_REGS)
+ else if (mips_regsize (current_gdbarch) == 4 &&
+ core_reg_size == (2 * mips_regsize (current_gdbarch)) * NUM_REGS)
{
/* This is a core file from a N32 executable, 64 bits are saved
for all registers. */
diff --git a/gdb/jv-exp.y b/gdb/jv-exp.y
index 0def55f8812..dbd5879afac 100644
--- a/gdb/jv-exp.y
+++ b/gdb/jv-exp.y
@@ -1133,34 +1133,34 @@ yylex ()
switch (namelen)
{
case 7:
- if (STREQN (tokstart, "boolean", 7))
+ if (DEPRECATED_STREQN (tokstart, "boolean", 7))
return BOOLEAN;
break;
case 6:
- if (STREQN (tokstart, "double", 6))
+ if (DEPRECATED_STREQN (tokstart, "double", 6))
return DOUBLE;
break;
case 5:
- if (STREQN (tokstart, "short", 5))
+ if (DEPRECATED_STREQN (tokstart, "short", 5))
return SHORT;
- if (STREQN (tokstart, "false", 5))
+ if (DEPRECATED_STREQN (tokstart, "false", 5))
{
yylval.lval = 0;
return BOOLEAN_LITERAL;
}
- if (STREQN (tokstart, "super", 5))
+ if (DEPRECATED_STREQN (tokstart, "super", 5))
return SUPER;
- if (STREQN (tokstart, "float", 5))
+ if (DEPRECATED_STREQN (tokstart, "float", 5))
return FLOAT;
break;
case 4:
- if (STREQN (tokstart, "long", 4))
+ if (DEPRECATED_STREQN (tokstart, "long", 4))
return LONG;
- if (STREQN (tokstart, "byte", 4))
+ if (DEPRECATED_STREQN (tokstart, "byte", 4))
return BYTE;
- if (STREQN (tokstart, "char", 4))
+ if (DEPRECATED_STREQN (tokstart, "char", 4))
return CHAR;
- if (STREQN (tokstart, "true", 4))
+ if (DEPRECATED_STREQN (tokstart, "true", 4))
{
yylval.lval = 1;
return BOOLEAN_LITERAL;
diff --git a/gdb/language.c b/gdb/language.c
index cc894820aee..c1dd2ae90db 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -344,17 +344,17 @@ show_case_command (char *ignore, int from_tty)
static void
set_case_command (char *ignore, int from_tty)
{
- if (STREQ (case_sensitive, "on"))
+ if (DEPRECATED_STREQ (case_sensitive, "on"))
{
case_sensitivity = case_sensitive_on;
case_mode = case_mode_manual;
}
- else if (STREQ (case_sensitive, "off"))
+ else if (DEPRECATED_STREQ (case_sensitive, "off"))
{
case_sensitivity = case_sensitive_off;
case_mode = case_mode_manual;
}
- else if (STREQ (case_sensitive, "auto"))
+ else if (DEPRECATED_STREQ (case_sensitive, "auto"))
{
case_mode = case_mode_auto;
set_type_range_case ();
@@ -1060,7 +1060,7 @@ language_enum (char *str)
int i;
for (i = 0; i < languages_size; i++)
- if (STREQ (languages[i]->la_name, str))
+ if (DEPRECATED_STREQ (languages[i]->la_name, str))
return languages[i]->la_language;
return language_unknown;
diff --git a/gdb/libunwind-frame.c b/gdb/libunwind-frame.c
new file mode 100644
index 00000000000..bf0c36d9f60
--- /dev/null
+++ b/gdb/libunwind-frame.c
@@ -0,0 +1,387 @@
+/* Frame unwinder for frames using the libunwind library.
+
+ Copyright 2003 Free Software Foundation, Inc.
+
+ Written by Jeff Johnston, contributed by Red Hat 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 "inferior.h"
+#include "frame.h"
+#include "frame-base.h"
+#include "frame-unwind.h"
+#include "gdbcore.h"
+#include "gdbtypes.h"
+#include "symtab.h"
+#include "objfiles.h"
+#include "regcache.h"
+
+#include <dlfcn.h>
+
+#include "gdb_assert.h"
+#include "gdb_string.h"
+
+#include "libunwind-frame.h"
+
+#include "complaints.h"
+
+static int libunwind_initialized;
+static struct gdbarch_data *libunwind_descr_handle;
+
+#ifndef LIBUNWIND_SO
+#define LIBUNWIND_SO "libunwind.so"
+#endif
+
+/* Required function pointers from libunwind. */
+static int (*unw_get_reg_p) (unw_cursor_t *, unw_regnum_t, unw_word_t *);
+static int (*unw_get_fpreg_p) (unw_cursor_t *, unw_regnum_t, unw_fpreg_t *);
+static int (*unw_get_saveloc_p) (unw_cursor_t *, unw_regnum_t, unw_save_loc_t *);
+static int (*unw_step_p) (unw_cursor_t *);
+static int (*unw_init_remote_p) (unw_cursor_t *, unw_addr_space_t, void *);
+static unw_addr_space_t (*unw_create_addr_space_p) (unw_accessors_t *, int);
+static int (*unw_search_unwind_table_p) (unw_addr_space_t, unw_word_t, unw_dyn_info_t *,
+ unw_proc_info_t *, int, void *);
+static unw_word_t (*unw_find_dyn_list_p) (unw_addr_space_t, unw_dyn_info_t *,
+ void *);
+
+
+struct libunwind_frame_cache
+{
+ CORE_ADDR base;
+ CORE_ADDR func_addr;
+ unw_cursor_t cursor;
+};
+
+/* We need to qualify the function names with a platform-specific prefix to match
+ the names used by the libunwind library. The UNW_OBJ macro is provided by the
+ libunwind.h header file. */
+#define STRINGIFY2(name) #name
+#define STRINGIFY(name) STRINGIFY2(name)
+
+static char *get_reg_name = STRINGIFY(UNW_OBJ(get_reg));
+static char *get_fpreg_name = STRINGIFY(UNW_OBJ(get_fpreg));
+static char *get_saveloc_name = STRINGIFY(UNW_OBJ(get_save_loc));
+static char *step_name = STRINGIFY(UNW_OBJ(step));
+static char *init_remote_name = STRINGIFY(UNW_OBJ(init_remote));
+static char *create_addr_space_name = STRINGIFY(UNW_OBJ(create_addr_space));
+static char *search_unwind_table_name = STRINGIFY(UNW_OBJ(search_unwind_table));
+static char *find_dyn_list_name = STRINGIFY(UNW_OBJ(find_dyn_list));
+
+static struct libunwind_descr *
+libunwind_descr (struct gdbarch *gdbarch)
+{
+ return gdbarch_data (gdbarch, libunwind_descr_handle);
+}
+
+static void *
+libunwind_descr_init (struct gdbarch *gdbarch)
+{
+ struct libunwind_descr *descr = GDBARCH_OBSTACK_ZALLOC (gdbarch,
+ struct libunwind_descr);
+ return descr;
+}
+
+void
+libunwind_frame_set_descr (struct gdbarch *gdbarch, struct libunwind_descr *descr)
+{
+ struct libunwind_descr *arch_descr;
+
+ gdb_assert (gdbarch != NULL);
+
+ arch_descr = gdbarch_data (gdbarch, libunwind_descr_handle);
+
+ if (arch_descr == NULL)
+ {
+ /* First time here. Must initialize data area. */
+ arch_descr = libunwind_descr_init (gdbarch);
+ set_gdbarch_data (gdbarch, libunwind_descr_handle, arch_descr);
+ }
+
+ /* Copy new descriptor info into arch descriptor. */
+ arch_descr->gdb2uw = descr->gdb2uw;
+ arch_descr->uw2gdb = descr->uw2gdb;
+ arch_descr->is_fpreg = descr->is_fpreg;
+ arch_descr->accessors = descr->accessors;
+}
+
+static struct libunwind_frame_cache *
+libunwind_frame_cache (struct frame_info *next_frame, void **this_cache)
+{
+ unw_accessors_t *acc;
+ unw_addr_space_t as;
+ unw_word_t fp;
+ unw_regnum_t uw_sp_regnum;
+ struct libunwind_frame_cache *cache;
+ struct libunwind_descr *descr;
+ int i, ret;
+
+ if (*this_cache)
+ return *this_cache;
+
+ /* Allocate a new cache. */
+ cache = FRAME_OBSTACK_ZALLOC (struct libunwind_frame_cache);
+
+ cache->func_addr = frame_func_unwind (next_frame);
+
+ /* Get a libunwind cursor to the previous frame. We do this by initializing
+ a cursor. Libunwind treats a new cursor as the top of stack and will get
+ the current register set via the libunwind register accessor. Now, we
+ provide the platform-specific accessors and we set up the register accessor to use
+ the frame register unwinding interfaces so that we properly get the registers for
+ the current frame rather than the top. We then use the unw_step function to
+ move the libunwind cursor back one frame. We can later use this cursor to find previous
+ registers via the unw_get_reg interface which will invoke libunwind's special logic. */
+ descr = libunwind_descr (get_frame_arch (next_frame));
+ acc = descr->accessors;
+ as = unw_create_addr_space_p (acc,
+ TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
+ ? __BIG_ENDIAN
+ : __LITTLE_ENDIAN);
+
+ unw_init_remote_p (&cache->cursor, as, next_frame);
+ unw_step_p (&cache->cursor);
+
+ /* To get base address, get sp from previous frame. */
+ uw_sp_regnum = descr->gdb2uw (SP_REGNUM);
+ ret = unw_get_reg_p (&cache->cursor, uw_sp_regnum, &fp);
+ if (ret < 0)
+ error ("Can't get libunwind sp register.");
+
+ cache->base = (CORE_ADDR)fp;
+
+ *this_cache = cache;
+ return cache;
+}
+
+unw_word_t
+libunwind_find_dyn_list (unw_addr_space_t as, unw_dyn_info_t *di, void *arg)
+{
+ return unw_find_dyn_list_p (as, di, arg);
+}
+
+static const struct frame_unwind libunwind_frame_unwind =
+{
+ NORMAL_FRAME,
+ libunwind_frame_this_id,
+ libunwind_frame_prev_register
+};
+
+/* Verify if there is sufficient libunwind information for the frame to use
+ libunwind frame unwinding. */
+const struct frame_unwind *
+libunwind_frame_sniffer (struct frame_info *next_frame)
+{
+ unw_cursor_t cursor;
+ unw_accessors_t *acc;
+ unw_addr_space_t as;
+ struct libunwind_descr *descr;
+ int i, ret;
+
+ /* To test for libunwind unwind support, initialize a cursor to the current frame and try to back
+ up. We use this same method when setting up the frame cache (see libunwind_frame_cache()).
+ If libunwind returns success for this operation, it means that it has found sufficient
+ libunwind unwinding information to do so. */
+
+ descr = libunwind_descr (get_frame_arch (next_frame));
+ acc = descr->accessors;
+ as = unw_create_addr_space_p (acc,
+ TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
+ ? __BIG_ENDIAN
+ : __LITTLE_ENDIAN);
+
+ ret = unw_init_remote_p (&cursor, as, next_frame);
+
+ if (ret >= 0)
+ ret = unw_step_p (&cursor);
+
+ if (ret < 0)
+ return NULL;
+
+ return &libunwind_frame_unwind;
+}
+
+void
+libunwind_frame_this_id (struct frame_info *next_frame, void **this_cache,
+ struct frame_id *this_id)
+{
+ struct libunwind_frame_cache *cache =
+ libunwind_frame_cache (next_frame, this_cache);
+
+ (*this_id) = frame_id_build (cache->base, cache->func_addr);
+}
+
+void
+libunwind_frame_prev_register (struct frame_info *next_frame, void **this_cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *valuep)
+{
+ struct libunwind_frame_cache *cache =
+ libunwind_frame_cache (next_frame, this_cache);
+
+ void *ptr;
+ unw_cursor_t *c;
+ unw_save_loc_t sl;
+ int i, ret;
+ unw_word_t intval;
+ unw_fpreg_t fpval;
+ unw_regnum_t uw_regnum;
+ struct libunwind_descr *descr;
+
+ /* Convert from gdb register number to libunwind register number. */
+ descr = libunwind_descr (get_frame_arch (next_frame));
+ uw_regnum = descr->gdb2uw (regnum);
+
+ gdb_assert (regnum >= 0);
+
+ if (!target_has_registers)
+ error ("No registers.");
+
+ *optimizedp = 0;
+ *addrp = 0;
+ *lvalp = not_lval;
+ *realnump = -1;
+
+ memset (valuep, 0, register_size (current_gdbarch, regnum));
+
+ if (uw_regnum < 0)
+ return;
+
+ /* To get the previous register, we use the libunwind register APIs with
+ the cursor we have already pushed back to the previous frame. */
+
+ if (descr->is_fpreg (uw_regnum))
+ {
+ ret = unw_get_fpreg_p (&cache->cursor, uw_regnum, &fpval);
+ ptr = &fpval;
+ }
+ else
+ {
+ ret = unw_get_reg_p (&cache->cursor, uw_regnum, &intval);
+ ptr = &intval;
+ }
+
+ if (ret < 0)
+ return;
+
+ memcpy (valuep, ptr, register_size (current_gdbarch, regnum));
+
+ if (unw_get_saveloc_p (&cache->cursor, uw_regnum, &sl) < 0)
+ return;
+
+ switch (sl.type)
+ {
+ case UNW_SLT_NONE:
+ *optimizedp = 1;
+ break;
+
+ case UNW_SLT_MEMORY:
+ *lvalp = lval_memory;
+ *addrp = sl.u.addr;
+ break;
+
+ case UNW_SLT_REG:
+ *lvalp = lval_register;
+ *realnump = regnum;
+ break;
+ }
+}
+
+CORE_ADDR
+libunwind_frame_base_address (struct frame_info *next_frame, void **this_cache)
+{
+ struct libunwind_frame_cache *cache =
+ libunwind_frame_cache (next_frame, this_cache);
+
+ return cache->base;
+}
+
+/* The following is a glue routine to call the libunwind unwind table
+ search function to get unwind information for a specified ip address. */
+int
+libunwind_search_unwind_table (void *as, long ip, void *di,
+ void *pi, int need_unwind_info, void *args)
+{
+ return unw_search_unwind_table_p (*(unw_addr_space_t *)as, (unw_word_t )ip,
+ di, pi, need_unwind_info, args);
+}
+
+static int
+libunwind_load (void)
+{
+ void *handle;
+
+ handle = dlopen (LIBUNWIND_SO, RTLD_NOW);
+ if (handle == NULL)
+ return 0;
+
+ /* Initialize pointers to the dynamic library functions we will use. */
+
+ unw_get_reg_p = dlsym (handle, get_reg_name);
+ if (unw_get_reg_p == NULL)
+ return 0;
+
+ unw_get_fpreg_p = dlsym (handle, get_fpreg_name);
+ if (unw_get_fpreg_p == NULL)
+ return 0;
+
+ unw_get_saveloc_p = dlsym (handle, get_saveloc_name);
+ if (unw_get_saveloc_p == NULL)
+ return 0;
+
+ unw_step_p = dlsym (handle, step_name);
+ if (unw_step_p == NULL)
+ return 0;
+
+ unw_init_remote_p = dlsym (handle, init_remote_name);
+ if (unw_init_remote_p == NULL)
+ return 0;
+
+ unw_create_addr_space_p = dlsym (handle, create_addr_space_name);
+ if (unw_create_addr_space_p == NULL)
+ return 0;
+
+ unw_search_unwind_table_p = dlsym (handle, search_unwind_table_name);
+ if (unw_search_unwind_table_p == NULL)
+ return 0;
+
+ unw_find_dyn_list_p = dlsym (handle, find_dyn_list_name);
+ if (unw_find_dyn_list_p == NULL)
+ return 0;
+
+ return 1;
+}
+
+int
+libunwind_is_initialized (void)
+{
+ return libunwind_initialized;
+}
+
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_libunwind_frame (void);
+
+void
+_initialize_libunwind_frame (void)
+{
+ libunwind_descr_handle = register_gdbarch_data (libunwind_descr_init);
+
+ libunwind_initialized = libunwind_load ();
+}
diff --git a/gdb/libunwind-frame.h b/gdb/libunwind-frame.h
new file mode 100644
index 00000000000..bacdf87a49a
--- /dev/null
+++ b/gdb/libunwind-frame.h
@@ -0,0 +1,63 @@
+/* Frame unwinder for frames with libunwind frame information.
+
+ Copyright 2003 Free Software Foundation, Inc.
+
+ Contributed by Jeff Johnston.
+
+ 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. */
+
+#ifdef HAVE_LIBUNWIND_H
+
+#ifndef LIBUNWIND_FRAME_H
+#define LIBUNWIND_FRAME_H 1
+
+#include "libunwind.h"
+
+struct frame_info;
+
+struct libunwind_descr
+{
+ int (*gdb2uw) (int);
+ int (*uw2gdb) (int);
+ int (*is_fpreg) (int);
+ void *accessors;
+};
+
+const struct frame_unwind *libunwind_frame_sniffer (struct frame_info *next_frame);
+
+void libunwind_frame_set_descr (struct gdbarch *arch, struct libunwind_descr *descr);
+
+void libunwind_frame_this_id (struct frame_info *next_frame, void **this_cache,
+ struct frame_id *this_id);
+void libunwind_frame_prev_register (struct frame_info *next_frame, void **this_cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *valuep);
+CORE_ADDR libunwind_frame_base_address (struct frame_info *next_frame, void **this_cache);
+
+int libunwind_is_initialized (void);
+
+int libunwind_search_unwind_table (void *as, long ip, void *di,
+ void *pi, int need_unwind_info, void *args);
+
+unw_word_t libunwind_find_dyn_list (unw_addr_space_t, unw_dyn_info_t *,
+ void *);
+
+#endif /* libunwind-frame.h */
+
+#endif /* HAVE_LIBUNWIND_H */
diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y
index df4a8091f09..8de2a01ccd7 100644
--- a/gdb/m2-exp.y
+++ b/gdb/m2-exp.y
@@ -835,7 +835,7 @@ yylex ()
/* See if it is a special token of length 2 */
for( i = 0 ; i < (int) (sizeof tokentab2 / sizeof tokentab2[0]) ; i++)
- if(STREQN(tokentab2[i].name, tokstart, 2))
+ if(DEPRECATED_STREQN(tokentab2[i].name, tokstart, 2))
{
lexptr += 2;
return tokentab2[i].token;
@@ -992,7 +992,7 @@ yylex ()
/* Lookup special keywords */
for(i = 0 ; i < (int) (sizeof(keytab) / sizeof(keytab[0])) ; i++)
- if(namelen == strlen(keytab[i].keyw) && STREQN(tokstart,keytab[i].keyw,namelen))
+ if(namelen == strlen(keytab[i].keyw) && DEPRECATED_STREQN(tokstart,keytab[i].keyw,namelen))
return keytab[i].token;
yylval.sval.ptr = tokstart;
@@ -1066,12 +1066,12 @@ yylex ()
else
{
/* Built-in BOOLEAN type. This is sort of a hack. */
- if(STREQN(tokstart,"TRUE",4))
+ if(DEPRECATED_STREQN(tokstart,"TRUE",4))
{
yylval.ulval = 1;
return M2_TRUE;
}
- else if(STREQN(tokstart,"FALSE",5))
+ else if(DEPRECATED_STREQN(tokstart,"FALSE",5))
{
yylval.ulval = 0;
return M2_FALSE;
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index e8217226929..cc0ad71adbe 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -50,16 +50,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
analysis to compute correct stack frame layout.
The MSB of the minimal symbol's "info" field is used for this purpose.
- This field is already being used to store the symbol size, so the
- assumption is that the symbol size cannot exceed 2^30.
MSYMBOL_SET_RTC Actually sets the "RTC" bit.
MSYMBOL_SET_RTI Actually sets the "RTI" bit.
MSYMBOL_IS_RTC Tests the "RTC" bit in a minimal symbol.
- MSYMBOL_IS_RTI Tests the "RTC" bit in a minimal symbol.
- MSYMBOL_SIZE Returns the size of the minimal symbol,
- i.e. the "info" field with the "special" bit
- masked out. */
+ MSYMBOL_IS_RTI Tests the "RTC" bit in a minimal symbol. */
#define MSYMBOL_SET_RTC(msym) \
MSYMBOL_INFO (msym) = (char *) (((long) MSYMBOL_INFO (msym)) \
@@ -75,9 +70,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define MSYMBOL_IS_RTI(msym) \
(((long) MSYMBOL_INFO (msym) & 0x40000000) != 0)
-#define MSYMBOL_SIZE(msym) \
- ((long) MSYMBOL_INFO (msym) & 0x3fffffff)
-
enum insn_return_kind {
RETURN_RTS,
RETURN_RTC,
diff --git a/gdb/mcore-rom.c b/gdb/mcore-rom.c
index 339c64096d6..dcc2cfb26cf 100644
--- a/gdb/mcore-rom.c
+++ b/gdb/mcore-rom.c
@@ -102,7 +102,7 @@ picobug_dumpregs (void)
if (strchr (p, '-'))
{
/* got a range. either r0-r7, r8-r15 or ss0-ss4 */
- if (STREQN (p, "r0", 2) || STREQN (p, "r8", 2))
+ if (DEPRECATED_STREQN (p, "r0", 2) || DEPRECATED_STREQN (p, "r8", 2))
{
int rn = (p[1] == '0' ? 0 : 8);
int i = 0;
@@ -116,7 +116,7 @@ picobug_dumpregs (void)
i++;
}
}
- else if (STREQN (p, "ss", 2))
+ else if (DEPRECATED_STREQN (p, "ss", 2))
{
/* get the next five values, ignoring the first */
int rn;
@@ -145,7 +145,7 @@ picobug_dumpregs (void)
{
for (i = 0; i < NUM_REGS; i++)
{
- if (picobug_regnames[i] && STREQ (picobug_regnames[i], name))
+ if (picobug_regnames[i] && DEPRECATED_STREQ (picobug_regnames[i], name))
break;
}
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
index 09779841eba..598a0ace52c 100644
--- a/gdb/mcore-tdep.c
+++ b/gdb/mcore-tdep.c
@@ -246,27 +246,16 @@ mcore_reg_struct_has_addr (int gcc_p, struct type *type)
static struct frame_info *
analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame)
{
- static struct frame_info *dummy = NULL;
-
- if (dummy == NULL)
- {
- struct frame_extra_info *extra_info;
- CORE_ADDR *saved_regs;
- dummy = deprecated_frame_xmalloc ();
- saved_regs = (CORE_ADDR *) xmalloc (SIZEOF_FRAME_SAVED_REGS);
- deprecated_set_frame_saved_regs_hack (dummy, saved_regs);
- extra_info = XMALLOC (struct frame_extra_info);
- deprecated_set_frame_extra_info_hack (dummy, extra_info);
- }
-
- deprecated_set_frame_next_hack (dummy, NULL);
- deprecated_set_frame_prev_hack (dummy, NULL);
+ struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
+ struct frame_info *dummy
+ = deprecated_frame_xmalloc_with_cleanup (SIZEOF_FRAME_SAVED_REGS,
+ sizeof (struct frame_extra_info));
deprecated_update_frame_pc_hack (dummy, pc);
deprecated_update_frame_base_hack (dummy, frame);
get_frame_extra_info (dummy)->status = 0;
get_frame_extra_info (dummy)->framesize = 0;
- memset (deprecated_get_frame_saved_regs (dummy), '\000', SIZEOF_FRAME_SAVED_REGS);
mcore_analyze_prologue (dummy, 0, 0);
+ do_cleanups (old_chain);
return dummy;
}
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index b5c74468ef1..0415f7532d2 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -793,7 +793,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
else
{
t = parse_type (cur_fd, ax, sh->index + 1, 0, bigend, name);
- if (STREQ (name, "malloc") && TYPE_CODE (t) == TYPE_CODE_VOID)
+ if (DEPRECATED_STREQ (name, "malloc") && TYPE_CODE (t) == TYPE_CODE_VOID)
{
/* I don't know why, but, at least under Alpha GNU/Linux,
when linking against a malloc without debugging
@@ -1667,7 +1667,7 @@ parse_type (int fd, union aux_ext *ax, unsigned int aux_index, int *bs,
bad_tag_guess_complaint (sym_name);
TYPE_CODE (tp) = type_code;
}
- if (TYPE_NAME (tp) == NULL || !STREQ (TYPE_NAME (tp), name))
+ if (TYPE_NAME (tp) == NULL || !DEPRECATED_STREQ (TYPE_NAME (tp), name))
TYPE_NAME (tp) = obsavestring (name, strlen (name),
&current_objfile->type_obstack);
}
@@ -1987,7 +1987,7 @@ parse_procedure (PDR *pr, struct symtab *search_symtab,
/* Correct incorrect setjmp procedure descriptor from the library
to make backtrace through setjmp work. */
- if (e->pdr.pcreg == 0 && STREQ (sh_name, "setjmp"))
+ if (e->pdr.pcreg == 0 && DEPRECATED_STREQ (sh_name, "setjmp"))
{
complaint (&symfile_complaints, "fixing bad setjmp PDR from libc");
e->pdr.pcreg = RA_REGNUM;
@@ -2608,7 +2608,7 @@ parse_partial_symbols (struct objfile *objfile)
((char *) debug_info->external_sym
+ (fh->isymBase + 1) * external_sym_size),
&sh);
- if (STREQ (debug_info->ss + fh->issBase + sh.iss, stabs_symbol))
+ if (DEPRECATED_STREQ (debug_info->ss + fh->issBase + sh.iss, stabs_symbol))
processing_gcc_compilation = 2;
}
@@ -2929,12 +2929,12 @@ parse_partial_symbols (struct objfile *objfile)
things like "break c-exp.y:435" need to work (I
suppose the psymtab_include_list could be hashed or put
in a binary tree, if profiling shows this is a major hog). */
- if (pst && STREQ (namestring, pst->filename))
+ if (pst && DEPRECATED_STREQ (namestring, pst->filename))
continue;
{
int i;
for (i = 0; i < includes_used; i++)
- if (STREQ (namestring, psymtab_include_list[i]))
+ if (DEPRECATED_STREQ (namestring, psymtab_include_list[i]))
{
i = -1;
break;
@@ -3861,7 +3861,7 @@ psymtab_to_symtab_1 (struct partial_symtab *pst, char *filename)
((char *) debug_info->external_sym
+ (fh->isymBase + 1) * external_sym_size),
&sh);
- if (STREQ (debug_info->ss + fh->issBase + sh.iss,
+ if (DEPRECATED_STREQ (debug_info->ss + fh->issBase + sh.iss,
stabs_symbol))
{
/* We indicate that this is a GCC compilation so that certain
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index c6930e96b89..5921e310b80 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -659,6 +659,7 @@ prim_record_minimal_symbol_and_info (const char *name, CORE_ADDR address,
MSYMBOL_TYPE (msymbol) = ms_type;
/* FIXME: This info, if it remains, needs its own field. */
MSYMBOL_INFO (msymbol) = info; /* FIXME! */
+ MSYMBOL_SIZE (msymbol) = 0;
/* The hash pointers must be cleared! If they're not,
add_minsym_to_hash_table will NOT add this msymbol to the hash table. */
@@ -938,6 +939,7 @@ install_minimal_symbols (struct objfile *objfile)
SYMBOL_LINKAGE_NAME (&msymbols[mcount]) = NULL;
SYMBOL_VALUE_ADDRESS (&msymbols[mcount]) = 0;
MSYMBOL_INFO (&msymbols[mcount]) = NULL;
+ MSYMBOL_SIZE (&msymbols[mcount]) = 0;
MSYMBOL_TYPE (&msymbols[mcount]) = mst_unknown;
SYMBOL_INIT_LANGUAGE_SPECIFIC (&msymbols[mcount], language_unknown);
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
index 6d58055300a..197f7e92a5b 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -31,22 +31,19 @@ mips_linux_cannot_fetch_register (int regno)
{
if (regno > ZERO_REGNUM && regno < ZERO_REGNUM + 32)
return 0;
- else if (regno >= FP0_REGNUM && regno <= FP0_REGNUM + 32)
+ else if (regno >= mips_regnum (current_gdbarch)->fp0
+ && regno <= mips_regnum (current_gdbarch)->fp0 + 32)
return 0;
-
- switch (regno)
- {
- case LO_REGNUM:
- case HI_REGNUM:
- case BADVADDR_REGNUM:
- case CAUSE_REGNUM:
- case PC_REGNUM:
- case FCRCS_REGNUM:
- case FCRIR_REGNUM:
- return 0;
- }
-
- return 1;
+ else if (regno == mips_regnum (current_gdbarch)->lo
+ || regno == mips_regnum (current_gdbarch)->hi
+ || regno == mips_regnum (current_gdbarch)->badvaddr
+ || regno == mips_regnum (current_gdbarch)->cause
+ || regno == mips_regnum (current_gdbarch)->pc
+ || regno == mips_regnum (current_gdbarch)->fp_control_status
+ || regno == mips_regnum (current_gdbarch)->fp_implementation_revision)
+ return 0;
+ else
+ return 1;
}
int
@@ -56,15 +53,11 @@ mips_linux_cannot_store_register (int regno)
return 0;
else if (regno >= FP0_REGNUM && regno <= FP0_REGNUM + 32)
return 0;
-
- switch (regno)
- {
- case LO_REGNUM:
- case HI_REGNUM:
- case PC_REGNUM:
- case FCRCS_REGNUM:
- return 0;
- }
-
- return 1;
+ else if (regno == mips_regnum (current_gdbarch)->lo
+ || regno == mips_regnum (current_gdbarch)->hi
+ || regno == mips_regnum (current_gdbarch)->pc
+ || regno == mips_regnum (current_gdbarch)->fp_control_status)
+ return 0;
+ else
+ return 1;
}
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index 20ada7b9477..a7ee145a951 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -85,8 +85,8 @@ mips_linux_get_longjmp_target (CORE_ADDR *pc)
return 1;
}
-/* Transform the bits comprising a 32-bit register to the right
- size for supply_register(). This is needed when MIPS_REGSIZE is 8. */
+/* Transform the bits comprising a 32-bit register to the right size
+ for supply_register(). This is needed when mips_regsize() is 8. */
static void
supply_32bit_reg (int regnum, const void *addr)
@@ -111,13 +111,18 @@ supply_gregset (elf_gregset_t *gregsetp)
for (regi = EF_REG0; regi <= EF_REG31; regi++)
supply_32bit_reg ((regi - EF_REG0), (char *)(regp + regi));
- supply_32bit_reg (LO_REGNUM, (char *)(regp + EF_LO));
- supply_32bit_reg (HI_REGNUM, (char *)(regp + EF_HI));
+ supply_32bit_reg (mips_regnum (current_gdbarch)->lo,
+ (char *)(regp + EF_LO));
+ supply_32bit_reg (mips_regnum (current_gdbarch)->hi,
+ (char *)(regp + EF_HI));
- supply_32bit_reg (PC_REGNUM, (char *)(regp + EF_CP0_EPC));
- supply_32bit_reg (BADVADDR_REGNUM, (char *)(regp + EF_CP0_BADVADDR));
+ supply_32bit_reg (mips_regnum (current_gdbarch)->pc,
+ (char *)(regp + EF_CP0_EPC));
+ supply_32bit_reg (mips_regnum (current_gdbarch)->badvaddr,
+ (char *)(regp + EF_CP0_BADVADDR));
supply_32bit_reg (PS_REGNUM, (char *)(regp + EF_CP0_STATUS));
- supply_32bit_reg (CAUSE_REGNUM, (char *)(regp + EF_CP0_CAUSE));
+ supply_32bit_reg (mips_regnum (current_gdbarch)->cause,
+ (char *)(regp + EF_CP0_CAUSE));
/* Fill inaccessible registers with zero. */
supply_register (UNUSED_REGNUM, zerobuf);
@@ -139,12 +144,12 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
memset (regp, 0, sizeof (elf_gregset_t));
for (regi = 0; regi < 32; regi++)
fill_gregset (gregsetp, regi);
- fill_gregset (gregsetp, LO_REGNUM);
- fill_gregset (gregsetp, HI_REGNUM);
- fill_gregset (gregsetp, PC_REGNUM);
- fill_gregset (gregsetp, BADVADDR_REGNUM);
+ fill_gregset (gregsetp, mips_regnum (current_gdbarch)->lo);
+ fill_gregset (gregsetp, mips_regnum (current_gdbarch)->hi);
+ fill_gregset (gregsetp, mips_regnum (current_gdbarch)->pc);
+ fill_gregset (gregsetp, mips_regnum (current_gdbarch)->badvaddr);
fill_gregset (gregsetp, PS_REGNUM);
- fill_gregset (gregsetp, CAUSE_REGNUM);
+ fill_gregset (gregsetp, mips_regnum (current_gdbarch)->cause);
return;
}
@@ -156,28 +161,20 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
return;
}
- regaddr = -1;
- switch (regno)
- {
- case LO_REGNUM:
- regaddr = EF_LO;
- break;
- case HI_REGNUM:
- regaddr = EF_HI;
- break;
- case PC_REGNUM:
- regaddr = EF_CP0_EPC;
- break;
- case BADVADDR_REGNUM:
- regaddr = EF_CP0_BADVADDR;
- break;
- case PS_REGNUM:
- regaddr = EF_CP0_STATUS;
- break;
- case CAUSE_REGNUM:
- regaddr = EF_CP0_CAUSE;
- break;
- }
+ if (regno == mips_regnum (current_gdbarch)->lo)
+ regaddr = EF_LO;
+ else if (regno == mips_regnum (current_gdbarch)->hi)
+ regaddr = EF_HI;
+ else if (regno == mips_regnum (current_gdbarch)->pc)
+ regaddr = EF_CP0_EPC;
+ else if (regno == mips_regnum (current_gdbarch)->badvaddr)
+ regaddr = EF_CP0_BADVADDR;
+ else if (regno == PS_REGNUM)
+ regaddr = EF_CP0_STATUS;
+ else if (regno == mips_regnum (current_gdbarch)->cause)
+ regaddr = EF_CP0_CAUSE;
+ else
+ regaddr = -1;
if (regaddr != -1)
{
@@ -200,10 +197,12 @@ supply_fpregset (elf_fpregset_t *fpregsetp)
supply_register (FP0_REGNUM + regi,
(char *)(*fpregsetp + regi));
- supply_register (FCRCS_REGNUM, (char *)(*fpregsetp + 32));
+ supply_register (mips_regnum (current_gdbarch)->fp_control_status,
+ (char *)(*fpregsetp + 32));
- /* FIXME: how can we supply FCRIR_REGNUM? The ABI doesn't tell us. */
- supply_register (FCRIR_REGNUM, zerobuf);
+ /* FIXME: how can we supply FCRIR? The ABI doesn't tell us. */
+ supply_register (mips_regnum (current_gdbarch)->fp_implementation_revision,
+ zerobuf);
}
/* Likewise, pack one or all floating point registers into an
@@ -220,7 +219,7 @@ fill_fpregset (elf_fpregset_t *fpregsetp, int regno)
to = (char *) (*fpregsetp + regno - FP0_REGNUM);
memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regno - FP0_REGNUM));
}
- else if (regno == FCRCS_REGNUM)
+ else if (regno == mips_regnum (current_gdbarch)->fp_control_status)
{
from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)];
to = (char *) (*fpregsetp + 32);
@@ -232,7 +231,7 @@ fill_fpregset (elf_fpregset_t *fpregsetp, int regno)
for (regi = 0; regi < 32; regi++)
fill_fpregset (fpregsetp, FP0_REGNUM + regi);
- fill_fpregset(fpregsetp, FCRCS_REGNUM);
+ fill_fpregset(fpregsetp, mips_regnum (current_gdbarch)->fp_control_status);
}
}
@@ -249,21 +248,22 @@ mips_linux_register_addr (int regno, CORE_ADDR blockend)
if (regno < 32)
regaddr = regno;
- else if ((regno >= FP0_REGNUM) && (regno < FP0_REGNUM + 32))
- regaddr = FPR_BASE + (regno - FP0_REGNUM);
- else if (regno == PC_REGNUM)
+ else if ((regno >= mips_regnum (current_gdbarch)->fp0)
+ && (regno < mips_regnum (current_gdbarch)->fp0 + 32))
+ regaddr = FPR_BASE + (regno - mips_regnum (current_gdbarch)->fp0);
+ else if (regno == mips_regnum (current_gdbarch)->pc)
regaddr = PC;
- else if (regno == CAUSE_REGNUM)
+ else if (regno == mips_regnum (current_gdbarch)->cause)
regaddr = CAUSE;
- else if (regno == BADVADDR_REGNUM)
+ else if (regno == mips_regnum (current_gdbarch)->badvaddr)
regaddr = BADVADDR;
- else if (regno == LO_REGNUM)
+ else if (regno == mips_regnum (current_gdbarch)->lo)
regaddr = MMLO;
- else if (regno == HI_REGNUM)
+ else if (regno == mips_regnum (current_gdbarch)->hi)
regaddr = MMHI;
- else if (regno == FCRCS_REGNUM)
+ else if (regno == mips_regnum (current_gdbarch)->fp_control_status)
regaddr = FPC_CSR;
- else if (regno == FCRIR_REGNUM)
+ else if (regno == mips_regnum (current_gdbarch)->fp_implementation_revision)
regaddr = FPC_EIR;
else
error ("Unknowable register number %d.", regno);
@@ -386,13 +386,18 @@ mips64_supply_gregset (mips64_elf_gregset_t *gregsetp)
for (regi = MIPS64_EF_REG0; regi <= MIPS64_EF_REG31; regi++)
supply_register ((regi - MIPS64_EF_REG0), (char *)(regp + regi));
- supply_register (LO_REGNUM, (char *)(regp + MIPS64_EF_LO));
- supply_register (HI_REGNUM, (char *)(regp + MIPS64_EF_HI));
+ supply_register (mips_regnum (current_gdbarch)->lo,
+ (char *)(regp + MIPS64_EF_LO));
+ supply_register (mips_regnum (current_gdbarch)->hi,
+ (char *)(regp + MIPS64_EF_HI));
- supply_register (PC_REGNUM, (char *)(regp + MIPS64_EF_CP0_EPC));
- supply_register (BADVADDR_REGNUM, (char *)(regp + MIPS64_EF_CP0_BADVADDR));
+ supply_register (mips_regnum (current_gdbarch)->pc,
+ (char *)(regp + MIPS64_EF_CP0_EPC));
+ supply_register (mips_regnum (current_gdbarch)->badvaddr,
+ (char *)(regp + MIPS64_EF_CP0_BADVADDR));
supply_register (PS_REGNUM, (char *)(regp + MIPS64_EF_CP0_STATUS));
- supply_register (CAUSE_REGNUM, (char *)(regp + MIPS64_EF_CP0_CAUSE));
+ supply_register (mips_regnum (current_gdbarch)->cause,
+ (char *)(regp + MIPS64_EF_CP0_CAUSE));
/* Fill inaccessible registers with zero. */
supply_register (UNUSED_REGNUM, zerobuf);
@@ -414,12 +419,12 @@ mips64_fill_gregset (mips64_elf_gregset_t *gregsetp, int regno)
memset (regp, 0, sizeof (mips64_elf_gregset_t));
for (regi = 0; regi < 32; regi++)
mips64_fill_gregset (gregsetp, regi);
- mips64_fill_gregset (gregsetp, LO_REGNUM);
- mips64_fill_gregset (gregsetp, HI_REGNUM);
- mips64_fill_gregset (gregsetp, PC_REGNUM);
- mips64_fill_gregset (gregsetp, BADVADDR_REGNUM);
+ mips64_fill_gregset (gregsetp, mips_regnum (current_gdbarch)->lo);
+ mips64_fill_gregset (gregsetp, mips_regnum (current_gdbarch)->hi);
+ mips64_fill_gregset (gregsetp, mips_regnum (current_gdbarch)->pc);
+ mips64_fill_gregset (gregsetp, mips_regnum (current_gdbarch)->badvaddr);
mips64_fill_gregset (gregsetp, PS_REGNUM);
- mips64_fill_gregset (gregsetp, CAUSE_REGNUM);
+ mips64_fill_gregset (gregsetp, mips_regnum (current_gdbarch)->cause);
return;
}
@@ -431,28 +436,20 @@ mips64_fill_gregset (mips64_elf_gregset_t *gregsetp, int regno)
return;
}
- regaddr = -1;
- switch (regno)
- {
- case LO_REGNUM:
- regaddr = MIPS64_EF_LO;
- break;
- case HI_REGNUM:
- regaddr = MIPS64_EF_HI;
- break;
- case PC_REGNUM:
- regaddr = MIPS64_EF_CP0_EPC;
- break;
- case BADVADDR_REGNUM:
- regaddr = MIPS64_EF_CP0_BADVADDR;
- break;
- case PS_REGNUM:
- regaddr = MIPS64_EF_CP0_STATUS;
- break;
- case CAUSE_REGNUM:
- regaddr = MIPS64_EF_CP0_CAUSE;
- break;
- }
+ if (regno == mips_regnum (current_gdbarch)->lo)
+ regaddr = MIPS64_EF_LO;
+ else if (regno == mips_regnum (current_gdbarch)->hi)
+ regaddr = MIPS64_EF_HI;
+ else if (regno == mips_regnum (current_gdbarch)->pc)
+ regaddr = MIPS64_EF_CP0_EPC;
+ else if (regno == mips_regnum (current_gdbarch)->badvaddr)
+ regaddr = MIPS64_EF_CP0_BADVADDR;
+ else if (regno == PS_REGNUM)
+ regaddr = MIPS64_EF_CP0_STATUS;
+ else if (regno == mips_regnum (current_gdbarch)->cause)
+ regaddr = MIPS64_EF_CP0_CAUSE;
+ else
+ regaddr = -1;
if (regaddr != -1)
{
@@ -475,10 +472,12 @@ mips64_supply_fpregset (mips64_elf_fpregset_t *fpregsetp)
supply_register (FP0_REGNUM + regi,
(char *)(*fpregsetp + regi));
- supply_register (FCRCS_REGNUM, (char *)(*fpregsetp + 32));
+ supply_register (mips_regnum (current_gdbarch)->fp_control_status,
+ (char *)(*fpregsetp + 32));
- /* FIXME: how can we supply FCRIR_REGNUM? The ABI doesn't tell us. */
- supply_register (FCRIR_REGNUM, zerobuf);
+ /* FIXME: how can we supply FCRIR? The ABI doesn't tell us. */
+ supply_register (mips_regnum (current_gdbarch)->fp_implementation_revision,
+ zerobuf);
}
/* Likewise, pack one or all floating point registers into an
@@ -495,7 +494,7 @@ mips64_fill_fpregset (mips64_elf_fpregset_t *fpregsetp, int regno)
to = (char *) (*fpregsetp + regno - FP0_REGNUM);
memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regno - FP0_REGNUM));
}
- else if (regno == FCRCS_REGNUM)
+ else if (regno == mips_regnum (current_gdbarch)->fp_control_status)
{
from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)];
to = (char *) (*fpregsetp + 32);
@@ -507,7 +506,8 @@ mips64_fill_fpregset (mips64_elf_fpregset_t *fpregsetp, int regno)
for (regi = 0; regi < 32; regi++)
mips64_fill_fpregset (fpregsetp, FP0_REGNUM + regi);
- mips64_fill_fpregset(fpregsetp, FCRCS_REGNUM);
+ mips64_fill_fpregset(fpregsetp,
+ mips_regnum (current_gdbarch)->fp_control_status);
}
}
@@ -525,21 +525,22 @@ mips64_linux_register_addr (int regno, CORE_ADDR blockend)
if (regno < 32)
regaddr = regno;
- else if ((regno >= FP0_REGNUM) && (regno < FP0_REGNUM + 32))
+ else if ((regno >= mips_regnum (current_gdbarch)->fp0)
+ && (regno < mips_regnum (current_gdbarch)->fp0 + 32))
regaddr = MIPS64_FPR_BASE + (regno - FP0_REGNUM);
- else if (regno == PC_REGNUM)
+ else if (regno == mips_regnum (current_gdbarch)->pc)
regaddr = MIPS64_PC;
- else if (regno == CAUSE_REGNUM)
+ else if (regno == mips_regnum (current_gdbarch)->cause)
regaddr = MIPS64_CAUSE;
- else if (regno == BADVADDR_REGNUM)
+ else if (regno == mips_regnum (current_gdbarch)->badvaddr)
regaddr = MIPS64_BADVADDR;
- else if (regno == LO_REGNUM)
+ else if (regno == mips_regnum (current_gdbarch)->lo)
regaddr = MIPS64_MMLO;
- else if (regno == HI_REGNUM)
+ else if (regno == mips_regnum (current_gdbarch)->hi)
regaddr = MIPS64_MMHI;
- else if (regno == FCRCS_REGNUM)
+ else if (regno == mips_regnum (current_gdbarch)->fp_control_status)
regaddr = MIPS64_FPC_CSR;
- else if (regno == FCRIR_REGNUM)
+ else if (regno == mips_regnum (current_gdbarch)->fp_implementation_revision)
regaddr = MIPS64_FPC_EIR;
else
error ("Unknowable register number %d.", regno);
diff --git a/gdb/mips-nat.c b/gdb/mips-nat.c
index 4c359860ef2..626f770f18d 100644
--- a/gdb/mips-nat.c
+++ b/gdb/mips-nat.c
@@ -55,12 +55,12 @@ static int
register_ptrace_addr (int regno)
{
return (regno < 32 ? GPR_BASE + regno
- : regno == PC_REGNUM ? PC
- : regno == CAUSE_REGNUM ? CAUSE
- : regno == HI_REGNUM ? MMHI
- : regno == LO_REGNUM ? MMLO
- : regno == FCRCS_REGNUM ? FPC_CSR
- : regno == FCRIR_REGNUM ? FPC_EIR
+ : regno == mips_regnum (current_gdbarch)->pc ? PC
+ : regno == mips_regnum (current_gdbarch)->cause ? CAUSE
+ : regno == mips_regnum (current_gdbarch)->hi ? MMHI
+ : regno == mips_regnum (current_gdbarch)->lo ? MMLO
+ : regno == mips_regnum (current_gdbarch)->fp_control_status ? FPC_CSR
+ : regno == mips_regnum (current_gdbarch)->fp_implementation_revision ? FPC_EIR
: regno >= FP0_REGNUM ? FPR_BASE + (regno - FP0_REGNUM)
: 0);
}
@@ -110,8 +110,10 @@ store_inferior_registers (int regno)
if (regno > 0)
{
if (regno == ZERO_REGNUM || regno == PS_REGNUM
- || regno == BADVADDR_REGNUM || regno == CAUSE_REGNUM
- || regno == FCRIR_REGNUM || regno == DEPRECATED_FP_REGNUM
+ || regno == mips_regnum (current_gdbarch)->badvaddr
+ || regno == mips_regnum (current_gdbarch)->cause
+ || regno == mips_regnum (current_gdbarch)->fp_implementation_revision
+ || regno == DEPRECATED_FP_REGNUM
|| (regno >= FIRST_EMBED_REGNUM && regno <= LAST_EMBED_REGNUM))
return;
regaddr = register_ptrace_addr (regno);
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index c0d8b08127c..2c3e8c27090 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -134,10 +134,30 @@ struct gdbarch_tdep
int mips_default_saved_regsize;
int mips_fp_register_double;
int mips_default_stack_argsize;
- int gdb_target_is_mips64;
int default_mask_address_p;
+ /* Is the target using 64-bit raw integer registers but only
+ storing a left-aligned 32-bit value in each? */
+ int mips64_transfers_32bit_regs_p;
+ /* Indexes for various registers. IRIX and embedded have
+ different values. This contains the "public" fields. Don't
+ add any that do not need to be public. */
+ const struct mips_regnum *regnum;
+ /* Register names table for the current register set. */
+ const char **mips_processor_reg_names;
};
+const struct mips_regnum *
+mips_regnum (struct gdbarch *gdbarch)
+{
+ return gdbarch_tdep (gdbarch)->regnum;
+}
+
+static int
+mips_fpa0_regnum (struct gdbarch *gdbarch)
+{
+ return mips_regnum (gdbarch)->fp0 + 12;
+}
+
#define MIPS_EABI (gdbarch_tdep (current_gdbarch)->mips_abi == MIPS_ABI_EABI32 \
|| gdbarch_tdep (current_gdbarch)->mips_abi == MIPS_ABI_EABI64)
@@ -181,9 +201,9 @@ unmake_mips16_addr (CORE_ADDR addr)
static LONGEST
read_signed_register (int regnum)
{
- void *buf = alloca (DEPRECATED_REGISTER_RAW_SIZE (regnum));
+ void *buf = alloca (register_size (current_gdbarch, regnum));
deprecated_read_register_gen (regnum, buf);
- return (extract_signed_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (regnum)));
+ return (extract_signed_integer (buf, register_size (current_gdbarch, regnum)));
}
static LONGEST
@@ -213,6 +233,13 @@ mips_abi (struct gdbarch *gdbarch)
return gdbarch_tdep (gdbarch)->mips_abi;
}
+int
+mips_regsize (struct gdbarch *gdbarch)
+{
+ return (gdbarch_bfd_arch_info (gdbarch)->bits_per_word
+ / gdbarch_bfd_arch_info (gdbarch)->bits_per_byte);
+}
+
static unsigned int
mips_saved_regsize (void)
{
@@ -226,17 +253,13 @@ mips_saved_regsize (void)
/* Functions for setting and testing a bit in a minimal symbol that
marks it as 16-bit function. The MSB of the minimal symbol's
- "info" field is used for this purpose. This field is already
- being used to store the symbol size, so the assumption is
- that the symbol size cannot exceed 2^31.
+ "info" field is used for this purpose.
ELF_MAKE_MSYMBOL_SPECIAL tests whether an ELF symbol is "special",
i.e. refers to a 16-bit function, and sets a "special" bit in a
minimal symbol to mark it as a 16-bit function
- MSYMBOL_IS_SPECIAL tests the "special" bit in a minimal symbol
- MSYMBOL_SIZE returns the size of the minimal symbol, i.e.
- the "info" field with the "special" bit masked out */
+ MSYMBOL_IS_SPECIAL tests the "special" bit in a minimal symbol */
static void
mips_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym)
@@ -255,12 +278,6 @@ msymbol_is_special (struct minimal_symbol *msym)
return (((long) MSYMBOL_INFO (msym) & 0x80000000) != 0);
}
-static long
-msymbol_size (struct minimal_symbol *msym)
-{
- return ((long) MSYMBOL_INFO (msym) & 0x7fffffff);
-}
-
/* XFER a value from the big/little/left end of the register.
Depending on the size of the value it might occupy the entire
register or just part of it. Make an allowance for this, aligning
@@ -279,7 +296,7 @@ mips_xfer_register (struct regcache *regcache, int reg_num, int length,
switch (endian)
{
case BFD_ENDIAN_BIG:
- reg_offset = DEPRECATED_REGISTER_RAW_SIZE (reg_num) - length;
+ reg_offset = register_size (current_gdbarch, reg_num) - length;
break;
case BFD_ENDIAN_LITTLE:
reg_offset = 0;
@@ -325,7 +342,7 @@ mips2_fp_compat (void)
{
/* MIPS1 and MIPS2 have only 32 bit FPRs, and the FR bit is not
meaningful. */
- if (DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM) == 4)
+ if (register_size (current_gdbarch, mips_regnum (current_gdbarch)->fp0) == 4)
return 0;
#if 0
@@ -343,9 +360,7 @@ mips2_fp_compat (void)
/* Indicate that the ABI makes use of double-precision registers
provided by the FPU (rather than combining pairs of registers to
- form double-precision values). Do not use "TARGET_IS_MIPS64" to
- determine if the ABI is using double-precision registers. See also
- MIPS_FPU_TYPE. */
+ form double-precision values). See also MIPS_FPU_TYPE. */
#define FP_REGISTER_DOUBLE (gdbarch_tdep (current_gdbarch)->mips_fp_register_double)
/* The amount of space reserved on the stack for registers. This is
@@ -369,8 +384,6 @@ mips_stack_argsize (void)
return 4;
}
-#define GDB_TARGET_IS_MIPS64 (gdbarch_tdep (current_gdbarch)->gdb_target_is_mips64 + 0)
-
#define MIPS_DEFAULT_MASK_ADDRESS_P (gdbarch_tdep (current_gdbarch)->default_mask_address_p)
#define VM_MIN_ADDRESS (CORE_ADDR)0x400000
@@ -382,10 +395,6 @@ static CORE_ADDR heuristic_proc_start (CORE_ADDR);
static CORE_ADDR read_next_frame_reg (struct frame_info *, int);
-static int mips_set_processor_type (char *);
-
-static void mips_show_processor_type_command (char *, int);
-
static void reinit_frame_cache_sfunc (char *, int, struct cmd_list_element *);
static mips_extra_func_info_t find_proc_desc (CORE_ADDR pc,
@@ -398,32 +407,71 @@ static CORE_ADDR after_prologue (CORE_ADDR pc,
static struct type *mips_float_register_type (void);
static struct type *mips_double_register_type (void);
-/* This value is the model of MIPS in use. It is derived from the value
- of the PrID register. */
-
-char *mips_processor_type;
-
-char *tmp_mips_processor_type;
-
/* The list of available "set mips " and "show mips " commands */
static struct cmd_list_element *setmipscmdlist = NULL;
static struct cmd_list_element *showmipscmdlist = NULL;
-/* A set of original names, to be used when restoring back to generic
- registers from a specific set. */
-static char *mips_generic_reg_names[] = MIPS_REGISTER_NAMES;
-
/* Integer registers 0 thru 31 are handled explicitly by
mips_register_name(). Processor specific registers 32 and above
- are listed in the sets of register names assigned to
- mips_processor_reg_names. */
-static char **mips_processor_reg_names = mips_generic_reg_names;
+ are listed in the followign tables. */
+
+enum { NUM_MIPS_PROCESSOR_REGS = (90 - 32) };
+
+/* Generic MIPS. */
+
+static const char *mips_generic_reg_names[NUM_MIPS_PROCESSOR_REGS] = {
+ "sr", "lo", "hi", "bad", "cause","pc",
+ "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
+ "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
+ "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
+ "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",
+ "fsr", "fir", ""/*"fp"*/, "",
+ "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
+};
+
+/* Names of IDT R3041 registers. */
+
+static const char *mips_r3041_reg_names[] = {
+ "sr", "lo", "hi", "bad", "cause","pc",
+ "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
+ "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
+ "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
+ "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",
+ "fsr", "fir", "",/*"fp"*/ "",
+ "", "", "bus", "ccfg", "", "", "", "",
+ "", "", "port", "cmp", "", "", "epc", "prid",
+};
+
+/* Names of tx39 registers. */
+
+static const char *mips_tx39_reg_names[NUM_MIPS_PROCESSOR_REGS] = {
+ "sr", "lo", "hi", "bad", "cause","pc",
+ "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
+ "", "", "", "",
+ "", "", "", "", "", "", "", "",
+ "", "", "config", "cache", "debug", "depc", "epc", ""
+};
+
+/* Names of IRIX registers. */
+static const char *mips_irix_reg_names[NUM_MIPS_PROCESSOR_REGS] = {
+ "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
+ "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
+ "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
+ "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",
+ "pc", "cause", "bad", "hi", "lo", "fsr", "fir"
+};
+
/* Return the name of the register corresponding to REGNO. */
static const char *
mips_register_name (int regno)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
/* GPR names for all ABIs other than n32/n64. */
static char *mips_gpr_names[] = {
"zero", "at", "v0", "v1", "a0", "a1", "a2", "a3",
@@ -459,79 +507,15 @@ mips_register_name (int regno)
return mips_gpr_names[rawnum];
}
else if (32 <= rawnum && rawnum < NUM_REGS)
- return mips_processor_reg_names[rawnum - 32];
+ {
+ gdb_assert (rawnum - 32 < NUM_MIPS_PROCESSOR_REGS);
+ return tdep->mips_processor_reg_names[rawnum - 32];
+ }
else
internal_error (__FILE__, __LINE__,
"mips_register_name: bad register number %d", rawnum);
}
-/* *INDENT-OFF* */
-/* Names of IDT R3041 registers. */
-
-char *mips_r3041_reg_names[] = {
- "sr", "lo", "hi", "bad", "cause","pc",
- "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
- "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
- "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
- "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",
- "fsr", "fir", "",/*"fp"*/ "",
- "", "", "bus", "ccfg", "", "", "", "",
- "", "", "port", "cmp", "", "", "epc", "prid",
-};
-
-/* Names of IDT R3051 registers. */
-
-char *mips_r3051_reg_names[] = {
- "sr", "lo", "hi", "bad", "cause","pc",
- "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
- "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
- "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
- "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",
- "fsr", "fir", ""/*"fp"*/, "",
- "inx", "rand", "elo", "", "ctxt", "", "", "",
- "", "", "ehi", "", "", "", "epc", "prid",
-};
-
-/* Names of IDT R3081 registers. */
-
-char *mips_r3081_reg_names[] = {
- "sr", "lo", "hi", "bad", "cause","pc",
- "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
- "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
- "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
- "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",
- "fsr", "fir", ""/*"fp"*/, "",
- "inx", "rand", "elo", "cfg", "ctxt", "", "", "",
- "", "", "ehi", "", "", "", "epc", "prid",
-};
-
-/* Names of LSI 33k registers. */
-
-char *mips_lsi33k_reg_names[] = {
- "epc", "hi", "lo", "sr", "cause","badvaddr",
- "dcic", "bpc", "bda", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
-};
-
-struct {
- char *name;
- char **regnames;
-} mips_processor_type_table[] = {
- { "generic", mips_generic_reg_names },
- { "r3041", mips_r3041_reg_names },
- { "r3051", mips_r3051_reg_names },
- { "r3071", mips_r3081_reg_names },
- { "r3081", mips_r3081_reg_names },
- { "lsi33k", mips_lsi33k_reg_names },
- { NULL, NULL }
-};
-/* *INDENT-ON* */
-
/* Return the groups that a MIPS register can be categorised into. */
static int
@@ -572,22 +556,46 @@ mips_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
/* Map the symbol table registers which live in the range [1 *
NUM_REGS .. 2 * NUM_REGS) back onto the corresponding raw
- registers. */
+ registers. Take care of alignment and size problems. */
static void
mips_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
int cookednum, void *buf)
{
+ int rawnum = cookednum % NUM_REGS;
gdb_assert (cookednum >= NUM_REGS && cookednum < 2 * NUM_REGS);
- return regcache_raw_read (regcache, cookednum % NUM_REGS, buf);
+ if (register_size (gdbarch, rawnum) == register_size (gdbarch, cookednum))
+ return regcache_raw_read (regcache, rawnum, buf);
+ else if (register_size (gdbarch, rawnum) > register_size (gdbarch, cookednum))
+ {
+ if (gdbarch_tdep (gdbarch)->mips64_transfers_32bit_regs_p
+ || TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
+ regcache_raw_read_part (regcache, rawnum, 0, 4, buf);
+ else
+ regcache_raw_read_part (regcache, rawnum, 4, 4, buf);
+ }
+ else
+ internal_error (__FILE__, __LINE__, "bad register size");
}
static void
mips_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
int cookednum, const void *buf)
{
+ int rawnum = cookednum % NUM_REGS;
gdb_assert (cookednum >= NUM_REGS && cookednum < 2 * NUM_REGS);
- return regcache_raw_write (regcache, cookednum % NUM_REGS, buf);
+ if (register_size (gdbarch, rawnum) == register_size (gdbarch, cookednum))
+ return regcache_raw_write (regcache, rawnum, buf);
+ else if (register_size (gdbarch, rawnum) > register_size (gdbarch, cookednum))
+ {
+ if (gdbarch_tdep (gdbarch)->mips64_transfers_32bit_regs_p
+ || TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
+ regcache_raw_write_part (regcache, rawnum, 0, 4, buf);
+ else
+ regcache_raw_write_part (regcache, rawnum, 4, 4, buf);
+ }
+ else
+ internal_error (__FILE__, __LINE__, "bad register size");
}
/* Table to translate MIPS16 register field to actual register number. */
@@ -625,124 +633,35 @@ struct linked_proc_info
*linked_proc_desc_table = NULL;
/* Number of bytes of storage in the actual machine representation for
- register N. NOTE: This indirectly defines the register size
- transfered by the GDB protocol. */
+ register N. NOTE: This defines the pseudo register type so need to
+ rebuild the architecture vector. */
static int mips64_transfers_32bit_regs_p = 0;
-static int
-mips_register_raw_size (int regnum)
-{
- gdb_assert (regnum >= 0);
- if (regnum < NUM_REGS)
- {
- /* For compatibility with old code, implemnt the broken register raw
- size map for the raw registers.
-
- NOTE: cagney/2003-06-15: This is so bogus. The register's
- raw size is changing according to the ABI
- (FP_REGISTER_DOUBLE). Also, GDB's protocol is defined by a
- combination of DEPRECATED_REGISTER_RAW_SIZE and DEPRECATED_REGISTER_BYTE. */
- if (mips64_transfers_32bit_regs_p)
- return DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum);
- else if (regnum >= FP0_REGNUM && regnum < FP0_REGNUM + 32
- && FP_REGISTER_DOUBLE)
- /* For MIPS_ABI_N32 (for example) we need 8 byte floating point
- registers. */
- return 8;
- else
- return MIPS_REGSIZE;
- }
- else if (regnum < 2 * NUM_REGS)
- {
- /* For the moment map [NUM_REGS .. 2*NUM_REGS) onto the same raw
- registers, but always return the virtual size. */
- int rawnum = regnum % NUM_REGS;
- return TYPE_LENGTH (gdbarch_register_type (current_gdbarch, rawnum));
- }
- else
- internal_error (__FILE__, __LINE__, "Register %d out of range", regnum);
-}
-
-/* Register offset in a buffer for each register.
-
- FIXME: cagney/2003-06-15: This is so bogus. Instead REGISTER_TYPE
- should strictly return the layout of the buffer. Unfortunately
- remote.c and the MIPS have come to rely on a custom layout that
- doesn't 1:1 map onto the register type. */
-
-static int
-mips_register_byte (int regnum)
+static void
+set_mips64_transfers_32bit_regs (char *args, int from_tty,
+ struct cmd_list_element *c)
{
- gdb_assert (regnum >= 0);
- if (regnum < NUM_REGS)
- /* Pick up the relevant per-tm file register byte method. */
- return MIPS_REGISTER_BYTE (regnum);
- else if (regnum < 2 * NUM_REGS)
+ struct gdbarch_info info;
+ gdbarch_info_init (&info);
+ /* FIXME: cagney/2003-11-15: Should be setting a field in "info"
+ instead of relying on globals. Doing that would let generic code
+ handle the search for this specific architecture. */
+ if (!gdbarch_update_p (info))
{
- int reg;
- int byte;
- /* Start with the end of the raw register buffer - assum that
- MIPS_REGISTER_BYTE (NUM_REGS) returns that end. */
- byte = MIPS_REGISTER_BYTE (NUM_REGS);
- /* Add space for all the proceeding registers based on their
- real size. */
- for (reg = NUM_REGS; reg < regnum; reg++)
- byte += TYPE_LENGTH (gdbarch_register_type (current_gdbarch,
- (reg % NUM_REGS)));
- return byte;
+ mips64_transfers_32bit_regs_p = 0;
+ error ("32-bit compatibility mode not supported");
}
- else
- internal_error (__FILE__, __LINE__, "Register %d out of range", regnum);
}
-/* Convert between RAW and VIRTUAL registers. The RAW register size
- defines the remote-gdb packet. */
-
-static int
-mips_register_convertible (int reg_nr)
-{
- if (mips64_transfers_32bit_regs_p)
- return 0;
- else
- return (DEPRECATED_REGISTER_RAW_SIZE (reg_nr) > DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr));
-}
-
-static void
-mips_register_convert_to_virtual (int n, struct type *virtual_type,
- char *raw_buf, char *virt_buf)
-{
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- memcpy (virt_buf,
- raw_buf + (DEPRECATED_REGISTER_RAW_SIZE (n) - TYPE_LENGTH (virtual_type)),
- TYPE_LENGTH (virtual_type));
- else
- memcpy (virt_buf,
- raw_buf,
- TYPE_LENGTH (virtual_type));
-}
-
-static void
-mips_register_convert_to_raw (struct type *virtual_type, int n,
- const char *virt_buf, char *raw_buf)
-{
- memset (raw_buf, 0, DEPRECATED_REGISTER_RAW_SIZE (n));
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- memcpy (raw_buf + (DEPRECATED_REGISTER_RAW_SIZE (n) - TYPE_LENGTH (virtual_type)),
- virt_buf,
- TYPE_LENGTH (virtual_type));
- else
- memcpy (raw_buf,
- virt_buf,
- TYPE_LENGTH (virtual_type));
-}
+/* Convert to/from a register and the corresponding memory value. */
static int
mips_convert_register_p (int regnum, struct type *type)
{
return (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
- && DEPRECATED_REGISTER_RAW_SIZE (regnum) == 4
- && (regnum) >= FP0_REGNUM && (regnum) < FP0_REGNUM + 32
+ && register_size (current_gdbarch, regnum) == 4
+ && (regnum) >= mips_regnum (current_gdbarch)->fp0 && (regnum) < mips_regnum (current_gdbarch)->fp0 + 32
&& TYPE_CODE(type) == TYPE_CODE_FLT
&& TYPE_LENGTH(type) == 8);
}
@@ -769,35 +688,46 @@ mips_value_to_register (struct frame_info *frame, int regnum,
static struct type *
mips_register_type (struct gdbarch *gdbarch, int regnum)
{
- /* For moment, map [NUM_REGS .. 2*NUM_REGS) onto the same raw
- registers. Even return the same type. */
- int rawnum = regnum % NUM_REGS;
- gdb_assert (rawnum >= 0 && rawnum < NUM_REGS);
-#ifdef MIPS_REGISTER_TYPE
- return MIPS_REGISTER_TYPE (rawnum);
-#else
- if (FP0_REGNUM <= rawnum && rawnum < FP0_REGNUM + 32)
+ gdb_assert (regnum >= 0 && regnum < 2 * NUM_REGS);
+ if ((regnum % NUM_REGS) >= mips_regnum (current_gdbarch)->fp0
+ && (regnum % NUM_REGS) < mips_regnum (current_gdbarch)->fp0 + 32)
{
- /* Floating point registers... */
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- return builtin_type_ieee_double_big;
- else
- return builtin_type_ieee_double_little;
+ /* The floating-point registers raw, or cooked, always match
+ mips_regsize(), and also map 1:1, byte for byte. */
+ switch (gdbarch_byte_order (gdbarch))
+ {
+ case BFD_ENDIAN_BIG:
+ if (mips_regsize (gdbarch) == 4)
+ return builtin_type_ieee_single_big;
+ else
+ return builtin_type_ieee_double_big;
+ case BFD_ENDIAN_LITTLE:
+ if (mips_regsize (gdbarch) == 4)
+ return builtin_type_ieee_single_little;
+ else
+ return builtin_type_ieee_double_little;
+ case BFD_ENDIAN_UNKNOWN:
+ default:
+ internal_error (__FILE__, __LINE__, "bad switch");
+ }
}
- else if (rawnum == PS_REGNUM /* CR */)
- return builtin_type_uint32;
- else if (FCRCS_REGNUM <= rawnum && rawnum <= LAST_EMBED_REGNUM)
- return builtin_type_uint32;
+ else if (regnum >= (NUM_REGS + mips_regnum (current_gdbarch)->fp_control_status)
+ && regnum <= NUM_REGS + LAST_EMBED_REGNUM)
+ /* The pseudo/cooked view of the embedded registers is always
+ 32-bit. The raw view is handled below. */
+ return builtin_type_int32;
+ else if (regnum >= NUM_REGS && mips_regsize (gdbarch)
+ && gdbarch_tdep (gdbarch)->mips64_transfers_32bit_regs_p)
+ /* The target, while using a 64-bit register buffer, is only
+ transfering 32-bits of each integer register. Reflect this in
+ the cooked/pseudo register value. */
+ return builtin_type_int32;
+ else if (mips_regsize (gdbarch) == 8)
+ /* 64-bit ISA. */
+ return builtin_type_int64;
else
- {
- /* Everything else...
- Return type appropriate for width of register. */
- if (MIPS_REGSIZE == TYPE_LENGTH (builtin_type_uint64))
- return builtin_type_uint64;
- else
- return builtin_type_uint32;
- }
-#endif
+ /* 32-bit ISA. */
+ return builtin_type_int32;
}
/* TARGET_READ_SP -- Remove useless bits from the stack pointer. */
@@ -860,12 +790,6 @@ mips_eabi_use_struct_convention (int gcc_p, struct type *type)
return (TYPE_LENGTH (type) > 2 * MIPS_SAVED_REGSIZE);
}
-static int
-mips_n32n64_use_struct_convention (int gcc_p, struct type *type)
-{
- return (TYPE_LENGTH (type) > 2 * MIPS_SAVED_REGSIZE);
-}
-
/* Should call_function pass struct by reference?
For each architecture, structs are passed either by
value or by reference, depending on their size. */
@@ -1109,7 +1033,7 @@ mips32_next_pc (CORE_ADDR pc)
{
int tf = itype_rt (inst) & 0x01;
int cnum = itype_rt (inst) >> 2;
- int fcrcs = read_signed_register (FCRCS_REGNUM);
+ int fcrcs = read_signed_register (mips_regnum (current_gdbarch)->fp_control_status);
int cond = ((fcrcs >> 24) & 0x0e) | ((fcrcs >> 23) & 0x01);
if (((cond >> cnum) & 0x01) == tf)
@@ -1569,31 +1493,27 @@ mips_find_saved_regs (struct frame_info *fci)
#ifndef SIGFRAME_BASE
/* To satisfy alignment restrictions, sigcontext is located 4 bytes
above the sigtramp frame. */
-#define SIGFRAME_BASE MIPS_REGSIZE
+#define SIGFRAME_BASE mips_regsize (current_gdbarch)
/* FIXME! Are these correct?? */
-#define SIGFRAME_PC_OFF (SIGFRAME_BASE + 2 * MIPS_REGSIZE)
-#define SIGFRAME_REGSAVE_OFF (SIGFRAME_BASE + 3 * MIPS_REGSIZE)
+#define SIGFRAME_PC_OFF (SIGFRAME_BASE + 2 * mips_regsize (current_gdbarch))
+#define SIGFRAME_REGSAVE_OFF (SIGFRAME_BASE + 3 * mips_regsize (current_gdbarch))
#define SIGFRAME_FPREGSAVE_OFF \
- (SIGFRAME_REGSAVE_OFF + MIPS_NUMREGS * MIPS_REGSIZE + 3 * MIPS_REGSIZE)
-#endif
-#ifndef SIGFRAME_REG_SIZE
- /* FIXME! Is this correct?? */
-#define SIGFRAME_REG_SIZE MIPS_REGSIZE
+ (SIGFRAME_REGSAVE_OFF + MIPS_NUMREGS * mips_regsize (current_gdbarch) + 3 * mips_regsize (current_gdbarch))
#endif
if ((get_frame_type (fci) == SIGTRAMP_FRAME))
{
for (ireg = 0; ireg < MIPS_NUMREGS; ireg++)
{
CORE_ADDR reg_position = (get_frame_base (fci) + SIGFRAME_REGSAVE_OFF
- + ireg * SIGFRAME_REG_SIZE);
+ + ireg * mips_regsize (current_gdbarch));
set_reg_offset (saved_regs, ireg, reg_position);
}
for (ireg = 0; ireg < MIPS_NUMREGS; ireg++)
{
CORE_ADDR reg_position = (get_frame_base (fci)
+ SIGFRAME_FPREGSAVE_OFF
- + ireg * SIGFRAME_REG_SIZE);
- set_reg_offset (saved_regs, FP0_REGNUM + ireg, reg_position);
+ + ireg * mips_regsize (current_gdbarch));
+ set_reg_offset (saved_regs, mips_regnum (current_gdbarch)->fp0 + ireg, reg_position);
}
set_reg_offset (saved_regs, PC_REGNUM, get_frame_base (fci) + SIGFRAME_PC_OFF);
@@ -1741,14 +1661,14 @@ mips_find_saved_regs (struct frame_info *fci)
reg_position is decremented each time through the
loop). */
if ((ireg & 1))
- set_reg_offset (saved_regs, FP0_REGNUM + ireg,
+ set_reg_offset (saved_regs, mips_regnum (current_gdbarch)->fp0 + ireg,
reg_position - MIPS_SAVED_REGSIZE);
else
- set_reg_offset (saved_regs, FP0_REGNUM + ireg,
+ set_reg_offset (saved_regs, mips_regnum (current_gdbarch)->fp0 + ireg,
reg_position + MIPS_SAVED_REGSIZE);
}
else
- set_reg_offset (saved_regs, FP0_REGNUM + ireg, reg_position);
+ set_reg_offset (saved_regs, mips_regnum (current_gdbarch)->fp0 + ireg, reg_position);
reg_position -= MIPS_SAVED_REGSIZE;
}
@@ -1786,40 +1706,26 @@ read_next_frame_reg (struct frame_info *fi, int regno)
static CORE_ADDR
mips_addr_bits_remove (CORE_ADDR addr)
{
- if (GDB_TARGET_IS_MIPS64)
- {
- if (mips_mask_address_p () && (addr >> 32 == (CORE_ADDR) 0xffffffff))
- {
- /* This hack is a work-around for existing boards using
- PMON, the simulator, and any other 64-bit targets that
- doesn't have true 64-bit addressing. On these targets,
- the upper 32 bits of addresses are ignored by the
- hardware. Thus, the PC or SP are likely to have been
- sign extended to all 1s by instruction sequences that
- load 32-bit addresses. For example, a typical piece of
- code that loads an address is this:
- lui $r2, <upper 16 bits>
- ori $r2, <lower 16 bits>
- But the lui sign-extends the value such that the upper 32
- bits may be all 1s. The workaround is simply to mask off
- these bits. In the future, gcc may be changed to support
- true 64-bit addressing, and this masking will have to be
- disabled. */
- addr &= (CORE_ADDR) 0xffffffff;
- }
- }
- else if (mips_mask_address_p ())
- {
- /* FIXME: This is wrong! mips_addr_bits_remove() shouldn't be
- masking off bits, instead, the actual target should be asking
- for the address to be converted to a valid pointer. */
- /* Even when GDB is configured for some 32-bit targets
- (e.g. mips-elf), BFD is configured to handle 64-bit targets,
- so CORE_ADDR is 64 bits. So we still have to mask off
- useless bits from addresses. */
- addr &= (CORE_ADDR) 0xffffffff;
- }
- return addr;
+ if (mips_mask_address_p ()
+ && (((ULONGEST) addr) >> 32 == 0xffffffffUL))
+ /* This hack is a work-around for existing boards using PMON, the
+ simulator, and any other 64-bit targets that doesn't have true
+ 64-bit addressing. On these targets, the upper 32 bits of
+ addresses are ignored by the hardware. Thus, the PC or SP are
+ likely to have been sign extended to all 1s by instruction
+ sequences that load 32-bit addresses. For example, a typical
+ piece of code that loads an address is this:
+
+ lui $r2, <upper 16 bits>
+ ori $r2, <lower 16 bits>
+
+ But the lui sign-extends the value such that the upper 32 bits
+ may be all 1s. The workaround is simply to mask off these
+ bits. In the future, gcc may be changed to support true 64-bit
+ addressing, and this masking will have to be disabled. */
+ return addr &= 0xffffffffUL;
+ else
+ return addr;
}
/* mips_software_single_step() is called just before we want to resume
@@ -1871,10 +1777,8 @@ mips_frame_saved_pc (struct frame_info *frame)
if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), 0, 0))
{
- LONGEST tmp;
/* Always unwind the cooked PC register value. */
- frame_unwind_signed_register (frame, NUM_REGS + PC_REGNUM, &tmp);
- saved_pc = tmp;
+ saved_pc = frame_unwind_register_signed (frame, NUM_REGS + PC_REGNUM);
}
else
{
@@ -2262,7 +2166,7 @@ restart:
but the register size used is only 32 bits. Make the address
for the saved register point to the lower 32 bits. */
PROC_REG_MASK (&temp_proc_desc) |= 1 << reg;
- set_reg_offset (temp_saved_regs, reg, sp + low_word + 8 - MIPS_REGSIZE);
+ set_reg_offset (temp_saved_regs, reg, sp + low_word + 8 - mips_regsize (current_gdbarch));
}
else if (high_word == 0x27be) /* addiu $30,$sp,size */
{
@@ -2611,9 +2515,6 @@ mips_frame_chain (struct frame_info *frame)
CORE_ADDR tmp;
CORE_ADDR saved_pc = DEPRECATED_FRAME_SAVED_PC (frame);
- if (saved_pc == 0 || deprecated_inside_entry_file (saved_pc))
- return 0;
-
/* Check if the PC is inside a call stub. If it is, fetch the
PC of the caller of that stub. */
if ((tmp = SKIP_TRAMPOLINE_CODE (saved_pc)) != 0)
@@ -2672,7 +2573,6 @@ mips_init_extra_frame_info (int fromleaf, struct frame_info *fci)
frame_extra_info_zalloc (fci, sizeof (struct frame_extra_info));
- deprecated_set_frame_saved_regs_hack (fci, NULL);
get_frame_extra_info (fci)->proc_desc =
proc_desc == &temp_proc_desc ? 0 : proc_desc;
if (proc_desc)
@@ -2862,7 +2762,7 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
/* Initialize the integer and float register pointers. */
argreg = A0_REGNUM;
- float_argreg = FPA0_REGNUM;
+ float_argreg = mips_fpa0_regnum (current_gdbarch);
/* The struct_return pointer occupies the first parameter-passing reg. */
if (struct_return)
@@ -2970,10 +2870,11 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
/* Copy the argument to general registers or the stack in
register-sized pieces. Large arguments are split between
registers and stack. */
- /* Note: structs whose size is not a multiple of MIPS_REGSIZE
- are treated specially: Irix cc passes them in registers
- where gcc sometimes puts them on the stack. For maximum
- compatibility, we will put them in both places. */
+ /* Note: structs whose size is not a multiple of
+ mips_regsize() are treated specially: Irix cc passes them
+ in registers where gcc sometimes puts them on the stack.
+ For maximum compatibility, we will put them in both
+ places. */
int odd_sized_struct = ((len > MIPS_SAVED_REGSIZE) &&
(len % MIPS_SAVED_REGSIZE != 0));
@@ -3122,7 +3023,7 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
/* Initialize the integer and float register pointers. */
argreg = A0_REGNUM;
- float_argreg = FPA0_REGNUM;
+ float_argreg = mips_fpa0_regnum (current_gdbarch);
/* The struct_return pointer occupies the first parameter-passing reg. */
if (struct_return)
@@ -3177,10 +3078,11 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
/* Copy the argument to general registers or the stack in
register-sized pieces. Large arguments are split between
registers and stack. */
- /* Note: structs whose size is not a multiple of MIPS_REGSIZE
- are treated specially: Irix cc passes them in registers
- where gcc sometimes puts them on the stack. For maximum
- compatibility, we will put them in both places. */
+ /* Note: structs whose size is not a multiple of
+ mips_regsize() are treated specially: Irix cc passes them
+ in registers where gcc sometimes puts them on the stack.
+ For maximum compatibility, we will put them in both
+ places. */
int odd_sized_struct = ((len > MIPS_SAVED_REGSIZE) &&
(len % MIPS_SAVED_REGSIZE != 0));
/* Note: Floating-point values that didn't fit into an FP
@@ -3353,7 +3255,7 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
/* Initialize the integer and float register pointers. */
argreg = A0_REGNUM;
- float_argreg = FPA0_REGNUM;
+ float_argreg = mips_fpa0_regnum (current_gdbarch);
/* The struct_return pointer occupies the first parameter-passing reg. */
if (struct_return)
@@ -3467,10 +3369,11 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
/* Copy the argument to general registers or the stack in
register-sized pieces. Large arguments are split between
registers and stack. */
- /* Note: structs whose size is not a multiple of MIPS_REGSIZE
- are treated specially: Irix cc passes them in registers
- where gcc sometimes puts them on the stack. For maximum
- compatibility, we will put them in both places. */
+ /* Note: structs whose size is not a multiple of
+ mips_regsize() are treated specially: Irix cc passes them
+ in registers where gcc sometimes puts them on the stack.
+ For maximum compatibility, we will put them in both
+ places. */
int odd_sized_struct = ((len > MIPS_SAVED_REGSIZE) &&
(len % MIPS_SAVED_REGSIZE != 0));
/* Structures should be aligned to eight bytes (even arg registers)
@@ -3546,8 +3449,8 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
&& !fp_register_arg_p (typecode, arg_type))
{
LONGEST regval = extract_signed_integer (val, partial_len);
- /* Value may need to be sign extended, because
- MIPS_REGSIZE != MIPS_SAVED_REGSIZE. */
+ /* Value may need to be sign extended, because
+ mips_regsize() != MIPS_SAVED_REGSIZE. */
/* A non-floating-point argument being passed in a
general register. If a struct or union, and if
@@ -3661,7 +3564,7 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
/* Initialize the integer and float register pointers. */
argreg = A0_REGNUM;
- float_argreg = FPA0_REGNUM;
+ float_argreg = mips_fpa0_regnum (current_gdbarch);
/* The struct_return pointer occupies the first parameter-passing reg. */
if (struct_return)
@@ -3775,10 +3678,11 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
/* Copy the argument to general registers or the stack in
register-sized pieces. Large arguments are split between
registers and stack. */
- /* Note: structs whose size is not a multiple of MIPS_REGSIZE
- are treated specially: Irix cc passes them in registers
- where gcc sometimes puts them on the stack. For maximum
- compatibility, we will put them in both places. */
+ /* Note: structs whose size is not a multiple of
+ mips_regsize() are treated specially: Irix cc passes them
+ in registers where gcc sometimes puts them on the stack.
+ For maximum compatibility, we will put them in both
+ places. */
int odd_sized_struct = ((len > MIPS_SAVED_REGSIZE) &&
(len % MIPS_SAVED_REGSIZE != 0));
/* Structures should be aligned to eight bytes (even arg registers)
@@ -3854,8 +3758,8 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
&& !fp_register_arg_p (typecode, arg_type))
{
LONGEST regval = extract_signed_integer (val, partial_len);
- /* Value may need to be sign extended, because
- MIPS_REGSIZE != MIPS_SAVED_REGSIZE. */
+ /* Value may need to be sign extended, because
+ mips_regsize() != MIPS_SAVED_REGSIZE. */
/* A non-floating-point argument being passed in a
general register. If a struct or union, and if
@@ -3950,7 +3854,7 @@ mips_pop_frame (void)
/* Floating point registers must not be sign extended,
in case MIPS_SAVED_REGSIZE = 4 but sizeof (FP0_REGNUM) == 8. */
- if (FP0_REGNUM <= regnum && regnum < FP0_REGNUM + 32)
+ if (mips_regnum (current_gdbarch)->fp0 <= regnum && regnum < mips_regnum (current_gdbarch)->fp0 + 32)
write_register (regnum,
read_memory_unsigned_integer (deprecated_get_frame_saved_regs (frame)[regnum],
MIPS_SAVED_REGSIZE));
@@ -3985,14 +3889,14 @@ mips_pop_frame (void)
xfree (pi_ptr);
- write_register (HI_REGNUM,
+ write_register (mips_regnum (current_gdbarch)->hi,
read_memory_integer (new_sp - 2 * MIPS_SAVED_REGSIZE,
MIPS_SAVED_REGSIZE));
- write_register (LO_REGNUM,
+ write_register (mips_regnum (current_gdbarch)->lo,
read_memory_integer (new_sp - 3 * MIPS_SAVED_REGSIZE,
MIPS_SAVED_REGSIZE));
if (MIPS_FPU_TYPE != MIPS_FPU_NONE)
- write_register (FCRCS_REGNUM,
+ write_register (mips_regnum (current_gdbarch)->fp_control_status,
read_memory_integer (new_sp - 4 * MIPS_SAVED_REGSIZE,
MIPS_SAVED_REGSIZE));
}
@@ -4053,7 +3957,7 @@ static void
mips_read_fp_register_single (struct frame_info *frame, int regno,
char *rare_buffer)
{
- int raw_size = DEPRECATED_REGISTER_RAW_SIZE (regno);
+ int raw_size = register_size (current_gdbarch, regno);
char *raw_buffer = alloca (raw_size);
if (!frame_register_read (frame, regno, raw_buffer))
@@ -4085,7 +3989,7 @@ static void
mips_read_fp_register_double (struct frame_info *frame, int regno,
char *rare_buffer)
{
- int raw_size = DEPRECATED_REGISTER_RAW_SIZE (regno);
+ int raw_size = register_size (current_gdbarch, regno);
if (raw_size == 8 && !mips2_fp_compat ())
{
@@ -4096,7 +4000,7 @@ mips_read_fp_register_double (struct frame_info *frame, int regno,
}
else
{
- if ((regno - FP0_REGNUM) & 1)
+ if ((regno - mips_regnum (current_gdbarch)->fp0) & 1)
internal_error (__FILE__, __LINE__,
"mips_read_fp_register_double: bad access to "
"odd-numbered FP register");
@@ -4124,13 +4028,13 @@ mips_print_fp_register (struct ui_file *file, struct frame_info *frame,
double doub, flt1, flt2; /* doubles extracted from raw hex data */
int inv1, inv2, namelen;
- raw_buffer = (char *) alloca (2 * DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM));
+ raw_buffer = (char *) alloca (2 * register_size (current_gdbarch, mips_regnum (current_gdbarch)->fp0));
fprintf_filtered (file, "%s:", REGISTER_NAME (regnum));
fprintf_filtered (file, "%*s", 4 - (int) strlen (REGISTER_NAME (regnum)),
"");
- if (DEPRECATED_REGISTER_RAW_SIZE (regnum) == 4 || mips2_fp_compat ())
+ if (register_size (current_gdbarch, regnum) == 4 || mips2_fp_compat ())
{
/* 4-byte registers: Print hex and floating. Also print even
numbered registers as doubles. */
@@ -4217,7 +4121,7 @@ mips_print_register (struct ui_file *file, struct frame_info *frame,
fprintf_filtered (file, ": ");
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- offset = DEPRECATED_REGISTER_RAW_SIZE (regnum) - DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum);
+ offset = register_size (current_gdbarch, regnum) - register_size (current_gdbarch, regnum);
else
offset = 0;
@@ -4248,7 +4152,7 @@ print_gp_register_row (struct ui_file *file, struct frame_info *frame,
struct gdbarch *gdbarch = get_frame_arch (frame);
/* do values for GP (int) regs */
char raw_buffer[MAX_REGISTER_SIZE];
- int ncols = (MIPS_REGSIZE == 8 ? 4 : 8); /* display cols per row */
+ int ncols = (mips_regsize (gdbarch) == 8 ? 4 : 8); /* display cols per row */
int col, byte;
int regnum;
@@ -4262,7 +4166,7 @@ print_gp_register_row (struct ui_file *file, struct frame_info *frame,
continue; /* unused register */
if (TYPE_CODE (gdbarch_register_type (gdbarch, regnum)) == TYPE_CODE_FLT)
break; /* end the row: reached FP register */
- fprintf_filtered (file, MIPS_REGSIZE == 8 ? "%17s" : "%9s",
+ fprintf_filtered (file, mips_regsize (current_gdbarch) == 8 ? "%17s" : "%9s",
REGISTER_NAME (regnum));
col++;
}
@@ -4285,16 +4189,19 @@ print_gp_register_row (struct ui_file *file, struct frame_info *frame,
if (!frame_register_read (frame, regnum, raw_buffer))
error ("can't read register %d (%s)", regnum, REGISTER_NAME (regnum));
/* pad small registers */
- for (byte = 0; byte < (MIPS_REGSIZE - DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum)); byte++)
+ for (byte = 0;
+ byte < (mips_regsize (current_gdbarch)
+ - register_size (current_gdbarch, regnum));
+ byte++)
printf_filtered (" ");
/* Now print the register value in hex, endian order. */
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- for (byte = DEPRECATED_REGISTER_RAW_SIZE (regnum) - DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum);
- byte < DEPRECATED_REGISTER_RAW_SIZE (regnum);
+ for (byte = register_size (current_gdbarch, regnum) - register_size (current_gdbarch, regnum);
+ byte < register_size (current_gdbarch, regnum);
byte++)
fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[byte]);
else
- for (byte = DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum) - 1;
+ for (byte = register_size (current_gdbarch, regnum) - 1;
byte >= 0;
byte--)
fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[byte]);
@@ -4375,6 +4282,61 @@ mips_step_skips_delay (CORE_ADDR pc)
}
+/* Given PC at the function's start address, attempt to find the
+ prologue end using SAL information. Return zero if the skip fails.
+
+ A non-optimized prologue traditionally has one SAL for the function
+ and a second for the function body. A single line function has
+ them both pointing at the same line.
+
+ An optimized prologue is similar but the prologue may contain
+ instructions (SALs) from the instruction body. Need to skip those
+ while not getting into the function body.
+
+ The functions end point and an increasing SAL line are used as
+ indicators of the prologue's endpoint.
+
+ This code is based on the function refine_prologue_limit (versions
+ found in both ia64 and ppc). */
+
+static CORE_ADDR
+skip_prologue_using_sal (CORE_ADDR func_addr)
+{
+ struct symtab_and_line prologue_sal;
+ CORE_ADDR start_pc;
+ CORE_ADDR end_pc;
+
+ /* Get an initial range for the function. */
+ find_pc_partial_function (func_addr, NULL, &start_pc, &end_pc);
+ start_pc += FUNCTION_START_OFFSET;
+
+ prologue_sal = find_pc_line (start_pc, 0);
+ if (prologue_sal.line != 0)
+ {
+ while (prologue_sal.end < end_pc)
+ {
+ struct symtab_and_line sal;
+
+ sal = find_pc_line (prologue_sal.end, 0);
+ if (sal.line == 0)
+ break;
+ /* Assume that a consecutive SAL for the same (or larger)
+ line mark the prologue -> body transition. */
+ if (sal.line >= prologue_sal.line)
+ break;
+ /* The case in which compiler's optimizer/scheduler has
+ moved instructions into the prologue. We look ahead in
+ the function looking for address ranges whose
+ corresponding line number is less the first one that we
+ found for the function. This is more conservative then
+ refine_prologue_limit which scans a large number of SALs
+ looking for any in the prologue */
+ prologue_sal = sal;
+ }
+ }
+ return prologue_sal.end;
+}
+
/* Skip the PC past function prologue instructions (32-bit version).
This is a helper function for mips_skip_prologue. */
@@ -4386,10 +4348,15 @@ mips32_skip_prologue (CORE_ADDR pc)
int seen_sp_adjust = 0;
int load_immediate_bytes = 0;
+ /* Find an upper bound on the prologue. */
+ end_pc = skip_prologue_using_sal (pc);
+ if (end_pc == 0)
+ end_pc = pc + 100; /* Magic. */
+
/* Skip the typical prologue instructions. These are the stack adjustment
instruction and the instructions that save registers on the stack
or in the gcc frame. */
- for (end_pc = pc + 100; pc < end_pc; pc += MIPS_INSTLEN)
+ for (; pc < end_pc; pc += MIPS_INSTLEN)
{
unsigned long high_word;
@@ -4531,10 +4498,15 @@ mips16_skip_prologue (CORE_ADDR pc)
} /* end of table marker */
};
+ /* Find an upper bound on the prologue. */
+ end_pc = skip_prologue_using_sal (pc);
+ if (end_pc == 0)
+ end_pc = pc + 100; /* Magic. */
+
/* Skip the typical prologue instructions. These are the stack adjustment
instruction and the instructions that save registers on the stack
or in the gcc frame. */
- for (end_pc = pc + 100; pc < end_pc; pc += MIPS16_INSTLEN)
+ for (; pc < end_pc; pc += MIPS16_INSTLEN)
{
unsigned short inst;
int i;
@@ -4629,11 +4601,11 @@ return_value_location (struct type *valtype,
lo->buf_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 4 : 0;
hi->buf_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 0 : 4;
lo->reg_offset = ((TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
- && DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM) == 8)
+ && register_size (current_gdbarch, mips_regnum (current_gdbarch)->fp0) == 8)
? 4 : 0);
hi->reg_offset = lo->reg_offset;
- lo->reg = FP0_REGNUM + 0;
- hi->reg = FP0_REGNUM + 1;
+ lo->reg = mips_regnum (current_gdbarch)->fp0 + 0;
+ hi->reg = mips_regnum (current_gdbarch)->fp0 + 1;
lo->len = 4;
hi->len = 4;
}
@@ -4642,10 +4614,10 @@ return_value_location (struct type *valtype,
/* The floating point value fits in a single floating-point
register. */
lo->reg_offset = ((TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
- && DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM) == 8
+ && register_size (current_gdbarch, mips_regnum (current_gdbarch)->fp0) == 8
&& len == 4)
? 4 : 0);
- lo->reg = FP0_REGNUM;
+ lo->reg = mips_regnum (current_gdbarch)->fp0;
lo->len = len;
lo->buf_offset = 0;
hi->len = 0;
@@ -4698,7 +4670,7 @@ return_value_location (struct type *valtype,
}
}
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
- && DEPRECATED_REGISTER_RAW_SIZE (regnum) == 8
+ && register_size (current_gdbarch, regnum) == 8
&& MIPS_SAVED_REGSIZE == 4)
{
/* Account for the fact that only the least-signficant part
@@ -4724,12 +4696,12 @@ mips_eabi_extract_return_value (struct type *valtype,
return_value_location (valtype, &hi, &lo);
memcpy (valbuf + lo.buf_offset,
- regbuf + DEPRECATED_REGISTER_BYTE (lo.reg) + lo.reg_offset,
+ regbuf + DEPRECATED_REGISTER_BYTE (NUM_REGS + lo.reg) + lo.reg_offset,
lo.len);
if (hi.len > 0)
memcpy (valbuf + hi.buf_offset,
- regbuf + DEPRECATED_REGISTER_BYTE (hi.reg) + hi.reg_offset,
+ regbuf + DEPRECATED_REGISTER_BYTE (NUM_REGS + hi.reg) + hi.reg_offset,
hi.len);
}
@@ -4743,12 +4715,12 @@ mips_o64_extract_return_value (struct type *valtype,
return_value_location (valtype, &hi, &lo);
memcpy (valbuf + lo.buf_offset,
- regbuf + DEPRECATED_REGISTER_BYTE (lo.reg) + lo.reg_offset,
+ regbuf + DEPRECATED_REGISTER_BYTE (NUM_REGS + lo.reg) + lo.reg_offset,
lo.len);
if (hi.len > 0)
memcpy (valbuf + hi.buf_offset,
- regbuf + DEPRECATED_REGISTER_BYTE (hi.reg) + hi.reg_offset,
+ regbuf + DEPRECATED_REGISTER_BYTE (NUM_REGS + hi.reg) + hi.reg_offset,
hi.len);
}
@@ -4766,14 +4738,14 @@ mips_eabi_store_return_value (struct type *valtype, char *valbuf)
memset (raw_buffer, 0, sizeof (raw_buffer));
memcpy (raw_buffer + lo.reg_offset, valbuf + lo.buf_offset, lo.len);
deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (lo.reg), raw_buffer,
- DEPRECATED_REGISTER_RAW_SIZE (lo.reg));
+ register_size (current_gdbarch, lo.reg));
if (hi.len > 0)
{
memset (raw_buffer, 0, sizeof (raw_buffer));
memcpy (raw_buffer + hi.reg_offset, valbuf + hi.buf_offset, hi.len);
deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (hi.reg), raw_buffer,
- DEPRECATED_REGISTER_RAW_SIZE (hi.reg));
+ register_size (current_gdbarch, hi.reg));
}
}
@@ -4788,35 +4760,43 @@ mips_o64_store_return_value (struct type *valtype, char *valbuf)
memset (raw_buffer, 0, sizeof (raw_buffer));
memcpy (raw_buffer + lo.reg_offset, valbuf + lo.buf_offset, lo.len);
deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (lo.reg), raw_buffer,
- DEPRECATED_REGISTER_RAW_SIZE (lo.reg));
+ register_size (current_gdbarch, lo.reg));
if (hi.len > 0)
{
memset (raw_buffer, 0, sizeof (raw_buffer));
memcpy (raw_buffer + hi.reg_offset, valbuf + hi.buf_offset, hi.len);
deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (hi.reg), raw_buffer,
- DEPRECATED_REGISTER_RAW_SIZE (hi.reg));
+ register_size (current_gdbarch, hi.reg));
}
}
/* O32 ABI stuff. */
-static void
-mips_o32_xfer_return_value (struct type *type,
- struct regcache *regcache,
- bfd_byte *in, const bfd_byte *out)
+static enum return_value_convention
+mips_o32_return_value (struct gdbarch *gdbarch, struct type *type,
+ struct regcache *regcache,
+ void *readbuf, const void *writebuf)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- if (TYPE_CODE (type) == TYPE_CODE_FLT
- && TYPE_LENGTH (type) == 4
- && tdep->mips_fpu_type != MIPS_FPU_NONE)
+
+ if (TYPE_CODE (type)== TYPE_CODE_STRUCT
+ || TYPE_CODE (type)== TYPE_CODE_UNION
+ || TYPE_CODE (type)== TYPE_CODE_ARRAY)
+ return RETURN_VALUE_STRUCT_CONVENTION;
+ else if (TYPE_CODE (type) == TYPE_CODE_FLT
+ && TYPE_LENGTH (type) == 4
+ && tdep->mips_fpu_type != MIPS_FPU_NONE)
{
/* A single-precision floating-point value. It fits in the
least significant part of FP0. */
if (mips_debug)
fprintf_unfiltered (gdb_stderr, "Return float in $fp0\n");
- mips_xfer_register (regcache, NUM_REGS + FP0_REGNUM, TYPE_LENGTH (type),
- TARGET_BYTE_ORDER, in, out, 0);
+ mips_xfer_register (regcache,
+ NUM_REGS + mips_regnum (current_gdbarch)->fp0,
+ TYPE_LENGTH (type),
+ TARGET_BYTE_ORDER, readbuf, writebuf, 0);
+ return RETURN_VALUE_REGISTER_CONVENTION;
}
else if (TYPE_CODE (type) == TYPE_CODE_FLT
&& TYPE_LENGTH (type) == 8
@@ -4830,20 +4810,25 @@ mips_o32_xfer_return_value (struct type *type,
switch (TARGET_BYTE_ORDER)
{
case BFD_ENDIAN_LITTLE:
- mips_xfer_register (regcache, NUM_REGS + FP0_REGNUM + 0, 4,
- TARGET_BYTE_ORDER, in, out, 0);
- mips_xfer_register (regcache, NUM_REGS + FP0_REGNUM + 1, 4,
- TARGET_BYTE_ORDER, in, out, 4);
+ mips_xfer_register (regcache,
+ NUM_REGS + mips_regnum (current_gdbarch)->fp0 + 0,
+ 4, TARGET_BYTE_ORDER, readbuf, writebuf, 0);
+ mips_xfer_register (regcache,
+ NUM_REGS + mips_regnum (current_gdbarch)->fp0 + 1,
+ 4, TARGET_BYTE_ORDER, readbuf, writebuf, 4);
break;
case BFD_ENDIAN_BIG:
- mips_xfer_register (regcache, NUM_REGS + FP0_REGNUM + 1, 4,
- TARGET_BYTE_ORDER, in, out, 0);
- mips_xfer_register (regcache, NUM_REGS + FP0_REGNUM + 0, 4,
- TARGET_BYTE_ORDER, in, out, 4);
+ mips_xfer_register (regcache,
+ NUM_REGS + mips_regnum (current_gdbarch)->fp0 + 1,
+ 4, TARGET_BYTE_ORDER, readbuf, writebuf, 0);
+ mips_xfer_register (regcache,
+ NUM_REGS + mips_regnum (current_gdbarch)->fp0 + 0,
+ 4, TARGET_BYTE_ORDER, readbuf, writebuf, 4);
break;
default:
internal_error (__FILE__, __LINE__, "bad switch");
}
+ return RETURN_VALUE_REGISTER_CONVENTION;
}
#if 0
else if (TYPE_CODE (type) == TYPE_CODE_STRUCT
@@ -4865,7 +4850,7 @@ mips_o32_xfer_return_value (struct type *type,
bfd_byte reg[MAX_REGISTER_SIZE];
int regnum;
int field;
- for (field = 0, regnum = FP0_REGNUM;
+ for (field = 0, regnum = mips_regnum (current_gdbarch)->fp0;
field < TYPE_NFIELDS (type);
field++, regnum += 2)
{
@@ -4875,8 +4860,9 @@ mips_o32_xfer_return_value (struct type *type,
fprintf_unfiltered (gdb_stderr, "Return float struct+%d\n", offset);
mips_xfer_register (regcache, NUM_REGS + regnum,
TYPE_LENGTH (TYPE_FIELD_TYPE (type, field)),
- TARGET_BYTE_ORDER, in, out, offset);
+ TARGET_BYTE_ORDER, readbuf, writebuf, offset);
}
+ return RETURN_VALUE_REGISTER_CONVENTION;
}
#endif
#if 0
@@ -4890,17 +4876,18 @@ mips_o32_xfer_return_value (struct type *type,
int regnum;
for (offset = 0, regnum = V0_REGNUM;
offset < TYPE_LENGTH (type);
- offset += DEPRECATED_REGISTER_RAW_SIZE (regnum), regnum++)
+ offset += register_size (current_gdbarch, regnum), regnum++)
{
- int xfer = DEPRECATED_REGISTER_RAW_SIZE (regnum);
+ int xfer = register_size (current_gdbarch, regnum);
if (offset + xfer > TYPE_LENGTH (type))
xfer = TYPE_LENGTH (type) - offset;
if (mips_debug)
fprintf_unfiltered (gdb_stderr, "Return struct+%d:%d in $%d\n",
offset, xfer, regnum);
mips_xfer_register (regcache, NUM_REGS + regnum, xfer,
- BFD_ENDIAN_UNKNOWN, in, out, offset);
+ BFD_ENDIAN_UNKNOWN, readbuf, writebuf, offset);
}
+ return RETURN_VALUE_REGISTER_CONVENTION;
}
#endif
else
@@ -4922,42 +4909,37 @@ mips_o32_xfer_return_value (struct type *type,
fprintf_unfiltered (gdb_stderr, "Return scalar+%d:%d in $%d\n",
offset, xfer, regnum);
mips_xfer_register (regcache, NUM_REGS + regnum, xfer,
- TARGET_BYTE_ORDER, in, out, offset);
+ TARGET_BYTE_ORDER, readbuf, writebuf, offset);
}
+ return RETURN_VALUE_REGISTER_CONVENTION;
}
}
-static void
-mips_o32_extract_return_value (struct type *type,
- struct regcache *regcache,
- void *valbuf)
-{
- mips_o32_xfer_return_value (type, regcache, valbuf, NULL);
-}
-
-static void
-mips_o32_store_return_value (struct type *type, char *valbuf)
-{
- mips_o32_xfer_return_value (type, current_regcache, NULL, valbuf);
-}
-
/* N32/N44 ABI stuff. */
-static void
-mips_n32n64_xfer_return_value (struct type *type,
- struct regcache *regcache,
- bfd_byte *in, const bfd_byte *out)
+static enum return_value_convention
+mips_n32n64_return_value (struct gdbarch *gdbarch,
+ struct type *type, struct regcache *regcache,
+ void *readbuf, const void *writebuf)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- if (TYPE_CODE (type) == TYPE_CODE_FLT
- && tdep->mips_fpu_type != MIPS_FPU_NONE)
+ if (TYPE_CODE (type)== TYPE_CODE_STRUCT
+ || TYPE_CODE (type)== TYPE_CODE_UNION
+ || TYPE_CODE (type)== TYPE_CODE_ARRAY
+ || TYPE_LENGTH (type) > 2 * MIPS_SAVED_REGSIZE)
+ return RETURN_VALUE_STRUCT_CONVENTION;
+ else if (TYPE_CODE (type) == TYPE_CODE_FLT
+ && tdep->mips_fpu_type != MIPS_FPU_NONE)
{
/* A floating-point value belongs in the least significant part
of FP0. */
if (mips_debug)
fprintf_unfiltered (gdb_stderr, "Return float in $fp0\n");
- mips_xfer_register (regcache, NUM_REGS + FP0_REGNUM, TYPE_LENGTH (type),
- TARGET_BYTE_ORDER, in, out, 0);
+ mips_xfer_register (regcache,
+ NUM_REGS + mips_regnum (current_gdbarch)->fp0,
+ TYPE_LENGTH (type),
+ TARGET_BYTE_ORDER, readbuf, writebuf, 0);
+ return RETURN_VALUE_REGISTER_CONVENTION;
}
else if (TYPE_CODE (type) == TYPE_CODE_STRUCT
&& TYPE_NFIELDS (type) <= 2
@@ -4978,7 +4960,7 @@ mips_n32n64_xfer_return_value (struct type *type,
bfd_byte reg[MAX_REGISTER_SIZE];
int regnum;
int field;
- for (field = 0, regnum = FP0_REGNUM;
+ for (field = 0, regnum = mips_regnum (current_gdbarch)->fp0;
field < TYPE_NFIELDS (type);
field++, regnum += 2)
{
@@ -4988,8 +4970,9 @@ mips_n32n64_xfer_return_value (struct type *type,
fprintf_unfiltered (gdb_stderr, "Return float struct+%d\n", offset);
mips_xfer_register (regcache, NUM_REGS + regnum,
TYPE_LENGTH (TYPE_FIELD_TYPE (type, field)),
- TARGET_BYTE_ORDER, in, out, offset);
+ TARGET_BYTE_ORDER, readbuf, writebuf, offset);
}
+ return RETURN_VALUE_REGISTER_CONVENTION;
}
else if (TYPE_CODE (type) == TYPE_CODE_STRUCT
|| TYPE_CODE (type) == TYPE_CODE_UNION)
@@ -5001,17 +4984,18 @@ mips_n32n64_xfer_return_value (struct type *type,
int regnum;
for (offset = 0, regnum = V0_REGNUM;
offset < TYPE_LENGTH (type);
- offset += DEPRECATED_REGISTER_RAW_SIZE (regnum), regnum++)
+ offset += register_size (current_gdbarch, regnum), regnum++)
{
- int xfer = DEPRECATED_REGISTER_RAW_SIZE (regnum);
+ int xfer = register_size (current_gdbarch, regnum);
if (offset + xfer > TYPE_LENGTH (type))
xfer = TYPE_LENGTH (type) - offset;
if (mips_debug)
fprintf_unfiltered (gdb_stderr, "Return struct+%d:%d in $%d\n",
offset, xfer, regnum);
mips_xfer_register (regcache, NUM_REGS + regnum, xfer,
- BFD_ENDIAN_UNKNOWN, in, out, offset);
+ BFD_ENDIAN_UNKNOWN, readbuf, writebuf, offset);
}
+ return RETURN_VALUE_REGISTER_CONVENTION;
}
else
{
@@ -5021,9 +5005,9 @@ mips_n32n64_xfer_return_value (struct type *type,
int regnum;
for (offset = 0, regnum = V0_REGNUM;
offset < TYPE_LENGTH (type);
- offset += DEPRECATED_REGISTER_RAW_SIZE (regnum), regnum++)
+ offset += register_size (current_gdbarch, regnum), regnum++)
{
- int xfer = DEPRECATED_REGISTER_RAW_SIZE (regnum);
+ int xfer = register_size (current_gdbarch, regnum);
int pos = 0;
if (offset + xfer > TYPE_LENGTH (type))
xfer = TYPE_LENGTH (type) - offset;
@@ -5031,25 +5015,12 @@ mips_n32n64_xfer_return_value (struct type *type,
fprintf_unfiltered (gdb_stderr, "Return scalar+%d:%d in $%d\n",
offset, xfer, regnum);
mips_xfer_register (regcache, NUM_REGS + regnum, xfer,
- TARGET_BYTE_ORDER, in, out, offset);
+ TARGET_BYTE_ORDER, readbuf, writebuf, offset);
}
+ return RETURN_VALUE_REGISTER_CONVENTION;
}
}
-static void
-mips_n32n64_extract_return_value (struct type *type,
- struct regcache *regcache,
- void *valbuf)
-{
- mips_n32n64_xfer_return_value (type, regcache, valbuf, NULL);
-}
-
-static void
-mips_n32n64_store_return_value (struct type *type, char *valbuf)
-{
- mips_n32n64_xfer_return_value (type, current_regcache, NULL, valbuf);
-}
-
static CORE_ADDR
mips_extract_struct_value_address (struct regcache *regcache)
{
@@ -5154,76 +5125,22 @@ set_mipsfpu_auto_command (char *args, int from_tty)
mips_fpu_type_auto = 1;
}
-/* Command to set the processor type. */
-
-void
-mips_set_processor_type_command (char *args, int from_tty)
-{
- int i;
-
- if (tmp_mips_processor_type == NULL || *tmp_mips_processor_type == '\0')
- {
- printf_unfiltered ("The known MIPS processor types are as follows:\n\n");
- for (i = 0; mips_processor_type_table[i].name != NULL; ++i)
- printf_unfiltered ("%s\n", mips_processor_type_table[i].name);
-
- /* Restore the value. */
- tmp_mips_processor_type = xstrdup (mips_processor_type);
-
- return;
- }
-
- if (!mips_set_processor_type (tmp_mips_processor_type))
- {
- error ("Unknown processor type `%s'.", tmp_mips_processor_type);
- /* Restore its value. */
- tmp_mips_processor_type = xstrdup (mips_processor_type);
- }
-}
-
-static void
-mips_show_processor_type_command (char *args, int from_tty)
-{
-}
-
-/* Modify the actual processor type. */
-
-static int
-mips_set_processor_type (char *str)
-{
- int i;
-
- if (str == NULL)
- return 0;
-
- for (i = 0; mips_processor_type_table[i].name != NULL; ++i)
- {
- if (strcasecmp (str, mips_processor_type_table[i].name) == 0)
- {
- mips_processor_type = str;
- mips_processor_reg_names = mips_processor_type_table[i].regnames;
- return 1;
- /* FIXME tweak fpu flag too */
- }
- }
-
- return 0;
-}
-
/* Attempt to identify the particular processor model by reading the
- processor id. */
+ processor id. NOTE: cagney/2003-11-15: Firstly it isn't clear that
+ the relevant processor still exists (it dates back to '94) and
+ secondly this is not the way to do this. The processor type should
+ be set by forcing an architecture change. */
-char *
-mips_read_processor_type (void)
+void
+deprecated_mips_set_processor_regs_hack (void)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
CORE_ADDR prid;
prid = read_register (PRID_REGNUM);
if ((prid & ~0xf) == 0x700)
- return savestring ("r3041", strlen ("r3041"));
-
- return NULL;
+ tdep->mips_processor_reg_names = mips_r3041_reg_names;
}
/* Just like reinit_frame_cache, but with the right arguments to be
@@ -5612,11 +5529,11 @@ mips_stab_reg_to_regnum (int num)
if (num >= 0 && num < 32)
regnum = num;
else if (num >= 38 && num < 70)
- regnum = num + FP0_REGNUM - 38;
+ regnum = num + mips_regnum (current_gdbarch)->fp0 - 38;
else if (num == 70)
- regnum = HI_REGNUM;
+ regnum = mips_regnum (current_gdbarch)->hi;
else if (num == 71)
- regnum = LO_REGNUM;
+ regnum = mips_regnum (current_gdbarch)->lo;
else
/* This will hopefully (eventually) provoke a warning. Should
we be calling complaint() here? */
@@ -5635,11 +5552,11 @@ mips_dwarf_dwarf2_ecoff_reg_to_regnum (int num)
if (num >= 0 && num < 32)
regnum = num;
else if (num >= 32 && num < 64)
- regnum = num + FP0_REGNUM - 32;
+ regnum = num + mips_regnum (current_gdbarch)->fp0 - 32;
else if (num == 64)
- regnum = HI_REGNUM;
+ regnum = mips_regnum (current_gdbarch)->hi;
else if (num == 65)
- regnum = LO_REGNUM;
+ regnum = mips_regnum (current_gdbarch)->lo;
else
/* This will hopefully (eventually) provoke a warning. Should we
be calling complaint() here? */
@@ -5831,6 +5748,11 @@ mips_gdbarch_init (struct gdbarch_info info,
continue;
if (gdbarch_tdep (arches->gdbarch)->mips_abi != mips_abi)
continue;
+ /* Need to be pedantic about which register virtual size is
+ used. */
+ if (gdbarch_tdep (arches->gdbarch)->mips64_transfers_32bit_regs_p
+ != mips64_transfers_32bit_regs_p)
+ continue;
return arches->gdbarch;
}
@@ -5838,6 +5760,7 @@ mips_gdbarch_init (struct gdbarch_info info,
tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
gdbarch = gdbarch_alloc (&info, tdep);
tdep->elf_flags = elf_flags;
+ tdep->mips64_transfers_32bit_regs_p = mips64_transfers_32bit_regs_p;
/* Initially set everything according to the default ABI/ISA. */
set_gdbarch_short_bit (gdbarch, 16);
@@ -5845,8 +5768,6 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_float_bit (gdbarch, 32);
set_gdbarch_double_bit (gdbarch, 64);
set_gdbarch_long_double_bit (gdbarch, 64);
- set_gdbarch_deprecated_register_raw_size (gdbarch, mips_register_raw_size);
- set_gdbarch_deprecated_register_byte (gdbarch, mips_register_byte);
set_gdbarch_register_reggroup_p (gdbarch, mips_register_reggroup_p);
set_gdbarch_pseudo_register_read (gdbarch, mips_pseudo_register_read);
set_gdbarch_pseudo_register_write (gdbarch, mips_pseudo_register_write);
@@ -5856,34 +5777,59 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_elf_make_msymbol_special (gdbarch,
mips_elf_make_msymbol_special);
-
- if (info.osabi == GDB_OSABI_IRIX)
- num_regs = 71;
- else
- num_regs = 90;
- set_gdbarch_num_regs (gdbarch, num_regs);
- set_gdbarch_num_pseudo_regs (gdbarch, num_regs);
+ /* Fill in the OS dependant register numbers. */
+ {
+ struct mips_regnum *regnum = GDBARCH_OBSTACK_ZALLOC (gdbarch,
+ struct mips_regnum);
+ tdep->regnum = regnum;
+ if (info.osabi == GDB_OSABI_IRIX)
+ {
+ regnum->fp0 = 32;
+ regnum->pc = 64;
+ regnum->cause = 65;
+ regnum->badvaddr = 66;
+ regnum->hi = 67;
+ regnum->lo = 68;
+ regnum->fp_control_status = 69;
+ regnum->fp_implementation_revision = 70;
+ num_regs = 71;
+ }
+ else
+ {
+ regnum->lo = MIPS_EMBED_LO_REGNUM;
+ regnum->hi = MIPS_EMBED_HI_REGNUM;
+ regnum->badvaddr = MIPS_EMBED_BADVADDR_REGNUM;
+ regnum->cause = MIPS_EMBED_CAUSE_REGNUM;
+ regnum->pc = MIPS_EMBED_PC_REGNUM;
+ regnum->fp0 = MIPS_EMBED_FP0_REGNUM;
+ regnum->fp_control_status = 70;
+ regnum->fp_implementation_revision = 71;
+ num_regs = 90;
+ }
+ /* FIXME: cagney/2003-11-15: For MIPS, hasn't PC_REGNUM been
+ replaced by read_pc? */
+ set_gdbarch_pc_regnum (gdbarch, regnum->pc);
+ set_gdbarch_fp0_regnum (gdbarch, regnum->fp0);
+ set_gdbarch_num_regs (gdbarch, num_regs);
+ set_gdbarch_num_pseudo_regs (gdbarch, num_regs);
+ }
switch (mips_abi)
{
case MIPS_ABI_O32:
set_gdbarch_push_dummy_call (gdbarch, mips_o32_push_dummy_call);
- set_gdbarch_deprecated_store_return_value (gdbarch, mips_o32_store_return_value);
- set_gdbarch_extract_return_value (gdbarch, mips_o32_extract_return_value);
+ set_gdbarch_return_value (gdbarch, mips_o32_return_value);
tdep->mips_default_saved_regsize = 4;
tdep->mips_default_stack_argsize = 4;
tdep->mips_fp_register_double = 0;
tdep->mips_last_arg_regnum = A0_REGNUM + 4 - 1;
- tdep->mips_last_fp_arg_regnum = FPA0_REGNUM + 4 - 1;
- tdep->gdb_target_is_mips64 = 0;
+ tdep->mips_last_fp_arg_regnum = tdep->regnum->fp0 + 12 + 4 - 1;
tdep->default_mask_address_p = 0;
set_gdbarch_long_bit (gdbarch, 32);
set_gdbarch_ptr_bit (gdbarch, 32);
set_gdbarch_long_long_bit (gdbarch, 64);
set_gdbarch_deprecated_reg_struct_has_addr
(gdbarch, mips_o32_reg_struct_has_addr);
- set_gdbarch_use_struct_convention (gdbarch,
- always_use_struct_convention);
break;
case MIPS_ABI_O64:
set_gdbarch_push_dummy_call (gdbarch, mips_o64_push_dummy_call);
@@ -5893,8 +5839,7 @@ mips_gdbarch_init (struct gdbarch_info info,
tdep->mips_default_stack_argsize = 8;
tdep->mips_fp_register_double = 1;
tdep->mips_last_arg_regnum = A0_REGNUM + 4 - 1;
- tdep->mips_last_fp_arg_regnum = FPA0_REGNUM + 4 - 1;
- tdep->gdb_target_is_mips64 = 1;
+ tdep->mips_last_fp_arg_regnum = tdep->regnum->fp0 + 12 + 4 - 1;
tdep->default_mask_address_p = 0;
set_gdbarch_long_bit (gdbarch, 32);
set_gdbarch_ptr_bit (gdbarch, 32);
@@ -5911,8 +5856,7 @@ mips_gdbarch_init (struct gdbarch_info info,
tdep->mips_default_stack_argsize = 4;
tdep->mips_fp_register_double = 0;
tdep->mips_last_arg_regnum = A0_REGNUM + 8 - 1;
- tdep->mips_last_fp_arg_regnum = FPA0_REGNUM + 8 - 1;
- tdep->gdb_target_is_mips64 = 0;
+ tdep->mips_last_fp_arg_regnum = tdep->regnum->fp0 + 12 + 8 - 1;
tdep->default_mask_address_p = 0;
set_gdbarch_long_bit (gdbarch, 32);
set_gdbarch_ptr_bit (gdbarch, 32);
@@ -5930,8 +5874,7 @@ mips_gdbarch_init (struct gdbarch_info info,
tdep->mips_default_stack_argsize = 8;
tdep->mips_fp_register_double = 1;
tdep->mips_last_arg_regnum = A0_REGNUM + 8 - 1;
- tdep->mips_last_fp_arg_regnum = FPA0_REGNUM + 8 - 1;
- tdep->gdb_target_is_mips64 = 1;
+ tdep->mips_last_fp_arg_regnum = tdep->regnum->fp0 + 12 + 8 - 1;
tdep->default_mask_address_p = 0;
set_gdbarch_long_bit (gdbarch, 64);
set_gdbarch_ptr_bit (gdbarch, 64);
@@ -5943,39 +5886,31 @@ mips_gdbarch_init (struct gdbarch_info info,
break;
case MIPS_ABI_N32:
set_gdbarch_push_dummy_call (gdbarch, mips_n32n64_push_dummy_call);
- set_gdbarch_deprecated_store_return_value (gdbarch, mips_n32n64_store_return_value);
- set_gdbarch_extract_return_value (gdbarch, mips_n32n64_extract_return_value);
+ set_gdbarch_return_value (gdbarch, mips_n32n64_return_value);
tdep->mips_default_saved_regsize = 8;
tdep->mips_default_stack_argsize = 8;
tdep->mips_fp_register_double = 1;
tdep->mips_last_arg_regnum = A0_REGNUM + 8 - 1;
- tdep->mips_last_fp_arg_regnum = FPA0_REGNUM + 8 - 1;
- tdep->gdb_target_is_mips64 = 1;
+ tdep->mips_last_fp_arg_regnum = tdep->regnum->fp0 + 12 + 8 - 1;
tdep->default_mask_address_p = 0;
set_gdbarch_long_bit (gdbarch, 32);
set_gdbarch_ptr_bit (gdbarch, 32);
set_gdbarch_long_long_bit (gdbarch, 64);
- set_gdbarch_use_struct_convention (gdbarch,
- mips_n32n64_use_struct_convention);
set_gdbarch_deprecated_reg_struct_has_addr
(gdbarch, mips_n32n64_reg_struct_has_addr);
break;
case MIPS_ABI_N64:
set_gdbarch_push_dummy_call (gdbarch, mips_n32n64_push_dummy_call);
- set_gdbarch_deprecated_store_return_value (gdbarch, mips_n32n64_store_return_value);
- set_gdbarch_extract_return_value (gdbarch, mips_n32n64_extract_return_value);
+ set_gdbarch_return_value (gdbarch, mips_n32n64_return_value);
tdep->mips_default_saved_regsize = 8;
tdep->mips_default_stack_argsize = 8;
tdep->mips_fp_register_double = 1;
tdep->mips_last_arg_regnum = A0_REGNUM + 8 - 1;
- tdep->mips_last_fp_arg_regnum = FPA0_REGNUM + 8 - 1;
- tdep->gdb_target_is_mips64 = 1;
+ tdep->mips_last_fp_arg_regnum = tdep->regnum->fp0 + 12 + 8 - 1;
tdep->default_mask_address_p = 0;
set_gdbarch_long_bit (gdbarch, 64);
set_gdbarch_ptr_bit (gdbarch, 64);
set_gdbarch_long_long_bit (gdbarch, 64);
- set_gdbarch_use_struct_convention (gdbarch,
- mips_n32n64_use_struct_convention);
set_gdbarch_deprecated_reg_struct_has_addr
(gdbarch, mips_n32n64_reg_struct_has_addr);
break;
@@ -6027,11 +5962,14 @@ mips_gdbarch_init (struct gdbarch_info info,
else
tdep->mips_fpu_type = MIPS_FPU_DOUBLE;
- /* MIPS version of register names. NOTE: At present the MIPS
- register name management is part way between the old -
- #undef/#define MIPS_REGISTER_NAMES and the new REGISTER_NAME(nr).
- Further work on it is required. */
+ /* MIPS version of register names. */
set_gdbarch_register_name (gdbarch, mips_register_name);
+ if (info.osabi == GDB_OSABI_IRIX)
+ tdep->mips_processor_reg_names = mips_irix_reg_names;
+ else if (info.bfd_arch_info != NULL && info.bfd_arch_info->mach == bfd_mach_mips3900)
+ tdep->mips_processor_reg_names = mips_tx39_reg_names;
+ else
+ tdep->mips_processor_reg_names = mips_generic_reg_names;
set_gdbarch_read_pc (gdbarch, mips_read_pc);
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
set_gdbarch_deprecated_target_read_fp (gdbarch, mips_read_sp); /* Draft FRAME base. */
@@ -6065,9 +6003,6 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_deprecated_pop_frame (gdbarch, mips_pop_frame);
set_gdbarch_frame_align (gdbarch, mips_frame_align);
set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
- set_gdbarch_deprecated_register_convertible (gdbarch, mips_register_convertible);
- set_gdbarch_deprecated_register_convert_to_virtual (gdbarch, mips_register_convert_to_virtual);
- set_gdbarch_deprecated_register_convert_to_raw (gdbarch, mips_register_convert_to_raw);
set_gdbarch_deprecated_frame_chain (gdbarch, mips_frame_chain);
set_gdbarch_frameless_function_invocation (gdbarch,
@@ -6224,10 +6159,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
"mips_dump_tdep: MIPS_EABI = %d\n",
MIPS_EABI);
fprintf_unfiltered (file,
- "mips_dump_tdep: MIPS_LAST_FP_ARG_REGNUM = %d (%d regs)\n",
- MIPS_LAST_FP_ARG_REGNUM,
- MIPS_LAST_FP_ARG_REGNUM - FPA0_REGNUM + 1);
- fprintf_unfiltered (file,
"mips_dump_tdep: MIPS_FPU_TYPE = %d (%s)\n",
MIPS_FPU_TYPE,
(MIPS_FPU_TYPE == MIPS_FPU_NONE ? "none"
@@ -6247,9 +6178,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
"mips_dump_tdep: MIPS_STACK_ARGSIZE = %d\n",
MIPS_STACK_ARGSIZE);
fprintf_unfiltered (file,
- "mips_dump_tdep: MIPS_REGSIZE = %d\n",
- MIPS_REGSIZE);
- fprintf_unfiltered (file,
"mips_dump_tdep: A0_REGNUM = %d\n",
A0_REGNUM);
fprintf_unfiltered (file,
@@ -6259,36 +6187,15 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
"mips_dump_tdep: ATTACH_DETACH # %s\n",
XSTRING (ATTACH_DETACH));
fprintf_unfiltered (file,
- "mips_dump_tdep: BADVADDR_REGNUM = %d\n",
- BADVADDR_REGNUM);
- fprintf_unfiltered (file,
- "mips_dump_tdep: CAUSE_REGNUM = %d\n",
- CAUSE_REGNUM);
- fprintf_unfiltered (file,
"mips_dump_tdep: DWARF_REG_TO_REGNUM # %s\n",
XSTRING (DWARF_REG_TO_REGNUM (REGNUM)));
fprintf_unfiltered (file,
"mips_dump_tdep: ECOFF_REG_TO_REGNUM # %s\n",
XSTRING (ECOFF_REG_TO_REGNUM (REGNUM)));
fprintf_unfiltered (file,
- "mips_dump_tdep: FCRCS_REGNUM = %d\n",
- FCRCS_REGNUM);
- fprintf_unfiltered (file,
- "mips_dump_tdep: FCRIR_REGNUM = %d\n",
- FCRIR_REGNUM);
- fprintf_unfiltered (file,
"mips_dump_tdep: FIRST_EMBED_REGNUM = %d\n",
FIRST_EMBED_REGNUM);
fprintf_unfiltered (file,
- "mips_dump_tdep: FPA0_REGNUM = %d\n",
- FPA0_REGNUM);
- fprintf_unfiltered (file,
- "mips_dump_tdep: GDB_TARGET_IS_MIPS64 = %d\n",
- GDB_TARGET_IS_MIPS64);
- fprintf_unfiltered (file,
- "mips_dump_tdep: HI_REGNUM = %d\n",
- HI_REGNUM);
- fprintf_unfiltered (file,
"mips_dump_tdep: IGNORE_HELPER_CALL # %s\n",
XSTRING (IGNORE_HELPER_CALL (PC)));
fprintf_unfiltered (file,
@@ -6300,9 +6207,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"mips_dump_tdep: LAST_EMBED_REGNUM = %d\n",
LAST_EMBED_REGNUM);
- fprintf_unfiltered (file,
- "mips_dump_tdep: LO_REGNUM = %d\n",
- LO_REGNUM);
#ifdef MACHINE_CPROC_FP_OFFSET
fprintf_unfiltered (file,
"mips_dump_tdep: MACHINE_CPROC_FP_OFFSET = %d\n",
@@ -6336,15 +6240,9 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
"mips_dump_tdep: MIPS_NUMREGS = %d\n",
MIPS_NUMREGS);
fprintf_unfiltered (file,
- "mips_dump_tdep: MIPS_REGISTER_NAMES = delete?\n");
- fprintf_unfiltered (file,
"mips_dump_tdep: MIPS_SAVED_REGSIZE = %d\n",
MIPS_SAVED_REGSIZE);
fprintf_unfiltered (file,
- "mips_dump_tdep: OP_LDFPR = used?\n");
- fprintf_unfiltered (file,
- "mips_dump_tdep: OP_LDGPR = used?\n");
- fprintf_unfiltered (file,
"mips_dump_tdep: PRID_REGNUM = %d\n",
PRID_REGNUM);
fprintf_unfiltered (file,
@@ -6410,9 +6308,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
"mips_dump_tdep: SIGFRAME_REGSAVE_OFF = %d\n",
SIGFRAME_REGSAVE_OFF);
fprintf_unfiltered (file,
- "mips_dump_tdep: SIGFRAME_REG_SIZE = %d\n",
- SIGFRAME_REG_SIZE);
- fprintf_unfiltered (file,
"mips_dump_tdep: SKIP_TRAMPOLINE_CODE # %s\n",
XSTRING (SKIP_TRAMPOLINE_CODE (PC)));
fprintf_unfiltered (file,
@@ -6614,16 +6509,18 @@ Show zeroing of upper 32 bits of 64-bit addresses.",
/* Allow the user to control the size of 32 bit registers within the
raw remote packet. */
- add_show_from_set (add_set_cmd ("remote-mips64-transfers-32bit-regs",
- class_obscure,
- var_boolean,
- (char *)&mips64_transfers_32bit_regs_p, "\
-Set compatibility with MIPS targets that transfers 32 and 64 bit quantities.\n\
+ add_setshow_cmd ("remote-mips64-transfers-32bit-regs", class_obscure,
+ var_boolean, &mips64_transfers_32bit_regs_p, "\
+Set compatibility with 64-bit MIPS targets that transfer 32-bit quantities.\n\
+Use \"on\" to enable backward compatibility with older MIPS 64 GDB+target\n\
+that would transfer 32 bits for some registers (e.g. SR, FSR) and\n\
+64 bits for others. Use \"off\" to disable compatibility mode", "\
+Show compatibility with 64-bit MIPS targets that transfer 32-bit quantities.\n\
Use \"on\" to enable backward compatibility with older MIPS 64 GDB+target\n\
that would transfer 32 bits for some registers (e.g. SR, FSR) and\n\
64 bits for others. Use \"off\" to disable compatibility mode",
- &setlist),
- &showlist);
+ set_mips64_transfers_32bit_regs, NULL,
+ &setlist, &showlist);
/* Debug this files internals. */
add_show_from_set (add_set_cmd ("mips", class_maintenance, var_zinteger,
diff --git a/gdb/mips-tdep.h b/gdb/mips-tdep.h
index 5d3aa85692d..7a00ffaf5e9 100644
--- a/gdb/mips-tdep.h
+++ b/gdb/mips-tdep.h
@@ -1,6 +1,6 @@
/* Target-dependent header for the MIPS architecture, for GDB, the GNU Debugger.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -43,4 +43,35 @@ enum mips_abi mips_abi (struct gdbarch *gdbarch);
/* For wince :-(. */
extern CORE_ADDR mips_next_pc (CORE_ADDR pc);
+/* Return the "MIPS" register size. Just a short cut to the BFD
+ architecture's word size. */
+extern int mips_regsize (struct gdbarch *gdbarch);
+
+/* Return the current index for various MIPS registers. */
+struct mips_regnum
+{
+ int pc;
+ int fp0;
+ int fp_implementation_revision;
+ int fp_control_status;
+ int badvaddr; /* Bad vaddr for addressing exception. */
+ int cause; /* Describes last exception. */
+ int hi; /* Multiply/divide temp. */
+ int lo; /* ... */
+};
+extern const struct mips_regnum *mips_regnum (struct gdbarch *gdbarch);
+
+enum {
+ MIPS_EMBED_LO_REGNUM = 33,
+ MIPS_EMBED_HI_REGNUM = 34,
+ MIPS_EMBED_BADVADDR_REGNUM = 35,
+ MIPS_EMBED_CAUSE_REGNUM = 36,
+ MIPS_EMBED_PC_REGNUM = 37,
+ MIPS_EMBED_FP0_REGNUM = 38
+};
+
+/* Defined in mips-tdep.c and used in remote-mips.c */
+extern void deprecated_mips_set_processor_regs_hack (void);
+
+
#endif /* MIPS_TDEP_H */
diff --git a/gdb/mipsnbsd-tdep.c b/gdb/mipsnbsd-tdep.c
index 62ec8f3bb64..01d8262eff2 100644
--- a/gdb/mipsnbsd-tdep.c
+++ b/gdb/mipsnbsd-tdep.c
@@ -46,7 +46,7 @@ mipsnbsd_supply_reg (char *regs, int regno)
if (CANNOT_FETCH_REGISTER (i))
supply_register (i, NULL);
else
- supply_register (i, regs + (i * MIPS_REGSIZE));
+ supply_register (i, regs + (i * mips_regsize (current_gdbarch)));
}
}
}
@@ -58,7 +58,7 @@ mipsnbsd_fill_reg (char *regs, int regno)
for (i = 0; i <= PC_REGNUM; i++)
if ((regno == i || regno == -1) && ! CANNOT_STORE_REGISTER (i))
- regcache_collect (i, regs + (i * MIPS_REGSIZE));
+ regcache_collect (i, regs + (i * mips_regsize (current_gdbarch)));
}
void
@@ -66,14 +66,16 @@ mipsnbsd_supply_fpreg (char *fpregs, int regno)
{
int i;
- for (i = FP0_REGNUM; i <= FCRIR_REGNUM; i++)
+ for (i = FP0_REGNUM;
+ i <= mips_regnum (current_gdbarch)->fp_implementation_revision;
+ i++)
{
if (regno == i || regno == -1)
{
if (CANNOT_FETCH_REGISTER (i))
supply_register (i, NULL);
else
- supply_register (i, fpregs + ((i - FP0_REGNUM) * MIPS_REGSIZE));
+ supply_register (i, fpregs + ((i - FP0_REGNUM) * mips_regsize (current_gdbarch)));
}
}
}
@@ -83,9 +85,10 @@ mipsnbsd_fill_fpreg (char *fpregs, int regno)
{
int i;
- for (i = FP0_REGNUM; i <= FCRCS_REGNUM; i++)
+ for (i = FP0_REGNUM; i <= mips_regnum (current_gdbarch)->fp_control_status;
+ i++)
if ((regno == i || regno == -1) && ! CANNOT_STORE_REGISTER (i))
- regcache_collect (i, fpregs + ((i - FP0_REGNUM) * MIPS_REGSIZE));
+ regcache_collect (i, fpregs + ((i - FP0_REGNUM) * mips_regsize (current_gdbarch)));
}
static void
@@ -232,7 +235,7 @@ mipsnbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
success. */
#define NBSD_MIPS_JB_PC (2 * 4)
-#define NBSD_MIPS_JB_ELEMENT_SIZE MIPS_REGSIZE
+#define NBSD_MIPS_JB_ELEMENT_SIZE mips_regsize (current_gdbarch)
#define NBSD_MIPS_JB_OFFSET (NBSD_MIPS_JB_PC * \
NBSD_MIPS_JB_ELEMENT_SIZE)
@@ -259,14 +262,14 @@ static int
mipsnbsd_cannot_fetch_register (int regno)
{
return (regno == ZERO_REGNUM
- || regno == FCRIR_REGNUM);
+ || regno == mips_regnum (current_gdbarch)->fp_implementation_revision);
}
static int
mipsnbsd_cannot_store_register (int regno)
{
return (regno == ZERO_REGNUM
- || regno == FCRIR_REGNUM);
+ || regno == mips_regnum (current_gdbarch)->fp_implementation_revision);
}
/* NetBSD/mips uses a slightly different link_map structure from the
diff --git a/gdb/mipsnbsd-tdep.h b/gdb/mipsnbsd-tdep.h
index 6e9f50ed7c2..0feca8784c6 100644
--- a/gdb/mipsnbsd-tdep.h
+++ b/gdb/mipsnbsd-tdep.h
@@ -27,7 +27,7 @@ void mipsnbsd_fill_reg (char *, int);
void mipsnbsd_supply_fpreg (char *, int);
void mipsnbsd_fill_fpreg (char *, int);
-#define SIZEOF_STRUCT_REG (38 * MIPS_REGSIZE)
-#define SIZEOF_STRUCT_FPREG (33 * MIPS_REGSIZE)
+#define SIZEOF_STRUCT_REG (38 * mips_regsize (current_gdbarch))
+#define SIZEOF_STRUCT_FPREG (33 * mips_regsize (current_gdbarch))
#endif /* MIPSNBSD_TDEP_H */
diff --git a/gdb/mipsread.c b/gdb/mipsread.c
index 2ea18d712d5..a6506f232d9 100644
--- a/gdb/mipsread.c
+++ b/gdb/mipsread.c
@@ -197,19 +197,19 @@ alphacoff_locate_sections (bfd *ignore_abfd, asection *sectp, void *sip)
si = (struct alphacoff_dynsecinfo *) sip;
- if (STREQ (sectp->name, ".dynsym"))
+ if (DEPRECATED_STREQ (sectp->name, ".dynsym"))
{
si->sym_sect = sectp;
}
- else if (STREQ (sectp->name, ".dynstr"))
+ else if (DEPRECATED_STREQ (sectp->name, ".dynstr"))
{
si->str_sect = sectp;
}
- else if (STREQ (sectp->name, ".dynamic"))
+ else if (DEPRECATED_STREQ (sectp->name, ".dynamic"))
{
si->dyninfo_sect = sectp;
}
- else if (STREQ (sectp->name, ".got"))
+ else if (DEPRECATED_STREQ (sectp->name, ".got"))
{
si->got_sect = sectp;
}
diff --git a/gdb/mipsv4-nat.c b/gdb/mipsv4-nat.c
index 686d2564ba6..3a3e7327ef5 100644
--- a/gdb/mipsv4-nat.c
+++ b/gdb/mipsv4-nat.c
@@ -53,14 +53,18 @@ supply_gregset (gregset_t *gregsetp)
for (regi = 0; regi <= CXT_RA; regi++)
supply_register (regi, (char *) (regp + regi));
- supply_register (PC_REGNUM, (char *) (regp + CXT_EPC));
- supply_register (HI_REGNUM, (char *) (regp + CXT_MDHI));
- supply_register (LO_REGNUM, (char *) (regp + CXT_MDLO));
- supply_register (CAUSE_REGNUM, (char *) (regp + CXT_CAUSE));
+ supply_register (mips_regnum (current_gdbarch)->pc,
+ (char *) (regp + CXT_EPC));
+ supply_register (mips_regnum (current_gdbarch)->hi,
+ (char *) (regp + CXT_MDHI));
+ supply_register (mips_regnum (current_gdbarch)->lo,
+ (char *) (regp + CXT_MDLO));
+ supply_register (mips_regnum (current_gdbarch)->cause,
+ (char *) (regp + CXT_CAUSE));
/* Fill inaccessible registers with zero. */
supply_register (PS_REGNUM, zerobuf);
- supply_register (BADVADDR_REGNUM, zerobuf);
+ supply_register (mips_regnum (current_gdbarch)->badvaddr, zerobuf);
supply_register (DEPRECATED_FP_REGNUM, zerobuf);
supply_register (UNUSED_REGNUM, zerobuf);
for (regi = FIRST_EMBED_REGNUM; regi <= LAST_EMBED_REGNUM; regi++)
@@ -77,22 +81,22 @@ fill_gregset (gregset_t *gregsetp, int regno)
if ((regno == -1) || (regno == regi))
*(regp + regi) = *(greg_t *) & deprecated_registers[DEPRECATED_REGISTER_BYTE (regi)];
- if ((regno == -1) || (regno == PC_REGNUM))
- *(regp + CXT_EPC) = *(greg_t *) & deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)];
+ if ((regno == -1) || (regno == mips_regnum (current_gdbarch)->pc))
+ *(regp + CXT_EPC) = *(greg_t *) & deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->pc)];
- if ((regno == -1) || (regno == CAUSE_REGNUM))
- *(regp + CXT_CAUSE) = *(greg_t *) & deprecated_registers[DEPRECATED_REGISTER_BYTE (CAUSE_REGNUM)];
+ if ((regno == -1) || (regno == mips_regnum (current_gdbarch)->cause))
+ *(regp + CXT_CAUSE) = *(greg_t *) & deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->cause)];
- if ((regno == -1) || (regno == HI_REGNUM))
- *(regp + CXT_MDHI) = *(greg_t *) & deprecated_registers[DEPRECATED_REGISTER_BYTE (HI_REGNUM)];
+ if ((regno == -1) || (regno == mips_regnum (current_gdbarch)->hi))
+ *(regp + CXT_MDHI) = *(greg_t *) & deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->hi)];
- if ((regno == -1) || (regno == LO_REGNUM))
- *(regp + CXT_MDLO) = *(greg_t *) & deprecated_registers[DEPRECATED_REGISTER_BYTE (LO_REGNUM)];
+ if ((regno == -1) || (regno == mips_regnum (current_gdbarch)->lo))
+ *(regp + CXT_MDLO) = *(greg_t *) & deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->lo)];
}
/*
* Now we do the same thing for floating-point registers.
- * We don't bother to condition on FP0_REGNUM since any
+ * We don't bother to condition on FP0 regnum since any
* reasonable MIPS configuration has an R3010 in it.
*
* Again, see the comments in m68k-tdep.c.
@@ -106,13 +110,15 @@ supply_fpregset (fpregset_t *fpregsetp)
memset (zerobuf, 0, MAX_REGISTER_SIZE);
for (regi = 0; regi < 32; regi++)
- supply_register (FP0_REGNUM + regi,
+ supply_register (mips_regnum (current_gdbarch)->fp0 + regi,
(char *) &fpregsetp->fp_r.fp_regs[regi]);
- supply_register (FCRCS_REGNUM, (char *) &fpregsetp->fp_csr);
+ supply_register (mips_regnum (current_gdbarch)->fp_control_status,
+ (char *) &fpregsetp->fp_csr);
- /* FIXME: how can we supply FCRIR_REGNUM? The ABI doesn't tell us. */
- supply_register (FCRIR_REGNUM, zerobuf);
+ /* FIXME: how can we supply FCRIR? The ABI doesn't tell us. */
+ supply_register (mips_regnum (current_gdbarch)->fp_implementation_revision,
+ zerobuf);
}
void
@@ -121,18 +127,20 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
int regi;
char *from, *to;
- for (regi = FP0_REGNUM; regi < FP0_REGNUM + 32; regi++)
+ for (regi = mips_regnum (current_gdbarch)->fp0;
+ regi < mips_regnum (current_gdbarch)->fp0 + 32; regi++)
{
if ((regno == -1) || (regno == regi))
{
from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regi)];
- to = (char *) &(fpregsetp->fp_r.fp_regs[regi - FP0_REGNUM]);
+ to = (char *) &(fpregsetp->fp_r.fp_regs[regi - mips_regnum (current_gdbarch)->fp0]);
memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regi));
}
}
- if ((regno == -1) || (regno == FCRCS_REGNUM))
- fpregsetp->fp_csr = *(unsigned *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (FCRCS_REGNUM)];
+ if ((regno == -1)
+ || (regno == mips_regnum (current_gdbarch)->fp_control_status))
+ fpregsetp->fp_csr = *(unsigned *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->fp_control_status)];
}
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index 42c54fc8475..fdc353031f6 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -152,25 +152,16 @@ static struct frame_info *analyze_dummy_frame (CORE_ADDR, CORE_ADDR);
static struct frame_info *
analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame)
{
- static struct frame_info *dummy = NULL;
- if (dummy == NULL)
- {
- struct frame_extra_info *extra_info;
- CORE_ADDR *saved_regs;
- dummy = deprecated_frame_xmalloc ();
- saved_regs = xmalloc (SIZEOF_FRAME_SAVED_REGS);
- deprecated_set_frame_saved_regs_hack (dummy, saved_regs);
- extra_info = XMALLOC (struct frame_extra_info);
- deprecated_set_frame_extra_info_hack (dummy, extra_info);
- }
- deprecated_set_frame_next_hack (dummy, NULL);
- deprecated_set_frame_prev_hack (dummy, NULL);
+ struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
+ struct frame_info *dummy
+ = deprecated_frame_xmalloc_with_cleanup (SIZEOF_FRAME_SAVED_REGS,
+ sizeof (struct frame_extra_info));
deprecated_update_frame_pc_hack (dummy, pc);
deprecated_update_frame_base_hack (dummy, frame);
get_frame_extra_info (dummy)->status = 0;
get_frame_extra_info (dummy)->stack_size = 0;
- memset (deprecated_get_frame_saved_regs (dummy), '\000', SIZEOF_FRAME_SAVED_REGS);
mn10300_analyze_prologue (dummy, pc);
+ do_cleanups (old_chain);
return dummy;
}
diff --git a/gdb/objc-exp.y b/gdb/objc-exp.y
index 057833bdeea..f1ba4942e22 100644
--- a/gdb/objc-exp.y
+++ b/gdb/objc-exp.y
@@ -680,7 +680,7 @@ qualified_name: typebase COLONCOLON name
error ("`%s' is not defined as an aggregate type.",
TYPE_NAME (type));
- if (!STREQ (type_name_no_tag (type), $4.ptr))
+ if (!DEPRECATED_STREQ (type_name_no_tag (type), $4.ptr))
error ("invalid destructor `%s::~%s'",
type_name_no_tag (type), $4.ptr);
@@ -1266,7 +1266,7 @@ yylex ()
tokstart = lexptr;
/* See if it is a special token of length 3. */
for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++)
- if (STREQN (tokstart, tokentab3[i].operator, 3))
+ if (DEPRECATED_STREQN (tokstart, tokentab3[i].operator, 3))
{
lexptr += 3;
yylval.opcode = tokentab3[i].opcode;
@@ -1275,7 +1275,7 @@ yylex ()
/* See if it is a special token of length 2. */
for (i = 0; i < sizeof tokentab2 / sizeof tokentab2[0]; i++)
- if (STREQN (tokstart, tokentab2[i].operator, 2))
+ if (DEPRECATED_STREQN (tokstart, tokentab2[i].operator, 2))
{
lexptr += 2;
yylval.opcode = tokentab2[i].opcode;
@@ -1590,43 +1590,43 @@ yylex ()
switch (namelen)
{
case 8:
- if (STREQN (tokstart, "unsigned", 8))
+ if (DEPRECATED_STREQN (tokstart, "unsigned", 8))
return UNSIGNED;
if (current_language->la_language == language_cplus
&& strncmp (tokstart, "template", 8) == 0)
return TEMPLATE;
- if (STREQN (tokstart, "volatile", 8))
+ if (DEPRECATED_STREQN (tokstart, "volatile", 8))
return VOLATILE_KEYWORD;
break;
case 6:
- if (STREQN (tokstart, "struct", 6))
+ if (DEPRECATED_STREQN (tokstart, "struct", 6))
return STRUCT;
- if (STREQN (tokstart, "signed", 6))
+ if (DEPRECATED_STREQN (tokstart, "signed", 6))
return SIGNED_KEYWORD;
- if (STREQN (tokstart, "sizeof", 6))
+ if (DEPRECATED_STREQN (tokstart, "sizeof", 6))
return SIZEOF;
- if (STREQN (tokstart, "double", 6))
+ if (DEPRECATED_STREQN (tokstart, "double", 6))
return DOUBLE_KEYWORD;
break;
case 5:
if ((current_language->la_language == language_cplus)
&& strncmp (tokstart, "class", 5) == 0)
return CLASS;
- if (STREQN (tokstart, "union", 5))
+ if (DEPRECATED_STREQN (tokstart, "union", 5))
return UNION;
- if (STREQN (tokstart, "short", 5))
+ if (DEPRECATED_STREQN (tokstart, "short", 5))
return SHORT;
- if (STREQN (tokstart, "const", 5))
+ if (DEPRECATED_STREQN (tokstart, "const", 5))
return CONST_KEYWORD;
break;
case 4:
- if (STREQN (tokstart, "enum", 4))
+ if (DEPRECATED_STREQN (tokstart, "enum", 4))
return ENUM;
- if (STREQN (tokstart, "long", 4))
+ if (DEPRECATED_STREQN (tokstart, "long", 4))
return LONG;
break;
case 3:
- if (STREQN (tokstart, "int", 3))
+ if (DEPRECATED_STREQN (tokstart, "int", 3))
return INT_KEYWORD;
break;
default:
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 0a5ed81806c..923d59b2c10 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -386,6 +386,7 @@ terminate_minimal_symbol_table (struct objfile *objfile)
DEPRECATED_SYMBOL_NAME (m) = NULL;
SYMBOL_VALUE_ADDRESS (m) = 0;
MSYMBOL_INFO (m) = NULL;
+ MSYMBOL_SIZE (m) = 0;
MSYMBOL_TYPE (m) = mst_unknown;
SYMBOL_INIT_LANGUAGE_SPECIFIC (m, language_unknown);
}
@@ -1103,7 +1104,7 @@ is_in_import_list (char *name, struct objfile *objfile)
return 0;
for (i = 0; i < objfile->import_list_size; i++)
- if (objfile->import_list[i] && STREQ (name, objfile->import_list[i]))
+ if (objfile->import_list[i] && DEPRECATED_STREQ (name, objfile->import_list[i]))
return 1;
return 0;
}
diff --git a/gdb/observer.c b/gdb/observer.c
index 6815d0f9c83..fce5f9287d8 100644
--- a/gdb/observer.c
+++ b/gdb/observer.c
@@ -191,30 +191,30 @@ observer_notify_normal_stop (void)
generic_observer_notify (normal_stop_subject, NULL);
}
-/* The following code is only used to unit-test the observers from
- our testsuite. DO NOT USE IT within observer.c! */
+/* The following code is only used to unit-test the observers from our
+ testsuite. DO NOT USE IT within observer.c (or anywhere else for
+ that matter)! */
-/* Since this code will not be used within GDB, it will trigger
- a warning if we decide to compile with -Wunused-function.
- This is ok for now. (brobecker 2003-03-18) */
+/* If we define these variables and functions as `static', the
+ compiler will optimize them out. */
-static int observer_test_first_observer = 0;
-static int observer_test_second_observer = 0;
-static int observer_test_third_observer = 0;
+int observer_test_first_observer = 0;
+int observer_test_second_observer = 0;
+int observer_test_third_observer = 0;
-static void
+void
observer_test_first_notification_function (void)
{
observer_test_first_observer++;
}
-static void
+void
observer_test_second_notification_function (void)
{
observer_test_second_observer++;
}
-static void
+void
observer_test_third_notification_function (void)
{
observer_test_third_observer++;
diff --git a/gdb/osabi.c b/gdb/osabi.c
index ee13277e6dc..4c94c5e698a 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -347,11 +347,11 @@ gdbarch_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch)
}
}
- warning ("A handler for the OS ABI \"%s\" is not built into this "
- "configuration of GDB. "
- "Attempting to continue with the default %s settings",
- gdbarch_osabi_name (info.osabi),
- info.bfd_arch_info->printable_name);
+ warning
+ ("A handler for the OS ABI \"%s\" is not built into this configuration\n"
+ "of GDB. Attempting to continue with the default %s settings.\n",
+ gdbarch_osabi_name (info.osabi),
+ info.bfd_arch_info->printable_name);
}
@@ -462,6 +462,13 @@ generic_elf_osabi_sniff_abi_tag_sections (bfd *abfd, asection *sect, void *obj)
}
return;
}
+
+ /* .note.netbsdcore.procinfo notes, used by NetBSD. */
+ if (strcmp (name, ".note.netbsdcore.procinfo") == 0 && sectsize > 0)
+ {
+ *os_ident_ptr = GDB_OSABI_NETBSD_ELF;
+ return;
+ }
}
static enum gdb_osabi
@@ -593,8 +600,6 @@ _initialize_gdb_osabi (void)
bfd_target_elf_flavour,
generic_elf_osabi_sniffer);
- return;
-
/* Register the "set osabi" command. */
c = add_set_enum_cmd ("osabi", class_support, gdb_osabi_available_names,
&set_osabi_string, "Set OS ABI of target.", &setlist);
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index b03241fe765..287f682266f 100644
--- a/gdb/p-exp.y
+++ b/gdb/p-exp.y
@@ -1370,29 +1370,29 @@ yylex ()
switch (namelen)
{
case 6:
- if (STREQ (uptokstart, "OBJECT"))
+ if (DEPRECATED_STREQ (uptokstart, "OBJECT"))
return CLASS;
- if (STREQ (uptokstart, "RECORD"))
+ if (DEPRECATED_STREQ (uptokstart, "RECORD"))
return STRUCT;
- if (STREQ (uptokstart, "SIZEOF"))
+ if (DEPRECATED_STREQ (uptokstart, "SIZEOF"))
return SIZEOF;
break;
case 5:
- if (STREQ (uptokstart, "CLASS"))
+ if (DEPRECATED_STREQ (uptokstart, "CLASS"))
return CLASS;
- if (STREQ (uptokstart, "FALSE"))
+ if (DEPRECATED_STREQ (uptokstart, "FALSE"))
{
yylval.lval = 0;
return FALSEKEYWORD;
}
break;
case 4:
- if (STREQ (uptokstart, "TRUE"))
+ if (DEPRECATED_STREQ (uptokstart, "TRUE"))
{
yylval.lval = 1;
return TRUEKEYWORD;
}
- if (STREQ (uptokstart, "SELF"))
+ if (DEPRECATED_STREQ (uptokstart, "SELF"))
{
/* here we search for 'this' like
inserted in FPC stabs debug info */
diff --git a/gdb/p-typeprint.c b/gdb/p-typeprint.c
index 085a6cfcedc..0eb371a6372 100644
--- a/gdb/p-typeprint.c
+++ b/gdb/p-typeprint.c
@@ -140,8 +140,8 @@ void
pascal_type_print_method_args (char *physname, const char *methodname,
struct ui_file *stream)
{
- int is_constructor = STREQN (physname, "__ct__", 6);
- int is_destructor = STREQN (physname, "__dt__", 6);
+ int is_constructor = DEPRECATED_STREQN (physname, "__ct__", 6);
+ int is_destructor = DEPRECATED_STREQN (physname, "__dt__", 6);
if (is_constructor || is_destructor)
{
@@ -560,7 +560,7 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show,
{
QUIT;
/* Don't print out virtual function table. */
- if (STREQN (TYPE_FIELD_NAME (type, i), "_vptr", 5)
+ if (DEPRECATED_STREQN (TYPE_FIELD_NAME (type, i), "_vptr", 5)
&& is_cplus_marker ((TYPE_FIELD_NAME (type, i))[5]))
continue;
@@ -638,8 +638,8 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show,
{
char *physname = TYPE_FN_FIELD_PHYSNAME (f, j);
- int is_constructor = STREQN (physname, "__ct__", 6);
- int is_destructor = STREQN (physname, "__dt__", 6);
+ int is_constructor = DEPRECATED_STREQN (physname, "__ct__", 6);
+ int is_destructor = DEPRECATED_STREQN (physname, "__dt__", 6);
QUIT;
if (TYPE_FN_FIELD_PROTECTED (f, j))
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
index c45a167069d..e565f098794 100644
--- a/gdb/p-valprint.c
+++ b/gdb/p-valprint.c
@@ -650,7 +650,7 @@ pascal_object_print_class_method (char *valaddr, struct type *type,
check_stub_method_group (domain, i);
for (j = 0; j < len2; j++)
{
- if (STREQ (DEPRECATED_SYMBOL_NAME (sym), TYPE_FN_FIELD_PHYSNAME (f, j)))
+ if (DEPRECATED_STREQ (DEPRECATED_SYMBOL_NAME (sym), TYPE_FN_FIELD_PHYSNAME (f, j)))
goto common;
}
}
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index 8227aa858fd..372ad0c7b48 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -127,7 +127,9 @@ ppc_register_u_addr (int regno)
{
int u_addr = -1;
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- int wordsize = tdep->wordsize;
+ /* NOTE: cagney/2003-11-25: This is the word size used by the ptrace
+ interface, and not the wordsize of the program's ABI. */
+ int wordsize = sizeof (PTRACE_XFER_TYPE);
/* General purpose registers occupy 1 slot each in the buffer */
if (regno >= tdep->ppc_gp0_regnum && regno <= tdep->ppc_gplast_regnum )
@@ -235,6 +237,9 @@ fetch_register (int tid, int regno)
return;
}
+ /* Read the raw register using PTRACE_XFER_TYPE sized chunks. On a
+ 32-bit platform, 64-bit floating-point registers will require two
+ transfers. */
for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
{
errno = 0;
@@ -248,7 +253,19 @@ fetch_register (int tid, int regno)
perror_with_name (mess);
}
}
- supply_register (regno, buf);
+
+ /* Now supply the register. Be careful to map between ptrace's and
+ the current_regcache's idea of the current wordsize. */
+ if ((regno >= FP0_REGNUM && regno < FP0_REGNUM +32)
+ || gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_LITTLE)
+ /* FPs are always 64 bits. Little endian values are always found
+ at the left-hand end of the register. */
+ regcache_raw_supply (current_regcache, regno, buf);
+ else
+ /* Big endian register, need to fetch the right-hand end. */
+ regcache_raw_supply (current_regcache, regno,
+ (buf + sizeof (PTRACE_XFER_TYPE)
+ - register_size (current_gdbarch, regno)));
}
static void
@@ -380,7 +397,21 @@ store_register (int tid, int regno)
if (regaddr == -1)
return;
- regcache_collect (regno, buf);
+ /* First collect the register value from the regcache. Be careful
+ to to convert the regcache's wordsize into ptrace's wordsize. */
+ memset (buf, 0, sizeof buf);
+ if ((regno >= FP0_REGNUM && regno < FP0_REGNUM + 32)
+ || TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
+ /* Floats are always 64-bit. Little endian registers are always
+ at the left-hand end of the register cache. */
+ regcache_raw_collect (current_regcache, regno, buf);
+ else
+ /* Big-endian registers belong at the right-hand end of the
+ buffer. */
+ regcache_raw_collect (current_regcache, regno,
+ (buf + sizeof (PTRACE_XFER_TYPE)
+ - register_size (current_gdbarch, regno)));
+
for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
{
errno = 0;
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index c094efeb182..a0bb7607f06 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -598,7 +598,8 @@ ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache)
static enum return_value_convention
ppc_linux_return_value (struct gdbarch *gdbarch, struct type *valtype,
- struct regcache *regcache, const void *inval, void *outval)
+ struct regcache *regcache, void *readbuf,
+ const void *writebuf)
{
if ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT
|| TYPE_CODE (valtype) == TYPE_CODE_UNION)
@@ -606,7 +607,8 @@ ppc_linux_return_value (struct gdbarch *gdbarch, struct type *valtype,
&& TYPE_VECTOR (valtype)))
return RETURN_VALUE_STRUCT_CONVENTION;
else
- return ppc_sysv_abi_return_value (gdbarch, valtype, regcache, inval, outval);
+ return ppc_sysv_abi_return_value (gdbarch, valtype, regcache, readbuf,
+ writebuf);
}
/* Fetch (and possibly build) an appropriate link_map_offsets
@@ -1081,6 +1083,9 @@ ppc_linux_init_abi (struct gdbarch_info info,
set_gdbarch_in_solib_call_trampoline
(gdbarch, ppc64_in_solib_call_trampoline);
set_gdbarch_skip_trampoline_code (gdbarch, ppc64_skip_trampoline_code);
+
+ /* PPC64 malloc's entry-point is called ".malloc". */
+ set_gdbarch_name_of_malloc (gdbarch, ".malloc");
}
}
diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c
index 01438c159a2..60cf986bd72 100644
--- a/gdb/ppc-sysv-tdep.c
+++ b/gdb/ppc-sysv-tdep.c
@@ -29,6 +29,7 @@
#include "gdb_assert.h"
#include "ppc-tdep.h"
#include "target.h"
+#include "objfiles.h"
/* Pass the arguments in either registers, or in the stack. Using the
ppc sysv ABI, the first eight words of the argument list (that might
@@ -790,27 +791,38 @@ ppc64_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
".FN" and "FN" in the minimal symbol table. "FN" points at the
FN's descriptor, while ".FN" points at the entry point (which
matches FUNC_ADDR). Need to reverse from FUNC_ADDR back to the
- FN's descriptor address. */
+ FN's descriptor address (while at the same time being careful to
+ find "FN" in the same object file as ".FN"). */
{
/* Find the minimal symbol that corresponds to FUNC_ADDR (should
have the name ".FN"). */
struct minimal_symbol *dot_fn = lookup_minimal_symbol_by_pc (func_addr);
if (dot_fn != NULL && SYMBOL_LINKAGE_NAME (dot_fn)[0] == '.')
{
- /* Now find the corresponding "FN" (dropping ".") minimal
- symbol's address. */
- struct minimal_symbol *fn =
- lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (dot_fn) + 1, NULL,
- NULL);
- if (fn != NULL)
+ /* Get the section that contains FUNC_ADR. Need this for the
+ "objfile" that it contains. */
+ struct obj_section *dot_fn_section = find_pc_section (func_addr);
+ if (dot_fn_section != NULL && dot_fn_section->objfile != NULL)
{
- /* Got the address of that descriptor. The TOC is the
- second double word. */
- CORE_ADDR toc =
- read_memory_unsigned_integer (SYMBOL_VALUE_ADDRESS (fn) +
- tdep->wordsize, tdep->wordsize);
- regcache_cooked_write_unsigned (regcache,
- tdep->ppc_gp0_regnum + 2, toc);
+ /* Now find the corresponding "FN" (dropping ".") minimal
+ symbol's address. Only look for the minimal symbol in
+ ".FN"'s object file - avoids problems when two object
+ files (i.e., shared libraries) contain a minimal symbol
+ with the same name. */
+ struct minimal_symbol *fn =
+ lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (dot_fn) + 1, NULL,
+ dot_fn_section->objfile);
+ if (fn != NULL)
+ {
+ /* Got the address of that descriptor. The TOC is the
+ second double word. */
+ CORE_ADDR toc =
+ read_memory_unsigned_integer (SYMBOL_VALUE_ADDRESS (fn)
+ + tdep->wordsize,
+ tdep->wordsize);
+ regcache_cooked_write_unsigned (regcache,
+ tdep->ppc_gp0_regnum + 2, toc);
+ }
}
}
}
diff --git a/gdb/proc-api.c b/gdb/proc-api.c
index 208b984a74b..1e4a2dccf17 100644
--- a/gdb/proc-api.c
+++ b/gdb/proc-api.c
@@ -747,7 +747,7 @@ procfs_note (char *msg, char *file, int line)
if (info_verbose)
fprintf (procfs_file ? procfs_file : stdout,
"%s:%d -- ", file, line);
- fprintf (procfs_file ? procfs_file : stdout, msg);
+ fprintf (procfs_file ? procfs_file : stdout, "%s", msg);
if (procfs_file)
fflush (procfs_file);
}
diff --git a/gdb/procfs.c b/gdb/procfs.c
index a92b8497060..72ad202a2e8 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -4163,7 +4163,7 @@ wait_again:
wstat = (what << 8) | 0177;
break;
case PR_FAULTED:
- switch (what) { /* FIXME: FAULTED_USE_SIGINFO */
+ switch (what) {
#ifdef FLTWATCH
case FLTWATCH:
wstat = (SIGTRAP << 8) | 0177;
diff --git a/gdb/remote-e7000.c b/gdb/remote-e7000.c
index 10d7362ee9a..c422c947612 100644
--- a/gdb/remote-e7000.c
+++ b/gdb/remote-e7000.c
@@ -657,10 +657,6 @@ e7000_open (char *args, int from_tty)
}
serial_raw (e7000_desc);
-#ifdef GDB_TARGET_IS_H8300
- h8300hmode = 1;
-#endif
-
/* Start the remote connection; if error (0), discard this target.
In particular, if the user quits, be sure to discard it
(we'd be in an inconsistent state otherwise). */
@@ -909,15 +905,18 @@ e7000_fetch_registers (void)
wanted = want_sh3;
}
}
-#ifdef GDB_TARGET_IS_H8300
if (TARGET_ARCHITECTURE->arch == bfd_arch_h8300)
{
- if (h8300smode)
- wanted = want_h8300s;
- else
- wanted = want_h8300h;
+ wanted = want_h8300h;
+ switch (TARGET_ARCHITECTURE->mach)
+ {
+ case bfd_mach_h8300s:
+ case bfd_mach_h8300sn:
+ case bfd_mach_h8300sx:
+ case bfd_mach_h8300sxn:
+ wanted = want_h8300s;
+ }
}
-#endif
fetch_regs_from_dump (gch, wanted);
@@ -2046,15 +2045,18 @@ e7000_wait (ptid_t ptid, struct target_waitstatus *status)
wanted_nopc = want_nopc_sh3;
}
}
-#ifdef GDB_TARGET_IS_H8300
if (TARGET_ARCHITECTURE->arch == bfd_arch_h8300)
{
- if (h8300smode)
- wanted_nopc = want_nopc_h8300s;
- else
- wanted_nopc = want_nopc_h8300h;
+ wanted_nopc = want_nopc_h8300h;
+ switch (TARGET_ARCHITECTURE->mach)
+ {
+ case bfd_mach_h8300s:
+ case bfd_mach_h8300sn:
+ case bfd_mach_h8300sx:
+ case bfd_mach_h8300sxn:
+ wanted_nopc = want_nopc_h8300s;
+ }
}
-#endif
fetch_regs_from_dump (gch, wanted_nopc);
/* And supply the extra ones the simulator uses */
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index 8512e444d63..71e2befaeff 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -36,6 +36,7 @@
#include "gdb_stat.h"
#include "regcache.h"
#include <ctype.h>
+#include "mips-tdep.h"
/* Breakpoint types. Values 0, 1, and 2 must agree with the watch
@@ -1606,9 +1607,7 @@ device is attached to the target board (e.g., /dev/ttya).\n"
/* FIXME: Should we call start_remote here? */
/* Try to figure out the processor model if possible. */
- ptype = mips_read_processor_type ();
- if (ptype)
- mips_set_processor_type_command (xstrdup (ptype), 0);
+ deprecated_mips_set_processor_regs_hack ();
/* This is really the job of start_remote however, that makes an
assumption that the target is about to print out a status message
@@ -1902,26 +1901,24 @@ mips_map_regno (int regno)
{
if (regno < 32)
return regno;
- if (regno >= FP0_REGNUM && regno < FP0_REGNUM + 32)
- return regno - FP0_REGNUM + 32;
- switch (regno)
- {
- case PC_REGNUM:
- return REGNO_OFFSET + 0;
- case CAUSE_REGNUM:
- return REGNO_OFFSET + 1;
- case HI_REGNUM:
- return REGNO_OFFSET + 2;
- case LO_REGNUM:
- return REGNO_OFFSET + 3;
- case FCRCS_REGNUM:
- return REGNO_OFFSET + 4;
- case FCRIR_REGNUM:
- return REGNO_OFFSET + 5;
- default:
- /* FIXME: Is there a way to get the status register? */
- return 0;
- }
+ if (regno >= mips_regnum (current_gdbarch)->fp0
+ && regno < mips_regnum (current_gdbarch)->fp0 + 32)
+ return regno - mips_regnum (current_gdbarch)->fp0 + 32;
+ else if (regno == mips_regnum (current_gdbarch)->pc)
+ return REGNO_OFFSET + 0;
+ else if (regno == mips_regnum (current_gdbarch)->cause)
+ return REGNO_OFFSET + 1;
+ else if (regno == mips_regnum (current_gdbarch)->hi)
+ return REGNO_OFFSET + 2;
+ else if (regno == mips_regnum (current_gdbarch)->lo)
+ return REGNO_OFFSET + 3;
+ else if (regno == mips_regnum (current_gdbarch)->fp_control_status)
+ return REGNO_OFFSET + 4;
+ else if (regno == mips_regnum (current_gdbarch)->fp_implementation_revision)
+ return REGNO_OFFSET + 5;
+ else
+ /* FIXME: Is there a way to get the status register? */
+ return 0;
}
/* Fetch the remote registers. */
diff --git a/gdb/remote-rdp.c b/gdb/remote-rdp.c
index 6cbf73cbe8a..2db0a910d83 100644
--- a/gdb/remote-rdp.c
+++ b/gdb/remote-rdp.c
@@ -1,7 +1,7 @@
/* Remote debugging for the ARM RDP interface.
- Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002 Free Software
- Foundation, Inc.
+ Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003 Free
+ Software Foundation, Inc.
This file is part of GDB.
@@ -352,11 +352,29 @@ rdp_init (int cold, int tty)
case SERIAL_TIMEOUT:
break;
case RDP_RES_VALUE_LITTLE_ENDIAN:
+#if 0
+ /* FIXME: cagney/2003-11-22: Ever since the ARM
+ was multi-arched (in 2002-02-08), this
+ assignment has had no effect. There needs to
+ be some sort of check/decision based on the
+ current architecture's byte-order vs the remote
+ target's byte order. For the moment disable
+ the assignment to keep things building. */
target_byte_order = BFD_ENDIAN_LITTLE;
+#endif
sync = 1;
break;
case RDP_RES_VALUE_BIG_ENDIAN:
+#if 0
+ /* FIXME: cagney/2003-11-22: Ever since the ARM
+ was multi-arched (in 2002-02-08), this
+ assignment has had no effect. There needs to
+ be some sort of check/decision based on the
+ current architecture's byte-order vs the remote
+ target's byte order. For the moment disable
+ the assignment to keep things building. */
target_byte_order = BFD_ENDIAN_BIG;
+#endif
sync = 1;
break;
default:
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 538f8a4dbc1..b1dc94e0cac 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -42,6 +42,7 @@
#include "regcache.h"
#include "gdb_assert.h"
#include "sim-regno.h"
+#include "arch-utils.h"
/* Prototypes */
@@ -504,27 +505,23 @@ gdbsim_open (char *args, int from_tty)
strcpy (arg_buf, "gdbsim"); /* 7 */
/* Specify the byte order for the target when it is both selectable
and explicitly specified by the user (not auto detected). */
- if (!TARGET_BYTE_ORDER_AUTO)
+ switch (selected_byte_order ())
{
- switch (TARGET_BYTE_ORDER)
- {
- case BFD_ENDIAN_BIG:
- strcat (arg_buf, " -E big");
- break;
- case BFD_ENDIAN_LITTLE:
- strcat (arg_buf, " -E little");
- break;
- default:
- internal_error (__FILE__, __LINE__,
- "Value of TARGET_BYTE_ORDER unknown");
- }
+ case BFD_ENDIAN_BIG:
+ strcat (arg_buf, " -E big");
+ break;
+ case BFD_ENDIAN_LITTLE:
+ strcat (arg_buf, " -E little");
+ break;
+ case BFD_ENDIAN_UNKNOWN:
+ break;
}
/* Specify the architecture of the target when it has been
explicitly specified */
- if (!TARGET_ARCHITECTURE_AUTO)
+ if (selected_architecture_name () != NULL)
{
strcat (arg_buf, " --architecture=");
- strcat (arg_buf, TARGET_ARCHITECTURE->printable_name);
+ strcat (arg_buf, selected_architecture_name ());
}
/* finally, any explicit args */
if (args)
diff --git a/gdb/remote-vxmips.c b/gdb/remote-vxmips.c
index 6cc7ca5b60b..55ba49b98ca 100644
--- a/gdb/remote-vxmips.c
+++ b/gdb/remote-vxmips.c
@@ -111,11 +111,11 @@ vx_read_register (int regno)
bcopy (&mips_greg_packet[MIPS_R_SR],
&deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)], MIPS_GREG_SIZE);
bcopy (&mips_greg_packet[MIPS_R_LO],
- &deprecated_registers[DEPRECATED_REGISTER_BYTE (LO_REGNUM)], MIPS_GREG_SIZE);
+ &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->lo)], MIPS_GREG_SIZE);
bcopy (&mips_greg_packet[MIPS_R_HI],
- &deprecated_registers[DEPRECATED_REGISTER_BYTE (HI_REGNUM)], MIPS_GREG_SIZE);
+ &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->hi)], MIPS_GREG_SIZE);
bcopy (&mips_greg_packet[MIPS_R_PC],
- &deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)], MIPS_GREG_SIZE);
+ &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->pc)], MIPS_GREG_SIZE);
/* If the target has floating point registers, fetch them.
Otherwise, zero the floating point register values in
@@ -136,15 +136,15 @@ vx_read_register (int regno)
/* Copy the floating point control/status register (fpcsr). */
bcopy (&mips_fpreg_packet[MIPS_R_FPCSR],
- &deprecated_registers[DEPRECATED_REGISTER_BYTE (FCRCS_REGNUM)],
- DEPRECATED_REGISTER_RAW_SIZE (FCRCS_REGNUM));
+ &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->fp_control_status)],
+ DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->fp_control_status));
}
else
{
memset (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
0, DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
- memset (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FCRCS_REGNUM)],
- 0, DEPRECATED_REGISTER_RAW_SIZE (FCRCS_REGNUM));
+ memset (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->fp_control_status)],
+ 0, DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->fp_control_status));
}
/* Mark the register cache valid. */
@@ -170,11 +170,11 @@ vx_write_register (int regno)
bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
&mips_greg_packet[MIPS_R_SR], MIPS_GREG_SIZE);
- bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (LO_REGNUM)],
+ bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->lo)],
&mips_greg_packet[MIPS_R_LO], MIPS_GREG_SIZE);
- bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (HI_REGNUM)],
+ bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->hi)],
&mips_greg_packet[MIPS_R_HI], MIPS_GREG_SIZE);
- bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)],
+ bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->pc)],
&mips_greg_packet[MIPS_R_PC], MIPS_GREG_SIZE);
net_write_registers (mips_greg_packet, MIPS_GREG_PLEN, PTRACE_SETREGS);
@@ -191,9 +191,9 @@ vx_write_register (int regno)
/* Copy the floating point control/status register (fpcsr). */
- bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FCRCS_REGNUM)],
+ bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->fp_control_status)],
&mips_fpreg_packet[MIPS_R_FPCSR],
- DEPRECATED_REGISTER_RAW_SIZE (FCRCS_REGNUM));
+ DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->fp_control_status));
net_write_registers (mips_fpreg_packet, MIPS_FPREG_PLEN,
PTRACE_SETFPREGS);
diff --git a/gdb/remote.c b/gdb/remote.c
index 80726bc0e18..29ab0112760 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -2302,7 +2302,12 @@ remote_open_1 (char *name, int from_tty, struct target_ops *target,
{
if (serial_setbaudrate (remote_desc, baud_rate))
{
+ /* The requested speed could not be set. Error out to
+ top level after closing remote_desc. Take care to
+ set remote_desc to NULL to avoid closing remote_desc
+ more than once. */
serial_close (remote_desc);
+ remote_desc = NULL;
perror_with_name (name);
}
}
@@ -3561,9 +3566,23 @@ remote_fetch_registers (int regnum)
struct packet_reg *r = &rs->regs[i];
if (r->in_g_packet)
{
- supply_register (r->regnum, regs + r->offset);
- if (buf[r->offset * 2] == 'x')
- set_register_cached (i, -1);
+ if (r->offset * 2 >= strlen (buf))
+ /* A short packet that didn't include the register's
+ value, this implies that the register is zero (and
+ not that the register is unavailable). Supply that
+ zero value. */
+ regcache_raw_supply (current_regcache, r->regnum, NULL);
+ else if (buf[r->offset * 2] == 'x')
+ {
+ gdb_assert (r->offset * 2 < strlen (buf));
+ /* The register isn't available, mark it as such (at
+ the same time setting the value to zero). */
+ regcache_raw_supply (current_regcache, r->regnum, NULL);
+ set_register_cached (i, -1);
+ }
+ else
+ regcache_raw_supply (current_regcache, r->regnum,
+ regs + r->offset);
}
}
}
@@ -5555,7 +5574,12 @@ remote_cisco_open (char *name, int from_tty)
baud_rate = (baud_rate > 0) ? baud_rate : 9600;
if (serial_setbaudrate (remote_desc, baud_rate))
{
+ /* The requested speed could not be set. Error out to
+ top level after closing remote_desc. Take care to
+ set remote_desc to NULL to avoid closing remote_desc
+ more than once. */
serial_close (remote_desc);
+ remote_desc = NULL;
perror_with_name (name);
}
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index 6f96c176bf1..78789842608 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -759,7 +759,7 @@ add_vmap (LdInfo *ldi)
last = 0;
/* FIXME??? am I tossing BFDs? bfd? */
while ((last = bfd_openr_next_archived_file (abfd, last)))
- if (STREQ (mem, last->filename))
+ if (DEPRECATED_STREQ (mem, last->filename))
break;
if (!last)
@@ -843,8 +843,8 @@ vmap_ldinfo (LdInfo *ldi)
/* The filenames are not always sufficient to match on. */
- if ((name[0] == '/' && !STREQ (name, vp->name))
- || (memb[0] && !STREQ (memb, vp->member)))
+ if ((name[0] == '/' && !DEPRECATED_STREQ (name, vp->name))
+ || (memb[0] && !DEPRECATED_STREQ (memb, vp->member)))
continue;
/* See if we are referring to the same file.
@@ -941,17 +941,17 @@ vmap_exec (void)
for (i = 0; &exec_ops.to_sections[i] < exec_ops.to_sections_end; i++)
{
- if (STREQ (".text", exec_ops.to_sections[i].the_bfd_section->name))
+ if (DEPRECATED_STREQ (".text", exec_ops.to_sections[i].the_bfd_section->name))
{
exec_ops.to_sections[i].addr += vmap->tstart - vmap->tvma;
exec_ops.to_sections[i].endaddr += vmap->tstart - vmap->tvma;
}
- else if (STREQ (".data", exec_ops.to_sections[i].the_bfd_section->name))
+ else if (DEPRECATED_STREQ (".data", exec_ops.to_sections[i].the_bfd_section->name))
{
exec_ops.to_sections[i].addr += vmap->dstart - vmap->dvma;
exec_ops.to_sections[i].endaddr += vmap->dstart - vmap->dvma;
}
- else if (STREQ (".bss", exec_ops.to_sections[i].the_bfd_section->name))
+ else if (DEPRECATED_STREQ (".bss", exec_ops.to_sections[i].the_bfd_section->name))
{
exec_ops.to_sections[i].addr += vmap->dstart - vmap->dvma;
exec_ops.to_sections[i].endaddr += vmap->dstart - vmap->dvma;
diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c
index ca87b8e86f1..ac080ac767e 100644
--- a/gdb/sh64-tdep.c
+++ b/gdb/sh64-tdep.c
@@ -49,7 +49,7 @@
/* registers numbers shared with the simulator */
#include "gdb/sim-sh.h"
-/* Information that is dependent on the processor variant. */
+/* Information that is dependent on the processor variant. */
enum sh_abi
{
SH_ABI_UNKNOWN,
@@ -78,7 +78,7 @@ enum
/* FPP stands for Floating Point Pair, to avoid confusion with
GDB's FP0_REGNUM, which is the number of the first Floating
point register. Unfortunately on the sh5, the floating point
- registers are called FR, and the floating point pairs are called FP. */
+ registers are called FR, and the floating point pairs are called FP. */
FPP0_REGNUM = 173,
FPP_LAST_REGNUM = 204,
FV0_REGNUM = 205,
@@ -119,7 +119,7 @@ struct frame_extra_info
};
static const char *
-sh_sh64_register_name (int reg_nr)
+sh64_register_name (int reg_nr)
{
static char *register_names[] =
{
@@ -197,17 +197,13 @@ sh_sh64_register_name (int reg_nr)
/* Macros and functions for setting and testing a bit in a minimal
symbol that marks it as 32-bit function. The MSB of the minimal
- symbol's "info" field is used for this purpose. This field is
- already being used to store the symbol size, so the assumption is
- that the symbol size cannot exceed 2^31.
+ symbol's "info" field is used for this purpose.
ELF_MAKE_MSYMBOL_SPECIAL
tests whether an ELF symbol is "special", i.e. refers
to a 32-bit function, and sets a "special" bit in a
minimal symbol to mark it as a 32-bit function
- MSYMBOL_IS_SPECIAL tests the "special" bit in a minimal symbol
- MSYMBOL_SIZE returns the size of the minimal symbol, i.e.
- the "info" field with the "special" bit masked out */
+ MSYMBOL_IS_SPECIAL tests the "special" bit in a minimal symbol */
#define MSYMBOL_IS_SPECIAL(msym) \
(((long) MSYMBOL_INFO (msym) & 0x80000000) != 0)
@@ -237,7 +233,7 @@ pc_is_isa32 (bfd_vma memaddr)
struct minimal_symbol *sym;
/* If bit 0 of the address is set, assume this is a
- ISA32 (shmedia) address. */
+ ISA32 (shmedia) address. */
if (IS_ISA32_ADDR (memaddr))
return 1;
@@ -252,7 +248,7 @@ pc_is_isa32 (bfd_vma memaddr)
}
static const unsigned char *
-sh_sh64_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
+sh64_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
{
/* The BRK instruction for shmedia is
01101111 11110101 11111111 11110000
@@ -396,14 +392,14 @@ sh_sh64_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
#define IS_MOV_R14_R0(x) ((x) == 0x20e6)
/* ADD Rm,R63,Rn Rm+R63-->Rn 0000 00mm mmmm 1001 1111 11nn nnnn 0000
- where Rm is one of r2-r9 which are the argument registers. */
+ where Rm is one of r2-r9 which are the argument registers. */
/* FIXME: Recognize the float and double register moves too! */
#define IS_MEDIA_IND_ARG_MOV(x) \
((((x) & 0xfc0ffc0f) == 0x0009fc00) && (((x) & 0x03f00000) >= 0x00200000 && ((x) & 0x03f00000) <= 0x00900000))
/* ST.Q Rn,0,Rm Rm-->Rn+0 1010 11nn nnnn 0000 0000 00mm mmmm 0000
or ST.L Rn,0,Rm Rm-->Rn+0 1010 10nn nnnn 0000 0000 00mm mmmm 0000
- where Rm is one of r2-r9 which are the argument registers. */
+ where Rm is one of r2-r9 which are the argument registers. */
#define IS_MEDIA_ARG_MOV(x) \
(((((x) & 0xfc0ffc0f) == 0xac000000) || (((x) & 0xfc0ffc0f) == 0xa8000000)) \
&& (((x) & 0x000003f0) >= 0x00000020 && ((x) & 0x000003f0) <= 0x00000090))
@@ -449,8 +445,8 @@ sh_sh64_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
/* Skip any prologue before the guts of a function */
-/* Skip the prologue using the debug information. If this fails we'll
- fall back on the 'guess' method below. */
+/* Skip the prologue using the debug information. If this fails we'll
+ fall back on the 'guess' method below. */
static CORE_ADDR
after_prologue (CORE_ADDR pc)
{
@@ -494,7 +490,7 @@ look_for_args_moves (CORE_ADDR start_pc, int media_mode)
{
/* This must be followed by a store to r14, so the argument
is where the debug info says it is. This can happen after
- the SP has been saved, unfortunately. */
+ the SP has been saved, unfortunately. */
int next_insn = read_memory_integer (UNMAKE_ISA32_ADDR (here),
insn_size);
@@ -504,7 +500,7 @@ look_for_args_moves (CORE_ADDR start_pc, int media_mode)
}
else if (IS_MEDIA_ARG_MOV (w))
{
- /* These instructions store directly the argument in r14. */
+ /* These instructions store directly the argument in r14. */
start_pc = here;
}
else
@@ -519,7 +515,7 @@ look_for_args_moves (CORE_ADDR start_pc, int media_mode)
{
/* This must be followed by a store to r14, so the argument
is where the debug info says it is. This can happen after
- the SP has been saved, unfortunately. */
+ the SP has been saved, unfortunately. */
int next_insn = 0xffff & read_memory_integer (here, insn_size);
here += insn_size;
@@ -528,7 +524,7 @@ look_for_args_moves (CORE_ADDR start_pc, int media_mode)
}
else if (IS_COMPACT_ARG_MOV (w))
{
- /* These instructions store directly the argument in r14. */
+ /* These instructions store directly the argument in r14. */
start_pc = here;
}
else if (IS_MOVL_R0 (w))
@@ -549,7 +545,7 @@ look_for_args_moves (CORE_ADDR start_pc, int media_mode)
stack slot in the register. GCC thinks the argument is
just passed by transparent reference, but this is only
true after the argument decoder is called. Such a call
- needs to be considered part of the prologue. */
+ needs to be considered part of the prologue. */
/* This must be followed by a JSR @r0 instruction and by
a NOP instruction. After these, the prologue is over! */
@@ -613,7 +609,7 @@ sh64_skip_prologue_hard_way (CORE_ADDR start_pc)
{
/* Don't bail out yet, we may have arguments stored in
registers here, according to the debug info, so that
- gdb can print the frames correctly. */
+ gdb can print the frames correctly. */
start_pc = look_for_args_moves (here - insn_size, media_mode);
break;
}
@@ -639,7 +635,7 @@ sh64_skip_prologue_hard_way (CORE_ADDR start_pc)
{
/* Don't bail out yet, we may have arguments stored in
registers here, according to the debug info, so that
- gdb can print the frames correctly. */
+ gdb can print the frames correctly. */
start_pc = look_for_args_moves (here - insn_size, media_mode);
break;
}
@@ -660,7 +656,7 @@ sh_skip_prologue (CORE_ADDR pc)
post_prologue_pc = after_prologue (pc);
/* If after_prologue returned a useful address, then use it. Else
- fall back on the instruction skipping code. */
+ fall back on the instruction skipping code. */
if (post_prologue_pc != 0)
return max (pc, post_prologue_pc);
else
@@ -706,20 +702,18 @@ gdb_print_insn_sh (bfd_vma memaddr, disassemble_info *info)
/* Given a register number RN as it appears in an assembly
instruction, find the corresponding register number in the GDB
- scheme. */
+ scheme. */
static int
translate_insn_rn (int rn, int media_mode)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
/* FIXME: this assumes that the number rn is for a not pseudo
- register only. */
+ register only. */
if (media_mode)
return rn;
else
{
- /* These registers don't have a corresponding compact one. */
- /* FIXME: This is probably not enough. */
+ /* These registers don't have a corresponding compact one. */
+ /* FIXME: This is probably not enough. */
#if 0
if ((rn >= 16 && rn <= 63) || (rn >= 93 && rn <= 140))
return rn;
@@ -744,7 +738,7 @@ sh64_frame_chain (struct frame_info *frame)
if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
get_frame_base (frame),
get_frame_base (frame)))
- return get_frame_base (frame); /* dummy frame same as caller's frame */
+ return get_frame_base (frame); /* dummy frame same as caller's frame */
if (get_frame_pc (frame)
&& !deprecated_inside_entry_file (get_frame_pc (frame)))
{
@@ -753,7 +747,9 @@ sh64_frame_chain (struct frame_info *frame)
if (gdbarch_tdep (current_gdbarch)->sh_abi == SH_ABI_32)
size = 4;
else
- size = DEPRECATED_REGISTER_RAW_SIZE (translate_insn_rn (DEPRECATED_FP_REGNUM, media_mode));
+ size = register_size (current_gdbarch,
+ translate_insn_rn (DEPRECATED_FP_REGNUM,
+ media_mode));
return read_memory_integer (get_frame_base (frame)
+ get_frame_extra_info (frame)->f_offset,
size);
@@ -770,8 +766,9 @@ sh64_get_saved_pr (struct frame_info *fi, int pr_regnum)
for (; fi; fi = get_next_frame (fi))
if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
get_frame_base (fi)))
- /* When the caller requests PR from the dummy frame, we return PC because
- that's where the previous routine appears to have done a call from. */
+ /* When the caller requests PR from the dummy frame, we return
+ PC because that's where the previous routine appears to have
+ done a call from. */
return deprecated_read_register_dummy (get_frame_pc (fi),
get_frame_base (fi), pr_regnum);
else
@@ -787,14 +784,14 @@ sh64_get_saved_pr (struct frame_info *fi, int pr_regnum)
int gdb_reg_num = translate_insn_rn (pr_regnum, media_mode);
int size = ((gdbarch_tdep (current_gdbarch)->sh_abi == SH_ABI_32)
? 4
- : DEPRECATED_REGISTER_RAW_SIZE (gdb_reg_num));
+ : register_size (current_gdbarch, gdb_reg_num));
return read_memory_integer (deprecated_get_frame_saved_regs (fi)[pr_regnum], size);
}
}
return read_register (pr_regnum);
}
-/* For vectors of 4 floating point registers. */
+/* For vectors of 4 floating point registers. */
static int
fv_reg_base_num (int fv_regnum)
{
@@ -830,10 +827,7 @@ fpp_reg_base_num (int fpp_regnum)
static int
is_media_pseudo (int rn)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- return (rn >= DR0_REGNUM
- && rn <= FV_LAST_REGNUM);
+ return (rn >= DR0_REGNUM && rn <= FV_LAST_REGNUM);
}
static int
@@ -846,7 +840,6 @@ static int
sh64_media_reg_base_num (int reg_nr)
{
int base_regnum = -1;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
if (reg_nr >= DR0_REGNUM
&& reg_nr <= DR_LAST_REGNUM)
@@ -929,7 +922,6 @@ static int
sh64_compact_reg_base_num (int reg_nr)
{
int base_regnum = -1;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
/* general register N maps to general register N */
if (reg_nr >= R0_C_REGNUM
@@ -970,7 +962,7 @@ sh64_compact_reg_base_num (int reg_nr)
base_regnum = 19;
else if (reg_nr == FPSCR_C_REGNUM)
- base_regnum = FPSCR_REGNUM; /*???? this register is a mess. */
+ base_regnum = FPSCR_REGNUM; /*???? this register is a mess. */
else if (reg_nr == FPUL_C_REGNUM)
base_regnum = FP0_REGNUM + 32;
@@ -981,7 +973,7 @@ sh64_compact_reg_base_num (int reg_nr)
/* Given a register number RN (according to the gdb scheme) , return
its corresponding architectural register. In media mode, only a
subset of the registers is pseudo registers. For compact mode, all
- the registers are pseudo. */
+ the registers are pseudo. */
static int
translate_rn_to_arch_reg_num (int rn, int media_mode)
{
@@ -994,7 +986,7 @@ translate_rn_to_arch_reg_num (int rn, int media_mode)
return sh64_media_reg_base_num (rn);
}
else
- /* All compact registers are pseudo. */
+ /* All compact registers are pseudo. */
return sh64_compact_reg_base_num (rn);
}
@@ -1024,8 +1016,9 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
int insn_size;
int gdb_register_number;
int register_number;
- char *dummy_regs = deprecated_generic_find_dummy_frame (get_frame_pc (fi), get_frame_base (fi));
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ char *dummy_regs = deprecated_generic_find_dummy_frame (get_frame_pc (fi),
+ get_frame_base (fi));
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
if (deprecated_get_frame_saved_regs (fi) == NULL)
frame_saved_regs_zalloc (fi);
@@ -1051,7 +1044,7 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
/* Loop around examining the prologue insns until we find something
that does not appear to be part of the prologue. But give up
- after 20 of them, since we're getting silly then. */
+ after 20 of them, since we're getting silly then. */
pc = get_frame_func (fi);
if (!pc)
@@ -1073,7 +1066,7 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
/* The frame pointer register is general register 14 in shmedia and
shcompact modes. In sh compact it is a pseudo register. Same goes
- for the stack pointer register, which is register 15. */
+ for the stack pointer register, which is register 15. */
fp_regnum = translate_insn_rn (DEPRECATED_FP_REGNUM, media_mode);
sp_regnum = translate_insn_rn (SP_REGNUM, media_mode);
@@ -1112,7 +1105,7 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
else if (IS_ADD_SP_R0 (insn))
{
/* This instruction still prepares r0, but we don't care.
- We already have the offset in r0_val. */
+ We already have the offset in r0_val. */
}
else if (IS_STS_R0 (insn))
{
@@ -1173,7 +1166,7 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
}
}
- /* Now we know how deep things are, we can work out their addresses. */
+ /* Now we know how deep things are, we can work out their addresses. */
for (rn = 0; rn < NUM_REGS + NUM_PSEUDO_REGS; rn++)
{
register_number = translate_rn_to_arch_reg_num (rn, media_mode);
@@ -1184,34 +1177,36 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
have_fp = 1;
/* Watch out! saved_regs is only for the real registers, and
- doesn't include space for the pseudo registers. */
- deprecated_get_frame_saved_regs (fi)[register_number]= get_frame_base (fi) - where[rn] + depth;
-
+ doesn't include space for the pseudo registers. */
+ deprecated_get_frame_saved_regs (fi)[register_number]
+ = get_frame_base (fi) - where[rn] + depth;
}
else
- deprecated_get_frame_saved_regs (fi)[register_number] = 0;
+ deprecated_get_frame_saved_regs (fi)[register_number] = 0;
}
if (have_fp)
{
/* SP_REGNUM is 15. For shmedia 15 is the real register. For
shcompact 15 is the arch register corresponding to the pseudo
- register r15 which still is the SP register. */
+ register r15 which still is the SP register. */
/* The place on the stack where fp is stored contains the sp of
- the caller. */
+ the caller. */
/* Again, saved_registers contains only space for the real
registers, so we store in DEPRECATED_FP_REGNUM position. */
int size;
if (tdep->sh_abi == SH_ABI_32)
size = 4;
else
- size = DEPRECATED_REGISTER_RAW_SIZE (fp_regnum);
- deprecated_get_frame_saved_regs (fi)[sp_regnum] = read_memory_integer (deprecated_get_frame_saved_regs (fi)[fp_regnum], size);
+ size = register_size (current_gdbarch, fp_regnum);
+ deprecated_get_frame_saved_regs (fi)[sp_regnum]
+ = read_memory_integer (deprecated_get_frame_saved_regs (fi)[fp_regnum],
+ size);
}
else
deprecated_get_frame_saved_regs (fi)[sp_regnum] = get_frame_base (fi);
- get_frame_extra_info (fi)->f_offset = depth - where[fp_regnum];
+ get_frame_extra_info (fi)->f_offset = depth - where[fp_regnum];
}
/* Initialize the extra info saved in a FRAME */
@@ -1253,7 +1248,7 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
{
int media_mode;
int live_regnum = regnum;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
if (!target_has_registers)
error ("No registers.");
@@ -1293,7 +1288,7 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
memcpy (raw_buffer,
(deprecated_generic_find_dummy_frame (get_frame_pc (frame), get_frame_base (frame))
+ DEPRECATED_REGISTER_BYTE (regnum)),
- DEPRECATED_REGISTER_RAW_SIZE (regnum));
+ register_size (current_gdbarch, regnum));
return;
}
@@ -1306,7 +1301,9 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
if (regnum == SP_REGNUM)
{
if (raw_buffer) /* SP register treated specially */
- store_unsigned_integer (raw_buffer, DEPRECATED_REGISTER_RAW_SIZE (regnum),
+ store_unsigned_integer (raw_buffer,
+ register_size (current_gdbarch,
+ regnum),
deprecated_get_frame_saved_regs (frame)[regnum]);
}
else
@@ -1322,13 +1319,14 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
|| live_regnum == PR_REGNUM))
size = 4;
else
- size = DEPRECATED_REGISTER_RAW_SIZE (live_regnum);
+ size = register_size (current_gdbarch, live_regnum);
if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
- read_memory (deprecated_get_frame_saved_regs (frame)[regnum], raw_buffer, size);
+ read_memory (deprecated_get_frame_saved_regs (frame)[regnum],
+ raw_buffer, size);
else
read_memory (deprecated_get_frame_saved_regs (frame)[regnum],
raw_buffer
- + DEPRECATED_REGISTER_RAW_SIZE (live_regnum)
+ + register_size (current_gdbarch, live_regnum)
- size,
size);
}
@@ -1352,7 +1350,8 @@ static CORE_ADDR
sh64_extract_struct_value_address (char *regbuf)
{
return (extract_unsigned_integer ((regbuf + DEPRECATED_REGISTER_BYTE (STRUCT_RETURN_REGNUM)),
- DEPRECATED_REGISTER_RAW_SIZE (STRUCT_RETURN_REGNUM)));
+ register_size (current_gdbarch,
+ STRUCT_RETURN_REGNUM)));
}
static CORE_ADDR
@@ -1362,14 +1361,14 @@ sh_frame_saved_pc (struct frame_info *frame)
}
/* Discard from the stack the innermost frame, restoring all saved registers.
- Used in the 'return' command. */
+ Used in the 'return' command. */
static void
sh64_pop_frame (void)
{
struct frame_info *frame = get_current_frame ();
CORE_ADDR fp;
int regnum;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int media_mode = pc_is_isa32 (get_frame_pc (frame));
@@ -1392,8 +1391,8 @@ sh64_pop_frame (void)
|| regnum == PR_REGNUM))
size = 4;
else
- size = DEPRECATED_REGISTER_RAW_SIZE (translate_insn_rn (regnum,
- media_mode));
+ size = register_size (current_gdbarch,
+ translate_insn_rn (regnum, media_mode));
write_register (regnum,
read_memory_integer (deprecated_get_frame_saved_regs (frame)[regnum],
size));
@@ -1471,7 +1470,7 @@ sh_frame_align (struct gdbarch *ignore, CORE_ADDR sp)
I.e. there is hole in the stack.
Different rules apply for variable arguments functions, and for functions
- for which the prototype is not known. */
+ for which the prototype is not known. */
static CORE_ADDR
sh64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
@@ -1492,7 +1491,6 @@ sh64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int len;
int argreg_size;
int fp_args[12];
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
memset (fp_args, 0, sizeof (fp_args));
@@ -1526,7 +1524,7 @@ sh64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
if (TYPE_CODE (type) != TYPE_CODE_FLT)
{
- argreg_size = DEPRECATED_REGISTER_RAW_SIZE (int_argreg);
+ argreg_size = register_size (current_gdbarch, int_argreg);
if (len < argreg_size)
{
@@ -1562,7 +1560,7 @@ sh64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
/* Store the value 8 bytes at a time. This means that
things larger than 8 bytes may go partly in registers
and partly on the stack. FIXME: argreg is incremented
- before we use its size. */
+ before we use its size. */
len -= argreg_size;
val += argreg_size;
int_argreg++;
@@ -1586,13 +1584,13 @@ sh64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
deprecated_write_register_gen (FP0_REGNUM + float_arg_index,
val);
fp_args[float_arg_index] = 1;
- /* Skip the corresponding general argument register. */
+ /* Skip the corresponding general argument register. */
int_argreg ++;
}
else
;
/* Store it as the integers, 8 bytes at the time, if
- necessary spilling on the stack. */
+ necessary spilling on the stack. */
}
else if (len == 8)
@@ -1607,7 +1605,7 @@ sh64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
{
/* Goes in DR0...DR10 */
/* The numbering of the DRi registers is consecutive,
- i.e. includes odd numbers. */
+ i.e. includes odd numbers. */
int double_register_offset = double_arg_index / 2;
int regnum = DR0_REGNUM +
double_register_offset;
@@ -1627,17 +1625,17 @@ sh64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
registers, not pseudo. write_register_gen will
call the gdbarch function to do register
writes, and that will properly know how to deal
- with pseudoregs. */
+ with pseudoregs. */
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. */
+ /* Skip the corresponding general argument register. */
int_argreg ++;
}
else
;
/* Store it as the integers, 8 bytes at the time, if
- necessary spilling on the stack. */
+ necessary spilling on the stack. */
}
}
}
@@ -1665,7 +1663,6 @@ sh64_extract_return_value (struct type *type, char *regbuf, char *valbuf)
int offset;
int return_register;
int len = TYPE_LENGTH (type);
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
@@ -1674,7 +1671,7 @@ sh64_extract_return_value (struct type *type, char *regbuf, char *valbuf)
/* Return value stored in FP0_REGNUM */
return_register = FP0_REGNUM;
offset = DEPRECATED_REGISTER_BYTE (return_register);
- memcpy (valbuf, (char *) regbuf + offset, len);
+ memcpy (valbuf, (char *) regbuf + offset, len);
}
else if (len == 8)
{
@@ -1690,7 +1687,7 @@ sh64_extract_return_value (struct type *type, char *regbuf, char *valbuf)
else
floatformat_to_doublest (&floatformat_ieee_double_big,
(char *) regbuf + offset, &val);
- deprecated_store_floating (valbuf, len, val);
+ store_typed_floating (valbuf, type, val);
}
}
else
@@ -1698,11 +1695,11 @@ sh64_extract_return_value (struct type *type, char *regbuf, char *valbuf)
if (len <= 8)
{
/* Result is in register 2. If smaller than 8 bytes, it is padded
- at the most significant end. */
+ at the most significant end. */
return_register = DEFAULT_RETURN_REGNUM;
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
offset = DEPRECATED_REGISTER_BYTE (return_register) +
- DEPRECATED_REGISTER_RAW_SIZE (return_register) - len;
+ register_size (current_gdbarch, return_register) - len;
else
offset = DEPRECATED_REGISTER_BYTE (return_register);
memcpy (valbuf, (char *) regbuf + offset, len);
@@ -1717,12 +1714,12 @@ sh64_extract_return_value (struct type *type, char *regbuf, char *valbuf)
If the architecture is sh4 or sh3e, store a function's return value
in the R0 general register or in the FP0 floating point register,
depending on the type of the return value. In all the other cases
- the result is stored in r0, left-justified. */
+ the result is stored in r0, left-justified. */
static void
sh64_store_return_value (struct type *type, char *valbuf)
{
- char buf[64]; /* more than enough... */
+ char buf[64]; /* more than enough... */
int len = TYPE_LENGTH (type);
if (TYPE_CODE (type) == TYPE_CODE_FLT)
@@ -1743,14 +1740,15 @@ sh64_store_return_value (struct type *type, char *valbuf)
int return_register = DEFAULT_RETURN_REGNUM;
int offset = 0;
- if (len <= DEPRECATED_REGISTER_RAW_SIZE (return_register))
+ if (len <= register_size (current_gdbarch, return_register))
{
- /* Pad with zeros. */
- memset (buf, 0, DEPRECATED_REGISTER_RAW_SIZE (return_register));
+ /* Pad with zeros. */
+ memset (buf, 0, register_size (current_gdbarch, return_register));
if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
- offset = 0; /*DEPRECATED_REGISTER_RAW_SIZE (return_register) - len;*/
+ offset = 0; /*register_size (current_gdbarch,
+ return_register) - len;*/
else
- offset = DEPRECATED_REGISTER_RAW_SIZE (return_register) - len;
+ offset = register_size (current_gdbarch, return_register) - len;
memcpy (buf + offset, valbuf, len);
deprecated_write_register_gen (return_register, buf);
@@ -1764,7 +1762,6 @@ static void
sh64_show_media_regs (void)
{
int i;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
printf_filtered ("PC=%s SR=%016llx \n",
paddr (read_register (PC_REGNUM)),
@@ -1803,7 +1800,6 @@ static void
sh64_show_compact_regs (void)
{
int i;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
printf_filtered ("PC=%s \n",
paddr (read_register (PC_C_REGNUM)));
@@ -1841,8 +1837,8 @@ sh64_show_compact_regs (void)
(long) read_register (FP0_REGNUM + i + 7));
}
-/*FIXME!!! This only shows the registers for shmedia, excluding the
- pseudo registers. */
+/* FIXME!!! This only shows the registers for shmedia, excluding the
+ pseudo registers. */
void
sh64_show_regs (void)
{
@@ -1922,13 +1918,12 @@ REGISTER_BYTE returns the register byte for the base register.
*/
/* *INDENT-ON* */
static int
-sh_sh64_register_byte (int reg_nr)
+sh64_register_byte (int reg_nr)
{
int base_regnum = -1;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
/* If it is a pseudo register, get the number of the first floating
- point register that is part of it. */
+ point register that is part of it. */
if (reg_nr >= DR0_REGNUM
&& reg_nr <= DR_LAST_REGNUM)
base_regnum = dr_reg_base_num (reg_nr);
@@ -1942,14 +1937,14 @@ sh_sh64_register_byte (int reg_nr)
base_regnum = fv_reg_base_num (reg_nr);
/* sh compact pseudo register. FPSCR is a pathological case, need to
- treat it as special. */
+ treat it as special. */
else if ((reg_nr >= R0_C_REGNUM
&& reg_nr <= FV_LAST_C_REGNUM)
&& reg_nr != FPSCR_C_REGNUM)
base_regnum = sh64_compact_reg_base_num (reg_nr);
- /* Now return the offset in bytes within the register cache. */
- /* sh media pseudo register, i.e. any of DR, FFP, FV registers. */
+ /* Now return the offset in bytes within the register cache. */
+ /* sh media pseudo register, i.e. any of DR, FFP, FV registers. */
if (reg_nr >= DR0_REGNUM
&& reg_nr <= FV_LAST_REGNUM)
return (base_regnum - FP0_REGNUM + 1) * 4
@@ -1985,19 +1980,19 @@ sh_sh64_register_byte (int reg_nr)
else if (reg_nr == FPSCR_C_REGNUM)
/* This is complicated, for now return the beginning of the
- architectural FPSCR register. */
+ architectural FPSCR register. */
return (TR7_REGNUM + 1) * 8;
else if (reg_nr == FPUL_C_REGNUM)
return ((base_regnum - FP0_REGNUM) * 4 +
(TR7_REGNUM + 1) * 8 + 4);
- /* It is not a pseudo register. */
- /* It is a 64 bit register. */
+ /* It is not a pseudo register. */
+ /* It is a 64 bit register. */
else if (reg_nr <= TR7_REGNUM)
return reg_nr * 8;
- /* It is a 32 bit register. */
+ /* It is a 32 bit register. */
else if (reg_nr == FPSCR_REGNUM)
return (FPSCR_REGNUM * 8);
@@ -2007,43 +2002,8 @@ sh_sh64_register_byte (int reg_nr)
+ (reg_nr - FP0_REGNUM + 1) * 4);
}
-static int
-sh_sh64_register_raw_size (int reg_nr)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- if ((reg_nr >= DR0_REGNUM
- && reg_nr <= DR_LAST_REGNUM)
- || (reg_nr >= FPP0_REGNUM
- && reg_nr <= FPP_LAST_REGNUM)
- || (reg_nr >= DR0_C_REGNUM
- && reg_nr <= DR_LAST_C_REGNUM)
- || (reg_nr <= TR7_REGNUM))
- return 8;
-
- else if ((reg_nr >= FV0_REGNUM
- && reg_nr <= FV_LAST_REGNUM)
- || (reg_nr >= FV0_C_REGNUM
- && reg_nr <= FV_LAST_C_REGNUM))
- return 16;
-
- else /* this covers also the 32-bit SH compact registers. */
- return 4;
-}
-
-/* ??????? FIXME */
-static int
-sh_sh64_register_virtual_size (int reg_nr)
-{
- if (reg_nr >= FP0_REGNUM
- && reg_nr <= FP_LAST_REGNUM)
- return 4;
- else
- return 8;
-}
-
static struct type *
-sh_sh64_build_float_register_type (int high)
+sh64_build_float_register_type (int high)
{
struct type *temp;
@@ -2051,11 +2011,11 @@ sh_sh64_build_float_register_type (int high)
return create_array_type (NULL, builtin_type_float, temp);
}
+/* Return the GDB type object for the "standard" data type
+ of data in register REG_NR. */
static struct type *
-sh_sh64_register_virtual_type (int reg_nr)
+sh64_register_type (struct gdbarch *gdbarch, int reg_nr)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
if ((reg_nr >= FP0_REGNUM
&& reg_nr <= FP_LAST_REGNUM)
|| (reg_nr >= FP0_C_REGNUM
@@ -2068,12 +2028,12 @@ sh_sh64_register_virtual_type (int reg_nr)
return builtin_type_double;
else if (reg_nr >= FPP0_REGNUM
&& reg_nr <= FPP_LAST_REGNUM)
- return sh_sh64_build_float_register_type (1);
+ return sh64_build_float_register_type (1);
else if ((reg_nr >= FV0_REGNUM
&& reg_nr <= FV_LAST_REGNUM)
||(reg_nr >= FV0_C_REGNUM
&& reg_nr <= FV_LAST_C_REGNUM))
- return sh_sh64_build_float_register_type (3);
+ return sh64_build_float_register_type (3);
else if (reg_nr == FPSCR_REGNUM)
return builtin_type_int;
else if (reg_nr >= R0_C_REGNUM
@@ -2084,15 +2044,13 @@ sh_sh64_register_virtual_type (int reg_nr)
}
static void
-sh_sh64_register_convert_to_virtual (int regnum, struct type *type,
+sh64_register_convert_to_virtual (int regnum, struct type *type,
char *from, char *to)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
if (TARGET_BYTE_ORDER != BFD_ENDIAN_LITTLE)
{
- /* It is a no-op. */
- memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regnum));
+ /* It is a no-op. */
+ memcpy (to, from, register_size (current_gdbarch, regnum));
return;
}
@@ -2102,23 +2060,22 @@ sh_sh64_register_convert_to_virtual (int regnum, struct type *type,
&& regnum <= DR_LAST_C_REGNUM))
{
DOUBLEST val;
- floatformat_to_doublest (&floatformat_ieee_double_littlebyte_bigword, from, &val);
- deprecated_store_floating(to, TYPE_LENGTH(type), val);
+ floatformat_to_doublest (&floatformat_ieee_double_littlebyte_bigword,
+ from, &val);
+ store_typed_floating (to, type, val);
}
else
- error("sh_register_convert_to_virtual called with non DR register number");
+ error ("sh64_register_convert_to_virtual called with non DR register number");
}
static void
-sh_sh64_register_convert_to_raw (struct type *type, int regnum,
+sh64_register_convert_to_raw (struct type *type, int regnum,
const void *from, void *to)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
if (TARGET_BYTE_ORDER != BFD_ENDIAN_LITTLE)
{
- /* It is a no-op. */
- memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regnum));
+ /* It is a no-op. */
+ memcpy (to, from, register_size (current_gdbarch, regnum));
return;
}
@@ -2128,10 +2085,11 @@ sh_sh64_register_convert_to_raw (struct type *type, int regnum,
&& regnum <= DR_LAST_C_REGNUM))
{
DOUBLEST val = deprecated_extract_floating (from, TYPE_LENGTH(type));
- floatformat_from_doublest (&floatformat_ieee_double_littlebyte_bigword, &val, to);
+ floatformat_from_doublest (&floatformat_ieee_double_littlebyte_bigword,
+ &val, to);
}
else
- error("sh_register_convert_to_raw called with non DR register number");
+ error ("sh64_register_convert_to_raw called with non DR register number");
}
static void
@@ -2142,24 +2100,25 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
int portion;
int offset = 0;
char temp_buffer[MAX_REGISTER_SIZE];
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (reg_nr >= DR0_REGNUM
&& reg_nr <= DR_LAST_REGNUM)
{
base_regnum = dr_reg_base_num (reg_nr);
- /* Build the value in the provided buffer. */
+ /* Build the value in the provided buffer. */
/* DR regs are double precision registers obtained by
- concatenating 2 single precision floating point registers. */
+ concatenating 2 single precision floating point registers. */
for (portion = 0; portion < 2; portion++)
regcache_raw_read (regcache, base_regnum + portion,
(temp_buffer
- + DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
+ + register_size (gdbarch, base_regnum) * portion));
- /* We must pay attention to the endiannes. */
- sh_sh64_register_convert_to_virtual (reg_nr, DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr),
- temp_buffer, buffer);
+ /* We must pay attention to the endianness. */
+ sh64_register_convert_to_virtual (reg_nr,
+ gdbarch_register_type (gdbarch,
+ reg_nr),
+ temp_buffer, buffer);
}
@@ -2168,13 +2127,13 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
{
base_regnum = fpp_reg_base_num (reg_nr);
- /* Build the value in the provided buffer. */
+ /* Build the value in the provided buffer. */
/* FPP regs are pairs of single precision registers obtained by
- concatenating 2 single precision floating point registers. */
+ concatenating 2 single precision floating point registers. */
for (portion = 0; portion < 2; portion++)
regcache_raw_read (regcache, base_regnum + portion,
((char *) buffer
- + DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
+ + register_size (gdbarch, base_regnum) * portion));
}
else if (reg_nr >= FV0_REGNUM
@@ -2182,13 +2141,13 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
{
base_regnum = fv_reg_base_num (reg_nr);
- /* Build the value in the provided buffer. */
+ /* Build the value in the provided buffer. */
/* FV regs are vectors of single precision registers obtained by
- concatenating 4 single precision floating point registers. */
+ concatenating 4 single precision floating point registers. */
for (portion = 0; portion < 4; portion++)
regcache_raw_read (regcache, base_regnum + portion,
((char *) buffer
- + DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
+ + register_size (gdbarch, base_regnum) * portion));
}
/* sh compact pseudo registers. 1-to-1 with a shmedia register */
@@ -2197,7 +2156,7 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
{
base_regnum = sh64_compact_reg_base_num (reg_nr);
- /* Build the value in the provided buffer. */
+ /* Build the value in the provided buffer. */
regcache_raw_read (regcache, base_regnum, temp_buffer);
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
offset = 4;
@@ -2209,9 +2168,9 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
{
base_regnum = sh64_compact_reg_base_num (reg_nr);
- /* Build the value in the provided buffer. */
+ /* Build the value in the provided buffer. */
/* Floating point registers map 1-1 to the media fp regs,
- they have the same size and endienness. */
+ they have the same size and endianness. */
regcache_raw_read (regcache, base_regnum, buffer);
}
@@ -2221,15 +2180,17 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
base_regnum = sh64_compact_reg_base_num (reg_nr);
/* DR_C regs are double precision registers obtained by
- concatenating 2 single precision floating point registers. */
+ concatenating 2 single precision floating point registers. */
for (portion = 0; portion < 2; portion++)
regcache_raw_read (regcache, base_regnum + portion,
(temp_buffer
- + DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
+ + register_size (gdbarch, base_regnum) * portion));
- /* We must pay attention to the endiannes. */
- sh_sh64_register_convert_to_virtual (reg_nr, DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr),
- temp_buffer, buffer);
+ /* We must pay attention to the endianness. */
+ sh64_register_convert_to_virtual (reg_nr,
+ gdbarch_register_type (gdbarch,
+ reg_nr),
+ temp_buffer, buffer);
}
else if (reg_nr >= FV0_C_REGNUM
@@ -2237,13 +2198,13 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
{
base_regnum = sh64_compact_reg_base_num (reg_nr);
- /* Build the value in the provided buffer. */
+ /* Build the value in the provided buffer. */
/* FV_C regs are vectors of single precision registers obtained by
- concatenating 4 single precision floating point registers. */
+ concatenating 4 single precision floating point registers. */
for (portion = 0; portion < 4; portion++)
regcache_raw_read (regcache, base_regnum + portion,
((char *) buffer
- + DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
+ + register_size (gdbarch, base_regnum) * portion));
}
else if (reg_nr == FPSCR_C_REGNUM)
@@ -2259,7 +2220,7 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
fpscr_base_regnum = FPSCR_REGNUM;
sr_base_regnum = SR_REGNUM;
- /* Build the value in the provided buffer. */
+ /* Build the value in the provided buffer. */
/* FPSCR_C is a very weird register that contains sparse bits
from the FPSCR and the SR architectural registers.
Specifically: */
@@ -2275,19 +2236,19 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
/* *INDENT-ON* */
/* Get FPSCR into a local buffer */
regcache_raw_read (regcache, fpscr_base_regnum, temp_buffer);
- /* Get value as an int. */
+ /* Get value as an int. */
fpscr_value = extract_unsigned_integer (temp_buffer, 4);
/* Get SR into a local buffer */
regcache_raw_read (regcache, sr_base_regnum, temp_buffer);
- /* Get value as an int. */
+ /* Get value as an int. */
sr_value = extract_unsigned_integer (temp_buffer, 4);
- /* Build the new value. */
+ /* Build the new value. */
fpscr_c_part1_value = fpscr_value & 0x3fffd;
fpscr_c_part2_value = (sr_value & 0x7000) << 6;
fpscr_c_value = fpscr_c_part1_value | fpscr_c_part2_value;
/* Store that in out buffer!!! */
store_unsigned_integer (buffer, 4, fpscr_c_value);
- /* FIXME There is surely an endianness gotcha here. */
+ /* FIXME There is surely an endianness gotcha here. */
}
else if (reg_nr == FPUL_C_REGNUM)
@@ -2295,7 +2256,7 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
base_regnum = sh64_compact_reg_base_num (reg_nr);
/* FPUL_C register is floating point register 32,
- same size, same endianness. */
+ same size, same endianness. */
regcache_raw_read (regcache, base_regnum, buffer);
}
}
@@ -2307,22 +2268,22 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
int base_regnum, portion;
int offset;
char temp_buffer[MAX_REGISTER_SIZE];
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (reg_nr >= DR0_REGNUM
&& reg_nr <= DR_LAST_REGNUM)
{
base_regnum = dr_reg_base_num (reg_nr);
- /* We must pay attention to the endiannes. */
- sh_sh64_register_convert_to_raw (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr), reg_nr,
- buffer, temp_buffer);
-
+ /* We must pay attention to the endianness. */
+ sh64_register_convert_to_raw (gdbarch_register_type (gdbarch, reg_nr),
+ reg_nr,
+ buffer, temp_buffer);
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 2; portion++)
regcache_raw_write (regcache, base_regnum + portion,
(temp_buffer
- + DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
+ + register_size (gdbarch,
+ base_regnum) * portion));
}
else if (reg_nr >= FPP0_REGNUM
@@ -2334,7 +2295,8 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
for (portion = 0; portion < 2; portion++)
regcache_raw_write (regcache, base_regnum + portion,
((char *) buffer
- + DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
+ + register_size (gdbarch,
+ base_regnum) * portion));
}
else if (reg_nr >= FV0_REGNUM
@@ -2346,7 +2308,8 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
for (portion = 0; portion < 4; portion++)
regcache_raw_write (regcache, base_regnum + portion,
((char *) buffer
- + DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
+ + register_size (gdbarch,
+ base_regnum) * portion));
}
/* sh compact general pseudo registers. 1-to-1 with a shmedia
@@ -2355,14 +2318,14 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
&& reg_nr <= T_C_REGNUM)
{
base_regnum = sh64_compact_reg_base_num (reg_nr);
- /* reg_nr is 32 bit here, and base_regnum is 64 bits. */
+ /* reg_nr is 32 bit here, and base_regnum is 64 bits. */
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
offset = 4;
else
offset = 0;
/* Let's read the value of the base register into a temporary
buffer, so that overwriting the last four bytes with the new
- value of the pseudo will leave the upper 4 bytes unchanged. */
+ value of the pseudo will leave the upper 4 bytes unchanged. */
regcache_raw_read (regcache, base_regnum, temp_buffer);
/* Write as an 8 byte quantity */
memcpy (temp_buffer + offset, buffer, 4);
@@ -2370,7 +2333,7 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
}
/* sh floating point compact pseudo registers. 1-to-1 with a shmedia
- registers. Both are 4 bytes. */
+ registers. Both are 4 bytes. */
else if (reg_nr >= FP0_C_REGNUM
&& reg_nr <= FP_LAST_C_REGNUM)
{
@@ -2384,13 +2347,16 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
base_regnum = sh64_compact_reg_base_num (reg_nr);
for (portion = 0; portion < 2; portion++)
{
- /* We must pay attention to the endiannes. */
- sh_sh64_register_convert_to_raw (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr), reg_nr,
- buffer, temp_buffer);
+ /* We must pay attention to the endianness. */
+ sh64_register_convert_to_raw (gdbarch_register_type (gdbarch,
+ reg_nr),
+ reg_nr,
+ buffer, temp_buffer);
regcache_raw_write (regcache, base_regnum + portion,
(temp_buffer
- + DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
+ + register_size (gdbarch,
+ base_regnum) * portion));
}
}
@@ -2403,7 +2369,8 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
{
regcache_raw_write (regcache, base_regnum + portion,
((char *) buffer
- + DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
+ + register_size (gdbarch,
+ base_regnum) * portion));
}
}
@@ -2435,10 +2402,10 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
21-31 reserved
*/
/* *INDENT-ON* */
- /* Get value as an int. */
+ /* Get value as an int. */
fpscr_c_value = extract_unsigned_integer (buffer, 4);
- /* Build the new values. */
+ /* Build the new values. */
fpscr_mask = 0x0003fffd;
sr_mask = 0x001c0000;
@@ -2467,7 +2434,7 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
}
}
-/* Floating point vector of 4 float registers. */
+/* Floating point vector of 4 float registers. */
static void
do_fv_register_info (struct gdbarch *gdbarch, struct ui_file *file,
int fv_regnum)
@@ -2481,7 +2448,7 @@ do_fv_register_info (struct gdbarch *gdbarch, struct ui_file *file,
(int) read_register (first_fp_reg_num + 3));
}
-/* Floating point vector of 4 float registers, compact mode. */
+/* Floating point vector of 4 float registers, compact mode. */
static void
do_fv_c_register_info (int fv_regnum)
{
@@ -2495,7 +2462,7 @@ do_fv_c_register_info (int fv_regnum)
}
/* Pairs of single regs. The DR are instead double precision
- registers. */
+ registers. */
static void
do_fpp_register_info (int fpp_regnum)
{
@@ -2507,7 +2474,7 @@ do_fpp_register_info (int fpp_regnum)
(int) read_register (first_fp_reg_num + 1));
}
-/* Double precision registers. */
+/* Double precision registers. */
static void
do_dr_register_info (struct gdbarch *gdbarch, struct ui_file *file,
int dr_regnum)
@@ -2520,7 +2487,7 @@ do_dr_register_info (struct gdbarch *gdbarch, struct ui_file *file,
(int) read_register (first_fp_reg_num + 1));
}
-/* Double precision registers, compact mode. */
+/* Double precision registers, compact mode. */
static void
do_dr_c_register_info (int dr_regnum)
{
@@ -2532,7 +2499,7 @@ do_dr_c_register_info (int dr_regnum)
(int) read_register (first_fp_reg_num +1));
}
-/* General register in compact mode. */
+/* General register in compact mode. */
static void
do_r_c_register_info (int r_c_regnum)
{
@@ -2544,8 +2511,8 @@ do_r_c_register_info (int r_c_regnum)
}
/* FIXME:!! THIS SHOULD TAKE CARE OF GETTING THE RIGHT PORTION OF THE
- shmedia REGISTERS. */
-/* Control registers, compact mode. */
+ shmedia REGISTERS. */
+/* Control registers, compact mode. */
static void
do_cr_c_register_info (int cr_c_regnum)
{
@@ -2578,7 +2545,7 @@ sh_do_fp_register (struct gdbarch *gdbarch, struct ui_file *file, int regnum)
int inv;
int j;
- /* Allocate space for the float. */
+ /* Allocate space for the float. */
raw_buffer = (char *) alloca (register_size (gdbarch, FP0_REGNUM));
/* Get the data in raw format. */
@@ -2588,17 +2555,17 @@ sh_do_fp_register (struct gdbarch *gdbarch, struct ui_file *file, int regnum)
/* Get the register as a number */
flt = unpack_double (builtin_type_float, raw_buffer, &inv);
- /* Print the name and some spaces. */
+ /* Print the name and some spaces. */
fputs_filtered (REGISTER_NAME (regnum), file);
print_spaces_filtered (15 - strlen (REGISTER_NAME (regnum)), file);
- /* Print the value. */
+ /* Print the value. */
if (inv)
fprintf_filtered (file, "<invalid float>");
else
fprintf_filtered (file, "%-10.9g", flt);
- /* Print the fp register as hex. */
+ /* Print the fp register as hex. */
fprintf_filtered (file, "\t(raw 0x");
for (j = 0; j < register_size (gdbarch, regnum); j++)
{
@@ -2613,8 +2580,7 @@ sh_do_fp_register (struct gdbarch *gdbarch, struct ui_file *file, int regnum)
static void
sh64_do_pseudo_register (int regnum)
{
- /* All the sh64-compact mode registers are pseudo registers. */
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ /* All the sh64-compact mode registers are pseudo registers. */
if (regnum < NUM_REGS
|| regnum >= NUM_REGS + NUM_PSEUDO_REGS_SH_MEDIA + NUM_PSEUDO_REGS_SH_COMPACT)
@@ -2643,16 +2609,15 @@ sh64_do_pseudo_register (int regnum)
else if (regnum >= R0_C_REGNUM
&& regnum <= R_LAST_C_REGNUM)
- do_r_c_register_info (regnum); /* FIXME, this function will not print the right format */
-
+ /* FIXME, this function will not print the right format. */
+ do_r_c_register_info (regnum);
else if (regnum >= FP0_C_REGNUM
&& regnum <= FP_LAST_C_REGNUM)
- sh_do_fp_register (current_gdbarch, gdb_stdout, regnum); /* this should work also for pseudoregs */
-
+ /* This should work also for pseudoregs. */
+ sh_do_fp_register (current_gdbarch, gdb_stdout, regnum);
else if (regnum >= PC_C_REGNUM
&& regnum <= FPUL_C_REGNUM)
do_cr_c_register_info (regnum);
-
}
static void
@@ -2750,7 +2715,6 @@ sh_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
static void
sh_compact_do_registers_info (int regnum, int fpregs)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
if (regnum != -1) /* do one specified register */
{
if (*(REGISTER_NAME (regnum)) == '\0')
@@ -2780,7 +2744,7 @@ sh64_do_registers_info (int regnum, int fpregs)
sh_print_registers_info (current_gdbarch, gdb_stdout,
deprecated_selected_frame, regnum, fpregs);
else
- sh_compact_do_registers_info (regnum, fpregs);
+ sh_compact_do_registers_info (regnum, fpregs);
}
#ifdef SVR4_SHARED_LIBS
@@ -2842,7 +2806,7 @@ sh64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
return arches->gdbarch;
/* None found, create a new architecture from the information
- provided. */
+ provided. */
tdep = XMALLOC (struct gdbarch_tdep);
gdbarch = gdbarch_alloc (&info, tdep);
@@ -2853,7 +2817,7 @@ sh64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Determine the ABI */
if (info.abfd && bfd_get_arch_size (info.abfd) == 64)
{
- /* If the ABI is the 64-bit one, it can only be sh-media. */
+ /* If the ABI is the 64-bit one, it can only be sh-media. */
tdep->sh_abi = SH_ABI_64;
set_gdbarch_ptr_bit (gdbarch, 8 * TARGET_CHAR_BIT);
set_gdbarch_long_bit (gdbarch, 8 * TARGET_CHAR_BIT);
@@ -2861,7 +2825,7 @@ sh64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
else
{
/* If the ABI is the 32-bit one it could be either media or
- compact. */
+ compact. */
tdep->sh_abi = SH_ABI_32;
set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
@@ -2899,33 +2863,23 @@ sh64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_fp0_regnum (gdbarch, SIM_SH64_FR0_REGNUM);
set_gdbarch_pc_regnum (gdbarch, 64);
- /* the number of real registers is the same whether we are in
- ISA16(compact) or ISA32(media). */
+ /* The number of real registers is the same whether we are in
+ ISA16(compact) or ISA32(media). */
set_gdbarch_num_regs (gdbarch, SIM_SH64_NR_REGS);
- set_gdbarch_deprecated_register_size (gdbarch, 8); /*????*/
set_gdbarch_deprecated_register_bytes (gdbarch,
((SIM_SH64_NR_FP_REGS + 1) * 4)
+ (SIM_SH64_NR_REGS - SIM_SH64_NR_FP_REGS -1) * 8);
- set_gdbarch_register_name (gdbarch, sh_sh64_register_name);
- set_gdbarch_deprecated_register_virtual_type (gdbarch, sh_sh64_register_virtual_type);
+ set_gdbarch_register_name (gdbarch, sh64_register_name);
+ set_gdbarch_register_type (gdbarch, sh64_register_type);
set_gdbarch_deprecated_store_return_value (gdbarch, sh64_store_return_value);
- set_gdbarch_deprecated_register_raw_size (gdbarch, sh_sh64_register_raw_size);
- set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_sh64_register_raw_size);
- set_gdbarch_deprecated_register_byte (gdbarch, sh_sh64_register_byte);
- /* This seems awfully wrong!*/
- /*set_gdbarch_deprecated_max_register_raw_size (gdbarch, 8);*/
- /* should include the size of the pseudo regs. */
- set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4 * 4);
- /* Or should that go in the virtual_size? */
- /*set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 8);*/
- set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4 * 4);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh64_register_byte);
set_gdbarch_pseudo_register_read (gdbarch, sh64_pseudo_register_read);
set_gdbarch_pseudo_register_write (gdbarch, sh64_pseudo_register_write);
set_gdbarch_deprecated_do_registers_info (gdbarch, sh64_do_registers_info);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh64_nofp_frame_init_saved_regs);
- set_gdbarch_breakpoint_from_pc (gdbarch, sh_sh64_breakpoint_from_pc);
+ set_gdbarch_breakpoint_from_pc (gdbarch, sh64_breakpoint_from_pc);
set_gdbarch_deprecated_call_dummy_words (gdbarch, sh64_call_dummy_words);
set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (sh64_call_dummy_words));
diff --git a/gdb/solib.h b/gdb/solib.h
index 936f037a46f..01971f412e7 100644
--- a/gdb/solib.h
+++ b/gdb/solib.h
@@ -149,7 +149,7 @@ extern void solib_create_inferior_hook (void); /* solib.c */
*/
#define SOLIB_UNLOADED_LIBRARY_PATHNAME(pid) \
-(0)
+""
/* This function returns TRUE if pc is the address of an instruction that
lies within the dynamic linker (such as the event hook, or the dld
diff --git a/gdb/source.c b/gdb/source.c
index 0ed3b3e5c9f..2b8d3a387fd 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -260,7 +260,7 @@ select_source_symtab (struct symtab *s)
{
char *name = s->filename;
int len = strlen (name);
- if (!(len > 2 && (STREQ (&name[len - 2], ".h"))))
+ if (!(len > 2 && (DEPRECATED_STREQ (&name[len - 2], ".h"))))
{
current_source_symtab = s;
}
@@ -277,7 +277,7 @@ select_source_symtab (struct symtab *s)
{
char *name = ps->filename;
int len = strlen (name);
- if (!(len > 2 && (STREQ (&name[len - 2], ".h"))))
+ if (!(len > 2 && (DEPRECATED_STREQ (&name[len - 2], ".h"))))
{
cs_pst = ps;
}
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index c32d3029b54..d3b24186769 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -433,7 +433,7 @@ sparc_frame_saved_pc (struct frame_info *frame)
as the third parameter. The offset to the saved pc is 12. */
find_pc_partial_function (get_frame_pc (frame), &name,
(CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
- if (name && STREQ (name, "ucbsigvechandler"))
+ if (name && DEPRECATED_STREQ (name, "ucbsigvechandler"))
saved_pc_offset = 12;
/* The sigcontext address is contained in register O2. */
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 7d04cc7c637..a4143e84b9a 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -1118,7 +1118,9 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
if (local_symbols
&& local_symbols->nsyms > 0
-#ifndef USE_REGISTER_NOT_ARG
+#ifndef DEPRECATED_USE_REGISTER_NOT_ARG
+ /* DEPRECATED_USE_REGISTER_NOT_ARG is only defined by
+ the SPARC. */
&& gdbarch_stabs_argument_has_addr (current_gdbarch,
SYMBOL_TYPE (sym))
#endif
@@ -1562,11 +1564,9 @@ again:
*pp = from + 1;
}
- /* Now check to see whether the type has already been
- declared. This was written for arrays of cross-referenced
- types before we had TYPE_CODE_TARGET_STUBBED, so I'm pretty
- sure it is not necessary anymore. But it might be a good
- idea, to save a little memory. */
+ /* If this type has already been declared, then reuse the same
+ type, rather than allocating a new one. This saves some
+ memory. */
for (ppt = file_symbols; ppt; ppt = ppt->next)
for (i = 0; i < ppt->nsyms; i++)
@@ -1580,6 +1580,8 @@ again:
{
obstack_free (&objfile->type_obstack, type_name);
type = SYMBOL_TYPE (sym);
+ if (typenums[0] != -1)
+ *dbx_lookup_type (typenums) = type;
return type;
}
}
diff --git a/gdb/stack.c b/gdb/stack.c
index 82820aa72a9..28ff09dbc26 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -1356,7 +1356,7 @@ print_block_frame_labels (struct block *b, int *have_default,
ALL_BLOCK_SYMBOLS (b, iter, sym)
{
- if (STREQ (DEPRECATED_SYMBOL_NAME (sym), "default"))
+ if (DEPRECATED_STREQ (DEPRECATED_SYMBOL_NAME (sym), "default"))
{
if (*have_default)
continue;
@@ -1854,33 +1854,33 @@ return_command (char *retval_exp, int from_tty)
if (VALUE_LAZY (return_value))
value_fetch_lazy (return_value);
- /* Check that this architecture can handle the function's return
- type. In the case of "struct convention", still do the
- "return", just also warn the user. */
- if (gdbarch_return_value_p (current_gdbarch))
+ if (TYPE_CODE (return_type) == TYPE_CODE_VOID)
+ /* If the return-type is "void", don't try to find the
+ return-value's location. However, do still evaluate the
+ return expression so that, even when the expression result
+ is discarded, side effects such as "return i++" still
+ occure. */
+ return_value = NULL;
+ else if (!gdbarch_return_value_p (current_gdbarch)
+ && (TYPE_CODE (return_type) == TYPE_CODE_STRUCT
+ || TYPE_CODE (return_type) == TYPE_CODE_UNION))
{
- if (gdbarch_return_value (current_gdbarch, return_type,
- NULL, NULL, NULL)
- == RETURN_VALUE_STRUCT_CONVENTION)
- return_value = NULL;
+ /* NOTE: cagney/2003-10-20: Compatibility hack for legacy
+ code. Old architectures don't expect STORE_RETURN_VALUE
+ to be called with with a small struct that needs to be
+ stored in registers. Don't start doing it now. */
+ query_prefix = "\
+A structure or union return type is not supported by this architecture.\n\
+If you continue, the return value that you specified will be ignored.\n";
+ return_value = NULL;
}
- else
+ else if (using_struct_return (return_type, 0))
{
- /* NOTE: cagney/2003-10-20: The double check is to ensure
- that the STORE_RETURN_VALUE call, further down, is not
- applied to a struct or union return-value. It wasn't
- allowed previously, so don't start allowing it now. An
- ABI that uses "register convention" to return small
- structures and should implement the "return_value"
- architecture method. */
- if (using_struct_return (return_type, 0)
- || TYPE_CODE (return_type) == TYPE_CODE_STRUCT
- || TYPE_CODE (return_type) == TYPE_CODE_UNION)
- return_value = NULL;
+ query_prefix = "\
+The location at which to store the function's return value is unknown.\n\
+If you continue, the return value that you specified will be ignored.\n";
+ return_value = NULL;
}
- if (return_value == NULL)
- query_prefix = "\
-The location at which to store the function's return value is unknown.\n";
}
/* Does an interactive user really want to do this? Include
@@ -2036,7 +2036,14 @@ get_frame_language (void)
if (deprecated_selected_frame)
{
- s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
+ /* We determine the current frame language by looking up its
+ associated symtab. To retrieve this symtab, we use the frame PC.
+ However we cannot use the frame pc as is, because it usually points
+ to the instruction following the "call", which is sometimes the first
+ instruction of another function. So we rely on
+ get_frame_address_in_block(), it provides us with a PC which is
+ guaranteed to be inside the frame's code block. */
+ s = find_pc_symtab (get_frame_address_in_block (deprecated_selected_frame));
if (s)
flang = s->language;
else
diff --git a/gdb/symfile.c b/gdb/symfile.c
index f2656fb4fd9..d58a8ecb9ab 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1226,7 +1226,7 @@ symbol_file_command (char *args, int from_tty)
if (strcmp (*argv, "-mapped") == 0)
flags |= OBJF_MAPPED;
else
- if (STREQ (*argv, "-readnow"))
+ if (strcmp (*argv, "-readnow") == 0)
flags |= OBJF_READNOW;
else
if (**argv == '-')
@@ -2682,7 +2682,8 @@ add_psymbol_to_list (char *name, int namelength, domain_enum domain,
SYMBOL_SET_NAMES (&psymbol, buf, namelength, objfile);
/* Stash the partial symbol away in the cache */
- psym = bcache (&psymbol, sizeof (struct partial_symbol), objfile->psymbol_cache);
+ psym = deprecated_bcache (&psymbol, sizeof (struct partial_symbol),
+ objfile->psymbol_cache);
/* Save pointer to partial symbol in psymtab, growing symtab if needed. */
if (list->next >= list->list + list->size)
@@ -2719,7 +2720,8 @@ add_psymbol_with_dem_name_to_list (char *name, int namelength, char *dem_name,
memcpy (buf, name, namelength);
buf[namelength] = '\0';
- DEPRECATED_SYMBOL_NAME (&psymbol) = bcache (buf, namelength + 1, objfile->psymbol_cache);
+ DEPRECATED_SYMBOL_NAME (&psymbol) = deprecated_bcache (buf, namelength + 1,
+ objfile->psymbol_cache);
buf = alloca (dem_namelength + 1);
memcpy (buf, dem_name, dem_namelength);
@@ -2730,7 +2732,7 @@ add_psymbol_with_dem_name_to_list (char *name, int namelength, char *dem_name,
case language_c:
case language_cplus:
SYMBOL_CPLUS_DEMANGLED_NAME (&psymbol) =
- bcache (buf, dem_namelength + 1, objfile->psymbol_cache);
+ deprecated_bcache (buf, dem_namelength + 1, objfile->psymbol_cache);
break;
/* FIXME What should be done for the default case? Ignoring for now. */
}
@@ -2751,7 +2753,8 @@ add_psymbol_with_dem_name_to_list (char *name, int namelength, char *dem_name,
SYMBOL_INIT_LANGUAGE_SPECIFIC (&psymbol, language);
/* Stash the partial symbol away in the cache */
- psym = bcache (&psymbol, sizeof (struct partial_symbol), objfile->psymbol_cache);
+ psym = deprecated_bcache (&psymbol, sizeof (struct partial_symbol),
+ objfile->psymbol_cache);
/* Save pointer to partial symbol in psymtab, growing symtab if needed. */
if (list->next >= list->list + list->size)
diff --git a/gdb/symtab.c b/gdb/symtab.c
index ed024d6c6db..f959970ad04 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -2389,10 +2389,6 @@ find_function_start_sal (struct symbol *sym, int funfirstline)
}
sal = find_pc_sect_line (pc, SYMBOL_BFD_SECTION (sym), 0);
-#ifdef PROLOGUE_FIRSTLINE_OVERLAP
- /* Convex: no need to suppress code on first line, if any */
- sal.pc = pc;
-#else
/* Check if SKIP_PROLOGUE left us in mid-line, and the next
line is still part of the same function. */
if (sal.pc != pc
@@ -2405,7 +2401,6 @@ find_function_start_sal (struct symbol *sym, int funfirstline)
sal = find_pc_sect_line (pc, SYMBOL_BFD_SECTION (sym), 0);
}
sal.pc = pc;
-#endif
return sal;
}
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 40ce11ec6b3..aa188e97921 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -326,6 +326,12 @@ struct minimal_symbol
char *info;
+ /* Size of this symbol. end_psymtab in dbxread.c uses this
+ information to calculate the end of the partial symtab based on the
+ address of the last symbol plus the size of the last symbol. */
+
+ unsigned long size;
+
#ifdef SOFUN_ADDRESS_MAYBE_MISSING
/* Which source file is this symbol in? Only relevant for mst_file_*. */
char *filename;
@@ -347,6 +353,7 @@ struct minimal_symbol
};
#define MSYMBOL_INFO(msymbol) (msymbol)->info
+#define MSYMBOL_SIZE(msymbol) (msymbol)->size
#define MSYMBOL_TYPE(msymbol) (msymbol)->type
diff --git a/gdb/target.c b/gdb/target.c
index 7e088b93b96..4c12bda3f8a 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -1284,7 +1284,7 @@ target_disconnect (char *args, int from_tty)
void
target_link (char *modname, CORE_ADDR *t_reloc)
{
- if (STREQ (current_target.to_shortname, "rombug"))
+ if (DEPRECATED_STREQ (current_target.to_shortname, "rombug"))
{
(current_target.to_lookup_symbol) (modname, t_reloc);
if (*t_reloc == 0)
diff --git a/gdb/target.h b/gdb/target.h
index 42b95964964..21956df9dd9 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -223,8 +223,10 @@ enum target_object
/* AVR target specific transfer. See "avr-tdep.c" and "remote.c". */
TARGET_OBJECT_AVR,
/* Transfer up-to LEN bytes of memory starting at OFFSET. */
- TARGET_OBJECT_MEMORY
- /* Possible future ojbects: TARGET_OJBECT_FILE, TARGET_OBJECT_PROC,
+ TARGET_OBJECT_MEMORY,
+ /* Kernel Unwind Table. See "ia64-tdep.c". */
+ TARGET_OBJECT_UNWIND_TABLE,
+ /* Possible future objects: TARGET_OBJECT_FILE, TARGET_OBJECT_PROC,
TARGET_OBJECT_AUXV, ... */
};
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 88f8c231792..f7b3a3073b2 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,242 @@
+2003-12-13 Jim Blandy <jimb@redhat.com>
+
+ * gdb.base/freebpcmd.exp, gdb.base/freebpcmd.c: New test.
+
+2003-12-12 Kevin Buettner <kevinb@redhat.com>
+
+ * gdb.asm/frv.inc: New file.
+ * gdb.asm/asm-source.exp: Add frv-*-* as a supported target.
+
+2003-12-09 Fred Fish <fnf@redhat.com>
+
+ * gdb.base/break.c (marker1, marker2, marker3, marker4): Move
+ functions to break1.c and leave prototypes behind. Add more
+ "set breakpoint NN here" comments.
+ * gdb.base/break1.c: New file.
+
+ * gdb.base/break.exp: Handle compiling test case from multiple
+ source files and change source file references as needed.
+ * gdb.base/completion.exp: Ditto.
+ * gdb.base/condbreak.exp: Ditto.
+ * gdb.base/define.exp: Ditto.
+ * gdb.base/ena-dis-br.exp: Ditto.
+ * gdb.base/info-proc.exp: Ditto.
+ * gdb.base/maint.exp: Ditto.
+ * gdb.base/until.exp: Ditto.
+
+ * gdb.base/condbreak.exp: Use bp_locationNN variables instead of
+ hardcoded line numbers.
+ * gdb.base/define.exp: Ditto.
+ * gdb.base/ena-dis-br.exp: Ditto.
+ * gdb.base/maint.exp: Ditto.
+ * gdb.base/until.exp: Ditto.
+
+ * gdb.base/completion.exp: Use "break1" for completion tests since
+ "break" is no longer a unique prefix.
+
+2003-12-06 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/structs.exp (test_struct_returns): When applicable, set
+ "return_value_unimplemented". When an unimplemented struct return
+ architecture, report incorrect values as a KFAIL
+
+2003-12-05 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/rtti.exp: Accept new wording of warning from
+ cp_lookup_rtti_type.
+
+2003-12-05 Michael Chastain <mec.gnu@mindspring.com>
+
+ Partial fix for PR testsuite/1456.
+ * gdb.base/scope.exp (test_at_main): Replace references to
+ gcc_compiled with calls to test_compiler_info.
+ (test_at_foo): Likewise.
+ (test_at_bar): Likewise.
+
+2003-12-04 Michael Chastain <mec.gnu@mindspring.com>
+
+ Partial fix for PR testsuite/1456.
+ * gdb.base/so-impl-ld.exp: Replace reference to gcc_compiled with call
+ to test_compiler_info.
+
+2003-12-03 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/so-impl-ld.exp: Update copyright notice.
+
+2003-12-02 Michael Chastain <mec.gnu@mindspring.com>
+
+ Partial fix for PR testsuite/1456.
+ * gdb.base/mips_pro.exp: Replace references to gcc_compiled with calls
+ to test_compiler_info.
+
+2003-11-28 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.objc/objcdecode.exp: Match and KFAIL the output that comes
+ from current versions of gdb. Clean up regular expressions.
+ Delete redundant timeout case.
+
+2003-11-28 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.objc/nondebug.exp: Match and KFAIL the output that comes
+ from current versions of gdb. Clean up regular expressions.
+ Delete redundant timeout case.
+
+2003-12-01 Michael Chastain <mec.gnu@mindspring.com>
+
+ Partial fix for PR testsuite/1456.
+ * gdb.base/callfuncs.exp (do_function_calls): Replace reference to
+ gcc_compiled with call to test_compiler_info.
+
+2003-11-30 Michael Chastain <mec.gnu@mindspring.com>
+
+ Partial fix for PR testsuite/1456.
+ * gdb.base/list.exp (test_list_function): Delete unused declaration
+ of gcc_compiled.
+
+2003-11-29 Michael Chastain <mec.gnu@mindspring.com>
+
+ Partial fix for PR testsuite/1456.
+ * gdb.base/complex.exp: Replace reference to gcc_compiled with
+ call to test_compiler_info.
+
+2003-11-29 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.asm/asm-source.exp: Initialize asm-note to "empty". Set
+ asm-note to "netbsd" for *-*-netbsdelf* and x86_64-*-netbsd*. Use
+ it to create the appropriate note.inc.
+ * gdb.asm/asmsrc1.s: Include "note.inc".
+ * gdb.asm/netbsd.inc: New file.
+ * gdb.asm/empty.inc: New file.
+
+2003-11-28 Michael Chastain <mec.gnu@mindspring.com>
+
+ Partial fix for PR testsuite/1456.
+ * gdb.base/constvars.exp: Replace references to gcc_compiled with
+ calls to test_compiler_info.
+
+2003-11-27 Michael Chastain <mec.gnu@mindspring.com>
+
+ Partial fix for PR testsuite/1456.
+ * gdb.base/volatile.exp: Replace references to gcc_compiled with
+ calls to test_compiler_info.
+
+2003-11-27 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/structs.exp: Use i*86-*-* instead of i686-*-* as a
+ pattern for the KFAILs.
+
+2003-11-25 Adam Fedor <fedor@gnu.org>
+
+ * gdb.objc/objcdecode.exp: Test for PR objc/1238.
+ * gdb.objc/objcdecode.m: New file.
+
+2003-11-25 Adam Fedor <fedor@gnu.org>
+
+ * gdb.objc/nondebug.exp: Test for PR objc/1236.
+ * gdb.objc/nondebug.m: New file.
+
+2003-11-26 Ben Elliston <bje@wasabisystems.com>
+
+ * gdb.asm/asm-source.exp: Make sure the final link succeeds on
+ NetBSD as it does on FreeBSD. Modelled on a similar change by
+ Mark Kettenis on 2003-05-30.
+ (link-flags): Set to "--entry _start" regardless of target.
+ Special linker flags are to be appended to $link-flags.
+ * gdb.asm/mips.inc (gdbasm_startup): Remove __start label.
+
+2003-11-25 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/method.exp: Accept output of new demangler.
+
+2003-11-25 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb/class2.exp: New file.
+ * gdb/class2.cc: New file.
+
+2003-11-25 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/templates.exp (test_ptype_of_templates): Accept output
+ of new demangler.
+
+2003-11-23 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.arch/i386-unwind.exp: Use gdb_run_cmd and gdb_expect instead
+ of gdb_test "run".
+
+2003-11-23 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.arch/i386-unwind.exp: Don't use runto_main. Change
+ "continue" into "run".
+
+2003-11-23 Michael Chastain <mec.gnu@mindspring.com>
+
+ Partial fix for PR testsuite/1456.
+ * gdb.cp/ambiguous.exp: Replace reference to gcc_compiled with
+ call to test_compiler_info.
+ * gdb.cp/ctti.exp: Likewise.
+ * gdb.cp/derivation.exp: Likewise.
+ * gdb.cp/member-ptr.exp: Likewise.
+ * gdb.cp/virtfunc.exp (test_virtual_calls): Remove unused
+ reference to gcc_compiled.
+
+2003-11-23 Michael Chastain <mec.gnu@mindspring.com>
+
+ Fix PR testsuite/1463.
+ * gdb.base/structs.exp (start_structs_test): Call
+ get_debug_format before using the debug format.
+
+2003-11-22 Andrew Cagney <cagney@redhat.com>
+
+ * lib/gdb.exp (gdb_test_multiple): Add simple example.
+ * gdb.base/structs.exp: Use gdb_test_multiple.
+
+2003-11-20 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/structs.exp: Handle and recover from internal errors.
+ Replace "foo${n}" with "foo<n>" in test messages.
+
+ * gdb.base/structs.exp: Update copyright. Rewrite.
+ * gdb.base/structs.c: Update copyright. Rewrite.
+
+ * lib/gdb.exp (gdb_internal_error_resync): Issue a perror when the
+ resync count exceeded.
+
+ * gdb.base/maint.exp: Use gdb_internal_error_resync to recover
+ from the internal error.
+ * lib/gdb.exp (gdb_internal_error_resync): New procedure.
+ Original from Jim Blandy.
+ (gdb_test_multiple): Use gdb_internal_error_resync.
+
+2003-11-19 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/callfuncs.exp: Change the XFAILed descriptor test to a
+ KFAIL.
+
+2003-11-17 Mark Kettenis <kettenis@gnu.org>
+
+ New testcase for PR backtrace/1435.
+ * gdb.arch/i386-unwind.exp: New file.
+ * gdb.arch/i386-unwind.c: New file.
+
+2003-11-17 Andrew Cagney <cagney@redhat.com>
+
+ * lib/gdb.exp (compiler_info): New global.
+ (test_compiler_info): New function.
+ (get_compiler_info): Set compiler_info.
+ * lib/compiler.c, lib/compiler.cc: Add copyright. When GNUC, set
+ "compiler_info" to gcc-<major>-<minor>.
+
+2003-11-15 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.trace/configure: Remove.
+
+2003-11-13 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.base/break.c: Add comments to aid finding line numbers for
+ breakpoints.
+ * gdb.base/break.exp: Remove all references to explicit line
+ numbers.
+
2003-11-11 David Carlton <carlton@kealia.com>
* gdb.cp/namespace.exp: KFAIL various tests with respect to PR
diff --git a/gdb/config/mips/tm-tx39.h b/gdb/testsuite/gdb.arch/i386-unwind.c
index 81f3b6ddc41..6d10ecb84b2 100644
--- a/gdb/config/mips/tm-tx39.h
+++ b/gdb/testsuite/gdb.arch/i386-unwind.c
@@ -1,4 +1,6 @@
-/* Copyright 1993, 1997, 1999, 2000 Free Software Foundation, Inc.
+/* Unwinder test program.
+
+ Copyright 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -6,27 +8,35 @@
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 "mips/tm-mips.h"
+void
+trap (void)
+{
+ asm ("int $0x03");
+}
+
+/* Make sure that main directly follows a function without an
+ epilogue. */
-#undef MIPS_REGISTER_NAMES
-#define MIPS_REGISTER_NAMES \
- { "sr", "lo", "hi", "bad", "cause","pc", \
- "", "", "", "", "", "", "", "", \
- "", "", "", "", "", "", "", "", \
- "", "", "", "", "", "", "", "", \
- "", "", "", "", "", "", "", "", \
- "", "", "", "", \
- "", "", "", "", "", "", "", "", \
- "", "", "config", "cache", "debug", "depc", "epc", "" \
- }
+asm(".text\n"
+ " .align 8\n"
+ " .globl gdb1435\n"
+ "gdb1435:\n"
+ " pushl %ebp\n"
+ " mov %esp, %ebp\n"
+ " call trap\n"
+ " .globl main\n"
+ "main:\n"
+ " pushl %ebp\n"
+ " mov %esp, %ebp\n"
+ " call gdb1435\n");
diff --git a/gdb/testsuite/gdb.arch/i386-unwind.exp b/gdb/testsuite/gdb.arch/i386-unwind.exp
new file mode 100644
index 00000000000..9c3130fc8c3
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/i386-unwind.exp
@@ -0,0 +1,68 @@
+# Copyright 2003 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@gnu.org
+
+# This file is part of the gdb testsuite.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+# Test i386 unwinder.
+
+set prms_id 0
+set bug_id 0
+
+if ![istarget "i?86-*-*"] then {
+ verbose "Skipping i386 unwinder tests."
+ return
+}
+
+set testfile "i386-unwind"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# Testcase for backtrace/1435.
+
+# We use gdb_run_cmd so this stands a chance to work for remote
+# targets too.
+gdb_run_cmd
+
+gdb_expect {
+ -re "Program received signal SIGTRAP.*$gdb_prompt $" {
+ pass "run past gdb1435"
+ }
+ -re ".*$gdb_prompt $" {
+ fail "run past gdb1435"
+ }
+ timeout {
+ fail "run past gdb1435 (timeout)"
+ }
+}
+
+gdb_test "backtrace 10" \
+ "#1\[ \t]*$hex in gdb1435.*\r\n#2\[ \t\]*$hex in main.*" \
+ "backtrace past gdb1435"
diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
index 8b0df38f3f1..e41bfec1a4d 100644
--- a/gdb/testsuite/gdb.asm/asm-source.exp
+++ b/gdb/testsuite/gdb.asm/asm-source.exp
@@ -32,8 +32,9 @@ set prms_id 0
set bug_id 0
set asm-arch ""
+set asm-note "empty"
set asm-flags ""
-set link-flags ""
+set link-flags "--entry _start"
switch -glob -- [istarget] {
"alpha*-*-*" {
@@ -51,6 +52,9 @@ switch -glob -- [istarget] {
"d10v-*-*" {
set asm-arch d10v
}
+ "frv-*-*" {
+ set asm-arch frv
+ }
"s390-*-*" {
set asm-arch s390
}
@@ -63,13 +67,10 @@ switch -glob -- [istarget] {
}
"i\[3456\]86-*-*" {
set asm-arch i386
- if [istarget "*-*-cygwin*"] then {
- set link-flags "--entry _start"
- }
}
"m32r*-*" {
set asm-arch m32r
- set link-flags "-Wl,--whole-archive -lgloss -Wl,--no-whole-archive"
+ append link-flags " -Wl,--whole-archive -lgloss -Wl,--no-whole-archive"
}
"m6811-*-*" {
set asm-arch m68hc11
@@ -88,7 +89,6 @@ switch -glob -- [istarget] {
"sh*-*-*" {
set asm-arch sh
set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}"
- set link-flags "--entry _start"
}
"sparc-*-*" {
set asm-arch sparc
@@ -118,13 +118,20 @@ if { "${asm-arch}" == "" } {
gdb_suppress_entire_file "Assembly source test -- not implemented for this target."
}
-# On FreeBSD, crt1.o the final link will fail because of unresolved
-# symbols. It turns out that libc.so references symbols that are
-# normally provided by crt1.o, which isn't linked in since we specify
-# -nostartfiles. Using -nostdlib doesn't help since target_compile
-# automatically adds -lm. Linking statically avoids this mess.
-if [istarget "*-*-freebsd*"] then {
- set link-flags "-static"
+# On FreeBSD and NetBSD, crt1.o the final link will fail because of
+# unresolved symbols. It turns out that libc.so references symbols
+# that are normally provided by crt1.o, which isn't linked in since we
+# specify -nostartfiles. Using -nostdlib doesn't help since
+# target_compile automatically adds -lm. Linking statically avoids
+# this mess.
+if {[istarget "*-*-freebsd*"] || [istarget "*-*-netbsd*"]} then {
+ append link-flags " -static"
+}
+
+# On NetBSD/ELF we need a special NetBSD-identifying note section.
+if { [istarget "*-*-netbsdelf*"]
+ || [istarget "x86_64-*-netbsd*"] } then {
+ set asm-note "netbsd"
}
# Watch out, we are invoking the assembler, but the testsuite sets multilib
@@ -149,6 +156,8 @@ set srcfile2 asmsrc2.s
remote_exec build "rm -f ${subdir}/arch.inc"
remote_download host ${srcdir}/${subdir}/${asm-arch}.inc ${subdir}/arch.inc
+remote_exec build "rm -f ${subdir}/note.inc"
+remote_download host ${srcdir}/${subdir}/${asm-note}.inc ${subdir}/note.inc
if { "${asm-flags}" == "" } {
#set asm-flags "-Wa,-gstabs,-I${srcdir}/${subdir},-I${objdir}/${subdir}"
@@ -362,3 +371,4 @@ gdb_test "disassem foostatic" ".*<foostatic\\+0>:.*End of assembler dump." \
"look at static function"
remote_exec build "rm -f ${subdir}/arch.inc"
+remote_exec build "rm -f ${subdir}/note.inc"
diff --git a/gdb/testsuite/gdb.asm/asmsrc1.s b/gdb/testsuite/gdb.asm/asmsrc1.s
index cba0e90ec2a..48bfb86d419 100644
--- a/gdb/testsuite/gdb.asm/asmsrc1.s
+++ b/gdb/testsuite/gdb.asm/asmsrc1.s
@@ -65,3 +65,5 @@ gdbasm_datavar globalvar 11
comment "A static variable"
gdbasm_datavar staticvar 5
+
+ .include "note.inc"
diff --git a/gdb/testsuite/gdb.asm/empty.inc b/gdb/testsuite/gdb.asm/empty.inc
new file mode 100644
index 00000000000..e786488d9f2
--- /dev/null
+++ b/gdb/testsuite/gdb.asm/empty.inc
@@ -0,0 +1 @@
+ comment "empty"
diff --git a/gdb/testsuite/gdb.asm/frv.inc b/gdb/testsuite/gdb.asm/frv.inc
new file mode 100644
index 00000000000..e8f3b8ff1f3
--- /dev/null
+++ b/gdb/testsuite/gdb.asm/frv.inc
@@ -0,0 +1,54 @@
+ comment "subroutine prologue"
+ .macro gdbasm_enter
+ addi sp,#-16,sp
+ sti fp, @(sp,0)
+ mov sp, fp
+ movsg lr, gr5
+ sti gr5, @(fp,8)
+ .endm
+
+ comment "subroutine epilogue"
+ .macro gdbasm_leave
+ ldi @(fp,8), gr5
+ ld @(fp,gr0), fp
+ addi sp,#16,sp
+ jmpl @(gr5,gr0)
+ .endm
+
+ .macro gdbasm_call subr
+ call \subr
+ .endm
+
+ .macro gdbasm_several_nops
+ nop
+ nop
+ nop
+ nop
+ .endm
+
+ comment "exit (0)"
+ .macro gdbasm_exit0
+ comment "Don't know how to exit, but this will certainly halt..."
+ ldi @(gr0,0), gr5
+ .endm
+
+ comment "crt0 startup"
+ .macro gdbasm_startup
+ call .Lcall
+.Lcall: movsg lr, gr4
+ sethi #gprelhi(.Lcall), gr5
+ setlo #gprello(.Lcall), gr5
+ sub gr4, gr5, gr16
+
+ sethi #gprelhi(_stack), sp
+ setlo #gprello(_stack), sp
+ setlos #0, fp
+ add sp, gr16, sp
+ .endm
+
+ comment "Declare a data variable"
+ .macro gdbasm_datavar name value
+ .data
+\name:
+ .long \value
+ .endm
diff --git a/gdb/testsuite/gdb.asm/mips.inc b/gdb/testsuite/gdb.asm/mips.inc
index 751f73f859b..a0992bb530f 100644
--- a/gdb/testsuite/gdb.asm/mips.inc
+++ b/gdb/testsuite/gdb.asm/mips.inc
@@ -58,7 +58,5 @@
comment "crt0 startup"
.macro gdbasm_startup
- .global __start
-__start:
move $fp, $sp
.endm
diff --git a/gdb/testsuite/gdb.asm/netbsd.inc b/gdb/testsuite/gdb.asm/netbsd.inc
new file mode 100644
index 00000000000..9446966c334
--- /dev/null
+++ b/gdb/testsuite/gdb.asm/netbsd.inc
@@ -0,0 +1,12 @@
+ comment "netbsd .note"
+
+.section ".note.netbsd.ident", "a"
+ .p2align 2
+
+ .long 7
+ .long 4
+ .long 1
+ .ascii "NetBSD\0\0"
+ .long 105010000
+
+ .p2align 2
diff --git a/gdb/testsuite/gdb.base/break.c b/gdb/testsuite/gdb.base/break.c
index 9e458b316bb..bf398fcca91 100644
--- a/gdb/testsuite/gdb.base/break.c
+++ b/gdb/testsuite/gdb.base/break.c
@@ -1,3 +1,25 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 1992, 1993, 1994, 1995, 1999, 2002, 2003 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 */
+
#ifdef vxworks
# include <stdio.h>
@@ -32,23 +54,16 @@ char *arg;
# include <stdlib.h>
#endif /* ! vxworks */
-/*
- * The following functions do nothing useful. They are included simply
- * as places to try setting breakpoints at. They are explicitly
- * "one-line functions" to verify that this case works (some versions
- * of gcc have or have had problems with this).
- */
-
#ifdef PROTOTYPES
-int marker1 (void) { return (0); }
-int marker2 (int a) { return (1); }
-void marker3 (char *a, char *b) {}
-void marker4 (long d) {}
+extern int marker1 (void);
+extern int marker2 (int a);
+extern void marker3 (char *a, char *b);
+extern void marker4 (long d);
#else
-int marker1 () { return (0); }
-int marker2 (a) int a; { return (1); }
-void marker3 (a, b) char *a, *b; {}
-void marker4 (d) long d; {}
+extern int marker1 ();
+extern int marker2 ();
+extern void marker3 ();
+extern void marker4 ();
#endif
/*
@@ -69,21 +84,21 @@ char *argv[], **envp;
#endif
{
#ifdef usestubs
- set_debug_traps();
+ set_debug_traps(); /* set breakpoint 5 here */
breakpoint();
#endif
- if (argc == 12345) { /* an unlikely value < 2^16, in case uninited */
+ if (argc == 12345) { /* an unlikely value < 2^16, in case uninited */ /* set breakpoint 6 here */
fprintf (stderr, "usage: factorial <number>\n");
return 1;
}
- printf ("%d\n", factorial (atoi ("6")));
-
- marker1 ();
- marker2 (43);
- marker3 ("stack", "trace");
+ printf ("%d\n", factorial (atoi ("6"))); /* set breakpoint 1 here */
+ /* set breakpoint 12 here */
+ marker1 (); /* set breakpoint 11 here */
+ marker2 (43); /* set breakpoint 20 here */
+ marker3 ("stack", "trace"); /* set breakpoint 21 here */
marker4 (177601976L);
- argc = (argc == 12345); /* This is silly, but we can step off of it */
- return argc;
+ argc = (argc == 12345); /* This is silly, but we can step off of it */ /* set breakpoint 2 here */
+ return argc; /* set breakpoint 10 here */
}
#ifdef PROTOTYPES
@@ -93,10 +108,10 @@ int factorial (value)
int value;
#endif
{
- if (value > 1) {
+ if (value > 1) { /* set breakpoint 7 here */
value *= factorial (value - 1);
}
- return (value);
+ return (value); /* set breakpoint 19 here */
}
#ifdef PROTOTYPES
@@ -106,7 +121,7 @@ int multi_line_if_conditional (a, b, c)
int a, b, c;
#endif
{
- if (a
+ if (a /* set breakpoint 3 here */
&& b
&& c)
return 0;
@@ -121,7 +136,7 @@ int multi_line_while_conditional (a, b, c)
int a, b, c;
#endif
{
- while (a
+ while (a /* set breakpoint 4 here */
&& b
&& c)
{
diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp
index 38820ec9fc9..c425d1439cf 100644
--- a/gdb/testsuite/gdb.base/break.exp
+++ b/gdb/testsuite/gdb.base/break.exp
@@ -34,10 +34,19 @@ set bug_id 0
set testfile "break"
set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
if [get_compiler_info ${binfile}] {
@@ -87,7 +96,7 @@ gdb_test "break main" \
# test break at quoted function
#
gdb_test "break \"marker2\"" \
- "Breakpoint.*at.* file .*$srcfile, line.*" \
+ "Breakpoint.*at.* file .*$srcfile1, line.*" \
"breakpoint quoted function"
#
@@ -97,6 +106,8 @@ gdb_test "break $srcfile:factorial" \
"Breakpoint.*at.* file .*$srcfile, line.*" \
"breakpoint function in file"
+set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
+
#
# test break at line number
#
@@ -109,44 +120,51 @@ gdb_test "break $srcfile:factorial" \
gdb_test "list main" \
".*main \\(argc, argv, envp\\).*" \
"use `list' to establish default source file"
-gdb_test "break 79" \
- "Breakpoint.*at.* file .*$srcfile, line 79\\." \
+gdb_test "break $bp_location1" \
+ "Breakpoint.*at.* file .*$srcfile, line $bp_location1\\." \
"breakpoint line number"
#
# test duplicate breakpoint
#
-gdb_test "break 79" \
- "Note: breakpoint \[0-9\]+ also set at pc.*Breakpoint \[0-9\]+ at.* file .*$srcfile, line 79\\." \
+gdb_test "break $bp_location1" \
+ "Note: breakpoint \[0-9\]+ also set at pc.*Breakpoint \[0-9\]+ at.* file .*$srcfile, line $bp_location1\\." \
"breakpoint duplicate"
+set bp_location2 [gdb_get_line_number "set breakpoint 2 here"]
+
#
# test break at line number in file
#
-gdb_test "break $srcfile:85" \
- "Breakpoint.*at.* file .*$srcfile, line 85\\." \
+gdb_test "break $srcfile:$bp_location2" \
+ "Breakpoint.*at.* file .*$srcfile, line $bp_location2\\." \
"breakpoint line number in file"
+set bp_location3 [gdb_get_line_number "set breakpoint 3 here"]
+set bp_location4 [gdb_get_line_number "set breakpoint 4 here"]
#
# Test putting a break at the start of a multi-line if conditional.
# Verify the breakpoint was put at the start of the conditional.
#
gdb_test "break multi_line_if_conditional" \
- "Breakpoint.*at.* file .*$srcfile, line 109\\." \
+ "Breakpoint.*at.* file .*$srcfile, line $bp_location3\\." \
"breakpoint at start of multi line if conditional"
gdb_test "break multi_line_while_conditional" \
- "Breakpoint.*at.* file .*$srcfile, line 124\\." \
+ "Breakpoint.*at.* file .*$srcfile, line $bp_location4\\." \
"breakpoint at start of multi line while conditional"
+set bp_location5 [gdb_get_line_number "set breakpoint 5 here"]
+set bp_location6 [gdb_get_line_number "set breakpoint 6 here"]
+
#
# check to see what breakpoints are set
#
if [target_info exists gdb_stub] {
- set main_line 72
+ set main_line $bp_location5
} else {
- set main_line 75
+ set main_line $bp_location6
}
if {$hp_aCC_compiler} {
@@ -155,16 +173,20 @@ if {$hp_aCC_compiler} {
set proto ""
}
+set bp_location7 [gdb_get_line_number "set breakpoint 7 here"]
+set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1]
+set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile1]
+
gdb_test "info break" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$main_line.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in marker2 at .*$srcfile:4\[49\].*
-\[0-9\]+\[\t \]+breakpoint keep y.* in factorial$proto at .*$srcfile:96.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:79.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:79.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:85.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in multi_line_if_conditional at .*$srcfile:109.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in multi_line_while_conditional at .*$srcfile:124" \
+\[0-9\]+\[\t \]+breakpoint keep y.* in marker2 at .*$srcfile1:($bp_location8|$bp_location9).*
+\[0-9\]+\[\t \]+breakpoint keep y.* in factorial$proto at .*$srcfile:$bp_location7.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location1.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location1.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location2.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in multi_line_if_conditional at .*$srcfile:$bp_location3.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in multi_line_while_conditional at .*$srcfile:$bp_location4" \
"breakpoint info"
# FIXME: The rest of this test doesn't work with anything that can't
@@ -191,52 +213,53 @@ if ![target_info exists use_gdb_stub] {
send_gdb "y\n"
exp_continue
}
- -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:75.*75\[\t \]+if .argc.* \{.*$gdb_prompt $"\
+ -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.* \{.*$gdb_prompt $"\
{ pass "run until function breakpoint" }
-re ".*$gdb_prompt $" { fail "run until function breakpoint" }
timeout { fail "run until function breakpoint (timeout)" }
}
} else {
if ![target_info exists gdb_stub] {
- gdb_test continue ".*Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:75.*75\[\t \]+if .argc.*\{.*" "stub continue"
+ gdb_test continue ".*Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.*\{.*" "stub continue"
}
}
#
# run until the breakpoint at a line number
#
-gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:79.*79\[\t \]+printf.*factorial.*" \
+gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location1.*$bp_location1\[\t \]+printf.*factorial.*" \
"run until breakpoint set at a line number"
#
# Run until the breakpoint set in a function in a file
#
for {set i 6} {$i >= 1} {incr i -1} {
- gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, factorial \\(value=$i\\) at .*$srcfile:96.*96\[\t \]+.*if .value > 1. \{.*" \
+ gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, factorial \\(value=$i\\) at .*$srcfile:$bp_location7.*$bp_location7\[\t \]+.*if .value > 1. \{.*" \
"run until file:function($i) breakpoint"
}
#
# Run until the breakpoint set at a quoted function
#
-gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, (0x\[0-9a-f\]+ in )?marker2 \\(a=43\\) at .*$srcfile:4\[49\].*" \
+gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, (0x\[0-9a-f\]+ in )?marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*" \
"run until quoted breakpoint"
#
# run until the file:function breakpoint at a line number in a file
#
-gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:85.*85\[\t \]+argc = \\(argc == 12345\\);.*" \
+gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location2.*$bp_location2\[\t \]+argc = \\(argc == 12345\\);.*" \
"run until file:linenum breakpoint"
# Test break at offset +1
+set bp_location10 [gdb_get_line_number "set breakpoint 10 here"]
gdb_test "break +1" \
- "Breakpoint.*at.* file .*$srcfile, line 86\\." \
+ "Breakpoint.*at.* file .*$srcfile, line $bp_location10\\." \
"breakpoint offset +1"
# Check to see if breakpoint is hit when stepped onto
gdb_test "step" \
- ".*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:86.*86\[\t \]+return argc;" \
+ ".*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location10.*$bp_location10\[\t \]+return argc;.*breakpoint 10 here.*" \
"step onto breakpoint"
#
@@ -260,37 +283,38 @@ gdb_test "tbreak $srcfile:factorial" "Breakpoint.*at.* file .*$srcfile, line.*"
#
# test break at line number
#
-send_gdb "tbreak 79\n"
+send_gdb "tbreak $bp_location1\n"
gdb_expect {
- -re "Breakpoint.*at.* file .*$srcfile, line 79.*$gdb_prompt $" { pass "Temporary breakpoint line number #1" }
+ -re "Breakpoint.*at.* file .*$srcfile, line $bp_location1.*$gdb_prompt $" { pass "Temporary breakpoint line number #1" }
-re ".*$gdb_prompt $" { pass "Temporary breakpoint line number #1" }
timeout { fail "breakpoint line number #1 (timeout)" }
}
-gdb_test "tbreak 75" "Breakpoint.*at.* file .*$srcfile, line 75.*" "Temporary breakpoint line number #2"
+gdb_test "tbreak $bp_location6" "Breakpoint.*at.* file .*$srcfile, line $bp_location6.*" "Temporary breakpoint line number #2"
#
# test break at line number in file
#
-send_gdb "tbreak $srcfile:85\n"
+send_gdb "tbreak $srcfile:$bp_location2\n"
gdb_expect {
- -re "Breakpoint.*at.* file .*$srcfile, line 85.*$gdb_prompt $" { pass "Temporary breakpoint line number in file #1" }
+ -re "Breakpoint.*at.* file .*$srcfile, line $bp_location2.*$gdb_prompt $" { pass "Temporary breakpoint line number in file #1" }
-re ".*$gdb_prompt $" { pass "Temporary breakpoint line number in file #1" }
timeout { fail "Temporary breakpoint line number in file #1 (timeout)" }
}
-gdb_test "tbreak $srcfile:81" "Breakpoint.*at.* file .*$srcfile, line 81.*" "Temporary breakpoint line number in file #2"
+set bp_location11 [gdb_get_line_number "set breakpoint 11 here"]
+gdb_test "tbreak $srcfile:$bp_location11" "Breakpoint.*at.* file .*$srcfile, line $bp_location11.*" "Temporary breakpoint line number in file #2"
#
# check to see what breakpoints are set (temporary this time)
#
gdb_test "info break" "Num Type.*Disp Enb Address.*What.*\[\r\n\]
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$main_line.*\[\r\n\]
-\[0-9\]+\[\t \]+breakpoint del.*y.*in factorial$proto at .*$srcfile:96.*\[\r\n\]
-\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:79.*\[\r\n\]
-\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:75.*\[\r\n\]
-\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:85.*\[\r\n\]
-\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:81.*" \
+\[0-9\]+\[\t \]+breakpoint del.*y.*in factorial$proto at .*$srcfile:$bp_location7.*\[\r\n\]
+\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$bp_location1.*\[\r\n\]
+\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$bp_location6.*\[\r\n\]
+\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$bp_location2.*\[\r\n\]
+\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$bp_location11.*" \
"Temporary breakpoint info"
@@ -378,7 +402,7 @@ gdb_expect {
# Run to the desired default location. If not positioned here, the
# tests below don't work.
#
-gdb_test "until 79" "main .* at .*:79.*" "until 79"
+gdb_test "until $bp_location1" "main .* at .*:$bp_location1.*" "until bp_location1"
# Verify that GDB allows one to just say "break", which is treated
@@ -427,13 +451,13 @@ gdb_expect {
#
if ![runto_main] then { fail "break tests suppressed" }
-send_gdb "break 79\n"
+send_gdb "break $bp_location1\n"
gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line 79.*$gdb_prompt $"\
- {pass "set to-be-silent break 79"}
+ -re "Breakpoint (\[0-9\]*) at .*, line $bp_location1.*$gdb_prompt $"\
+ {pass "set to-be-silent break bp_location1"}
-re "$gdb_prompt $"\
- {fail "set to-be-silent break 79"}
- timeout {fail "(timeout) set to-be-silent break 79"}
+ {fail "set to-be-silent break bp_location1"}
+ timeout {fail "(timeout) set to-be-silent break bp_location1"}
}
send_gdb "commands $expect_out(1,string)\n"
@@ -441,33 +465,33 @@ send_gdb "silent\n"
send_gdb "end\n"
gdb_expect {
-re ".*$gdb_prompt $"\
- {pass "set silent break 79"}
- timeout {fail "(timeout) set silent break 79"}
+ {pass "set silent break bp_location1"}
+ timeout {fail "(timeout) set silent break bp_location1"}
}
send_gdb "info break $expect_out(1,string)\n"
gdb_expect {
- -re "\[0-9\]*\[ \t\]*breakpoint.*:79\r\n\[ \t\]*silent.*$gdb_prompt $"\
- {pass "info silent break 79"}
+ -re "\[0-9\]*\[ \t\]*breakpoint.*:$bp_location1\r\n\[ \t\]*silent.*$gdb_prompt $"\
+ {pass "info silent break bp_location1"}
-re "$gdb_prompt $"\
- {fail "info silent break 79"}
- timeout {fail "(timeout) info silent break 79"}
+ {fail "info silent break bp_location1"}
+ timeout {fail "(timeout) info silent break bp_location1"}
}
send_gdb "continue\n"
gdb_expect {
-re "Continuing.\r\n$gdb_prompt $"\
- {pass "hit silent break 79"}
+ {pass "hit silent break bp_location1"}
-re "$gdb_prompt $"\
- {fail "hit silent break 79"}
- timeout {fail "(timeout) hit silent break 79"}
+ {fail "hit silent break bp_location1"}
+ timeout {fail "(timeout) hit silent break bp_location1"}
}
send_gdb "bt\n"
gdb_expect {
- -re "#0 main .* at .*:79.*$gdb_prompt $"\
- {pass "stopped for silent break 79"}
+ -re "#0 main .* at .*:$bp_location1.*$gdb_prompt $"\
+ {pass "stopped for silent break bp_location1"}
-re "$gdb_prompt $"\
- {fail "stopped for silent break 79"}
- timeout {fail "(timeout) stopped for silent break 79"}
+ {fail "stopped for silent break bp_location1"}
+ timeout {fail "(timeout) stopped for silent break bp_location1"}
}
# Verify that GDB can at least parse a breakpoint with the
@@ -475,7 +499,8 @@ gdb_expect {
# thread-specific breakpoint really triggers appropriately.
# The gdb.threads subdirectory contains tests for that.)
#
-send_gdb "break 80 thread 999\n"
+set bp_location12 [gdb_get_line_number "set breakpoint 12 here"]
+send_gdb "break $bp_location12 thread 999\n"
gdb_expect {
-re "Unknown thread 999.*$gdb_prompt $"\
{pass "thread-specific breakpoint on non-existent thread disallowed"}
@@ -483,7 +508,7 @@ gdb_expect {
{fail "thread-specific breakpoint on non-existent thread disallowed"}
timeout {fail "(timeout) thread-specific breakpoint on non-existent thread disallowed"}
}
-send_gdb "break 80 thread foo\n"
+send_gdb "break $bp_location12 thread foo\n"
gdb_expect {
-re "Junk after thread keyword..*$gdb_prompt $"\
{pass "thread-specific breakpoint on bogus thread ID disallowed"}
@@ -495,7 +520,7 @@ gdb_expect {
# Verify that GDB responds gracefully to a breakpoint command with
# trailing garbage.
#
-send_gdb "break 80 foo\n"
+send_gdb "break $bp_location12 foo\n"
gdb_expect {
-re "Junk at end of arguments..*$gdb_prompt $"\
{pass "breakpoint with trailing garbage disallowed"}
@@ -542,15 +567,15 @@ gdb_test "clear marker3" {Deleted breakpoints [0-9]+ [0-9]+.*}
# Verify that a breakpoint can be set via a convenience variable.
#
-send_gdb "set \$foo=81\n"
+send_gdb "set \$foo=$bp_location11\n"
gdb_expect {
-re "$gdb_prompt $"\
- {pass "set convenience variable \$foo to 81"}
- timeout {fail "(timeout) set convenience variable \$foo to 81"}
+ {pass "set convenience variable \$foo to bp_location11"}
+ timeout {fail "(timeout) set convenience variable \$foo to bp_location11"}
}
send_gdb "break \$foo\n"
gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line 81.*$gdb_prompt $"\
+ -re "Breakpoint (\[0-9\]*) at .*, line $bp_location11.*$gdb_prompt $"\
{pass "set breakpoint via convenience variable"}
-re "$gdb_prompt $"\
{fail "set breakpoint via convenience variable"}
@@ -579,7 +604,7 @@ gdb_expect {
#
send_gdb "break marker2\n"
gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line 4\[49\].*$gdb_prompt $"\
+ -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location8|$bp_location9).*$gdb_prompt $"\
{pass "set breakpoint on to-be-called function"}
-re "$gdb_prompt $"\
{fail "set breakpoint on to-be-called function"}
@@ -602,9 +627,9 @@ gdb_expect {
#
send_gdb "bt\n"
gdb_expect {
- -re "#0\[ \t\]*($hex in )?marker2.*:4\[49\]\r\n#1.*_sr4export.*$gdb_prompt $"\
+ -re "#0\[ \t\]*($hex in )?marker2.*:($bp_location8|$bp_location9)\r\n#1.*_sr4export.*$gdb_prompt $"\
{pass "backtrace while in called function"}
- -re "#0\[ \t\]*($hex in )?marker2.*:4\[49\]\r\n#1.*function called from gdb.*$gdb_prompt $"\
+ -re "#0\[ \t\]*($hex in )?marker2.*:($bp_location8|$bp_location9)\r\n#1.*function called from gdb.*$gdb_prompt $"\
{pass "backtrace while in called function"}
-re "$gdb_prompt $"\
{fail "backtrace while in called function"}
@@ -617,11 +642,11 @@ gdb_expect {
#
send_gdb "finish\n"
gdb_expect {
- -re "Run till exit from .*marker2.* at .*4\[49\]\r\n.* in _sr4export.*$gdb_prompt $"\
+ -re "Run till exit from .*marker2.* at .*($bp_location8|$bp_location9)\r\n.* in _sr4export.*$gdb_prompt $"\
{pass "finish from called function"}
- -re "Run till exit from .*marker2.* at .*4\[49\]\r\n.*function called from gdb.*$gdb_prompt $"\
+ -re "Run till exit from .*marker2.* at .*($bp_location8|$bp_location9)\r\n.*function called from gdb.*$gdb_prompt $"\
{pass "finish from called function"}
- -re "Run till exit from .*marker2.* at .*4\[49\]\r\n.*Value returned.*$gdb_prompt $"\
+ -re "Run till exit from .*marker2.* at .*($bp_location8|$bp_location9)\r\n.*Value returned.*$gdb_prompt $"\
{pass "finish from called function"}
-re "$gdb_prompt $"\
{fail "finish from called function"}
@@ -833,8 +858,16 @@ test_next_with_recursion
set binfileo2 ${objdir}/${subdir}/${testfile}o2
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfileo2}" executable {debug additional_flags="-O2" }] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}O0.o" object {debug "additional_flags=-w -O2"}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}O1.o" object {debug "additional_flags=-w -O2"}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${binfile}O0.o ${binfile}O1.o" "${binfileo2}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
if [get_compiler_info ${binfileo2}] {
@@ -861,7 +894,7 @@ gdb_test "break main" \
# test break at function
#
gdb_test "break marker4" \
- "Breakpoint.*at.* file .*$srcfile, line.*" \
+ "Breakpoint.*at.* file .*$srcfile1, line.*" \
"breakpoint small function, optimized file"
#
@@ -880,7 +913,7 @@ if ![target_info exists use_gdb_stub] {
send_gdb "y\n"
exp_continue
}
- -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:75.*75\[\t \]+if .argc.* \{.*$gdb_prompt $"\
+ -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.* \{.*$gdb_prompt $"\
{ pass "run until function breakpoint, optimized file" }
-re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$gdb_prompt $"\
{ pass "run until function breakpoint, optimized file (code motion)" }
@@ -889,7 +922,7 @@ if ![target_info exists use_gdb_stub] {
}
} else {
if ![target_info exists gdb_stub] {
- gdb_test continue ".*Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:75.*75\[\t \]+if .argc.*\{.*" "stub continue, optimized file"
+ gdb_test continue ".*Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.*\{.*" "stub continue, optimized file"
}
}
@@ -906,17 +939,19 @@ if ![target_info exists use_gdb_stub] {
# has no exactly matching line symbol, and GDB reports the breakpoint
# as if it were in the middle of a line rather than at the beginning.
+set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile1]
+set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile1]
send_gdb "continue\n"
gdb_expect {
- -re "Breakpoint $decimal, marker4 \\(d=177601976\\) at .*$srcfile:51\[\r\n\]+51\[\t \]+void marker4.*" {
+ -re "Breakpoint $decimal, marker4 \\(d=177601976\\) at .*$srcfile1:$bp_location13\[\r\n\]+$bp_location13\[\t \]+void marker4.*" {
pass "run until breakpoint set at small function, optimized file"
}
- -re "Breakpoint $decimal, $hex in marker4 \\(d=177601976\\) at .*$srcfile:51\[\r\n\]+51\[\t \]+void marker4.*" {
+ -re "Breakpoint $decimal, $hex in marker4 \\(d=177601976\\) at .*$srcfile1:$bp_location13\[\r\n\]+$bp_location13\[\t \]+void marker4.*" {
pass "run until breakpoint set at small function, optimized file"
}
- -re "Breakpoint $decimal, marker4 \\(d=177601976\\) at .*$srcfile:46\[\r\n\]+46\[\t \]+void marker4.*" {
+ -re "Breakpoint $decimal, marker4 \\(d=177601976\\) at .*$srcfile1:$bp_location14\[\r\n\]+$bp_location14\[\t \]+void marker4.*" {
# marker4() is defined at line 46 when compiled with -DPROTOTYPES
- pass "run until breakpoint set at small function, optimized file (line 46)"
+ pass "run until breakpoint set at small function, optimized file (line bp_location14)"
}
-re ".*$gdb_prompt " {
fail "run until breakpoint set at small function, optimized file"
diff --git a/gdb/testsuite/gdb.base/break1.c b/gdb/testsuite/gdb.base/break1.c
new file mode 100644
index 00000000000..2ed8b2a4a02
--- /dev/null
+++ b/gdb/testsuite/gdb.base/break1.c
@@ -0,0 +1,44 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 1992, 1993, 1994, 1995, 1999, 2002, 2003 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 */
+
+/* The code for this file was extracted from the gdb testsuite
+ testcase "break.c". */
+
+/* The following functions do nothing useful. They are included
+ simply as places to try setting breakpoints at. They are
+ explicitly "one-line functions" to verify that this case works
+ (some versions of gcc have or have had problems with this).
+
+ These functions are in a separate source file to prevent an
+ optimizing compiler from inlining them and optimizing them away. */
+
+#ifdef PROTOTYPES
+int marker1 (void) { return (0); } /* set breakpoint 15 here */
+int marker2 (int a) { return (1); } /* set breakpoint 8 here */
+void marker3 (char *a, char *b) {} /* set breakpoint 17 here */
+void marker4 (long d) {} /* set breakpoint 14 here */
+#else
+int marker1 () { return (0); } /* set breakpoint 16 here */
+int marker2 (a) int a; { return (1); } /* set breakpoint 9 here */
+void marker3 (a, b) char *a, *b; {} /* set breakpoint 18 here */
+void marker4 (d) long d; {} /* set breakpoint 13 here */
+#endif
diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp
index 7a5f14302d7..4446058f111 100644
--- a/gdb/testsuite/gdb.base/callfuncs.exp
+++ b/gdb/testsuite/gdb.base/callfuncs.exp
@@ -95,7 +95,6 @@ proc set_lang_c {} {
proc do_function_calls {} {
global prototypes
- global gcc_compiled
global gdb_prompt
# We need to up this because this can be really slow on some boards.
@@ -149,7 +148,7 @@ proc do_function_calls {} {
# to be a generic problem on quite a few platforms.
if $prototypes then {
setup_xfail "sparc-*-*" "mips*-*-*" 5318
- if {!$gcc_compiled} then {
+ if { ! [test_compiler_info gcc-*-*] } then {
setup_xfail "alpha-dec-osf2*" "i*86-*-sysv4*" 5318
}
}
@@ -182,30 +181,27 @@ proc do_function_calls {} {
gdb_test "p t_func_values(func_val2,func_val1)" " = 0"
gdb_test "p t_func_values(func_val1,func_val2)" " = 1"
- # On the rs6000, we need to pass the address of the trampoline routine,
- # not the address of add itself. I don't know how to go from add to
- # the address of the trampoline. Similar problems exist on the HPPA,
- # and in fact can present an unsolvable problem as the stubs may not
- # even exist in the user's program. We've slightly recoded t_func_values
- # to avoid such problems in the common case. This may or may not help
- # the RS6000.
- setup_xfail "rs6000*-*-*"
- setup_xfail "powerpc*-*-*"
- if {![istarget hppa*-*-hpux*]} then {
- gdb_test "p t_func_values(add,func_val2)" " = 1"
- }
-
- setup_xfail "rs6000*-*-*"
- setup_xfail "powerpc*-*-*"
- if {![istarget hppa*-*-hpux*]} then {
- gdb_test "p t_func_values(func_val1,doubleit)" " = 1"
- }
-
- setup_xfail "rs6000*-*-*"
- setup_xfail "powerpc*-*-*"
- if {![istarget hppa*-*-hpux*]} then {
- gdb_test "p t_call_add(add,3,4)" " = 7"
- }
+ # GDB currently screws up the passing of function parameters for
+ # ABIs that use function descriptors. Instead of passing the
+ # address of te function descriptor, GDB passes the address of the
+ # function body. This results in the called function treating the
+ # first few instructions of the function proper as a descriptor
+ # and attempting a jump through that (a totally random address).
+ setup_kfail "rs6000*-*-aix*" gdb/1457
+ setup_kfail "powerpc*-*-aix*" gdb/1457
+ setup_kfail "powerpc64*-*-*" gdb/1457
+ setup_kfail hppa*-*-hpux* gdb/1457
+ gdb_test "p t_func_values(add,func_val2)" " = 1"
+ setup_kfail "rs6000*-*-aix*" gdb/1457
+ setup_kfail "powerpc*-*-aix*" gdb/1457
+ setup_kfail "powerpc64*-*-*" gdb/1457
+ setup_kfail hppa*-*-hpux* gdb/1457
+ gdb_test "p t_func_values(func_val1,doubleit)" " = 1"
+ setup_kfail "rs6000*-*-aix*" gdb/1457
+ setup_kfail "powerpc*-*-aix*" gdb/1457
+ setup_kfail "powerpc64*-*-*" gdb/1457
+ setup_kfail hppa*-*-hpux* gdb/1457
+ gdb_test "p t_call_add(add,3,4)" " = 7"
gdb_test "p t_call_add(func_val1,3,4)" " = 7"
gdb_test "p t_enum_value1(enumval1)" " = 1"
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index a1ff58a2554..9f5435dff81 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -38,8 +38,8 @@
# "info ajksdlfk " no completions
# "info" " "
# "info " ambiguous (all info commands)
-# "p \"break" unambiguous (completes to filename "break.c")
-# "p \"break." unambiguous (should complete to "break.c" but does not,
+# "p \"break1" unambiguous (completes to filename "break1.c")
+# "p \"break1." unambiguous (should complete to "break1.c" but does not,
# due to readline limitations)
# "p 'a" ambiguous (all symbols starting with a)
# "p b-a" ambiguous (all symbols starting with a)
@@ -64,9 +64,19 @@ set bug_id 0
set testfile "break"
set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
if [get_compiler_info ${binfile}] {
@@ -351,61 +361,61 @@ gdb_expect {
}
-send_gdb "p \"break\t"
+send_gdb "p \"break1\t"
sleep 1
gdb_expect {
- -re "^p \"break\\\x07$"\
+ -re "^p \"break1\\\x07$"\
{ send_gdb "\n"
gdb_expect {
- -re ".*$gdb_prompt $" { fail "complete 'p \"break'"}
- timeout {fail "(timeout) complete 'p \"break'"}
+ -re ".*$gdb_prompt $" { fail "complete 'p \"break1'"}
+ timeout {fail "(timeout) complete 'p \"break1'"}
}
}
- -re "^p \"break\\.c\"$"\
+ -re "^p \"break1\\.c\"$"\
{ send_gdb "\n"
gdb_expect {
- -re ".*$gdb_prompt $" { pass "complete 'p \"break'"}
- timeout {fail "(timeout) complete 'p \"break'"}
+ -re ".*$gdb_prompt $" { pass "complete 'p \"break1'"}
+ timeout {fail "(timeout) complete 'p \"break1'"}
}
}
- -re "^p \"break.*$"
+ -re "^p \"break1.*$"
{ send_gdb "\n"
gdb_expect {
- -re ".*$gdb_prompt $" { fail "complete 'p \"break'"}
- timeout {fail "(timeout) complete 'p \"break'"}
+ -re ".*$gdb_prompt $" { fail "complete 'p \"break1'"}
+ timeout {fail "(timeout) complete 'p \"break1'"}
}
}
- -re ".*$gdb_prompt $" { fail "complete 'p \"break'" }
- timeout { fail "(timeout) complete 'p \"break'" }
+ -re ".*$gdb_prompt $" { fail "complete 'p \"break1'" }
+ timeout { fail "(timeout) complete 'p \"break1'" }
}
setup_xfail "*-*-*"
-send_gdb "p \"break.\t"
+send_gdb "p \"break1.\t"
sleep 1
gdb_expect {
- -re "^p \"break\\.\\\x07$"\
+ -re "^p \"break1\\.\\\x07$"\
{ send_gdb "\n"
gdb_expect {
- -re ".*$gdb_prompt $" { fail "complete 'p \"break.'"}
- timeout {fail "(timeout) complete 'p \"break.'"}
+ -re ".*$gdb_prompt $" { fail "complete 'p \"break1.'"}
+ timeout {fail "(timeout) complete 'p \"break1.'"}
}
}
- -re "^p \"break\\.c\"$"\
+ -re "^p \"break1\\.c\"$"\
{ send_gdb "\n"
gdb_expect {
- -re ".*$gdb_prompt $" { pass "complete 'p \"break.'"}
- timeout {fail "(timeout) complete 'p \"break.'"}
+ -re ".*$gdb_prompt $" { pass "complete 'p \"break1.'"}
+ timeout {fail "(timeout) complete 'p \"break1.'"}
}
}
- -re "^p \"break\\..*$"
+ -re "^p \"break1\\..*$"
{ send_gdb "\n"
gdb_expect {
- -re ".*$gdb_prompt $" { fail "complete 'p \"break.'"}
- timeout {fail "(timeout) complete 'p \"break.'"}
+ -re ".*$gdb_prompt $" { fail "complete 'p \"break1.'"}
+ timeout {fail "(timeout) complete 'p \"break1.'"}
}
}
- -re ".*$gdb_prompt $" { fail "complete 'p \"break.'" }
- timeout { fail "(timeout) complete 'p \"break.'" }
+ -re ".*$gdb_prompt $" { fail "complete 'p \"break1.'" }
+ timeout { fail "(timeout) complete 'p \"break1.'" }
}
send_gdb "p 'a\t"
@@ -682,7 +692,7 @@ gdb_expect {
-re "marker1.*$gdb_prompt info func marker$"\
{ send_gdb "\n"
gdb_expect {
- -re "All functions matching regular expression \"marker\":.*File.*break.c:\r\nint marker1\\((void|)\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long int\\);.*$gdb_prompt $"\
+ -re "All functions matching regular expression \"marker\":.*File.*break1.c:\r\nint marker1\\((void|)\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long int\\);.*$gdb_prompt $"\
{ pass "complete 'info func marke'"}
-re ".*$gdb_prompt $" { fail "complete 'info func marke'"}
timeout {fail "(timeout) complete 'info func marke'"}
diff --git a/gdb/testsuite/gdb.base/complex.exp b/gdb/testsuite/gdb.base/complex.exp
index f3f25e561b7..fac7f4f45c8 100644
--- a/gdb/testsuite/gdb.base/complex.exp
+++ b/gdb/testsuite/gdb.base/complex.exp
@@ -48,7 +48,7 @@ gdb_load $binfile
if [runto f2] then {
get_debug_format
- if {$gcc_compiled == 2 && [test_debug_format "DWARF 2"]} then {
+ if { [test_compiler_info gcc-2-*] && [test_debug_format "DWARF 2"] } then {
setup_xfail "*-*-*"
}
gdb_test "p *y" "\\\$\[0-9\]* = \{c = 42 '\\*', f = 1 \\+ 0 \\* I\}" \
diff --git a/gdb/testsuite/gdb.base/condbreak.exp b/gdb/testsuite/gdb.base/condbreak.exp
index c234431f15f..dc4df21fc0c 100644
--- a/gdb/testsuite/gdb.base/condbreak.exp
+++ b/gdb/testsuite/gdb.base/condbreak.exp
@@ -1,4 +1,4 @@
-# Copyright 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+# Copyright 1997, 1998, 1999, 2000, 2001, 2003 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
@@ -12,7 +12,7 @@
#
# 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. */
+# 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
@@ -35,10 +35,19 @@ set bug_id 0
set testfile "break"
set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
if [get_compiler_info ${binfile}] {
@@ -55,6 +64,13 @@ if [target_info exists gdb_stub] {
gdb_step_for_stub;
}
+set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
+set bp_location6 [gdb_get_line_number "set breakpoint 6 here"]
+set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1]
+set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile1]
+set bp_location15 [gdb_get_line_number "set breakpoint 15 here" $srcfile1]
+set bp_location16 [gdb_get_line_number "set breakpoint 16 here" $srcfile1]
+
#
# test break at function
#
@@ -66,15 +82,15 @@ gdb_test "break main" \
# test conditional break at function
#
gdb_test "break marker1 if 1==1" \
- "Breakpoint.*at.* file .*$srcfile, line.*"
+ "Breakpoint.*at.* file .*$srcfile1, line.*"
gdb_test "delete 2" ""
#
# test conditional break at line number
#
-gdb_test "break 79 if 1==1" \
- "Breakpoint.*at.* file .*$srcfile, line 79\\."
+gdb_test "break $srcfile:$bp_location1 if 1==1" \
+ "Breakpoint.*at.* file .*$srcfile, line $bp_location1\\."
gdb_test "delete 3" ""
@@ -82,16 +98,16 @@ gdb_test "delete 3" ""
# test conditional break at function
#
gdb_test "break marker1 if (1==1)" \
- "Breakpoint.*at.* file .*$srcfile, line.*"
+ "Breakpoint.*at.* file .*$srcfile1, line.*"
#
# test conditional break at line number
#
-gdb_test "break 79 if (1==1)" \
- "Breakpoint.*at.* file .*$srcfile, line 79\\."
+gdb_test "break $srcfile:$bp_location1 if (1==1)" \
+ "Breakpoint.*at.* file .*$srcfile, line $bp_location1\\."
gdb_test "break marker2 if (a==43)" \
- "Breakpoint.*at.* file .*$srcfile, line.*"
+ "Breakpoint.*at.* file .*$srcfile1, line.*"
#
# check to see what breakpoints are set
@@ -105,15 +121,14 @@ if {$hp_aCC_compiler} {
set marker2_proto ""
}
-set main_line 75
gdb_test "info break" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$main_line.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in marker1$marker1_proto at .*$srcfile:4\[38\].*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location6.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in marker1$marker1_proto at .*$srcfile1:($bp_location15|$bp_location16).*
\[\t \]+stop only if 1 == 1.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:79.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location1.*
\[\t \]+stop only if 1 == 1.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in marker2$marker2_proto at .*$srcfile:4\[49\].*
+\[0-9\]+\[\t \]+breakpoint keep y.* in marker2$marker2_proto at .*$srcfile1:($bp_location8|$bp_location9).*
\[\t \]+stop only if a == 43.*" \
"breakpoint info"
@@ -128,7 +143,7 @@ rerun_to_main
#
# run until the breakpoint at a line number
#
-gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:79.*79\[\t \]+printf.*factorial.*" \
+gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location1.*$bp_location1\[\t \]+printf.*factorial.*" \
"run until breakpoint set at a line number"
#
@@ -173,10 +188,10 @@ gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.
# Until the Dwarf2 writer gets fixed, I'm going to XFAIL its behavior.
send_gdb "continue\n"
gdb_expect {
- -re "Continuing\\..*Breakpoint \[0-9\]+, marker1 \\(\\) at .*$srcfile:4\[38\].*4\[38\]\[\t \]+.*$gdb_prompt $" {
+ -re "Continuing\\..*Breakpoint \[0-9\]+, marker1 \\(\\) at .*$srcfile1:($bp_location15|$bp_location16).*($bp_location15|$bp_location16)\[\t \]+.*$gdb_prompt $" {
pass "run until breakpoint at marker1"
}
- -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker1 \\(\\) at .*$srcfile:4\[38\].*4\[38\]\[\t \]+.*$gdb_prompt $" {
+ -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker1 \\(\\) at .*$srcfile1:($bp_location15|$bp_location16).*($bp_location15|$bp_location16)\[\t \]+.*$gdb_prompt $" {
xfail "run until breakpoint at marker1"
}
-re "$gdb_prompt $" {
@@ -192,10 +207,10 @@ gdb_expect {
setup_xfail hppa2.0w-*-* 11512CLLbs
send_gdb "continue\n"
gdb_expect {
- -re "Continuing\\..*Breakpoint \[0-9\]+, marker2 \\(a=43\\) at .*$srcfile:4\[49\].*4\[49\]\[\t \]+.*" {
+ -re "Continuing\\..*Breakpoint \[0-9\]+, marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*" {
pass "run until breakpoint at marker2"
}
- -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker2 \\(a=43\\) at .*$srcfile:4\[49\].*4\[49\]\[\t \]+.*" {
+ -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*" {
xfail "run until breakpoint at marker2"
}
-re "$gdb_prompt $" {
diff --git a/gdb/testsuite/gdb.base/constvars.exp b/gdb/testsuite/gdb.base/constvars.exp
index 8a6b60b3ed5..9008624a936 100644
--- a/gdb/testsuite/gdb.base/constvars.exp
+++ b/gdb/testsuite/gdb.base/constvars.exp
@@ -82,9 +82,7 @@ if ![runto_main] then {
get_debug_format
proc local_compiler_xfail_check { } {
- global gcc_compiled;
-
- if {$gcc_compiled == 2} then {
+ if { [test_compiler_info gcc-2-*] } then {
if { ![test_debug_format "HP"] \
&& ![test_debug_format "DWARF 2"] } then {
setup_xfail "*-*-*"
@@ -128,7 +126,7 @@ send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
# test function parameters
local_compiler_xfail_check
-if {$gcc_compiled == 3 && [test_debug_format "stabs"]} then {
+if { [test_compiler_info gcc-3-*] && [test_debug_format "stabs"] } then {
# With stabs, even GCC 3 does not get the const char arguments correct.
setup_xfail "*-*-*"
}
@@ -144,8 +142,6 @@ gdb_expect {
# test vars and pointers
proc do_constvar_tests {} {
- global gcc_compiled
-
gdb_test "print lave" " = 66 'B'"
gdb_test "ptype lave" "type = char"
gdb_test "print lavish" " = 10 '\\\\n'"
@@ -285,7 +281,7 @@ proc do_constvar_tests {} {
gdb_test "ptype locust" "type = double \\* const"
local_compiler_xfail_check
- if {$gcc_compiled == 3 && [test_debug_format "stabs"]} then {
+ if { [test_compiler_info gcc-3-*] && [test_debug_format "stabs"] } then {
# With stabs, even GCC 3 does not get the constant structure member
# correct.
setup_xfail "*-*-*"
diff --git a/gdb/testsuite/gdb.base/define.exp b/gdb/testsuite/gdb.base/define.exp
index 06ea1c0f4f8..7e948f18e01 100644
--- a/gdb/testsuite/gdb.base/define.exp
+++ b/gdb/testsuite/gdb.base/define.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2001 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2001, 2003 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
@@ -12,7 +12,7 @@
#
# 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. */
+# 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
@@ -34,10 +34,19 @@ set bug_id 0
set testfile "break"
set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
gdb_exit
@@ -45,6 +54,9 @@ gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
+set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
+set bp_location11 [gdb_get_line_number "set breakpoint 11 here"]
+
if ![runto_main] then { fail "define tests suppressed" }
# Verify that GDB allows a user to define their very own commands.
@@ -68,7 +80,7 @@ gdb_expect {
#
send_gdb "nextwhere\n"
gdb_expect {
- -re ".*79\[ \t\]*printf.*#0\[ \t\]*main.*:79.*$gdb_prompt $"\
+ -re ".*$bp_location1\[ \t\]*printf.*#0\[ \t\]*main.*:$bp_location1.*$gdb_prompt $"\
{pass "use user command: nextwhere"}
-re "$gdb_prompt $"\
{fail "use user command: nextwhere"}
@@ -224,7 +236,7 @@ gdb_expect {
send_gdb "next\n"
gdb_expect {
- -re "#0\[ \t\]*main.*:81.*$gdb_prompt $"\
+ -re "#0\[ \t\]*main.*:$bp_location11.*$gdb_prompt $"\
{pass "use hook-stop command"}
-re "$gdb_prompt $"\
{fail "use hook-stop command"}
diff --git a/gdb/testsuite/gdb.base/ena-dis-br.exp b/gdb/testsuite/gdb.base/ena-dis-br.exp
index 93f6707097c..b0e3c1de623 100644
--- a/gdb/testsuite/gdb.base/ena-dis-br.exp
+++ b/gdb/testsuite/gdb.base/ena-dis-br.exp
@@ -1,5 +1,4 @@
-# Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
-
+# Copyright 1997, 1998, 1999, 2003 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
@@ -13,7 +12,7 @@
#
# 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. */
+# 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
@@ -32,9 +31,18 @@ set bug_id 0
set testfile "break"
set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
@@ -43,6 +51,17 @@ gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
+set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
+set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1]
+set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile1]
+set bp_location11 [gdb_get_line_number "set breakpoint 11 here"]
+set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile1]
+set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile1]
+set bp_location15 [gdb_get_line_number "set breakpoint 15 here" $srcfile1]
+set bp_location16 [gdb_get_line_number "set breakpoint 16 here" $srcfile1]
+set bp_location17 [gdb_get_line_number "set breakpoint 17 here" $srcfile1]
+set bp_location18 [gdb_get_line_number "set breakpoint 18 here" $srcfile1]
+
if ![runto_main] then { fail "enable/disable break tests suppressed" }
# Verify that we can set a breakpoint (the location is irrelevant),
@@ -50,7 +69,7 @@ if ![runto_main] then { fail "enable/disable break tests suppressed" }
#
send_gdb "break marker1\n"
gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line 4\[38\].*$gdb_prompt $"\
+ -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location15|$bp_location16).*$gdb_prompt $"\
{pass "break marker1"}
-re "$gdb_prompt $"\
{fail "break marker1"}
@@ -98,7 +117,7 @@ gdb_expect {
#
send_gdb "break marker2\n"
gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line 4\[49\].*$gdb_prompt $"\
+ -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location8|$bp_location9).*$gdb_prompt $"\
{pass "break marker2"}
-re "$gdb_prompt $"\
{fail "break marker2"}
@@ -156,7 +175,7 @@ if ![runto_main] then { fail "enable/disable break tests suppressed" }
send_gdb "break marker3\n"
gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line (45|50).*$gdb_prompt $"\
+ -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location17|$bp_location18).*$gdb_prompt $"\
{pass "break marker3"}
-re "$gdb_prompt $"\
{fail "break marker3"}
@@ -181,7 +200,7 @@ gdb_expect {
send_gdb "continue\n"
gdb_expect {
- -re ".*marker3 .*:(45|50).*$gdb_prompt $"\
+ -re ".*marker3 .*:($bp_location17|$bp_location18).*$gdb_prompt $"\
{pass "continue to auto-deleted break marker3"}
-re "Breakpoint \[0-9\]*, marker3.*$gdb_prompt $"\
{fail "continue to auto-deleted break marker3"}
@@ -206,7 +225,7 @@ gdb_expect {
#
send_gdb "break marker4\n"
gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line (46|51).*$gdb_prompt $"\
+ -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location14|$bp_location13).*$gdb_prompt $"\
{pass "break marker4"}
-re "$gdb_prompt $"\
{fail "break marker4"}
@@ -237,7 +256,7 @@ if ![runto_main] then { fail "enable/disable break tests suppressed" }
send_gdb "break marker1\n"
gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line 4\[38\].*$gdb_prompt $"\
+ -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location15|$bp_location16).*$gdb_prompt $"\
{pass "break marker1"}
-re "$gdb_prompt $"\
{fail "break marker1"}
@@ -328,7 +347,7 @@ if ![runto_main] then { fail "enable/disable break tests suppressed" }
send_gdb "break marker1\n"
gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line 4\[38\].*$gdb_prompt $"\
+ -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location15|$bp_location16).*$gdb_prompt $"\
{pass "break marker1"}
-re "$gdb_prompt $"\
{fail "break marker1"}
@@ -365,7 +384,7 @@ rerun_to_main
send_gdb "continue\n"
gdb_expect {
- -re ".*marker1 .*:4\[38\].*$gdb_prompt $"\
+ -re ".*marker1 .*:($bp_location15|$bp_location16).*$gdb_prompt $"\
{pass "continue to ignored & auto-deleted break marker1"}
-re "Breakpoint \[0-9\]*, marker1.*$gdb_prompt $"\
{fail "continue to ignored & auto-deleted break marker1"}
@@ -381,7 +400,7 @@ if ![runto_main] then { fail "enable/disable break tests suppressed" }
send_gdb "break marker1\n"
gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line 4\[38\].*$gdb_prompt $"\
+ -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location15|$bp_location16).*$gdb_prompt $"\
{pass "break marker1"}
-re "$gdb_prompt $"\
{fail "break marker1"}
@@ -423,9 +442,9 @@ gdb_expect {
#
if ![runto_main] then { fail "enable/disable break tests suppressed" }
-send_gdb "break 79\n"
+send_gdb "break $bp_location1\n"
gdb_expect {
- -re "Breakpoint \[0-9\]*.*, line 79.*$gdb_prompt $"\
+ -re "Breakpoint \[0-9\]*.*, line $bp_location1.*$gdb_prompt $"\
{pass "prepare to continue with ignore count"}
-re "$gdb_prompt $"\
{fail "prepare to continue with ignore count"}
@@ -442,7 +461,7 @@ gdb_expect {
send_gdb "next\n"
gdb_expect {
- -re ".*81\[ \t\]*marker1.*$gdb_prompt $"\
+ -re ".*$bp_location11\[ \t\]*marker1.*$gdb_prompt $"\
{pass "step after continue with ignore count"}
-re "$gdb_prompt $"\
{fail "step after continue with ignore count"}
diff --git a/gdb/testsuite/gdb.base/freebpcmd.c b/gdb/testsuite/gdb.base/freebpcmd.c
new file mode 100644
index 00000000000..52d9f30c2b1
--- /dev/null
+++ b/gdb/testsuite/gdb.base/freebpcmd.c
@@ -0,0 +1,15 @@
+int
+main (int argc, char **argv)
+{
+ int i;
+
+#ifdef usestubs
+ set_debug_traps();
+ breakpoint();
+#endif
+
+ for (i = 0; i < 100; i++)
+ printf (">>> %d\n", i); /* euphonium */
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/freebpcmd.exp b/gdb/testsuite/gdb.base/freebpcmd.exp
new file mode 100644
index 00000000000..f9521398893
--- /dev/null
+++ b/gdb/testsuite/gdb.base/freebpcmd.exp
@@ -0,0 +1,121 @@
+# Copyright 2003 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.
+
+
+# This is a regression test for the following bug, as of 2003-12-12:
+#
+# Set a breakpoint which will be hit many times. Attach a complex set
+# of commands to it, including a "continue" command. Run the program,
+# so that the breakpoint is hit, its commands get executed, and the
+# program continues and hits the breakpoint again. You will see
+# messages like "warning: Invalid control type in command structure.",
+# or maybe GDB will crash.
+#
+# When the breakpoint is hit, bpstat_stop_status copies the
+# breakpoint's command tree to the bpstat. bpstat_do_actions then
+# calls execute_control_command to run the commands. The 'continue'
+# command invokes the following chain of calls:
+#
+# continue_command
+# -> clear_proceed_status
+# -> bpstat_clear
+# -> free_command_lines
+# -> frees the commands we are currently running.
+#
+# When control does eventually return to execute_control_command, GDB
+# continues to walk the tree of freed command nodes, resulting in the
+# error messages and / or crashes.
+#
+# Since this bug depends on storage being reused between the time that
+# we continue and the time that we fall back to bpstat_do_actions, the
+# reproduction recipe is more delicate than I would like. I welcome
+# suggestions for improving this.
+
+set prms_id 0
+set bug_id 0
+
+set testfile "freebpcmd"
+set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "break [gdb_get_line_number "euphonium"]" "" "set breakpoint"
+
+# The goal of all this is to make sure that there's plenty of memory
+# churn, and different amounts of it each time the inferior stops;
+# this seems to make GDB crash more reliably.
+set lines {{if (i%2) == 0}
+ {echo "even "}
+ {print i}
+ {else}
+ {echo "odd "}
+ {print i}
+ {end}
+ {set variable $foo = 0}
+ {set variable $j = 0}
+ {while $j < i}
+ {set variable $foo += $j}
+ {set variable $j++}
+ {end}
+ {print $foo}
+ {if i != 40}
+ {c}
+ {end}
+ {end}}
+
+send_gdb "commands\n"
+for {set i 0} {$i < [llength $lines]} {incr i} {
+ gdb_expect {
+ -re ".*>" {
+ send_gdb "[lindex $lines $i]\n"
+ }
+ -re "$gdb_prompt $" {
+ set reason "got top-level prompt early"
+ break
+ }
+ timeout {
+ set reason "timeout"
+ break
+ }
+ }
+}
+if {$i >= [llength $lines]} {
+ pass "send breakpoint commands"
+} else {
+ fail "send breakpoint commands ($reason)"
+}
+
+gdb_run_cmd
+gdb_test_multiple "" "run program with breakpoint commands" {
+ -re "warning: Invalid control type in command structure" {
+ fail "run program with breakpoint commands"
+ }
+ -re "$gdb_prompt $" {
+ pass "run program with breakpoint commands"
+ }
+ eof {
+ fail "run program with breakpoint commands (GDB died)"
+ }
+}
diff --git a/gdb/testsuite/gdb.base/info-proc.exp b/gdb/testsuite/gdb.base/info-proc.exp
index 2a9a4b09a3d..d0da68f73f3 100644
--- a/gdb/testsuite/gdb.base/info-proc.exp
+++ b/gdb/testsuite/gdb.base/info-proc.exp
@@ -1,4 +1,4 @@
-# Copyright 2002 Free Software Foundation, Inc.
+# Copyright 2002, 2003 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
@@ -27,12 +27,22 @@ if $tracelevel then {
set prms_id 0
set bug_id 0
-set testfile "break"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
set ws "\[ \t\]+"
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+set testfile "break"
+set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp
index 84a15cfacbe..b38995c94a0 100644
--- a/gdb/testsuite/gdb.base/list.exp
+++ b/gdb/testsuite/gdb.base/list.exp
@@ -222,7 +222,6 @@ proc test_list_filename_and_number {} {
proc test_list_function {} {
global gdb_prompt
- global gcc_compiled
# gcc appears to generate incorrect debugging information for code
# in include files, which breaks this test.
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
index f82bf0202b0..48641642e18 100644
--- a/gdb/testsuite/gdb.base/maint.exp
+++ b/gdb/testsuite/gdb.base/maint.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2000, 2001, 2002, 2003 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
@@ -65,10 +65,19 @@ set bug_id 0
set testfile "break"
set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != ""
- } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
@@ -412,11 +421,13 @@ gdb_expect {
timeout { fail "(timeout) maint info sections DATA" }
}
+set bp_location6 [gdb_get_line_number "set breakpoint 6 here"]
+
send_gdb "maint info breakpoints\n"
gdb_expect {
- -re "Num\[ \t\]+Type\[ \t\]+Disp\[ \t\]+Enb\[ \t\]+Address\[ \t\]+What\r\n1\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+$hex\[ \t\]+in main at.*break.c:75\r\n\[ \t\]+breakpoint already hit 1 time\r\n.*$gdb_prompt $"\
+ -re "Num\[ \t\]+Type\[ \t\]+Disp\[ \t\]+Enb\[ \t\]+Address\[ \t\]+What\r\n1\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+$hex\[ \t\]+in main at.*break.c:$bp_location6\r\n\[ \t\]+breakpoint already hit 1 time\r\n.*$gdb_prompt $"\
{ pass "maint info breakpoints" }
- -re "Num\[ \t\]+Type\[ \t\]+Disp\[ \t\]+Enb\[ \t\]+Address\[ \t\]+What\r\n1\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+$hex in main at.*break.c:75\r\n\[ \t\]+breakpoint already hit 1 time\r\n-1\[ \t\]+shlib events\[ \t\]+keep\[ \t\]+y\[ \t\]+$hex.*breakpoint already hit.*$gdb_prompt $"\
+ -re "Num\[ \t\]+Type\[ \t\]+Disp\[ \t\]+Enb\[ \t\]+Address\[ \t\]+What\r\n1\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+$hex in main at.*break.c:$bp_location6\r\n\[ \t\]+breakpoint already hit 1 time\r\n-1\[ \t\]+shlib events\[ \t\]+keep\[ \t\]+y\[ \t\]+$hex.*breakpoint already hit.*$gdb_prompt $"\
{ pass "maint info breakpoints (with shlib events)" }
-re ".*$gdb_prompt $" { fail "maint info breakpoints" }
timeout { fail "(timeout) maint info breakpoints" }
@@ -650,34 +661,22 @@ gdb_expect {
}
send_gdb "maint internal-error\n"
-gdb_expect {
- -re "Quit this debugging session.*\\(y or n\\) $" {
- send_gdb "n\n"
- gdb_expect {
- -re "Create a core file.*\\(y or n\\) $" {
- send_gdb "n\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {
- pass "maint internal-error"
- }
- timeout {
- fail "(timeout) maint internal-error"
- }
- }
- }
- -re ".*$gdb_prompt $" {
- fail "maint internal-error"
- }
- timeout {
- fail "(timeout) maint internal-error"
- }
+gdb_expect {
+ -re "A problem internal to GDB has been detected" {
+ pass "maint internal-error"
+ if [gdb_internal_error_resync] {
+ pass "internal-error resync"
+ } else {
+ fail "internal-error resync"
}
}
-re ".*$gdb_prompt $" {
fail "maint internal-error"
+ untested "internal-error resync"
}
timeout {
- fail "(timeout) maint internal-error"
+ fail "maint internal-error (timeout)"
+ untested "internal-error resync"
}
}
diff --git a/gdb/testsuite/gdb.base/mips_pro.exp b/gdb/testsuite/gdb.base/mips_pro.exp
index a860e6335d0..53ea9fdee21 100644
--- a/gdb/testsuite/gdb.base/mips_pro.exp
+++ b/gdb/testsuite/gdb.base/mips_pro.exp
@@ -37,7 +37,7 @@ if [get_compiler_info ${binfile}] {
# This test must be compiled with -O2 if using gcc.
-if {$gcc_compiled} then {
+if { [test_compiler_info gcc-*-*] } then {
if { [gdb_compile "${srcdir}/$subdir/${srcfile}" "${binfile}" executable {debug additional_flags=-O2}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
@@ -56,7 +56,7 @@ if [runto middle] then {
# PR 3016
# warning: Hit heuristic-fence-post without finding
# warning: enclosing function for pc 0x1006ead0
- if {$gcc_compiled} then {
+ if { [test_compiler_info gcc-*-*] } then {
setup_xfail "mips*-sgi-irix4*" "mips64*-*-elf"
}
# The call chain is main -> top -> middle. But gcc can optimize a tail
diff --git a/gdb/testsuite/gdb.base/scope.exp b/gdb/testsuite/gdb.base/scope.exp
index db2c7ea9f91..266e0e31224 100644
--- a/gdb/testsuite/gdb.base/scope.exp
+++ b/gdb/testsuite/gdb.base/scope.exp
@@ -1,5 +1,5 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002 Free
-# Software Foundation, Inc.
+# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003
+# 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
@@ -59,7 +59,6 @@ proc test_at_main {} {
global det_file
global srcdir
global subdir
- global gcc_compiled
global hp_cc_compiler
# skip past init. There may be a call to __main at the start of
@@ -97,13 +96,13 @@ proc test_at_main {} {
# No clue why the powerpc fails this test.
setup_xfail "powerpc-*-*"
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print filelocal_ro" "\\\$$decimal = 201" "print filelocal_ro in test_at_main" ] {
gdb_suppress_tests ;
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
setup_xfail "powerpc-*-*"
if [gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_ro"] {
gdb_suppress_tests ;
@@ -112,7 +111,7 @@ proc test_at_main {} {
# Print scope1.c::filelocal, which is 2
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if {$hp_cc_compiler} then { setup_xfail "hppa2.0w-*-*" 11747CLLbs}
if [gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"] {
gdb_suppress_tests ;
@@ -121,7 +120,7 @@ proc test_at_main {} {
# Print scope1.c::filelocal_bss, which is 102
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if {$hp_cc_compiler} then { setup_xfail "hppa2.0w-*-*" 11747CLLbs}
if [gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_bss"] {
gdb_suppress_tests ;
@@ -130,7 +129,7 @@ proc test_at_main {} {
# Print scope1.c::filelocal_ro, which is 202
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if {$hp_cc_compiler} then { setup_xfail "hppa2.0w-*-*" 11747CLLbs}
if [gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_ro"] {
gdb_suppress_tests ;
@@ -144,7 +143,7 @@ proc test_at_main {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::foo::funclocal" "\\\$$decimal = 3" "print 'scope1.c'::foo::funclocal" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal"] {
gdb_suppress_tests ;
}
@@ -157,7 +156,7 @@ proc test_at_main {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::foo::funclocal_ro" "\\\$$decimal = 203" "print 'scope1.c'::foo::funclocal_ro" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_ro"] {
gdb_suppress_tests ;
}
@@ -170,7 +169,7 @@ proc test_at_main {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal"] {
gdb_suppress_tests ;
}
@@ -184,7 +183,6 @@ proc test_at_foo {} {
global det_file
global srcdir
global subdir
- global gcc_compiled
if [gdb_test "next" ".*bar \\(\\);" "" ] {
gdb_suppress_tests ;
@@ -207,7 +205,7 @@ proc test_at_foo {} {
# Print scope0.c::filelocal_ro, which is 201
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
setup_xfail "powerpc-*-*"
if [gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_ro"] {
gdb_suppress_tests ;
@@ -218,7 +216,7 @@ proc test_at_foo {} {
# Print scope1.c::filelocal, which is 2
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal at foo" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"] {
gdb_suppress_tests ;
}
@@ -227,14 +225,14 @@ proc test_at_foo {} {
gdb_test "print filelocal_bss" "\\\$$decimal = 102" \
"print filelocal_bss at foo"
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss at foo" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_bss"
gdb_test "print filelocal_ro" "\\\$$decimal = 202" \
"print filelocal_ro at foo"
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro at foo" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_ro"
@@ -245,7 +243,7 @@ proc test_at_foo {} {
gdb_test "print foo::funclocal" "\\\$$decimal = 3" \
"print foo::funclocal at foo"
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::foo::funclocal" "\\\$$decimal = 3" "print 'scope1.c'::foo::funclocal at foo" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal"
@@ -257,7 +255,7 @@ proc test_at_foo {} {
gdb_test "print foo::funclocal_bss" "\\\$$decimal = 103" \
"print foo::funclocal_bss at foo"
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::foo::funclocal_bss" "\\\$$decimal = 103" "print 'scope1.c'::foo::funclocal_bss at foo" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_bss"
@@ -269,7 +267,7 @@ proc test_at_foo {} {
gdb_test "print foo::funclocal_ro" "\\\$$decimal = 203" \
"print foo::funclocal_ro at foo"
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::foo::funclocal_ro" "\\\$$decimal = 203" "print 'scope1.c'::foo::funclocal_ro at foo" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_ro"
@@ -278,7 +276,7 @@ proc test_at_foo {} {
gdb_test "print bar::funclocal" "\\\$$decimal = 4" \
"print bar::funclocal at foo"
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal at foo" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal"
gdb_stop_suppressing_tests;
@@ -290,7 +288,6 @@ proc test_at_bar {} {
global det_file
global srcdir
global subdir
- global gcc_compiled
if [gdb_test "next" ".*" "" ] {
gdb_suppress_tests ;
@@ -313,7 +310,7 @@ proc test_at_bar {} {
# Print scope0.c::filelocal_ro, which is 201
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
setup_xfail "powerpc-*-*"
if [gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro at bar" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_ro"] {
gdb_suppress_tests ;
@@ -327,7 +324,7 @@ proc test_at_bar {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"] {
gdb_suppress_tests ;
}
@@ -340,7 +337,7 @@ proc test_at_bar {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_bss"] {
gdb_suppress_tests ;
}
@@ -353,7 +350,7 @@ proc test_at_bar {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_ro"] {
gdb_suppress_tests ;
}
@@ -366,7 +363,7 @@ proc test_at_bar {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::foo::funclocal" "\\\$$decimal = 3" "print 'scope1.c'::foo::funclocal at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal"] {
gdb_suppress_tests ;
}
@@ -379,7 +376,7 @@ proc test_at_bar {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::foo::funclocal_bss" "\\\$$decimal = 103" "print 'scope1.c'::foo::funclocal_bss at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_bss"] {
gdb_suppress_tests ;
}
@@ -392,7 +389,7 @@ proc test_at_bar {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::foo::funclocal_ro" "\\\$$decimal = 203" "print 'scope1.c'::foo::funclocal_ro at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_ro"] {
gdb_suppress_tests ;
}
@@ -410,7 +407,7 @@ proc test_at_bar {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal"] {
gdb_suppress_tests ;
}
@@ -428,7 +425,7 @@ proc test_at_bar {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::bar::funclocal_bss" "\\\$$decimal = 104" "print 'scope1.c'::bar::funclocal_bss at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal_bss"] {
gdb_suppress_tests ;
}
diff --git a/gdb/testsuite/gdb.base/so-impl-ld.exp b/gdb/testsuite/gdb.base/so-impl-ld.exp
index 68a1bf41c00..bcc7120c66c 100644
--- a/gdb/testsuite/gdb.base/so-impl-ld.exp
+++ b/gdb/testsuite/gdb.base/so-impl-ld.exp
@@ -1,4 +1,4 @@
-# Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1997, 1998, 1999, 2000, 2001, 2003 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
@@ -55,15 +55,15 @@ if [get_compiler_info ${binfile}] {
#remote_exec build "$CC -g +z -c ${libfile}1.c -o ${libfile}1.o"
-if {$gcc_compiled == 0} {
+if { [test_compiler_info gcc-*-*] } then {
+ set additional_flags "additional_flags=-fpic"
+} else {
if [istarget "hppa*-hp-hpux*"] then {
set additional_flags "additional_flags=+z"
} else {
# don't know that the compiler is, hope for the best...
set additional_flags ""
}
-} else {
- set additional_flags "additional_flags=-fpic"
}
if {[gdb_compile "${srcdir}/${subdir}/${libfile}1.c" "${libfile}1.o" object [list debug $additional_flags]] != ""} {
diff --git a/gdb/testsuite/gdb.base/structs.c b/gdb/testsuite/gdb.base/structs.c
index 356f0729f1e..f7124dace9f 100644
--- a/gdb/testsuite/gdb.base/structs.c
+++ b/gdb/testsuite/gdb.base/structs.c
@@ -1,4 +1,6 @@
-/* Copyright 1996, 1999 Free Software Foundation, Inc.
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 1996, 1999, 2003 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
@@ -17,37 +19,110 @@
Please email any bugs, comments, and/or additions to this file to:
bug-gdb@prep.ai.mit.edu */
-struct struct1 { char a;};
-struct struct2 { char a, b;};
-struct struct3 { char a, b, c; };
-struct struct4 { char a, b, c, d; };
-struct struct5 { char a, b, c, d, e; };
-struct struct6 { char a, b, c, d, e, f; };
-struct struct7 { char a, b, c, d, e, f, g; };
-struct struct8 { char a, b, c, d, e, f, g, h; };
-struct struct9 { char a, b, c, d, e, f, g, h, i; };
-struct struct10 { char a, b, c, d, e, f, g, h, i, j; };
-struct struct11 { char a, b, c, d, e, f, g, h, i, j, k; };
-struct struct12 { char a, b, c, d, e, f, g, h, i, j, k, l; };
-struct struct16 { char a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p; };
-
-struct struct1 foo1 = {'1'}, L1;
-struct struct2 foo2 = { 'a', 'b'}, L2;
-struct struct3 foo3 = { 'A', 'B', 'C'}, L3;
-struct struct4 foo4 = {'1', '2', '3', '4'}, L4;
-struct struct5 foo5 = {'a', 'b', 'c', 'd', 'e'}, L5;
-struct struct6 foo6 = {'A', 'B', 'C', 'D', 'E', 'F'}, L6;
-struct struct7 foo7 = {'1', '2', '3', '4', '5', '6', '7'}, L7;
-struct struct8 foo8 = {'1', '2', '3', '4', '5', '6', '7', '8'}, L8;
-struct struct9 foo9 = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'}, L9;
-struct struct10 foo10 = {
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'}, L10;
-struct struct11 foo11 = {
- '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B'}, L11;
-struct struct12 foo12 = {
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L'}, L12;
-struct struct16 foo16 = {
- 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p'}, L16;
+/* Useful abreviations. */
+typedef void t;
+typedef char tc;
+typedef short ts;
+typedef int ti;
+typedef long tl;
+typedef long long tll;
+typedef float tf;
+typedef double td;
+typedef long double tld;
+
+/* Force the type of each field. */
+#ifndef tA
+typedef t tA;
+#endif
+#ifndef tB
+typedef tA tB;
+#endif
+#ifndef tC
+typedef tB tC;
+#endif
+#ifndef tD
+typedef tC tD;
+#endif
+#ifndef tE
+typedef tD tE;
+#endif
+#ifndef tF
+typedef tE tF;
+#endif
+#ifndef tG
+typedef tF tG;
+#endif
+#ifndef tH
+typedef tG tH;
+#endif
+#ifndef tI
+typedef tH tI;
+#endif
+#ifndef tJ
+typedef tI tJ;
+#endif
+#ifndef tK
+typedef tJ tK;
+#endif
+#ifndef tL
+typedef tK tL;
+#endif
+#ifndef tM
+typedef tL tM;
+#endif
+#ifndef tN
+typedef tM tN;
+#endif
+#ifndef tO
+typedef tN tO;
+#endif
+#ifndef tP
+typedef tO tP;
+#endif
+#ifndef tQ
+typedef tP tQ;
+#endif
+#ifndef tR
+typedef tQ tR;
+#endif
+
+struct struct1 {tA a;};
+struct struct2 {tA a; tB b;};
+struct struct3 {tA a; tB b; tC c; };
+struct struct4 {tA a; tB b; tC c; tD d; };
+struct struct5 {tA a; tB b; tC c; tD d; tE e; };
+struct struct6 {tA a; tB b; tC c; tD d; tE e; tF f; };
+struct struct7 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; };
+struct struct8 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; };
+struct struct9 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; tI i; };
+struct struct10 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; tI i; tJ j; };
+struct struct11 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; tI i; tJ j; tK k; };
+struct struct12 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; tI i; tJ j; tK k; tL l; };
+struct struct13 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; tI i; tJ j; tK k; tL l; tM m; };
+struct struct14 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; tI i; tJ j; tK k; tL l; tM m; tN n; };
+struct struct15 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; tI i; tJ j; tK k; tL l; tM m; tN n; tO o; };
+struct struct16 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; tI i; tJ j; tK k; tL l; tM m; tN n; tO o; tP p; };
+struct struct17 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; tI i; tJ j; tK k; tL l; tM m; tN n; tO o; tP p; tQ q; };
+struct struct18 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; tI i; tJ j; tK k; tL l; tM m; tN n; tO o; tP p; tQ q; tR r; };
+
+struct struct1 foo1 = {'1'}, L1;
+struct struct2 foo2 = {'a','2'}, L2;
+struct struct3 foo3 = {'1','b','3'}, L3;
+struct struct4 foo4 = {'a','2','c','4'}, L4;
+struct struct5 foo5 = {'1','b','3','d','5'}, L5;
+struct struct6 foo6 = {'a','2','c','4','e','6'}, L6;
+struct struct7 foo7 = {'1','b','3','d','5','f','7'}, L7;
+struct struct8 foo8 = {'a','2','c','4','e','6','g','8'}, L8;
+struct struct9 foo9 = {'1','b','3','d','5','f','7','h','9'}, L9;
+struct struct10 foo10 = {'a','2','c','4','e','6','g','8','i','A'}, L10;
+struct struct11 foo11 = {'1','b','3','d','5','f','7','h','9','j','B'}, L11;
+struct struct12 foo12 = {'a','2','c','4','e','6','g','8','i','A','k','C'}, L12;
+struct struct13 foo13 = {'1','b','3','d','5','f','7','h','9','j','B','l','D'}, L13;
+struct struct14 foo14 = {'a','2','c','4','e','6','g','8','i','A','k','C','m','E'}, L14;
+struct struct15 foo15 = {'1','b','3','d','5','f','7','h','9','j','B','l','D','n','F'}, L15;
+struct struct16 foo16 = {'a','2','c','4','e','6','g','8','i','A','k','C','m','E','o','G'}, L16;
+struct struct17 foo17 = {'1','b','3','d','5','f','7','h','9','j','B','l','D','n','F','p','H'}, L17;
+struct struct18 foo18 = {'a','2','c','4','e','6','g','8','i','A','k','C','m','E','o','G','q','I'}, L18;
struct struct1 fun1()
{
@@ -97,10 +172,30 @@ struct struct12 fun12()
{
return foo12;
}
+struct struct13 fun13()
+{
+ return foo13;
+}
+struct struct14 fun14()
+{
+ return foo14;
+}
+struct struct15 fun15()
+{
+ return foo15;
+}
struct struct16 fun16()
{
return foo16;
}
+struct struct17 fun17()
+{
+ return foo17;
+}
+struct struct18 fun18()
+{
+ return foo18;
+}
#ifdef PROTOTYPES
void Fun1(struct struct1 foo1)
@@ -211,6 +306,33 @@ void Fun12(foo12)
L12 = foo12;
}
#ifdef PROTOTYPES
+void Fun13(struct struct13 foo13)
+#else
+void Fun13(foo13)
+ struct struct13 foo13;
+#endif
+{
+ L13 = foo13;
+}
+#ifdef PROTOTYPES
+void Fun14(struct struct14 foo14)
+#else
+void Fun14(foo14)
+ struct struct14 foo14;
+#endif
+{
+ L14 = foo14;
+}
+#ifdef PROTOTYPES
+void Fun15(struct struct15 foo15)
+#else
+void Fun15(foo15)
+ struct struct15 foo15;
+#endif
+{
+ L15 = foo15;
+}
+#ifdef PROTOTYPES
void Fun16(struct struct16 foo16)
#else
void Fun16(foo16)
@@ -219,6 +341,64 @@ void Fun16(foo16)
{
L16 = foo16;
}
+#ifdef PROTOTYPES
+void Fun17(struct struct17 foo17)
+#else
+void Fun17(foo17)
+ struct struct17 foo17;
+#endif
+{
+ L17 = foo17;
+}
+#ifdef PROTOTYPES
+void Fun18(struct struct18 foo18)
+#else
+void Fun18(foo18)
+ struct struct18 foo18;
+#endif
+{
+ L18 = foo18;
+}
+
+zed ()
+{
+
+ L1.a = L2.a = L3.a = L4.a = L5.a = L6.a = L7.a = L8.a = L9.a = L10.a = L11.a = L12.a = L13.a = L14.a = L15.a = L16.a = L17.a = L18.a = 'Z';
+
+ L2.b = L3.b = L4.b = L5.b = L6.b = L7.b = L8.b = L9.b = L10.b = L11.b = L12.b = L13.b = L14.b = L15.b = L16.b = L17.b = L18.b = 'Z';
+
+ L3.c = L4.c = L5.c = L6.c = L7.c = L8.c = L9.c = L10.c = L11.c = L12.c = L13.c = L14.c = L15.c = L16.c = L17.c = L18.c = 'Z';
+
+ L4.d = L5.d = L6.d = L7.d = L8.d = L9.d = L10.d = L11.d = L12.d = L13.d = L14.d = L15.d = L16.d = L17.d = L18.d = 'Z';
+
+ L5.e = L6.e = L7.e = L8.e = L9.e = L10.e = L11.e = L12.e = L13.e = L14.e = L15.e = L16.e = L17.e = L18.e = 'Z';
+
+ L6.f = L7.f = L8.f = L9.f = L10.f = L11.f = L12.f = L13.f = L14.f = L15.f = L16.f = L17.f = L18.f = 'Z';
+
+ L7.g = L8.g = L9.g = L10.g = L11.g = L12.g = L13.g = L14.g = L15.g = L16.g = L17.g = L18.g = 'Z';
+
+ L8.h = L9.h = L10.h = L11.h = L12.h = L13.h = L14.h = L15.h = L16.h = L17.h = L18.h = 'Z';
+
+ L9.i = L10.i = L11.i = L12.i = L13.i = L14.i = L15.i = L16.i = L17.i = L18.i = 'Z';
+
+ L10.j = L11.j = L12.j = L13.j = L14.j = L15.j = L16.j = L17.j = L18.j = 'Z';
+
+ L11.k = L12.k = L13.k = L14.k = L15.k = L16.k = L17.k = L18.k = 'Z';
+
+ L12.l = L13.l = L14.l = L15.l = L16.l = L17.l = L18.l = 'Z';
+
+ L13.m = L14.m = L15.m = L16.m = L17.m = L18.m = 'Z';
+
+ L14.n = L15.n = L16.n = L17.n = L18.n = 'Z';
+
+ L15.o = L16.o = L17.o = L18.o = 'Z';
+
+ L16.p = L17.p = L18.p = 'Z';
+
+ L17.q = L18.q = 'Z';
+
+ L18.r = 'Z';
+}
int main()
{
@@ -226,24 +406,7 @@ int main()
set_debug_traps();
breakpoint();
#endif
-
- /* TEST C FUNCTIONS */
- L1 = fun1();
- L2 = fun2();
- L3 = fun3();
- L4 = fun4();
- L5 = fun5();
- L6 = fun6();
- L7 = fun7();
- L8 = fun8();
- L9 = fun9();
- L10 = fun10();
- L11 = fun11();
- L12 = fun12();
- L16 = fun16();
-
- foo1.a = foo2.a = foo3.a = foo4.a = foo5.a = foo6.a = foo7.a = foo8.a =
- foo9.a = foo10.a = foo11.a = foo12.a = foo16.a = '$';
+ int i;
Fun1(foo1);
Fun2(foo2);
@@ -257,7 +420,40 @@ int main()
Fun10(foo10);
Fun11(foo11);
Fun12(foo12);
+ Fun13(foo13);
+ Fun14(foo14);
+ Fun15(foo15);
Fun16(foo16);
+ Fun17(foo17);
+ Fun18(foo18);
+
+ /* An infinite loop that first clears all the variables and then
+ calls each function. This "hack" is to make testing random
+ functions easier - "advance funN" is guaranteed to have always
+ been preceeded by a global variable clearing zed call. */
+
+ while (1)
+ {
+ zed ();
+ L1 = fun1();
+ L2 = fun2();
+ L3 = fun3();
+ L4 = fun4();
+ L5 = fun5();
+ L6 = fun6();
+ L7 = fun7();
+ L8 = fun8();
+ L9 = fun9();
+ L10 = fun10();
+ L11 = fun11();
+ L12 = fun12();
+ L13 = fun13();
+ L14 = fun14();
+ L15 = fun15();
+ L16 = fun16();
+ L17 = fun17();
+ L18 = fun18();
+ }
return 0;
}
diff --git a/gdb/testsuite/gdb.base/structs.exp b/gdb/testsuite/gdb.base/structs.exp
index ed91c86e482..7ff54c9057c 100644
--- a/gdb/testsuite/gdb.base/structs.exp
+++ b/gdb/testsuite/gdb.base/structs.exp
@@ -1,4 +1,6 @@
-# Copyright 1996, 1997, 1999 Free Software Foundation, Inc.
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 1996, 1997, 1999, 2003 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
@@ -17,8 +19,6 @@
# Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu
-# This file was written by Jeff Law. (law@cygnus.com)
-
if $tracelevel then {
strace $tracelevel
}
@@ -26,142 +26,642 @@ if $tracelevel then {
set prms_id 0
set bug_id 0
-set prototypes 1
+# Some targets can't call functions, so don't even bother with this
+# test.
+
+if [target_info exists gdb,cannot_call_functions] {
+ setup_xfail "*-*-*"
+ fail "This target can not call functions"
+ continue
+}
+
set testfile "structs"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
-# build the first test case
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- # built the second test case since we can't use prototypes
- warning "Prototypes not supported, rebuilding with -DNO_PROTOTYPES"
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DNO_PROTOTYPES}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
- }
- set prototypes 0
-}
+# Create and source the file that provides information about the
+# compiler used to compile the test case.
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
if [get_compiler_info ${binfile}] {
return -1;
}
+# Compile a variant of structs.c using TYPES to specify the type of
+# the first N struct elements (the remaining elements take the type of
+# the last TYPES field). Run the compmiled program up to "main".
+# Also updates the global "testfile" to reflect the most recent build.
-# Some targets can't call functions, so don't even bother with this
-# test.
-if [target_info exists gdb,cannot_call_functions] {
- setup_xfail "*-*-*" 2416
- fail "This target can not call functions"
- continue
+proc start_structs_test { types } {
+ global testfile
+ global srcfile
+ global binfile
+ global objdir
+ global subdir
+ global srcdir
+ global gdb_prompt
+
+ # Create the additional flags
+ set flags "debug"
+ set testfile "structs"
+ set n 0
+ for {set n 0} {$n<[llength ${types}]} {incr n} {
+ set m [I2A ${n}]
+ set t [lindex ${types} $n]
+ lappend flags "additional_flags=-Dt${m}=${t}"
+ append testfile "-" "$t"
+ }
+
+ set binfile ${objdir}/${subdir}/${testfile}
+ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "${flags}"] != "" } {
+ # built the second test case since we can't use prototypes
+ warning "Prototypes not supported, rebuilding with -DNO_PROTOTYPES"
+ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "${flags} additional_flags=-DNO_PROTOTYPES"] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ }
+
+ # Start with a fresh gdb.
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+
+ # Make certain that the output is consistent
+ gdb_test "set print sevenbit-strings" "" \
+ "set print sevenbit-strings; ${testfile}"
+ gdb_test "set print address off" "" \
+ "set print address off; ${testfile}"
+ gdb_test "set width 0" "" \
+ "set width 0; ${testfile}"
+
+ # Advance to main
+ if { ![runto_main] } then {
+ gdb_suppress_tests;
+ }
+
+ # Get the debug format
+ get_debug_format
+
+ # check that at the struct containing all the relevant types is correct
+ set foo_t "type = struct struct[llength ${types}] \{"
+ for {set n 0} {$n<[llength ${types}]} {incr n} {
+ append foo_t "\[\r\n \]+[lindex ${types} $n] [i2a $n];"
+ }
+ append foo_t "\[\r\n \]+\}"
+ gdb_test "ptype foo[llength ${types}]" "${foo_t}" \
+ "ptype foo[llength ${types}]; ${testfile}"
}
+# The expected value for fun${n}, L${n} and foo${n}. First element is
+# empty to make indexing easier. "foo" returns the modified value,
+# "zed" returns the invalid value.
-# Call FUNC with no arguments, and expect to see the regexp RESULT in
-# the output. If we get back the error message "Function return value
-# unknown", call that an unsupported test; on some architectures, it's
-# impossible to find structs returned by value reliably.
-proc call_struct_func { func result } {
- global gdb_prompt
-
- set command "p ${func}()"
- send_gdb "${command}\n"
- gdb_expect {
- -re "$result\[\r\n\]+$gdb_prompt $" {
- pass "$command"
- }
- -re "Function return value unknown.\[\r\n\]+$gdb_prompt $" {
- unsupported "$command"
- }
- -re "$gdb_prompt $" {
- fail "$command"
- }
- timeout {
- fail "$command (timeout)"
- }
+proc foo { n } {
+ return [lindex {
+ "{}"
+ "{a = 49 '1'}"
+ "{a = 97 'a', b = 50 '2'}"
+ "{a = 49 '1', b = 98 'b', c = 51 '3'}"
+ "{a = 97 'a', b = 50 '2', c = 99 'c', d = 52 '4'}"
+ "{a = 49 '1', b = 98 'b', c = 51 '3', d = 100 'd', e = 53 '5'}"
+ "{a = 97 'a', b = 50 '2', c = 99 'c', d = 52 '4', e = 101 'e', f = 54 '6'}"
+ "{a = 49 '1', b = 98 'b', c = 51 '3', d = 100 'd', e = 53 '5', f = 102 'f', g = 55 '7'}"
+ "{a = 97 'a', b = 50 '2', c = 99 'c', d = 52 '4', e = 101 'e', f = 54 '6', g = 103 'g', h = 56 '8'}"
+ "{a = 49 '1', b = 98 'b', c = 51 '3', d = 100 'd', e = 53 '5', f = 102 'f', g = 55 '7', h = 104 'h', i = 57 '9'}"
+ "{a = 97 'a', b = 50 '2', c = 99 'c', d = 52 '4', e = 101 'e', f = 54 '6', g = 103 'g', h = 56 '8', i = 105 'i', j = 65 'A'}"
+ "{a = 49 '1', b = 98 'b', c = 51 '3', d = 100 'd', e = 53 '5', f = 102 'f', g = 55 '7', h = 104 'h', i = 57 '9', j = 106 'j', k = 66 'B'}"
+ "{a = 97 'a', b = 50 '2', c = 99 'c', d = 52 '4', e = 101 'e', f = 54 '6', g = 103 'g', h = 56 '8', i = 105 'i', j = 65 'A', k = 107 'k', l = 67 'C'}"
+ "{a = 49 '1', b = 98 'b', c = 51 '3', d = 100 'd', e = 53 '5', f = 102 'f', g = 55 '7', h = 104 'h', i = 57 '9', j = 106 'j', k = 66 'B', l = 108 'l', m = 68 'D'}"
+ "{a = 97 'a', b = 50 '2', c = 99 'c', d = 52 '4', e = 101 'e', f = 54 '6', g = 103 'g', h = 56 '8', i = 105 'i', j = 65 'A', k = 107 'k', l = 67 'C', m = 109 'm', n = 69 'E'}"
+ "{a = 49 '1', b = 98 'b', c = 51 '3', d = 100 'd', e = 53 '5', f = 102 'f', g = 55 '7', h = 104 'h', i = 57 '9', j = 106 'j', k = 66 'B', l = 108 'l', m = 68 'D', n = 110 'n', o = 70 'F'}"
+ "{a = 97 'a', b = 50 '2', c = 99 'c', d = 52 '4', e = 101 'e', f = 54 '6', g = 103 'g', h = 56 '8', i = 105 'i', j = 65 'A', k = 107 'k', l = 67 'C', m = 109 'm', n = 69 'E', o = 111 'o', p = 71 'G'}"
+ "{a = 49 '1', b = 98 'b', c = 51 '3', d = 100 'd', e = 53 '5', f = 102 'f', g = 55 '7', h = 104 'h', i = 57 '9', j = 106 'j', k = 66 'B', l = 108 'l', m = 68 'D', n = 110 'n', o = 70 'F', p = 112 'p', q = 72 'H'}"
+ } $n]
+}
+
+proc zed { n } {
+ return [lindex {
+ "{}"
+ "{a = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z', h = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z', h = 90 'Z', i = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z', h = 90 'Z', i = 90 'Z', j = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z', h = 90 'Z', i = 90 'Z', j = 90 'Z', k = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z', h = 90 'Z', i = 90 'Z', j = 90 'Z', k = 90 'Z', l = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z', h = 90 'Z', i = 90 'Z', j = 90 'Z', k = 90 'Z', l = 90 'Z', m = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z', h = 90 'Z', i = 90 'Z', j = 90 'Z', k = 90 'Z', l = 90 'Z', m = 90 'Z', n = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z', h = 90 'Z', i = 90 'Z', j = 90 'Z', k = 90 'Z', l = 90 'Z', m = 90 'Z', n = 90 'Z', o = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z', h = 90 'Z', i = 90 'Z', j = 90 'Z', k = 90 'Z', l = 90 'Z', m = 90 'Z', n = 90 'Z', o = 90 'Z', p = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z', h = 90 'Z', i = 90 'Z', j = 90 'Z', k = 90 'Z', l = 90 'Z', m = 90 'Z', n = 90 'Z', o = 90 'Z', p = 90 'Z', q = 90 'Z'}"
+ } $n]
+}
+
+# Given N (0..25), return the corresponding alphabetic letter in lower
+# or upper case. This is ment to be i18n proof.
+
+proc i2a { n } {
+ return [string range "abcdefghijklmnopqrstuvwxyz" $n $n]
+}
+
+proc I2A { n } {
+ return [string toupper [i2a $n]]
+}
+
+
+# Use the file name, compiler and tuples to set up any needed KFAILs.
+
+proc setup_kfails { file tuples bug } {
+ global testfile
+ if [string match $file $testfile] {
+ foreach f $tuples { setup_kfail $f $bug }
+ }
+}
+
+proc setup_compiler_kfails { file compiler format tuples bug } {
+ global testfile
+ if {[string match $file $testfile] && [test_compiler_info $compiler] && [test_debug_format $format]} {
+ foreach f $tuples { setup_kfail $f $bug }
}
}
-# FIXME: Before calling this proc, we should probably verify that
-# we can call inferior functions and get a valid integral value
-# returned.
-# Note that it is OK to check for 0 or 1 as the returned values, because C
-# specifies that the numeric value of a relational or logical expression
-# (computed in the inferior) is 1 for true and 0 for false.
+# Test GDB's ability to make inferior function calls to functions
+# returning (or passing in a single structs.
-proc do_function_calls {} {
- global prototypes
- global gcc_compiled
+# N identifies the number of elements in the struct that will be used
+# for the test case. FAILS is a list of target tuples that will fail
+# this test.
+
+# start_structs_test() will have previously built a program with a
+# specified combination of types for those elements. To ensure
+# robustness of the output, "p/c" is used.
+
+# This tests the code paths "which return-value convention?" and
+# "extract return-value from registers" called by "infcall.c".
+
+proc test_struct_calls { n } {
+ global testfile
global gdb_prompt
- # First, call the "fun" functions and examine the value they return.
- call_struct_func "fun1" " = {a = 49 '1'}"
- call_struct_func "fun2" " = {a = 97 'a', b = 98 'b'}"
- call_struct_func "fun3" " = {a = 65 'A', b = 66 'B', c = 67 'C'}"
- call_struct_func "fun4" " = {a = 49 '1', b = 50 '2', c = 51 '3', d = 52 '4'}"
- call_struct_func "fun5" " = {a = 97 'a', b = 98 'b', c = 99 'c', d = 100 'd', e = 101 'e'}"
- call_struct_func "fun6" " = {a = 65 'A', b = 66 'B', c = 67 'C', d = 68 'D', e = 69 'E', f = 70 'F'}"
- call_struct_func "fun7" " = {a = 49 '1', b = 50 '2', c = 51 '3', d = 52 '4', e = 53 '5', f = 54 '6', g = 55 '7'}"
- call_struct_func "fun8" " = {a = 49 '1', b = 50 '2', c = 51 '3', d = 52 '4', e = 53 '5', f = 54 '6', g = 55 '7', h = 56 '8'}"
- call_struct_func "fun9" " = {a = 97 'a', b = 98 'b', c = 99 'c', d = 100 'd', e = 101 'e', f = 102 'f', g = 103 'g', h = 104 'h', i = 105 'i'}"
- call_struct_func "fun10" " = {a = 65 'A', b = 66 'B', c = 67 'C', d = 68 'D', e = 69 'E', f = 70 'F', g = 71 'G', h = 72 'H', i = 73 'I', j = 74 'J'}"
- call_struct_func "fun11" " = {a = 49 '1', b = 50 '2', c = 51 '3', d = 52 '4', e = 53 '5', f = 54 '6', g = 55 '7', h = 56 '8', i = 57 '9', j = 65 'A', k = 66 'B'}"
- call_struct_func "fun12" " = {a = 65 'A', b = 66 'B', c = 67 'C', d = 68 'D', e = 69 'E', f = 70 'F', g = 71 'G', h = 72 'H', i = 73 'I', j = 74 'J', k = 75 'K', l = 76 'L'}"
- call_struct_func "fun16" " = {a = 97 'a', b = 98 'b', c = 99 'c', d = 100 'd', e = 101 'e', f = 102 'f', g = 103 'g', h = 104 'h', i = 105 'i', j = 106 'j', k = 107 'k', l = 108 'l', m = 109 'm', n = 110 'n', o = 111 'o', p = 112 'p'}"
-
- # Now call the Fun functions to set the L* variables. This
- # tests that gdb properly passes structures to functions.
- gdb_test "p Fun1(foo1)" " = (void|0)"
- gdb_test "p Fun2(foo2)" " = (void|0)"
- gdb_test "p Fun3(foo3)" " = (void|0)"
- gdb_test "p Fun4(foo4)" " = (void|0)"
- gdb_test "p Fun5(foo5)" " = (void|0)"
- gdb_test "p Fun6(foo6)" " = (void|0)"
- gdb_test "p Fun7(foo7)" " = (void|0)"
- gdb_test "p Fun8(foo8)" " = (void|0)"
- gdb_test "p Fun9(foo9)" " = (void|0)"
- gdb_test "p Fun10(foo10)" " = (void|0)"
- gdb_test "p Fun11(foo11)" " = (void|0)"
- gdb_test "p Fun12(foo12)" " = (void|0)"
- gdb_test "p Fun16(foo16)" " = (void|0)"
-
- # Now print the L* variables and examine their values.
- gdb_test "p L1" " = {a = 49 '1'}"
- gdb_test "p L2" " = {a = 97 'a', b = 98 'b'}"
- gdb_test "p L3" " = {a = 65 'A', b = 66 'B', c = 67 'C'}"
- gdb_test "p L4" " = {a = 49 '1', b = 50 '2', c = 51 '3', d = 52 '4'}"
- gdb_test "p L5" " = {a = 97 'a', b = 98 'b', c = 99 'c', d = 100 'd', e = 101 'e'}"
- gdb_test "p L6" " = {a = 65 'A', b = 66 'B', c = 67 'C', d = 68 'D', e = 69 'E', f = 70 'F'}"
- gdb_test "p L7" " = {a = 49 '1', b = 50 '2', c = 51 '3', d = 52 '4', e = 53 '5', f = 54 '6', g = 55 '7'}"
- gdb_test "p L8" " = {a = 49 '1', b = 50 '2', c = 51 '3', d = 52 '4', e = 53 '5', f = 54 '6', g = 55 '7', h = 56 '8'}"
- gdb_test "p L9" " = {a = 97 'a', b = 98 'b', c = 99 'c', d = 100 'd', e = 101 'e', f = 102 'f', g = 103 'g', h = 104 'h', i = 105 'i'}"
- gdb_test "p L10" " = {a = 65 'A', b = 66 'B', c = 67 'C', d = 68 'D', e = 69 'E', f = 70 'F', g = 71 'G', h = 72 'H', i = 73 'I', j = 74 'J'}"
- gdb_test "p L11" " = {a = 49 '1', b = 50 '2', c = 51 '3', d = 52 '4', e = 53 '5', f = 54 '6', g = 55 '7', h = 56 '8', i = 57 '9', j = 65 'A', k = 66 'B'}"
- gdb_test "p L12" " = {a = 65 'A', b = 66 'B', c = 67 'C', d = 68 'D', e = 69 'E', f = 70 'F', g = 71 'G', h = 72 'H', i = 73 'I', j = 74 'J', k = 75 'K', l = 76 'L'}"
- gdb_test "p L16" " = {a = 97 'a', b = 98 'b', c = 99 'c', d = 100 'd', e = 101 'e', f = 102 'f', g = 103 'g', h = 104 'h', i = 105 'i', j = 106 'j', k = 107 'k', l = 108 'l', m = 109 'm', n = 110 'n', o = 111 'o', p = 112 'p'}"
-}
-# Start with a fresh gdb.
+ # Check that GDB can always extract a struct-return value from an
+ # inferior function call. Since GDB always knows the location of an
+ # inferior function call's return value these should never fail
+
+ # Implemented by calling the parameterless function "fun$N" and then
+ # examining the return value printed by GDB.
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+ set tests "call $n ${testfile}"
-gdb_test "set print sevenbit-strings" ""
-gdb_test "set print address off" ""
-gdb_test "set width 0" ""
+ # Call fun${n}, checking the printed return-value.
+ setup_kfails structs-*tld* i*86-*-* gdb/1447
+ setup_compiler_kfails structs-tc-* gcc-3-3 "DWARF 2" i*86-*-* gdb/1455
+ gdb_test "p/c fun${n}()" "[foo ${n}]" "p/c fun<n>(); ${tests}"
-if [target_info exists gdb,cannot_call_functions] {
- setup_xfail "*-*-*" 2416
- fail "This target can not call functions"
- return 0
+ # Check that GDB can always pass a structure to an inferior function.
+ # This test can never fail.
+
+ # Implemented by calling the one parameter function "Fun$N" which
+ # stores its parameter in the global variable "L$N". GDB then
+ # examining that global to confirm that the value is as expected.
+
+ gdb_test "call Fun${n}(foo${n})" "" "call Fun<n>(foo<n>); ${tests}"
+ setup_kfails structs-*tld* i*86-*-* gdb/1447
+ setup_compiler_kfails structs-tc-* gcc-3-3 "DWARF 2" i*86-*-* gdb/1455
+ gdb_test "p/c L${n}" [foo ${n}] "p/c L<n>; ${tests}"
}
-if { ![runto_main] } then {
- gdb_suppress_tests;
+# Test GDB's ability to both return a function (with "return" or
+# "finish") and correctly extract/store any corresponding
+# return-value.
+
+# Check that GDB can consistently extract/store structure return
+# values. There are two cases - returned in registers and returned in
+# memory. For the latter case, the return value can't be found and a
+# failure is "expected". However GDB must still both return the
+# function and display the final source and line information.
+
+# N identifies the number of elements in the struct that will be used
+# for the test case. FAILS is a list of target tuples that will fail
+# this test.
+
+# This tests the code paths "which return-value convention?", "extract
+# return-value from registers", and "store return-value in registers".
+# Unlike "test struct calls", this test is expected to "fail" when the
+# return-value is in memory (GDB can't find the location). The test
+# is in three parts: test "return"; test "finish"; check that the two
+# are consistent. GDB can sometimes work for one command and not the
+# other.
+
+proc test_struct_returns { n } {
+ global gdb_prompt
+ global testfile
+
+ set tests "return $n ${testfile}"
+
+
+ # Check that "return" works.
+
+ # GDB must always force the return of a function that has
+ # a struct result. Dependant on the ABI, it may, or may not be
+ # possible to store the return value in a register.
+
+ # The relevant code looks like "L{n} = fun{n}()". The test forces
+ # "fun{n}" to "return" with an explicit value. Since that code
+ # snippet will store the the returned value in "L{n}" the return
+ # is tested by examining "L{n}". This assumes that the
+ # compiler implemented this as fun{n}(&L{n}) and hence that when
+ # the value isn't stored "L{n}" remains unchanged. Also check for
+ # consistency between this and the "finish" case.
+
+ # Get into a call of fun${n}
+ gdb_test "advance fun${n}" \
+ "fun${n} .*\[\r\n\]+\[0-9\].*return foo${n}.*" \
+ "advance to fun<n> for return; ${tests}"
+
+ # Check that the program invalidated the relevant global.
+ setup_kfails structs-tld i*86-*-* gdb/1447
+ gdb_test "p/c L${n}" " = [zed $n]" "zed L<n> for return; ${tests} .${testfile}."
+
+ # Force the "return". This checks that the return is always
+ # performed, and that GDB correctly reported this to the user.
+ # GDB 6.0 and earlier, when the return-value's location wasn't
+ # known, both failed to print a final "source and line" and misplaced
+ # the frame ("No frame").
+
+ # The test is writen so that it only reports one FAIL/PASS for the
+ # entire operation. The value returned is checked further down.
+ # "return_value_unknown", if non-empty, records why GDB realised
+ # that it didn't know where the return value was.
+
+ set test "return foo<n>; ${tests}"
+ set return_value_unknown 0
+ set return_value_unimplemented 0
+ gdb_test_multiple "return foo${n}" "${test}" {
+ -re "The location" {
+ # Ulgh, a struct return, remember this (still need prompt).
+ set return_value_unknown 1
+ exp_continue
+ }
+ -re "A structure or union" {
+ # Ulgh, a struct return, remember this (still need prompt).
+ set return_value_unknown 1
+ # Double ulgh. Architecture doesn't use return_value and
+ # hence hasn't implemented small structure return.
+ set return_value_unimplemented 1
+ exp_continue
+ }
+ -re "Make fun${n} return now.*y or n. $" {
+ gdb_test_multiple "y" "${test}" {
+ -re "L${n} *= fun${n}.*${gdb_prompt} $" {
+ # Need to step off the function call
+ gdb_test "next" "L.* *= fun.*" "${test}"
+ }
+ -re "L[expr ${n} + 1] *= fun[expr ${n} + 1].*${gdb_prompt} $" {
+ pass "${test}"
+ }
+ }
+ }
+ }
+
+ # Check that the return-value is as expected. At this stage we're
+ # just checking that GDB has returned a value consistent with
+ # "return_value_unknown" set above.
+
+ set test "value foo<n> returned; ${tests}"
+ setup_kfails structs-*tld* i*86-*-* gdb/1447
+ gdb_test_multiple "p/c L${n}" "${test}" {
+ -re " = [foo ${n}].*${gdb_prompt} $" {
+ if $return_value_unknown {
+ # This contradicts the above claim that GDB didn't
+ # know the location of the return-value.
+ fail "${test}"
+ } else {
+ pass "${test}"
+ }
+ }
+ -re " = [zed ${n}].*${gdb_prompt} $" {
+ if $return_value_unknown {
+ # The struct return case. Since any modification
+ # would be by reference, and that can't happen, the
+ # value should be unmodified and hence Z is expected.
+ # Is this a reasonable assumption?
+ pass "${test}"
+ } else {
+ # This contradicts the above claim that GDB knew
+ # the location of the return-value.
+ fail "${test}"
+ }
+ }
+ -re ".*${gdb_prompt} $" {
+ if $return_value_unimplemented {
+ # What a suprize. The architecture hasn't implemented
+ # return_value, and hence has to fail.
+ kfail "$test" gdb/1444
+ } else {
+ fail "$test"
+ }
+ }
+ }
+
+ # Check that a "finish" works.
+
+ # This is almost but not quite the same as "call struct funcs".
+ # Architectures can have subtle differences in the two code paths.
+
+ # The relevant code snippet is "L{n} = fun{n}()". The program is
+ # advanced into a call to "fun{n}" and then that function is
+ # finished. The returned value that GDB prints, reformatted using
+ # "p/c", is checked.
+
+ # Get into "fun${n}()".
+ gdb_test "advance fun${n}" \
+ "fun${n} .*\[\r\n\]+\[0-9\].*return foo${n}.*" \
+ "advance to fun<n> for finish; ${tests}"
+
+ # Check that the program invalidated the relevant global.
+ setup_kfails structs-tld i*86-*-* gdb/1447
+ gdb_test "p/c L${n}" " = [zed $n]" "zed L<n> for finish; ${tests}"
+
+ # Finish the function, set 'finish_value_unknown" to non-empty if the
+ # return-value was not found.
+ set test "finish foo<n>; ${tests}"
+ set finish_value_unknown 0
+ gdb_test_multiple "finish" "${test}" {
+ -re "Value returned is .*${gdb_prompt} $" {
+ pass "${test}"
+ }
+ -re "Cannot determine contents.*${gdb_prompt} $" {
+ # Expected bad value. For the moment this is ok.
+ set finish_value_unknown 1
+ pass "${test}"
+ }
+ }
+
+ # Re-print the last (return-value) using the more robust
+ # "p/c". If no return value was found, the 'Z' from the previous
+ # check that the variable was cleared, is printed.
+ set test "value foo<n> finished; ${tests}"
+ setup_kfails structs-*tld* i*86-*-* gdb/1447
+ gdb_test_multiple "p/c" "${test}" {
+ -re "[foo ${n}]\[\r\n\]+${gdb_prompt} $" {
+ if $finish_value_unknown {
+ # This contradicts the above claim that GDB didn't
+ # know the location of the return-value.
+ fail "${test}"
+ } else {
+ pass "${test}"
+ }
+ }
+ -re "[zed ${n}]\[\r\n\]+${gdb_prompt} $" {
+ # The value didn't get found. This is "expected".
+ if $finish_value_unknown {
+ pass "${test}"
+ } else {
+ # This contradicts the above claim that GDB did
+ # know the location of the return-value.
+ fail "${test}"
+ }
+ }
+ }
+
+ # Finally, check that "return" and finish" have consistent
+ # behavior.
+
+ # Since both "return" and "finish" use equivalent "which
+ # return-value convention" logic, both commands should have
+ # identical can/can-not find return-value messages.
+
+ # Note that since "call" and "finish" use common code paths, a
+ # failure here is a strong indicator of problems with "store
+ # return-value" code paths. Suggest looking at "return_value"
+ # when investigating a fix.
+
+ set test "return and finish use same convention; ${tests}"
+ if {$finish_value_unknown == $return_value_unknown} {
+ pass "${test}"
+ } else {
+ kfail gdb/1444 "${test}"
+ }
}
-do_function_calls;
+# ABIs pass anything >8 or >16 bytes in memory but below that things
+# randomly use register and/and structure conventions. Check all
+# possible sized char structs in that range. But only a restricted
+# range of the other types.
+
+# NetBSD/PPC returns "unnatural" (3, 5, 6, 7) sized structs in memory.
+
+# d10v is weird. 5/6 byte structs go in memory. 2 or more char
+# structs go in memory. Everything else is in a register!
+
+# Test every single char struct from 1..17 in size. This is what the
+# original "structs" test was doing.
+
+start_structs_test { tc }
+test_struct_calls 1
+test_struct_calls 2
+test_struct_calls 3
+test_struct_calls 4
+test_struct_calls 5
+test_struct_calls 6
+test_struct_calls 7
+test_struct_calls 8
+test_struct_calls 9
+test_struct_calls 10
+test_struct_calls 11
+test_struct_calls 12
+test_struct_calls 13
+test_struct_calls 14
+test_struct_calls 15
+test_struct_calls 16
+test_struct_calls 17
+test_struct_returns 1
+test_struct_returns 2
+test_struct_returns 3
+test_struct_returns 4
+test_struct_returns 5
+test_struct_returns 6
+test_struct_returns 7
+test_struct_returns 8
+
+
+# Let the fun begin.
+
+# Assuming that any integer struct larger than 8 bytes goes in memory,
+# come up with many and varied combinations of a return struct. For
+# "struct calls" test just beyond that 8 byte boundary, for "struct
+# returns" test up to that boundary.
+
+# For floats, assumed that up to two struct elements can be stored in
+# floating point registers, regardless of their size.
+
+# The approx size of each structure it is computed assumed that tc=1,
+# ts=2, ti=4, tl=4, tll=8, tf=4, td=8, tld=16, and that all fields are
+# naturally aligned. Padding being added where needed. Note that
+# these numbers are just approx, the d10v has ti=2, a 64-bit has has
+# tl=8.
+
+# Approx size: 2, 4, ...
+start_structs_test { ts }
+test_struct_calls 1
+test_struct_calls 2
+test_struct_calls 3
+test_struct_calls 4
+test_struct_calls 5
+test_struct_returns 1
+test_struct_returns 2
+test_struct_returns 3
+test_struct_returns 4
+
+# Approx size: 4, 8, ...
+start_structs_test { ti }
+test_struct_calls 1
+test_struct_calls 2
+test_struct_calls 3
+test_struct_returns 1
+test_struct_returns 2
+
+# Approx size: 4, 8, ...
+start_structs_test { tl }
+test_struct_calls 1
+test_struct_calls 2
+test_struct_calls 3
+test_struct_returns 1
+test_struct_returns 2
+
+# Approx size: 8, 16, ...
+start_structs_test { tll }
+test_struct_calls 1
+test_struct_calls 2
+test_struct_returns 1
+
+# Approx size: 4, 8, ...
+start_structs_test { tf }
+test_struct_calls 1
+test_struct_calls 2
+test_struct_calls 3
+test_struct_returns 1
+test_struct_returns 2
+
+# Approx size: 8, 16, ...
+start_structs_test { td }
+test_struct_calls 1
+test_struct_calls 2
+test_struct_returns 1
+
+# Approx size: 16, 32, ...
+start_structs_test { tld }
+test_struct_calls 1
+test_struct_calls 2
+test_struct_returns 1
+
+# Approx size: 2+1=3, 4, ...
+start_structs_test { ts tc }
+test_struct_calls 2
+test_struct_calls 3
+test_struct_calls 4
+test_struct_calls 5
+test_struct_calls 6
+test_struct_calls 7
+test_struct_calls 8
+test_struct_returns 2
+
+# Approx size: 4+1=5, 6, ...
+start_structs_test { ti tc }
+test_struct_calls 2
+test_struct_calls 3
+test_struct_calls 4
+test_struct_calls 5
+test_struct_calls 6
+test_struct_returns 2
+
+# Approx size: 4+1=5, 6, ...
+start_structs_test { tl tc }
+test_struct_calls 2
+test_struct_calls 3
+test_struct_calls 4
+test_struct_calls 5
+test_struct_calls 6
+test_struct_returns 2
+
+# Approx size: 8+1=9, 10, ...
+start_structs_test { tll tc }
+test_struct_calls 2
+
+# Approx size: 4+1=5, 6, ...
+start_structs_test { tf tc }
+test_struct_calls 2
+test_struct_calls 3
+test_struct_calls 4
+test_struct_calls 5
+test_struct_calls 6
+test_struct_returns 2
+
+# Approx size: 8+1=9, 10, ...
+start_structs_test { td tc }
+test_struct_calls 2
+
+# Approx size: 16+1=17, 18, ...
+start_structs_test { tld tc }
+test_struct_calls 2
+
+# Approx size: (1+1)+2=4, 6, ...
+start_structs_test { tc ts }
+test_struct_calls 2
+test_struct_calls 3
+test_struct_calls 4
+test_struct_calls 5
+test_struct_calls 6
+test_struct_returns 2
+
+# Approx size: (1+3)+4=8, 12, ...
+start_structs_test { tc ti }
+test_struct_calls 2
+test_struct_calls 3
+test_struct_calls 4
+test_struct_returns 2
+
+# Approx size: (1+3)+4=8, 12, ...
+start_structs_test { tc tl }
+test_struct_calls 2
+test_struct_calls 3
+test_struct_calls 4
+test_struct_returns 2
+
+# Approx size: (1+7)+8=16, 24, ...
+start_structs_test { tc tll }
+test_struct_calls 2
+
+# Approx size: (1+3)+4=8, 12, ...
+start_structs_test { tc tf }
+test_struct_calls 2
+test_struct_calls 3
+test_struct_calls 4
+
+# Approx size: (1+7)+8=16, 24, ...
+start_structs_test { tc td }
+test_struct_calls 2
+
+# Approx size: (1+15)+16=32, 48, ...
+start_structs_test { tc tld }
+test_struct_calls 2
+
+# Some float combinations
+
+# Approx size: 8+4=12, 16, ...
+# d10v: 4+4=8, 12, ...
+start_structs_test { td tf }
+test_struct_calls 2
+test_struct_returns 2
-gdb_stop_suppressing_tests;
+# Approx size: (4+4)+8=16, 32, ...
+# d10v: 4+4=8, 12, ...
+start_structs_test { tf td }
+test_struct_calls 2
+test_struct_returns 2
return 0
diff --git a/gdb/testsuite/gdb.base/until.exp b/gdb/testsuite/gdb.base/until.exp
index f646c6d36ae..033005db0fd 100644
--- a/gdb/testsuite/gdb.base/until.exp
+++ b/gdb/testsuite/gdb.base/until.exp
@@ -23,13 +23,21 @@ if $tracelevel then {
strace $tracelevel
}
-set testfile break
+set testfile "break"
set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
set binfile ${objdir}/${subdir}/${testfile}
-remote_exec build "rm -f ${binfile}"
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
gdb_exit
@@ -37,6 +45,11 @@ gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
+set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
+set bp_location19 [gdb_get_line_number "set breakpoint 19 here"]
+set bp_location20 [gdb_get_line_number "set breakpoint 20 here"]
+set bp_location21 [gdb_get_line_number "set breakpoint 21 here"]
+
if ![runto_main] then {
fail "Can't run to main"
return 0
@@ -45,8 +58,8 @@ if ![runto_main] then {
# Verify that "until <location>" works. (This is really just syntactic
# sugar for "tbreak <location>; continue".)
#
-gdb_test "until 79" \
- "main .* at .*:79.*" \
+gdb_test "until $bp_location1" \
+ "main .* at .*:$bp_location1.*" \
"until line number"
# Verify that a malformed "advance" is gracefully caught.
@@ -62,8 +75,8 @@ delete_breakpoints
# inner invocations of factorial() are completed and we are back at this
# frame.
#
-gdb_test "until 99" \
- "factorial.*value=720.*at.*${srcfile}:99.*return \\(value\\)." \
+gdb_test "until $bp_location19" \
+ "factorial.*value=720.*at.*${srcfile}:$bp_location19.*return \\(value\\).*" \
"until factorial, recursive function"
# Run to a function called by main
@@ -76,6 +89,6 @@ delete_breakpoints
# stop at main, the caller, where we put the 'guard' breakpoint.
#
gdb_test "until marker3" \
- "($hex in |)main.*argc.*argv.*envp.*at.*${srcfile}:(82.*marker2 \\(43\\)|83.*marker3 \\(.stack., .trace.\\))." \
+ "($hex in |)main.*argc.*argv.*envp.*at.*${srcfile}:($bp_location20.*marker2 \\(43\\)|$bp_location21.*marker3 \\(.stack., .trace.\\)).*" \
"until func, not called by current frame"
diff --git a/gdb/testsuite/gdb.base/volatile.exp b/gdb/testsuite/gdb.base/volatile.exp
index 704369605eb..faf62b9847b 100644
--- a/gdb/testsuite/gdb.base/volatile.exp
+++ b/gdb/testsuite/gdb.base/volatile.exp
@@ -88,9 +88,7 @@ if ![runto_main] then {
get_debug_format
proc local_compiler_xfail_check { } {
- global gcc_compiled;
-
- if {$gcc_compiled == 2} then {
+ if { [test_compiler_info gcc-2-*] } then {
if { ![test_debug_format "HP"] \
&& ![test_debug_format "DWARF 2"] } then {
setup_xfail "*-*-*"
@@ -258,7 +256,7 @@ gdb_test "ptype vendor" "type = const volatile unsigned char \\* const volatile.
# test function parameters
local_compiler_xfail_check
-if {$gcc_compiled == 3 && [test_debug_format "stabs"]} then {
+if { [test_compiler_info gcc-3-*] && [test_debug_format "stabs"] } then {
# For reasons unknown, GCC 3 with stabs mangles several cv-qualified
# arguments to this function.
setup_xfail "*-*-*"
diff --git a/gdb/testsuite/gdb.cp/ambiguous.exp b/gdb/testsuite/gdb.cp/ambiguous.exp
index 4224b2d79fd..6385dcb9aec 100644
--- a/gdb/testsuite/gdb.cp/ambiguous.exp
+++ b/gdb/testsuite/gdb.cp/ambiguous.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2003 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
@@ -45,7 +45,7 @@ if [get_compiler_info ${binfile} "c++"] {
return -1;
}
-if { $gcc_compiled } then { continue }
+if { [test_compiler_info gcc-*] } then { continue }
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
diff --git a/gdb/testsuite/gdb.cp/class2.cc b/gdb/testsuite/gdb.cp/class2.cc
new file mode 100644
index 00000000000..16cf98891aa
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/class2.cc
@@ -0,0 +1,66 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2003 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 */
+
+struct A
+{
+ virtual ~A ();
+ int a1;
+};
+
+A::~A()
+{
+ a1 = 800;
+}
+
+struct B : public A
+{
+ virtual ~B ();
+ int b1;
+ int b2;
+};
+
+B::~B()
+{
+ a1 = 900;
+ b1 = 901;
+ b2 = 902;
+}
+
+// Stop the compiler from optimizing away data.
+void refer (A *)
+{
+ ;
+}
+
+int main (void)
+{
+ A alpha, *aap, *abp;
+ B beta, *bbp;
+
+ alpha.a1 = 100;
+ beta.a1 = 200; beta.b1 = 201; beta.b2 = 202;
+
+ aap = &alpha; refer (aap);
+ abp = &beta; refer (abp);
+ bbp = &beta; refer (bbp);
+
+ return 0; // marker return 0
+} // marker close brace
diff --git a/gdb/testsuite/gdb.cp/class2.exp b/gdb/testsuite/gdb.cp/class2.exp
new file mode 100644
index 00000000000..9d5534566d2
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/class2.exp
@@ -0,0 +1,115 @@
+# Copyright 2003 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.
+
+if $tracelevel then {
+ strace $tracelevel
+ }
+
+if { [skip_cplus_tests] } { continue }
+
+set prms_id 0
+set bug_id 0
+
+set testfile "class2"
+set srcfile ${testfile}.cc
+set binfile ${objdir}/${subdir}/${testfile}
+
+# Create and source the file that provides information about the compiler
+# used to compile the test case.
+if [get_compiler_info ${binfile} "c++"] {
+ return -1
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# Start with "set print object off".
+
+gdb_test "set print object off" ""
+
+if ![runto_main] then {
+ perror "couldn't run to main"
+ continue
+}
+
+get_debug_format
+
+gdb_test "break [gdb_get_line_number "marker return 0"]" \
+ "Breakpoint.*at.* file .*" ""
+
+gdb_test "continue" "Breakpoint .* at .*" ""
+
+# Access the "A" object.
+
+gdb_test "print alpha" \
+ "= {.*a1 = 100.*}" \
+ "print alpha at marker return 0"
+
+# Access the "B" object.
+
+gdb_test "print beta" \
+ "= {.*a1 = 200.*b1 = 201.*b2 = 202}" \
+ "print beta at marker return 0"
+
+# Access the "A" object through an "A *" pointer.
+
+gdb_test_multiple "print * aap" "print * aap at marker return 0" {
+ -re "= {.*a1 = 100.*}\r\n$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gdwarf-2
+ # gcc 3.3.2 -gstabs+
+ pass "print * aap at marker return 0"
+ }
+ -re "= {.*a1 = .*}\r\n$gdb_prompt $" {
+ if { [test_compiler_info gcc-2-*] && [test_debug_format "DWARF 2"] } {
+ # gcc 2.95.3 -gdwarf-2
+ setup_kfail "gdb/1465" "*-*-*"
+ }
+ fail "print * aap at marker return 0"
+ }
+}
+
+# Access the "B" object through a "B *" pointer.
+
+gdb_test "print * bbp" \
+ "= {.*a1 = 200.*b1 = 201.*b2 = 202}" \
+ "print * bbp at marker return 0"
+
+# Access the "B" object through an "A *" pointer.
+# This should print using the "A" type.
+
+gdb_test_multiple "print * abp" "print * abp at marker return 0, s-p-o off" {
+ -re "= {.*a1 = 200.*b1 = .*b2 = .*}\r\n$gdb_prompt $" {
+ # This would violate the documentation for "set print object off".
+ fail "print * abp at marker return 0, s-p-o off"
+ }
+ -re "= {.*a1 = 200.*}\r\n$gdb_prompt $" {
+ pass "print * abp at marker return 0, s-p-o off"
+ }
+}
+
+# Access the "B" object through a "B *" pointer expression.
+# This should print using the "B" type.
+
+gdb_test "print * (B *) abp" \
+ "= {.*a1 = 200.*b1 = 201.*b2 = 202}" \
+ "print * (B *) abp at marker return 0"
diff --git a/gdb/testsuite/gdb.cp/ctti.exp b/gdb/testsuite/gdb.cp/ctti.exp
index 96e9fcff81a..1bc005afed5 100644
--- a/gdb/testsuite/gdb.cp/ctti.exp
+++ b/gdb/testsuite/gdb.cp/ctti.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2001 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2001, 2003 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
@@ -46,7 +46,7 @@ if [get_compiler_info ${binfile} "c++"] {
return -1;
}
-if { $gcc_compiled } then { continue }
+if { [test_compiler_info gcc-*] } then { continue }
#if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile1} ${srcdir}/${subdir}/${srcfile2} ${srcdir}/${subdir}/${srcfile3}" "${binfile}" executable {debug c++}] != "" } {
# gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
diff --git a/gdb/testsuite/gdb.cp/derivation.exp b/gdb/testsuite/gdb.cp/derivation.exp
index 38a46a2beaa..39acf2570a9 100644
--- a/gdb/testsuite/gdb.cp/derivation.exp
+++ b/gdb/testsuite/gdb.cp/derivation.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2000, 2001, 2002, 2003 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
@@ -109,7 +109,7 @@ gdb_expect {
timeout { fail "(timeout) print value of d_instance" }
}
- if {$gcc_compiled} then {
+ if { [test_compiler_info gcc-*] } then {
send_gdb "ptype d_instance\n"
gdb_expect {
-re "type = class D : private A, public B, (protected|private) C \{\r\n\[\t \]*public:\r\n\[\t \]*int d;\r\n\[\t \]*int dd;\[\r\n\t ]+D & operator=\\(D const ?&\\);\[\r\n\t ]+D\\((D const|const D) ?&\\);\[\r\n\t \]+D\\((void|)\\);\r\n\[\t \]*int dfoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype d_instance" }
@@ -140,7 +140,7 @@ gdb_expect {
timeout { fail "(timeout) print value of e_instance" }
}
- if {$gcc_compiled} {
+ if { [test_compiler_info gcc-*] } then {
send_gdb "ptype e_instance\n"
gdb_expect {
-re "type = class E : public A, private B, (protected|private) C \{\r\n\[\t \]*public:\r\n\[\t \]*int e;\r\n\[\t \]*int ee;\[\r\n\t ]+E & operator=\\(E const ?&\\);\[\r\n\t ]+E\\((E const|const E) ?&\\);\[\r\n\t \]+E\\((void|)\\);\r\n\[\t \]*int efoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype e_instance" }
diff --git a/gdb/testsuite/gdb.cp/member-ptr.exp b/gdb/testsuite/gdb.cp/member-ptr.exp
index f21cd1506e7..82437859d8b 100644
--- a/gdb/testsuite/gdb.cp/member-ptr.exp
+++ b/gdb/testsuite/gdb.cp/member-ptr.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2003 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
@@ -54,7 +54,7 @@ if [get_compiler_info ${binfile} "c++"] {
# Nearly all of these tests fail when compiled with G++, so just give up
# until GDB gets enhanced. -sts 1999-06-22
-if {$gcc_compiled} {
+if { [test_compiler_info gcc-*] } then {
continue
}
diff --git a/gdb/testsuite/gdb.cp/method.exp b/gdb/testsuite/gdb.cp/method.exp
index a085b14cdcc..729b930768b 100644
--- a/gdb/testsuite/gdb.cp/method.exp
+++ b/gdb/testsuite/gdb.cp/method.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2001, 2002, 2003 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
@@ -96,7 +96,7 @@ gdb_test "break A::bar" \
"Breakpoint \[0-9\]* at $hex.*file .*method.cc, line 44\\."
gdb_test "continue" \
- "Continuing\\.\r\n\r\nBreakpoint \[0-9\]*, A::bar(\\(int\\) const|) \\(this=$hex, arg=15\\) at .*method\\.cc:44\r\n44\[\t \]*return arg \\+ 2 \\* x;" \
+ "Continuing\\.\r\n\r\nBreakpoint \[0-9\]*, A::bar(|\\(int\\) const| const) \\(this=$hex, arg=15\\) at .*method\\.cc:44\r\n44\[\t \]*return arg \\+ 2 \\* x;" \
"continue to A::bar"
# Check ability to access this-relative stuff.
diff --git a/gdb/testsuite/gdb.cp/rtti.exp b/gdb/testsuite/gdb.cp/rtti.exp
index 3eba24b3a04..eaf1c17ae3a 100644
--- a/gdb/testsuite/gdb.cp/rtti.exp
+++ b/gdb/testsuite/gdb.cp/rtti.exp
@@ -82,6 +82,10 @@ gdb_breakpoint [gdb_get_line_number "constructs-done"]
gdb_continue_to_breakpoint "end of constructors"
gdb_test_multiple "print *e1" "print *e1" {
+ -re "warning: RTTI symbol not found for class 'n1::D1'.*$gdb_prompt $" {
+ # gdb HEAD 2003-12-05
+ kfail "gdb/488" "print *e1"
+ }
-re "warning: can't find class named `n1::D1', as given by C\\+\\+ RTTI.*$gdb_prompt $" {
#kfail "gdb/488" "print *e1"
fail "print *e1"
@@ -102,6 +106,10 @@ gdb_test_multiple "print *e1" "print *e1" {
# that fail branch to an xfail.
gdb_test_multiple "print *e2" "print *e2" {
+ -re "warning: RTTI symbol not found for class 'n2::D2'.*$gdb_prompt $" {
+ # gdb HEAD 2003-12-05
+ kfail "gdb/488" "print *e2"
+ }
-re "warning: can't find class named `n2::D2', as given by C\\+\\+ RTTI.*$gdb_prompt $" {
#kfail "gdb/488" "print *e2"
fail "print *e2"
diff --git a/gdb/testsuite/gdb.cp/templates.exp b/gdb/testsuite/gdb.cp/templates.exp
index 0b8357d05e5..55fedd2bc40 100644
--- a/gdb/testsuite/gdb.cp/templates.exp
+++ b/gdb/testsuite/gdb.cp/templates.exp
@@ -61,7 +61,7 @@ proc test_ptype_of_templates {} {
-re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;((${ws}T5<int> & operator=\\(T5<int> const ?&\\);)|(${ws}T5\\(int\\);)|(${ws}T5\\((T5<int> const|const T5<int>) ?&\\);)|(${ws}~T5\\((void|)\\);)|(${ws}static void \\* operator new\\(unsigned( int| long)?\\);)|(${ws}static void operator delete\\(void ?\\*\\);)|(${ws}int value\\((void|)\\);))*${ws}\}\r\n$gdb_prompt $" {
pass "ptype T5<int> (obsolescent gcc or gdb)"
}
- -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}void T5\\(int\\);${ws}void T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\(int\\);${ws}static void \\* operator new\\(unsigned( long|)\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
+ -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}void T5\\(int\\);${ws}void T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\(int\\);${ws}static void \\* operator new\\(unsigned( int| long|)\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
# This also triggers gdb/1113...
kfail "gdb/1111" "ptype T5<int>"
}
@@ -87,7 +87,7 @@ proc test_ptype_of_templates {} {
-re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;((${ws}T5<int> & operator=\\(T5<int> const ?&\\);)|(${ws}T5\\(int\\);)|(${ws}T5\\(T5<int> const ?&\\);)|(${ws}~T5\\((void|)\\);)|(${ws}static void \\* operator new\\(unsigned( int| long)?\\);)|(${ws}static void operator delete\\(void ?\\*\\);)|(${ws}int value\\((void|)\\);))*${ws}\}\r\n$gdb_prompt $" {
pass "ptype t5i (obsolescent gcc or gdb)"
}
- -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}void T5\\(int\\);${ws}void T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\(int\\);${ws}static void \\* operator new\\(unsigned( long|)\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
+ -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}void T5\\(int\\);${ws}void T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\(int\\);${ws}static void \\* operator new\\(unsigned( int| long|)\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
# This also triggers gdb/1113...
kfail "gdb/1111" "ptype T5<int>"
}
diff --git a/gdb/testsuite/gdb.cp/virtfunc.exp b/gdb/testsuite/gdb.cp/virtfunc.exp
index dbd575cfb32..ff36c27cc36 100644
--- a/gdb/testsuite/gdb.cp/virtfunc.exp
+++ b/gdb/testsuite/gdb.cp/virtfunc.exp
@@ -734,7 +734,6 @@ proc test_virtual_calls {} {
global gdb_prompt
global GDB
global nl
- global gcc_compiled
if [target_info exists gdb,cannot_call_functions] {
setup_xfail "*-*-*" 2416
diff --git a/gdb/testsuite/gdb.trace/configure b/gdb/testsuite/gdb.trace/configure
deleted file mode 100755
index 417620553ee..00000000000
--- a/gdb/testsuite/gdb.trace/configure
+++ /dev/null
@@ -1,899 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12.1
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.12.1"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=collection.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-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"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-CC=${CC-cc}
-
-ac_aux_dir=
-for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-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:573: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-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:594: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-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:612: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CC@%$CC%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/gdb/testsuite/lib/compiler.c b/gdb/testsuite/lib/compiler.c
index 8eb0d47dd19..b0f557c1a5f 100644
--- a/gdb/testsuite/lib/compiler.c
+++ b/gdb/testsuite/lib/compiler.c
@@ -1,3 +1,24 @@
+/* This test file is part of GDB, the GNU debugger.
+
+ Copyright 1995, 1997, 1999, 2003 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 */
+
/* Often the behavior of any particular test depends upon what compiler was
used to compile the test. As each test is compiled, this file is
preprocessed by the same compiler used to compile that specific test
@@ -24,8 +45,10 @@ set signed_keyword_not_used 1
#if defined (__GNUC__)
set gcc_compiled __GNUC__
+set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ } -]
#else
set gcc_compiled 0
+set compiler_info ""
#endif
return 0
diff --git a/gdb/testsuite/lib/compiler.cc b/gdb/testsuite/lib/compiler.cc
index 5cb00f6685a..719b62b0b6b 100644
--- a/gdb/testsuite/lib/compiler.cc
+++ b/gdb/testsuite/lib/compiler.cc
@@ -1,3 +1,24 @@
+/* This test file is part of GDB, the GNU debugger.
+
+ Copyright 1995, 1999, 2003 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 */
+
/* Often the behavior of any particular test depends upon what compiler was
used to compile the test. As each test is compiled, this file is
preprocessed by the same compiler used to compile that specific test
@@ -27,8 +48,10 @@ set supports_template_debugging 0
#if defined (__GNUC__)
set gcc_compiled __GNUC__
+set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ } -]
#else
set gcc_compiled 0
+set compiler_info ""
#endif
return 0
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index a16b0fa7fec..136f68c43b8 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -360,6 +360,57 @@ proc gdb_continue_to_breakpoint {name} {
}
+# gdb_internal_error_resync:
+#
+# Answer the questions GDB asks after it reports an internal error
+# until we get back to a GDB prompt. Decline to quit the debugging
+# session, and decline to create a core file. Return non-zero if the
+# resync succeeds.
+#
+# This procedure just answers whatever questions come up until it sees
+# a GDB prompt; it doesn't require you to have matched the input up to
+# any specific point. However, it only answers questions it sees in
+# the output itself, so if you've matched a question, you had better
+# answer it yourself before calling this.
+#
+# You can use this function thus:
+#
+# gdb_expect {
+# ...
+# -re ".*A problem internal to GDB has been detected" {
+# gdb_internal_error_resync
+# }
+# ...
+# }
+#
+proc gdb_internal_error_resync {} {
+ global gdb_prompt
+
+ set count 0
+ while {$count < 10} {
+ gdb_expect {
+ -re "Quit this debugging session\\? \\(y or n\\) $" {
+ send_gdb "n\n"
+ incr count
+ }
+ -re "Create a core file of GDB\\? \\(y or n\\) $" {
+ send_gdb "n\n"
+ incr count
+ }
+ -re "$gdb_prompt $" {
+ # We're resynchronized.
+ return 1
+ }
+ timeout {
+ perror "Could not resync from internal error (timeout)"
+ return 0
+ }
+ }
+ }
+ perror "Could not resync from internal error (resync count exceeded)"
+ return 0
+}
+
# gdb_test_multiple COMMAND MESSAGE EXPECT_ARGUMENTS
# Send a command to gdb; test the result.
@@ -379,6 +430,20 @@ proc gdb_continue_to_breakpoint {name} {
# 0 if only user-supplied patterns matched
# -1 if there was an internal error.
#
+# You can use this function thus:
+#
+# gdb_test_multiple "print foo" "test foo" {
+# -re "expected output 1" {
+# pass "print foo"
+# }
+# -re "expected output 2" {
+# fail "print foo"
+# }
+# }
+#
+# The standard patterns, such as "Program exited..." and "A problem
+# ...", all being implicitly appended to that list.
+#
proc gdb_test_multiple { command message user_code } {
global verbose
global gdb_prompt
@@ -511,6 +576,10 @@ proc gdb_test_multiple { command message user_code } {
}
set code {
+ -re ".*A problem internal to GDB has been detected" {
+ fail "$message (GDB internal error)"
+ gdb_internal_error_resync
+ }
-re "\\*\\*\\* DOSEXIT code.*" {
if { $message != "" } {
fail "$message";
@@ -1025,6 +1094,9 @@ proc skip_hp_tests {} {
return $skip_hp
}
+global compiler_info
+set compiler_info unknown
+
proc get_compiler_info {binfile args} {
# Create and source the file that provides information about the compiler
# used to compile the test case.
@@ -1034,6 +1106,7 @@ proc get_compiler_info {binfile args} {
# These two come from compiler.c.
global signed_keyword_not_used
global gcc_compiled
+ global compiler_info
if {![istarget "hppa*-*-hpux*"] && ![istarget "mips*-*-irix*"]} {
if { [llength $args] > 0 } {
@@ -1106,6 +1179,11 @@ proc get_compiler_info {binfile args} {
return 0;
}
+proc test_compiler_info { compiler } {
+ global compiler_info
+ return [string match $compiler $compiler_info]
+}
+
proc get_compiler {args} {
global CC CC_FOR_TARGET CXX CXX_FOR_TARGET F77_FOR_TARGET
diff --git a/gdb/thread-db.c b/gdb/thread-db.c
index efd0d33b45f..b135c39f160 100644
--- a/gdb/thread-db.c
+++ b/gdb/thread-db.c
@@ -240,7 +240,7 @@ thread_db_state_str (td_thr_state_e state)
}
/* A callback function for td_ta_thr_iter, which we use to map all
- threads to LWPs.
+ threads to LWPs.
THP is a handle to the current thread; if INFOP is not NULL, the
struct thread_info associated with this thread is returned in
@@ -465,6 +465,26 @@ thread_db_load (void)
return 1;
}
+static td_err_e
+enable_thread_event (td_thragent_t *thread_agent, int event, CORE_ADDR *bp)
+{
+ td_notify_t notify;
+ td_err_e err;
+
+ /* Get the breakpoint address for thread EVENT. */
+ err = td_ta_event_addr_p (thread_agent, event, &notify);
+ if (err != TD_OK)
+ return err;
+
+ /* Set up the breakpoint. */
+ (*bp) = gdbarch_convert_from_func_ptr_addr (current_gdbarch,
+ (CORE_ADDR) notify.u.bptaddr,
+ &current_target);
+ create_thread_event_breakpoint ((*bp));
+
+ return TD_OK;
+}
+
static void
enable_thread_event_reporting (void)
{
@@ -498,9 +518,11 @@ enable_thread_event_reporting (void)
/* Delete previous thread event breakpoints, if any. */
remove_thread_event_breakpoints ();
+ td_create_bp_addr = 0;
+ td_death_bp_addr = 0;
- /* Get address for thread creation breakpoint. */
- err = td_ta_event_addr_p (thread_agent, TD_CREATE, &notify);
+ /* Set up the thread creation event. */
+ err = enable_thread_event (thread_agent, TD_CREATE, &td_create_bp_addr);
if (err != TD_OK)
{
warning ("Unable to get location for thread creation breakpoint: %s",
@@ -508,22 +530,14 @@ enable_thread_event_reporting (void)
return;
}
- /* Set up the breakpoint. */
- td_create_bp_addr = (CORE_ADDR) notify.u.bptaddr;
- create_thread_event_breakpoint (td_create_bp_addr);
-
- /* Get address for thread death breakpoint. */
- err = td_ta_event_addr_p (thread_agent, TD_DEATH, &notify);
+ /* Set up the thread death event. */
+ err = enable_thread_event (thread_agent, TD_DEATH, &td_death_bp_addr);
if (err != TD_OK)
{
warning ("Unable to get location for thread death breakpoint: %s",
thread_db_err_str (err));
return;
}
-
- /* Set up the breakpoint. */
- td_death_bp_addr = (CORE_ADDR) notify.u.bptaddr;
- create_thread_event_breakpoint (td_death_bp_addr);
}
static void
@@ -821,10 +835,10 @@ check_event (ptid_t ptid)
was created and cannot specifically locate the event message for it.
We have to call td_ta_event_getmsg() to get
the latest message. Since we have no way of correlating whether
- the event message we get back corresponds to our breakpoint, we must
+ the event message we get back corresponds to our breakpoint, we must
loop and read all event messages, processing them appropriately.
- This guarantees we will process the correct message before continuing
- from the breakpoint.
+ This guarantees we will process the correct message before continuing
+ from the breakpoint.
Currently, death events are not enabled. If they are enabled,
the death event can use the td_thr_event_getmsg() interface to
diff --git a/gdb/values.c b/gdb/values.c
index 27524ebc353..1d72a72b21d 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -1223,7 +1223,7 @@ register_value_being_returned (struct type *valtype, struct regcache *retbuf)
struct value *val = allocate_value (valtype);
/* If the function returns void, don't bother fetching the return
- value. */
+ value. See also "using_struct_return". */
if (TYPE_CODE (valtype) == TYPE_CODE_VOID)
return val;
@@ -1285,6 +1285,11 @@ using_struct_return (struct type *value_type, int gcc_p)
if (code == TYPE_CODE_ERROR)
error ("Function return type unknown.");
+ if (code == TYPE_CODE_VOID)
+ /* A void return value is never in memory. See also corresponding
+ code in "register_value_being_returned". */
+ return 0;
+
if (!gdbarch_return_value_p (current_gdbarch))
{
/* FIXME: cagney/2003-10-01: The below is dead. Instead an
diff --git a/gdb/version.in b/gdb/version.in
index 71700c22f68..a6451cd5367 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-2003-11-11-cvs
+2003-12-15-cvs
diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c
index 5e6a7e1a2ca..b4d590e34ac 100644
--- a/gdb/x86-64-tdep.c
+++ b/gdb/x86-64-tdep.c
@@ -209,31 +209,25 @@ x86_64_convert_register_p (int regnum, struct type *type)
}
-/* The returning of values is done according to the special algorithm.
- Some types are returned in registers an some (big structures) in
- memory. See the System V psABI for details. */
+/* Register classes as defined in the psABI. */
-#define MAX_CLASSES 4
-
-enum x86_64_reg_class
+enum amd64_reg_class
{
- X86_64_NO_CLASS,
- X86_64_INTEGER_CLASS,
- X86_64_INTEGERSI_CLASS,
- X86_64_SSE_CLASS,
- X86_64_SSESF_CLASS,
- X86_64_SSEDF_CLASS,
- X86_64_SSEUP_CLASS,
- X86_64_X87_CLASS,
- X86_64_X87UP_CLASS,
- X86_64_MEMORY_CLASS
+ AMD64_INTEGER,
+ AMD64_SSE,
+ AMD64_SSEUP,
+ AMD64_X87,
+ AMD64_X87UP,
+ AMD64_COMPLEX_X87,
+ AMD64_NO_CLASS,
+ AMD64_MEMORY
};
-/* Return the union class of CLASS1 and CLASS2.
- See the System V psABI for details. */
+/* Return the union class of CLASS1 and CLASS2. See the psABI for
+ details. */
-static enum x86_64_reg_class
-merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2)
+static enum amd64_reg_class
+amd64_merge_classes (enum amd64_reg_class class1, enum amd64_reg_class class2)
{
/* Rule (a): If both classes are equal, this is the resulting class. */
if (class1 == class2)
@@ -241,579 +235,361 @@ merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2)
/* Rule (b): If one of the classes is NO_CLASS, the resulting class
is the other class. */
- if (class1 == X86_64_NO_CLASS)
+ if (class1 == AMD64_NO_CLASS)
return class2;
- if (class2 == X86_64_NO_CLASS)
+ if (class2 == AMD64_NO_CLASS)
return class1;
/* Rule (c): If one of the classes is MEMORY, the result is MEMORY. */
- if (class1 == X86_64_MEMORY_CLASS || class2 == X86_64_MEMORY_CLASS)
- return X86_64_MEMORY_CLASS;
+ if (class1 == AMD64_MEMORY || class2 == AMD64_MEMORY)
+ return AMD64_MEMORY;
/* Rule (d): If one of the classes is INTEGER, the result is INTEGER. */
- if ((class1 == X86_64_INTEGERSI_CLASS && class2 == X86_64_SSESF_CLASS)
- || (class2 == X86_64_INTEGERSI_CLASS && class1 == X86_64_SSESF_CLASS))
- return X86_64_INTEGERSI_CLASS;
- if (class1 == X86_64_INTEGER_CLASS || class1 == X86_64_INTEGERSI_CLASS
- || class2 == X86_64_INTEGER_CLASS || class2 == X86_64_INTEGERSI_CLASS)
- return X86_64_INTEGER_CLASS;
-
- /* Rule (e): If one of the classes is X87 or X87UP class, MEMORY is
- used as class. */
- if (class1 == X86_64_X87_CLASS || class1 == X86_64_X87UP_CLASS
- || class2 == X86_64_X87_CLASS || class2 == X86_64_X87UP_CLASS)
- return X86_64_MEMORY_CLASS;
+ if (class1 == AMD64_INTEGER || class2 == AMD64_INTEGER)
+ return AMD64_INTEGER;
+
+ /* Rule (e): If one of the classes is X87, X87UP, COMPLEX_X87 class,
+ MEMORY is used as class. */
+ if (class1 == AMD64_X87 || class1 == AMD64_X87UP
+ || class1 == AMD64_COMPLEX_X87 || class2 == AMD64_X87
+ || class2 == AMD64_X87UP || class2 == AMD64_COMPLEX_X87)
+ return AMD64_MEMORY;
/* Rule (f): Otherwise class SSE is used. */
- return X86_64_SSE_CLASS;
+ return AMD64_SSE;
}
-/* 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.
+static void amd64_classify (struct type *type, enum amd64_reg_class class[2]);
- See the System V psABI for details. */
+/* Classify TYPE according to the rules for aggregate (structures and
+ arrays) and union types, and store the result in CLASS. */
-static int
-classify_argument (struct type *type,
- enum x86_64_reg_class classes[MAX_CLASSES], int bit_offset)
+static void
+amd64_classify_aggregate (struct type *type, enum amd64_reg_class class[2])
{
- int bytes = TYPE_LENGTH (type);
- int words = (bytes + 8 - 1) / 8;
+ int len = TYPE_LENGTH (type);
- switch (TYPE_CODE (type))
+ /* 1. If the size of an object is larger than two eightbytes, or in
+ C++, is a non-POD structure or union type, or contains
+ unaligned fields, it has class memory. */
+ if (len > 16)
{
- case TYPE_CODE_ARRAY:
- case TYPE_CODE_STRUCT:
- case TYPE_CODE_UNION:
- {
- int i;
- enum x86_64_reg_class subclasses[MAX_CLASSES];
-
- /* On x86-64 we pass structures larger than 16 bytes on the stack. */
- if (bytes > 16)
- return 0;
-
- 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. */
- if (!words)
- {
- classes[0] = X86_64_NO_CLASS;
- return 1;
- }
- switch (TYPE_CODE (type))
- {
- case TYPE_CODE_STRUCT:
- {
- int j;
- for (j = 0; j < TYPE_NFIELDS (type); ++j)
- {
- int num = classify_argument (TYPE_FIELDS (type)[j].type,
- subclasses,
- (TYPE_FIELDS (type)[j].loc.
- bitpos + bit_offset) % 256);
- if (!num)
- return 0;
- for (i = 0; i < num; i++)
- {
- int pos =
- (TYPE_FIELDS (type)[j].loc.bitpos +
- bit_offset) / 8 / 8;
- classes[i + pos] =
- merge_classes (subclasses[i], classes[i + pos]);
- }
- }
- }
- break;
- case TYPE_CODE_ARRAY:
- {
- int num;
+ class[0] = class[1] = AMD64_MEMORY;
+ return;
+ }
- num = classify_argument (TYPE_TARGET_TYPE (type),
- subclasses, bit_offset);
- if (!num)
- return 0;
+ /* 2. Both eightbytes get initialized to class NO_CLASS. */
+ class[0] = class[1] = AMD64_NO_CLASS;
- /* The partial classes are now full classes. */
- if (subclasses[0] == X86_64_SSESF_CLASS && bytes != 4)
- subclasses[0] = X86_64_SSE_CLASS;
- if (subclasses[0] == X86_64_INTEGERSI_CLASS && bytes != 4)
- subclasses[0] = X86_64_INTEGER_CLASS;
+ /* 3. Each field of an object is classified recursively so that
+ always two fields are considered. The resulting class is
+ calculated according to the classes of the fields in the
+ eightbyte: */
- for (i = 0; i < words; i++)
- classes[i] = subclasses[i % num];
- }
- break;
- case TYPE_CODE_UNION:
- {
- int j;
- {
- for (j = 0; j < TYPE_NFIELDS (type); ++j)
- {
- int num;
- num = classify_argument (TYPE_FIELDS (type)[j].type,
- subclasses, bit_offset);
- if (!num)
- return 0;
- for (i = 0; i < num; i++)
- classes[i] = merge_classes (subclasses[i], classes[i]);
- }
- }
- }
- break;
- default:
- break;
- }
- /* Final merger cleanup. */
- for (i = 0; i < words; i++)
- {
- /* If one class is MEMORY, everything should be passed in
- memory. */
- if (classes[i] == X86_64_MEMORY_CLASS)
- return 0;
-
- /* The X86_64_SSEUP_CLASS should be always preceeded by
- X86_64_SSE_CLASS. */
- if (classes[i] == X86_64_SSEUP_CLASS
- && (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. */
- if (classes[i] == X86_64_X87UP_CLASS
- && (i == 0 || classes[i - 1] != X86_64_X87_CLASS))
- classes[i] = X86_64_SSE_CLASS;
- }
- return words;
- }
- break;
- case TYPE_CODE_FLT:
- switch (bytes)
- {
- case 4:
- if (!(bit_offset % 64))
- classes[0] = X86_64_SSESF_CLASS;
- else
- classes[0] = X86_64_SSE_CLASS;
- return 1;
- case 8:
- classes[0] = X86_64_SSEDF_CLASS;
- return 1;
- case 16:
- classes[0] = X86_64_X87_CLASS;
- classes[1] = X86_64_X87UP_CLASS;
- return 2;
- }
- break;
- case TYPE_CODE_ENUM:
- case TYPE_CODE_REF:
- case TYPE_CODE_INT:
- case TYPE_CODE_PTR:
- switch (bytes)
+ if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
+ {
+ struct type *subtype = check_typedef (TYPE_TARGET_TYPE (type));
+
+ /* All fields in an array have the same type. */
+ amd64_classify (subtype, class);
+ if (len > 8 && class[1] == AMD64_NO_CLASS)
+ class[1] = class[0];
+ }
+ else
+ {
+ int i;
+
+ /* Structure or union. */
+ gdb_assert (TYPE_CODE (type) == TYPE_CODE_STRUCT
+ || TYPE_CODE (type) == TYPE_CODE_UNION);
+
+ for (i = 0; i < TYPE_NFIELDS (type); i++)
{
- case 1:
- case 2:
- case 4:
- case 8:
- if (bytes * 8 + bit_offset <= 32)
- classes[0] = X86_64_INTEGERSI_CLASS;
- else
- classes[0] = X86_64_INTEGER_CLASS;
- return 1;
- case 16:
- classes[0] = classes[1] = X86_64_INTEGER_CLASS;
- return 2;
- default:
- break;
+ struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i));
+ int pos = TYPE_FIELD_BITPOS (type, i) / 64;
+ enum amd64_reg_class subclass[2];
+
+ gdb_assert (pos == 0 || pos == 1);
+
+ amd64_classify (subtype, subclass);
+ class[pos] = amd64_merge_classes (class[pos], subclass[0]);
+ if (pos == 0)
+ class[1] = amd64_merge_classes (class[1], subclass[1]);
}
- case TYPE_CODE_VOID:
- return 0;
- default: /* Avoid warning. */
- break;
}
- internal_error (__FILE__, __LINE__,
- "classify_argument: unknown argument type");
+
+ /* 4. Then a post merger cleanup is done: */
+
+ /* Rule (a): If one of the classes is MEMORY, the whole argument is
+ passed in memory. */
+ if (class[0] == AMD64_MEMORY || class[1] == AMD64_MEMORY)
+ class[0] = class[1] = AMD64_MEMORY;
+
+ /* Rule (b): If SSEUP is not preceeded by SSE, it is converted to
+ SSE. */
+ if (class[0] == AMD64_SSEUP)
+ class[0] = AMD64_SSE;
+ if (class[1] == AMD64_SSEUP && class[0] != AMD64_SSE)
+ class[1] = AMD64_SSE;
}
-/* 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. */
+/* Classify TYPE, and store the result in CLASS. */
-static int
-examine_argument (enum x86_64_reg_class classes[MAX_CLASSES],
- int n, int *int_nregs, int *sse_nregs)
+static void
+amd64_classify (struct type *type, enum amd64_reg_class class[2])
{
- *int_nregs = 0;
- *sse_nregs = 0;
- if (!n)
- return 0;
- for (n--; n >= 0; n--)
- switch (classes[n])
- {
- case X86_64_INTEGER_CLASS:
- case X86_64_INTEGERSI_CLASS:
- (*int_nregs)++;
- break;
- case X86_64_SSE_CLASS:
- case X86_64_SSESF_CLASS:
- case X86_64_SSEDF_CLASS:
- (*sse_nregs)++;
- break;
- case X86_64_NO_CLASS:
- case X86_64_SSEUP_CLASS:
- case X86_64_X87_CLASS:
- case X86_64_X87UP_CLASS:
- break;
- case X86_64_MEMORY_CLASS:
- internal_error (__FILE__, __LINE__,
- "examine_argument: unexpected memory class");
- }
- return 1;
+ enum type_code code = TYPE_CODE (type);
+ int len = TYPE_LENGTH (type);
+
+ class[0] = class[1] = AMD64_NO_CLASS;
+
+ /* Arguments of types (signed and unsigned) _Bool, char, short, int,
+ long, long long, and pointers are in the INTEGER class. */
+ if ((code == TYPE_CODE_INT || code == TYPE_CODE_ENUM
+ || code == TYPE_CODE_PTR || code == TYPE_CODE_REF)
+ && (len == 1 || len == 2 || len == 4 || len == 8))
+ class[0] = AMD64_INTEGER;
+
+ /* Arguments of types float, double and __m64 are in class SSE. */
+ else if (code == TYPE_CODE_FLT && (len == 4 || len == 8))
+ /* FIXME: __m64 . */
+ class[0] = AMD64_SSE;
+
+ /* Arguments of types __float128 and __m128 are split into two
+ halves. The least significant ones belong to class SSE, the most
+ significant one to class SSEUP. */
+ /* FIXME: __float128, __m128. */
+
+ /* The 64-bit mantissa of arguments of type long double belongs to
+ class X87, the 16-bit exponent plus 6 bytes of padding belongs to
+ class X87UP. */
+ else if (code == TYPE_CODE_FLT && len == 16)
+ /* Class X87 and X87UP. */
+ class[0] = AMD64_X87, class[1] = AMD64_X87UP;
+
+ /* Aggregates. */
+ else if (code == TYPE_CODE_ARRAY || code == TYPE_CODE_STRUCT
+ || code == TYPE_CODE_UNION)
+ amd64_classify_aggregate (type, class);
}
-#define RET_INT_REGS 2
-#define RET_SSE_REGS 2
+static enum return_value_convention
+amd64_return_value (struct gdbarch *gdbarch, struct type *type,
+ struct regcache *regcache,
+ void *readbuf, const void *writebuf)
+{
+ enum amd64_reg_class class[2];
+ int len = TYPE_LENGTH (type);
+ static int integer_regnum[] = { X86_64_RAX_REGNUM, X86_64_RDX_REGNUM };
+ static int sse_regnum[] = { X86_64_XMM0_REGNUM, X86_64_XMM1_REGNUM };
+ int integer_reg = 0;
+ int sse_reg = 0;
+ int i;
-/* 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. */
+ gdb_assert (!(readbuf && writebuf));
-static int
-x86_64_use_struct_convention (int gcc_p, struct type *value_type)
-{
- enum x86_64_reg_class class[MAX_CLASSES];
- int n = classify_argument (value_type, class, 0);
- int needed_intregs;
- int needed_sseregs;
-
- return (!n ||
- !examine_argument (class, n, &needed_intregs, &needed_sseregs) ||
- needed_intregs > RET_INT_REGS || needed_sseregs > RET_SSE_REGS);
-}
+ /* 1. Classify the return type with the classification algorithm. */
+ amd64_classify (type, class);
-/* Extract from an array REGBUF containing the (raw) register state, a
- function return value of TYPE, and copy that, in virtual format,
- into VALBUF. */
+ /* 2. If the type has class MEMORY, then the caller provides space
+ for the return value and passes the address of this storage in
+ %rdi as if it were the first argument to the function. In
+ effect, this address becomes a hidden first argument. */
+ if (class[0] == AMD64_MEMORY)
+ return RETURN_VALUE_STRUCT_CONVENTION;
-static void
-x86_64_extract_return_value (struct type *type, struct regcache *regcache,
- void *valbuf)
-{
- enum x86_64_reg_class class[MAX_CLASSES];
- int n = classify_argument (type, class, 0);
- int needed_intregs;
- int needed_sseregs;
- int intreg = 0;
- int ssereg = 0;
- int offset = 0;
- int ret_int_r[RET_INT_REGS] = { X86_64_RAX_REGNUM, X86_64_RDX_REGNUM };
- int ret_sse_r[RET_SSE_REGS] = { X86_64_XMM0_REGNUM, X86_64_XMM1_REGNUM };
-
- if (!n ||
- !examine_argument (class, n, &needed_intregs, &needed_sseregs) ||
- needed_intregs > RET_INT_REGS || needed_sseregs > RET_SSE_REGS)
- { /* memory class */
- CORE_ADDR addr;
- regcache_cooked_read (regcache, X86_64_RAX_REGNUM, &addr);
- read_memory (addr, valbuf, TYPE_LENGTH (type));
- return;
- }
- else
+ gdb_assert (class[1] != AMD64_MEMORY);
+ gdb_assert (len <= 16);
+
+ for (i = 0; len > 0; i++, len -= 8)
{
- int i;
- for (i = 0; i < n; i++)
+ int regnum = -1;
+ int offset = 0;
+
+ switch (class[i])
{
- switch (class[i])
- {
- case X86_64_NO_CLASS:
- break;
- case X86_64_INTEGER_CLASS:
- regcache_cooked_read (regcache, ret_int_r[(intreg + 1) / 2],
- (char *) valbuf + offset);
- offset += 8;
- intreg += 2;
- break;
- case X86_64_INTEGERSI_CLASS:
- regcache_cooked_read_part (regcache, ret_int_r[intreg / 2],
- 0, 4, (char *) valbuf + offset);
- offset += 8;
- intreg++;
- break;
- case X86_64_SSEDF_CLASS:
- case X86_64_SSESF_CLASS:
- case X86_64_SSE_CLASS:
- regcache_cooked_read_part (regcache,
- ret_sse_r[(ssereg + 1) / 2], 0, 8,
- (char *) valbuf + offset);
- offset += 8;
- ssereg += 2;
- break;
- case X86_64_SSEUP_CLASS:
- regcache_cooked_read_part (regcache, ret_sse_r[ssereg / 2],
- 0, 8, (char *) valbuf + offset);
- offset += 8;
- ssereg++;
- break;
- case X86_64_X87_CLASS:
- regcache_cooked_read_part (regcache, X86_64_ST0_REGNUM,
- 0, 8, (char *) valbuf + offset);
- offset += 8;
- break;
- case X86_64_X87UP_CLASS:
- regcache_cooked_read_part (regcache, X86_64_ST0_REGNUM,
- 8, 2, (char *) valbuf + offset);
- offset += 8;
- break;
- case X86_64_MEMORY_CLASS:
- default:
- internal_error (__FILE__, __LINE__,
- "Unexpected argument class");
- }
+ case AMD64_INTEGER:
+ /* 3. If the class is INTEGER, the next available register
+ of the sequence %rax, %rdx is used. */
+ regnum = integer_regnum[integer_reg++];
+ break;
+
+ case AMD64_SSE:
+ /* 4. If the class is SSE, the next available SSE register
+ of the sequence %xmm0, %xmm1 is used. */
+ regnum = sse_regnum[sse_reg++];
+ break;
+
+ case AMD64_SSEUP:
+ /* 5. If the class is SSEUP, the eightbyte is passed in the
+ upper half of the last used SSE register. */
+ gdb_assert (sse_reg > 0);
+ regnum = sse_regnum[sse_reg - 1];
+ offset = 8;
+ break;
+
+ case AMD64_X87:
+ /* 6. If the class is X87, the value is returned on the X87
+ stack in %st0 as 80-bit x87 number. */
+ regnum = X86_64_ST0_REGNUM;
+ if (writebuf)
+ i387_return_value (gdbarch, regcache);
+ break;
+
+ case AMD64_X87UP:
+ /* 7. If the class is X87UP, the value is returned together
+ with the previous X87 value in %st0. */
+ gdb_assert (i > 0 && class[0] == AMD64_X87);
+ regnum = X86_64_ST0_REGNUM;
+ offset = 8;
+ len = 2;
+ break;
+
+ case AMD64_NO_CLASS:
+ continue;
+
+ default:
+ gdb_assert (!"Unexpected register class.");
}
+
+ gdb_assert (regnum != -1);
+
+ if (readbuf)
+ regcache_raw_read_part (regcache, regnum, offset, min (len, 8),
+ (char *) readbuf + i * 8);
+ if (writebuf)
+ regcache_raw_write_part (regcache, regnum, offset, min (len, 8),
+ (const char *) writebuf + i * 8);
}
-}
-#define INT_REGS 6
-#define SSE_REGS 8
+ return RETURN_VALUE_REGISTER_CONVENTION;
+}
+
static CORE_ADDR
-x86_64_push_arguments (struct regcache *regcache, int nargs,
- struct value **args, CORE_ADDR sp)
+amd64_push_arguments (struct regcache *regcache, int nargs,
+ struct value **args, CORE_ADDR sp)
{
- int intreg = 0;
- int ssereg = 0;
- /* For varargs functions we have to pass the total number of SSE
- registers used in %rax. So, let's count this number. */
- int total_sse_args = 0;
- /* Once an SSE/int argument is passed on the stack, all subsequent
- arguments are passed there. */
- int sse_stack = 0;
- int int_stack = 0;
- unsigned total_sp;
- int i;
- char buf[8];
- static int int_parameter_registers[INT_REGS] =
+ static int integer_regnum[] =
{
X86_64_RDI_REGNUM, 4, /* %rdi, %rsi */
X86_64_RDX_REGNUM, 2, /* %rdx, %rcx */
8, 9 /* %r8, %r9 */
};
- /* %xmm0 - %xmm7 */
- static int sse_parameter_registers[SSE_REGS] =
+ static int sse_regnum[] =
{
+ /* %xmm0 ... %xmm7 */
X86_64_XMM0_REGNUM + 0, X86_64_XMM1_REGNUM,
X86_64_XMM0_REGNUM + 2, X86_64_XMM0_REGNUM + 3,
X86_64_XMM0_REGNUM + 4, X86_64_XMM0_REGNUM + 5,
X86_64_XMM0_REGNUM + 6, X86_64_XMM0_REGNUM + 7,
};
- int stack_values_count = 0;
- int *stack_values;
- stack_values = alloca (nargs * sizeof (int));
+ struct value **stack_args = alloca (nargs * sizeof (struct value *));
+ int num_stack_args = 0;
+ int num_elements = 0;
+ int element = 0;
+ int integer_reg = 0;
+ int sse_reg = 0;
+ int i;
for (i = 0; i < nargs; i++)
{
- enum x86_64_reg_class class[MAX_CLASSES];
- int n = classify_argument (args[i]->type, class, 0);
- int needed_intregs;
- int needed_sseregs;
-
- if (!n ||
- !examine_argument (class, n, &needed_intregs, &needed_sseregs))
- { /* memory class */
- stack_values[stack_values_count++] = i;
+ struct type *type = VALUE_TYPE (args[i]);
+ int len = TYPE_LENGTH (type);
+ enum amd64_reg_class class[2];
+ int needed_integer_regs = 0;
+ int needed_sse_regs = 0;
+ int j;
+
+ /* Classify argument. */
+ amd64_classify (type, class);
+
+ /* Calculate the number of integer and SSE registers needed for
+ this argument. */
+ for (j = 0; j < 2; j++)
+ {
+ if (class[j] == AMD64_INTEGER)
+ needed_integer_regs++;
+ else if (class[j] == AMD64_SSE)
+ needed_sse_regs++;
+ }
+
+ /* Check whether enough registers are available, and if the
+ argument should be passed in registers at all. */
+ if (integer_reg + needed_integer_regs > ARRAY_SIZE (integer_regnum)
+ || sse_reg + needed_sse_regs > ARRAY_SIZE (sse_regnum)
+ || (needed_integer_regs == 0 && needed_sse_regs == 0))
+ {
+ /* The argument will be passed on the stack. */
+ num_elements += ((len + 7) / 8);
+ stack_args[num_stack_args++] = args[i];
}
else
{
- int j;
- int offset = 0;
+ /* The argument will be passed in registers. */
+ char *valbuf = VALUE_CONTENTS (args[i]);
+ char buf[8];
- if (intreg / 2 + needed_intregs > INT_REGS)
- int_stack = 1;
- if (ssereg / 2 + needed_sseregs > SSE_REGS)
- sse_stack = 1;
- if (!sse_stack)
- total_sse_args += needed_sseregs;
+ gdb_assert (len <= 16);
- for (j = 0; j < n; j++)
+ for (j = 0; len > 0; j++, len -= 8)
{
+ int regnum = -1;
+ int offset = 0;
+
switch (class[j])
{
- case X86_64_NO_CLASS:
- break;
- case X86_64_INTEGER_CLASS:
- if (int_stack)
- stack_values[stack_values_count++] = i;
- else
- {
- regcache_cooked_write
- (regcache, int_parameter_registers[(intreg + 1) / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
- offset += 8;
- intreg += 2;
- }
- break;
- case X86_64_INTEGERSI_CLASS:
- if (int_stack)
- stack_values[stack_values_count++] = i;
- else
- {
- LONGEST val = extract_signed_integer
- (VALUE_CONTENTS_ALL (args[i]) + offset, 4);
- regcache_cooked_write_signed
- (regcache, int_parameter_registers[intreg / 2], val);
-
- offset += 8;
- intreg++;
- }
- break;
- case X86_64_SSEDF_CLASS:
- case X86_64_SSESF_CLASS:
- case X86_64_SSE_CLASS:
- if (sse_stack)
- stack_values[stack_values_count++] = i;
- else
- {
- regcache_cooked_write
- (regcache, sse_parameter_registers[(ssereg + 1) / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
- offset += 8;
- ssereg += 2;
- }
- break;
- case X86_64_SSEUP_CLASS:
- if (sse_stack)
- stack_values[stack_values_count++] = i;
- else
- {
- regcache_cooked_write
- (regcache, sse_parameter_registers[ssereg / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
- offset += 8;
- ssereg++;
- }
+ case AMD64_INTEGER:
+ regnum = integer_regnum[integer_reg++];
break;
- case X86_64_X87_CLASS:
- case X86_64_MEMORY_CLASS:
- stack_values[stack_values_count++] = i;
+
+ case AMD64_SSE:
+ regnum = sse_regnum[sse_reg++];
break;
- case X86_64_X87UP_CLASS:
+
+ case AMD64_SSEUP:
+ gdb_assert (sse_reg > 0);
+ regnum = sse_regnum[sse_reg - 1];
+ offset = 8;
break;
+
default:
- internal_error (__FILE__, __LINE__,
- "Unexpected argument class");
+ gdb_assert (!"Unexpected register class.");
}
- intreg += intreg % 2;
- ssereg += ssereg % 2;
+
+ gdb_assert (regnum != -1);
+ memset (buf, 0, sizeof buf);
+ memcpy (buf, valbuf + j * 8, min (len, 8));
+ regcache_raw_write_part (regcache, regnum, offset, 8, buf);
}
}
}
- /* We have to make sure that the stack is 16-byte aligned after the
- setup. Let's calculate size of arguments first, align stack and
- then fill in the arguments. */
- total_sp = 0;
- for (i = 0; i < stack_values_count; i++)
- {
- struct value *arg = args[stack_values[i]];
- int len = TYPE_LENGTH (VALUE_ENCLOSING_TYPE (arg));
- total_sp += (len + 7) & ~7;
- }
- /* total_sp is now a multiple of 8, if it is not a multiple of 16,
- change the stack pointer so that it will be afterwards correctly
- aligned. */
- if (total_sp & 15)
- sp -= 8;
-
- /* Push any remaining arguments onto the stack. */
- while (--stack_values_count >= 0)
- {
- struct value *arg = args[stack_values[stack_values_count]];
- int len = TYPE_LENGTH (VALUE_ENCLOSING_TYPE (arg));
-
- /* Make sure the stack is 8-byte-aligned. */
- sp -= (len + 7) & ~7;
- write_memory (sp, VALUE_CONTENTS_ALL (arg), len);
- }
-
- /* Write number of SSE type arguments to RAX to take care of varargs
- functions. */
- store_unsigned_integer (buf, 8, total_sse_args);
- regcache_cooked_write (regcache, X86_64_RAX_REGNUM, buf);
-
- return sp;
-}
+ /* Allocate space for the arguments on the stack. */
+ sp -= num_elements * 8;
-/* Write into the appropriate registers a function return value stored
- in VALBUF of type TYPE, given in virtual format. */
+ /* The psABI says that "The end of the input argument area shall be
+ aligned on a 16 byte boundary." */
+ sp &= ~0xf;
-static void
-x86_64_store_return_value (struct type *type, struct regcache *regcache,
- const void *valbuf)
-{
- int len = TYPE_LENGTH (type);
-
- /* First handle long doubles. */
- if (TYPE_CODE_FLT == TYPE_CODE (type) && len == 16)
- {
- ULONGEST fstat;
- char buf[I386_MAX_REGISTER_SIZE];
-
- /* Returning floating-point values is a bit tricky. Apart from
- storing the return value in %st(0), we have to simulate the
- state of the FPU at function return point. */
-
- /* Convert the value found in VALBUF to the extended
- floating-point format used by the FPU. This is probably
- not exactly how it would happen on the target itself, but
- it is the best we can do. */
- convert_typed_floating (valbuf, type, buf, builtin_type_i387_ext);
- regcache_raw_write (regcache, X86_64_ST0_REGNUM, buf);
-
- /* Set the top of the floating-point register stack to 7. The
- actual value doesn't really matter, but 7 is what a normal
- function return would end up with if the program started out
- with a freshly initialized FPU. */
- regcache_raw_read_unsigned (regcache, FSTAT_REGNUM, &fstat);
- fstat |= (7 << 11);
- regcache_raw_write_unsigned (regcache, FSTAT_REGNUM, fstat);
-
- /* Mark %st(1) through %st(7) as empty. Since we set the top of
- the floating-point register stack to 7, the appropriate value
- for the tag word is 0x3fff. */
- regcache_raw_write_unsigned (regcache, FTAG_REGNUM, 0x3fff);
- }
- else if (TYPE_CODE_FLT == TYPE_CODE (type))
+ /* Write out the arguments to the stack. */
+ for (i = 0; i < num_stack_args; i++)
{
- /* Handle double and float variables. */
- regcache_cooked_write_part (regcache, X86_64_XMM0_REGNUM,
- 0, len, valbuf);
- }
- /* XXX: What about complex floating point types? */
- else
- {
- int low_size = register_size (current_gdbarch, X86_64_RAX_REGNUM);
- int high_size = register_size (current_gdbarch, X86_64_RDX_REGNUM);
+ struct type *type = VALUE_TYPE (stack_args[i]);
+ char *valbuf = VALUE_CONTENTS (stack_args[i]);
+ int len = TYPE_LENGTH (type);
- if (len <= low_size)
- regcache_cooked_write_part (regcache, 0, 0, len, valbuf);
- else if (len <= (low_size + high_size))
- {
- regcache_cooked_write_part (regcache, 0, 0, low_size, valbuf);
- regcache_cooked_write_part (regcache, 1, 0,
- len - low_size,
- (const char *) valbuf + low_size);
- }
- else
- internal_error (__FILE__, __LINE__,
- "Cannot store return value of %d bytes long.", len);
+ write_memory (sp + element * 8, valbuf, len);
+ element += ((len + 7) / 8);
}
+
+ /* The psABI says that "For calls that may call functions that use
+ varargs or stdargs (prototype-less calls or calls to functions
+ containing ellipsis (...) in the declaration) %al is used as
+ hidden argument to specify the number of SSE registers used. */
+ regcache_raw_write_unsigned (regcache, X86_64_RAX_REGNUM, sse_reg);
+ return sp;
}
-
static CORE_ADDR
x86_64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
@@ -824,7 +600,7 @@ x86_64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
char buf[8];
/* Pass arguments. */
- sp = x86_64_push_arguments (regcache, nargs, args, sp);
+ sp = amd64_push_arguments (regcache, nargs, args, sp);
/* Pass "hidden" argument". */
if (struct_return)
@@ -974,14 +750,6 @@ x86_64_frame_cache (struct frame_info *next_frame, void **this_cache)
cache = x86_64_alloc_frame_cache ();
*this_cache = cache;
- frame_unwind_register (next_frame, X86_64_RBP_REGNUM, buf);
- cache->base = extract_unsigned_integer (buf, 8);
- if (cache->base == 0)
- return cache;
-
- /* For normal frames, %rip is stored at 8(%rbp). */
- cache->saved_regs[X86_64_RIP_REGNUM] = 8;
-
cache->pc = frame_func_unwind (next_frame);
if (cache->pc != 0)
x86_64_analyze_prologue (cache->pc, frame_pc_unwind (next_frame), cache);
@@ -999,11 +767,21 @@ x86_64_frame_cache (struct frame_info *next_frame, void **this_cache)
frame_unwind_register (next_frame, X86_64_RSP_REGNUM, buf);
cache->base = extract_unsigned_integer (buf, 8) + cache->sp_offset;
}
+ else
+ {
+ frame_unwind_register (next_frame, X86_64_RBP_REGNUM, buf);
+ cache->base = extract_unsigned_integer (buf, 8);
+ }
/* Now that we have the base address for the stack frame we can
calculate the value of %rsp in the calling frame. */
cache->saved_sp = cache->base + 16;
+ /* For normal frames, %rip is stored at 8(%rbp). If we don't have a
+ frame we find it at the same offset from the reconstructed base
+ address. */
+ cache->saved_regs[X86_64_RIP_REGNUM] = 8;
+
/* Adjust all the saved registers such that they contain addresses
instead of offsets. */
for (i = 0; i < X86_64_NUM_SAVED_REGS; i++)
@@ -1300,11 +1078,9 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_register_to_value (gdbarch, i387_register_to_value);
set_gdbarch_value_to_register (gdbarch, i387_value_to_register);
- set_gdbarch_extract_return_value (gdbarch, x86_64_extract_return_value);
- set_gdbarch_store_return_value (gdbarch, x86_64_store_return_value);
+ set_gdbarch_return_value (gdbarch, amd64_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);
set_gdbarch_skip_prologue (gdbarch, x86_64_skip_prologue);
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 6183785db69..4375d18afdf 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -1251,7 +1251,7 @@ read_xcoff_symtab (struct partial_symtab *pst)
break;
case C_FCN:
- if (STREQ (cs->c_name, ".bf"))
+ if (DEPRECATED_STREQ (cs->c_name, ".bf"))
{
CORE_ADDR off = ANOFFSET (objfile->section_offsets,
SECT_OFF_TEXT (objfile));
@@ -1268,7 +1268,7 @@ read_xcoff_symtab (struct partial_symtab *pst)
if (new->name != NULL)
SYMBOL_SECTION (new->name) = SECT_OFF_TEXT (objfile);
}
- else if (STREQ (cs->c_name, ".ef"))
+ else if (DEPRECATED_STREQ (cs->c_name, ".ef"))
{
bfd_coff_swap_aux_in (abfd, raw_auxptr, cs->c_type, cs->c_sclass,
@@ -1362,7 +1362,7 @@ read_xcoff_symtab (struct partial_symtab *pst)
break;
case C_BLOCK:
- if (STREQ (cs->c_name, ".bb"))
+ if (DEPRECATED_STREQ (cs->c_name, ".bb"))
{
depth++;
new = push_context (depth,
@@ -1370,7 +1370,7 @@ read_xcoff_symtab (struct partial_symtab *pst)
+ ANOFFSET (objfile->section_offsets,
SECT_OFF_TEXT (objfile))));
}
- else if (STREQ (cs->c_name, ".eb"))
+ else if (DEPRECATED_STREQ (cs->c_name, ".eb"))
{
if (context_stack_depth <= 0)
{ /* We attempted to pop an empty context stack */
@@ -1671,7 +1671,7 @@ read_symbol_lineno (int symno)
if (symbol->n_sclass == C_FCN)
{
char *name = xcoff64 ? strtbl + symbol->n_offset : symbol->n_name;
- if (STREQ (name, ".bf"))
+ if (DEPRECATED_STREQ (name, ".bf"))
goto gotit;
}
symno += symbol->n_numaux + 1;
@@ -1705,7 +1705,7 @@ find_linenos (struct bfd *abfd, struct bfd_section *asect, void *vpinfo)
count = asect->lineno_count;
- if (!STREQ (asect->name, ".text") || count == 0)
+ if (!DEPRECATED_STREQ (asect->name, ".text") || count == 0)
return;
size = count * coff_data (abfd)->local_linesz;
@@ -2530,12 +2530,12 @@ scan_xcoff_symtab (struct objfile *objfile)
things like "break c-exp.y:435" need to work (I
suppose the psymtab_include_list could be hashed or put
in a binary tree, if profiling shows this is a major hog). */
- if (pst && STREQ (namestring, pst->filename))
+ if (pst && DEPRECATED_STREQ (namestring, pst->filename))
continue;
{
int i;
for (i = 0; i < includes_used; i++)
- if (STREQ (namestring, psymtab_include_list[i]))
+ if (DEPRECATED_STREQ (namestring, psymtab_include_list[i]))
{
i = -1;
break;