aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>1999-08-09 21:36:23 +0000
committerJason Molenda <jmolenda@apple.com>1999-08-09 21:36:23 +0000
commit96baa820df8126165bd3c4a33c561556b21203af (patch)
tree60cf1938a2c0aaae5d3aab73b553f031138ec99c /gdb
parent10e80b41455f1a386485631b7c170cafe341dcd6 (diff)
downloadfsf-binutils-gdb-96baa820df8126165bd3c4a33c561556b21203af.zip
fsf-binutils-gdb-96baa820df8126165bd3c4a33c561556b21203af.tar.gz
fsf-binutils-gdb-96baa820df8126165bd3c4a33c561556b21203af.tar.bz2
import gdb-1999-08-09 snapshot
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog332
-rw-r--r--gdb/Makefile.in14
-rw-r--r--gdb/NEWS7
-rw-r--r--gdb/a29k-tdep.c2
-rw-r--r--gdb/arm-tdep.c370
-rw-r--r--gdb/arm-xdep.c2
-rw-r--r--gdb/c-valprint.c9
-rw-r--r--gdb/ch-exp.c8
-rw-r--r--gdb/coffread.c52
-rw-r--r--gdb/command.c2
-rw-r--r--gdb/complaints.c13
-rw-r--r--gdb/config.in9
-rw-r--r--gdb/config/arm/tm-arm.h30
-rw-r--r--gdb/config/mcore/mcore.mt5
-rw-r--r--gdb/config/mcore/tm-mcore.h160
-rwxr-xr-xgdb/configure578
-rw-r--r--gdb/configure.in23
-rw-r--r--gdb/configure.tgt1
-rw-r--r--gdb/dbxread.c53
-rw-r--r--gdb/defs.h24
-rw-r--r--gdb/doc/ChangeLog13
-rw-r--r--gdb/doc/gdb.texinfo41
-rw-r--r--gdb/doc/gdbint.texinfo2
-rw-r--r--gdb/doc/remote.texi8
-rw-r--r--gdb/dsrec.c4
-rw-r--r--gdb/dstread.c5
-rw-r--r--gdb/dwarf2read.c2
-rw-r--r--gdb/elfread.c22
-rw-r--r--gdb/f-lang.c2
-rw-r--r--gdb/findvar.c22
-rw-r--r--gdb/gdbarch.c342
-rw-r--r--gdb/gdbarch.h6
-rw-r--r--gdb/hppah-nat.c2
-rw-r--r--gdb/i386-tdep.c2
-rw-r--r--gdb/infcmd.c19
-rw-r--r--gdb/infptrace.c2
-rw-r--r--gdb/infrun.c278
-rw-r--r--gdb/irix5-nat.c2
-rw-r--r--gdb/kod-cisco.c321
-rw-r--r--gdb/kod.c239
-rw-r--r--gdb/language.c22
-rw-r--r--gdb/m3-nat.c14
-rw-r--r--gdb/main.c4
-rw-r--r--gdb/mcore-rom.c206
-rw-r--r--gdb/mcore-tdep.c992
-rw-r--r--gdb/mipsread.c10
-rw-r--r--gdb/monitor.c48
-rw-r--r--gdb/nlmread.c12
-rw-r--r--gdb/objfiles.c25
-rw-r--r--gdb/objfiles.h10
-rw-r--r--gdb/os9kread.c12
-rw-r--r--gdb/osfsolib.c2
-rw-r--r--gdb/partial-stab.h26
-rw-r--r--gdb/remote-array.c29
-rw-r--r--gdb/remote-mips.c20
-rw-r--r--gdb/remote-os9k.c16
-rw-r--r--gdb/remote-rdi.c1
-rw-r--r--gdb/remote-rdp.c15
-rw-r--r--gdb/remote-sim.c48
-rw-r--r--gdb/remote-st.c16
-rw-r--r--gdb/remote-vx.c4
-rw-r--r--gdb/remote.c675
-rw-r--r--gdb/ser-pipe.c4
-rw-r--r--gdb/serial.c15
-rw-r--r--gdb/sh-tdep.c2
-rw-r--r--gdb/solib.c2
-rw-r--r--gdb/somread.c13
-rw-r--r--gdb/source.c2
-rw-r--r--gdb/sparc-tdep.c6
-rw-r--r--gdb/stabsread.h3
-rw-r--r--gdb/symfile.c38
-rw-r--r--gdb/symfile.h4
-rw-r--r--gdb/symm-nat.c18
-rw-r--r--gdb/target.c170
-rw-r--r--gdb/target.h9
-rw-r--r--gdb/testsuite/ChangeLog29
-rw-r--r--gdb/testsuite/gdb.base/commands.exp2
-rw-r--r--gdb/testsuite/gdb.base/display.exp15
-rw-r--r--gdb/testsuite/gdb.base/long_long.c2
-rw-r--r--gdb/testsuite/gdb.base/long_long.exp167
-rw-r--r--gdb/testsuite/gdb.base/step-test.exp3
-rw-r--r--gdb/testsuite/gdb.c++/virtfunc.exp32
-rw-r--r--gdb/top.c12
-rw-r--r--gdb/utils.c224
-rw-r--r--gdb/v850-tdep.c2
-rw-r--r--gdb/xcoffread.c26
86 files changed, 4201 insertions, 1834 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 21950fb..bb3f6c6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,297 @@
+Sun Aug 8 12:06:47 1999 Fred Fish <fnf@cygnus.com>
+
+ * coffread.c (process_coff_symbol): Remove section_offsets from
+ prototype and function definition. Get section_offsets from the
+ passed objfile and pass it on to callees the same way.
+ (coff_symtab_read): Ditto.
+ (coff_symfile_read): Ditto.
+ * dbxread.c (read_dbx_dynamic_symtab): Ditto.
+ (read_dbx_symtab): Ditto.
+ (dbx_symfile_read): Ditto.
+ (coffstab_build_psymtabs): Ditto.
+ (elfstab_build_psymtabs): Ditto.
+ (stabsect_build_psymtabs): Ditto.
+ * dstread.c (dst_symfile_read): Ditto.
+ * elfread.c (elf_symfile_read): Ditto.
+ * jv-class.c (jv_class_symfile_read): Ditto.
+ * mipsread.c (mipscoff_symfile_read): Ditto.
+ * nlmread.c (nlm_symfile_read): Ditto.
+ * os9kread.c (os9k_symfile_read): Ditto.
+ * somread.c (som_symfile_read): Ditto.
+ * stabsread.h (elfstab_build_psymtabs): Ditto.
+ * xcoffread.c (xcoff_initial_scan): Ditto.
+
+ * symfile.h (sym_read): Remove section_offsets from prototype.
+ * symfile.c (syms_from_objfile): Call sym_read without
+ section_offsets.
+ (reread_symbols): Ditto.
+
+ * elfread.c (elfstab_offset_sections): Use SIZEOF_SECTION_OFFSETS
+ to allocate sections offsets array.
+ * xcoffread.c (xcoff_symfile_offsets): Ditto.
+
+ * partial-stab.h (section_offsets): Get from objfile.
+ * dbxread.c (read_dbx_symtab): Fix typo that made -1 casted
+ to a CORE_ADDR look like an subtraction expression.
+ * objfiles.h: Add some comments.
+ * symfile.c: Add some comments.
+ * objfiles.c: Add some comments.
+ (objfile_relocated): Use ALL_OBJFILE_OSECTIONS to iterate over
+ sections.
+ (find_pc_sect_sections): Use ALL_OBJSECTIONS to iterate over all
+ sections in all objfiles.
+ * symfile.c (syms_from_objfile): Use ALL_OBJFILE_OSECTIONS.
+
+ * irix5-nat.c (symbol_add_stub): Fix typo that made taking the
+ address of lowest_sect with '&' look like a bitwise and op.
+ * osfsolib.c (symbol_add_stub): Ditto.
+ * solib.c (symbol_add_stub): Ditto.
+ * symfile.c (syms_from_objfile): Ditto.
+
+ * dwarf2read.c (dwarf2_build_psymtabs_hard): Minor format tweak.
+ * symfile.c (syms_from_objfile): Ditto, and fix typo.
+ * top.c (init_main): Fix typo in comment (DEFULAT_PROMPT).
+ * doc/gdbint.texinfo (find_sym_fns): This replaces symfile_init.
+
+1999-08-08 James Ingham <jingham@leda.cygnus.com>
+
+ * remote.c (remote_insert_breakpoint): Fix typo in Z packet support.
+ Also move Z packet support OUTSIDE of REMOTE_BREAKPOINT ifdef,
+ since this is not set for all targets that support the Z packet.
+
+Fri Aug 6 17:17:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * defs.h (fatal): Delete declaration.
+ (internal_error): Declare.
+ * utils.c (nomem): Call internal_error instead of fatal.
+ (fatal_dump_core): Delete.
+ (malloc_botch): Print message direct to stderr.
+ (fatal): Delete definition.
+ * utils.c (internal_error): Define.
+
+ * gdbarch.h, gdbarch.c, hppah-nat.c, ch-exp.c, dsrec.c, sh-tdep.c,
+ infptrace.c, f-lang.c, symm-nat.c, top.c, m3-nat.c, v850-tdep.c,
+ remote-vx.c, remote-sim.c, remote-mips.c, source.c, infcmd.c,
+ findvar.c, remote.c: Replace fatal with call to internal_error.
+
+Sun Aug 8 15:28:33 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * ser-pipe.c (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Move
+ definition from here.
+ * defs.h: To here.
+
+Sat Aug 7 21:44:59 1999 Fred Fish <fnf@cygnus.com>
+
+ * remote.c (remote_insert_breakpoint): Fix typo, missing ';'.
+
+Sun Aug 8 11:26:57 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * mips-tdep.c (mips_gdbarch_init): Add break; to the default case.
+
+Fri Aug 6 19:26:03 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * defs.h: Delete #if ANSI_PROTOTYPES code, GDB assumes ISO-C.
+ * remote-rdp.c (send_rdp), remote-os9k.c (printf_monitor),
+ remote-mips.c: (mips_error), remote-array.c: (printf_monitor,
+ debuglogs), complaints.c (complain), monitor.c:
+ (monitor_printf_noecho, monitor_printf), language.c (type_error,
+ range_error), remote-st.c: (printf_stdebug), remote-sim.c
+ (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
+ gdb_os_evprintf_filtered, gdb_os_error), serial.c (serial_printf),
+ utils.c (warning, error, fatal, fatal_dump_core, (query,
+ fprintf_filtered, fprintf_unfiltered, fprintfi_filtered,
+ printf_filtered, printf_unfiltered, printfi_filtered): Delete
+ legacy #ifndef ANSI_PROTOTYPES varargs code.
+
+ * defs.h: Don't #include <varargs.h>.
+ * remote-rdp.c, remote-os9k.c, remote-mips.c, remote-array.c,
+ monitor.c, remote-st.c: Don't include <varargs.h> or <stdarg.h>.
+
+1999-08-06 James Ingham <jingham@leda.cygnus.com>
+
+ * configure.in, configure: add the --enable-multi-ice to determine
+ whether to configure and build the multi-ice-gdb-server. Note,
+ for now this only builds on cygwin, so don't enable it for other
+ platforms...
+
+1999-08-06 Tom Tromey <tromey@cygnus.com>
+
+ * Makefile.in (SFILES): Added kod.c and kod-cisco.c.
+ (COMMON_OBS): Added kod.o and kod-cisco.o.
+ (kod-cisco.o): New target.
+ (kod.o): New target.
+ * kod-cisco.c: New file.
+ * kod.c: New file.
+
+1999-08-06 James Ingham <jingham@leda.cygnus.com>
+
+ These are some fixups for the Arm, and support for the
+ disassembly-flavor for the ARM.
+
+ * defs.h: Declare the disassembly_flavor_hook
+ * top.c: Define the disassembly_flavor_hook
+ * i386-tdep.c: Remove unnecessary declaration of the
+ disassembly_flavor_hook.
+
+ * config/arm/tm-arm.h: Change definition of
+ arm_init_extra_frame_info.
+ Add a few more comments.
+ * arm-tdep.c (arm_init_extra_frame_info): Listen to and use the
+ fromleaf parameter passed into init_extra_frame_info.
+ (set_disassembly_flavor_sfunc): New Function.
+ (set_disassembly_flavor): New Function.
+ (arm_othernames): Use the set_disassembly_flavor.
+ (_initialize_arm_tdep): Setup the disassembly flavor commands, and
+ initialize the flavor.
+ (arm_frameless_function_invocation): Adjust for
+ frameless functions that have 1 or 2 instructions that mimic the
+ standard APCS form.
+ (arm_scan_prologue): Be more careful about scanning the function
+ prologue. Don't match things that just have a few of the prologue
+ instructions out of order, and don't get thrown by the scheduler
+ migrating instructions into the prologue.
+
+ Add support for the "Z" and "z" packets to request the stub
+ to set a breakpoint.
+
+ * remote.c (set_remote_protocol_Z_packet_cmd): New function.
+ (show_remote_protocol_Z_packet_cmd): New Function.
+ (remote_open_1): Init the Z packet config.
+ (remote_async_open_1): Init the Z packet config.
+ (remote_insert_breakpoint): Use the "Z" packet if supported.
+ (remote_remove_breakpoint): Use the "z" packet if supported.
+ (remote_insert_watchpoint): New Function - currently wired to
+ nothing.
+ (remote_remove_watchpoint): Ditto.
+ (remote_insert_hw_breakpoint): Ditto.
+ (remote_remove_hw_breakpoint): Ditto.
+
+1999-08-06 Stan Shebs <shebs@andros.cygnus.com>
+
+ * infcmd.c: Include parser-defs.h.
+ (interrupt_target_command): Declare.
+ (stack_dummy_testing): Remove old funky flag.
+ (run_stack_dummy): Remove unused reference to old funky flag.
+
+1999-08-06 Tom Tromey <tromey@cygnus.com>
+
+ * command.c (do_setshow_command): Call set_hook if not NULL.
+ * top.c (set_hook): New hook definition.
+ * defs.h (set_hook): Declare.
+
+1999-08-05 Stan Shebs <shebs@andros.cygnus.com>
+
+ * infrun.c: Convert code to pure standard C, elim some warnings.
+ (stopped_for_shlib_catchpoint): Remove, never used.
+
+1999-08-05 Keith Seitz <keiths@cygnus.com>
+
+ * NEWS: Mention new Motorola MCore target.
+
+ * sparc-tdep.c (gdb_print_insn_sparc): Print insns of the current
+ architecture.
+
+Thu Aug 5 20:41:22 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure.in (configdirs): Add check for socketpair.
+ * configure, config.in: Re-generate.
+
+ From Mon Jul 19 10:46:18 1999 Philippe De Muyter <phdm@macqel.be>:
+ * ser-pipe.c (sys/wait.h): Include this file only #if HAVE_SYS_WAIT_H.
+ (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Macros defined if needed.
+
+Thu Aug 5 20:04:17 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * target.c (debug_to_open, debug_to_attach, debug_to_post_attach,
+ debug_to_require_attach, debug_to_detach, debug_to_require_detach,
+ debug_to_wait, debug_to_post_wait, debug_to_fetch_registers,
+ debug_to_store_registers, debug_to_prepare_to_store,
+ debug_to_xfer_memory, debug_to_files_info,
+ debug_to_insert_breakpoint, debug_to_remove_breakpoint,
+ debug_to_terminal_init, debug_to_terminal_inferior,
+ debug_to_terminal_ours_for_output, debug_to_terminal_ours,
+ debug_to_terminal_info, debug_to_kill, debug_to_load,
+ debug_to_lookup_symbol, debug_to_create_inferior,
+ debug_to_post_startup_inferior,
+ debug_to_acknowledge_created_inferior,
+ debug_to_clone_and_follow_inferior,
+ debug_to_post_follow_inferior_by_clone,
+ debug_to_insert_fork_catchpoint, debug_to_remove_fork_catchpoint,
+ debug_to_insert_vfork_catchpoint,
+ debug_to_remove_vfork_catchpoint, debug_to_has_forked,
+ debug_to_has_vforked, debug_to_can_follow_vfork_prior_to_exec,
+ debug_to_post_follow_vfork, debug_to_insert_exec_catchpoint,
+ debug_to_remove_exec_catchpoint, debug_to_has_execd,
+ debug_to_reported_exec_events_per_exec_call,
+ debug_to_has_syscall_event, debug_to_has_exited,
+ debug_to_mourn_inferior, debug_to_can_run,
+ debug_to_notice_signals, debug_to_thread_alive, debug_to_stop,
+ debug_to_query, debug_to_rcmd, debug_to_enable_exception_callback,
+ debug_to_get_current_exception_event, debug_to_pid_to_exec_file,
+ debug_to_core_file_to_sym_file, debug_to_close): Send trace output
+ to ``gdb_stdlog'' instead of ``gdb_stderr''.
+
+Thu Aug 5 16:22:10 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c (init_remote_ops): Initialize remote_ops.to_rcmd.
+ (init_remote_async_ops): Initialize remote_async_ops.to_query.
+ (remote_rcmd): New function.
+
+ * monitor.c (monitor_rcmd): Rename monitor_command.
+ (init_base_monitor_ops): Initialize monitor_ops.to_rcmd.
+ (_initialize_remote_monitors): Move "monitor" command from here.
+ * target.c (initialize_targets): To here.
+ (monitor_command): New function. Implement "monitor" command.
+
+ * target.c (cleanup_target): de_fault to_rcmd.
+ (update_current_target): INHERIT to_rcmd.
+ (debug_to_rcmd): New function.
+ (setup_target_debug): Initialize current_target.to_rcmd.
+
+ * target.h (struct target_ops): Add field to_rcmd.
+ (target_rcmd): Define.
+
+Thu Aug 5 14:24:07 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c: Replace comment describing remote protocol with
+ pointer to official document.
+
+Thu Aug 5 11:59:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c (remote_protocol_binary_download): New variable.
+ Replace ``remote_binary_download'' and ``remote_binary_checked''.
+ (set_remote_protocol_binary_download_cmd,
+ show_remote_protocol_binary_download_cmd): New functions.
+ (remote_open_1, remote_async_open_1, remote_cisco_open):
+ Initialize ``remote_protocol_binary_download'' instead of
+ ``remote_binary_download''.
+ (check_binary_download): Re-write.
+ (remote_write_bytes): Ditto.
+ (_initialize_remote): Add ``set remote X-packet'' and ``show
+ remote X-packet'' commands. Disable old ``set
+ remotebinarydownload'' command.
+
+1999-08-04 Keith Seitz <keiths@cygnus.com>
+
+ * remote-rdi.c (arm_rdi_close): Close the transport device, too.
+
+Wed Aug 4 10:42:58 1999 Fred Fish <fnf@cygnus.com>
+
+ * xcoffread.c (scan_xcoff_symtab): Change main_aux into
+ an array of 5 internal_auxent to leave room for bfd to
+ write n_numaux entries. Change code to use the first one.
+
+1999-08-02 Stan Shebs <shebs@andros.cygnus.com>
+
+ * c-valprint.c (c_val_print): When printing decimal equivalent
+ of a char, cast appropriately.
+
+1999-08-02 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ From Jonathan Larmour <jlarmour@cygnus.co.uk>:
+ * main.c (print_gdb_help): Use gdbinit variable to determine file
+ name used for --nx help
+
1999-08-01 Jason Molenda (jsm@bugshack.cygnus.com)
* config/mips/tm-mips.h (BIG_ENDIAN): Don't define here.
@@ -898,6 +1192,16 @@ Thu Jun 10 20:04:02 1999 Andrew Cagney <cagney@b1.cygnus.com>
mn10300-tdep.c: New function.
* config/mn10300/tm-mn10300.h (SAVED_PC_AFTER_CALL): Update.
+1999-06-10 Keith Seitz <keiths@cygnus.com>
+
+ * mcore-rom.c (picobug_dumpregs): Return a value. Any value, it
+ doesn't matter.
+ * mcore-tdep.c (mcore_analyze_prologue): Set NO_MORE_FRAMES
+ if the start of the function is the entry point.
+ (mcore_analyze_prologue): rotli takes an immediate, not an
+ offset immediate.
+ (mcore_push_arguments): Fix compiler warning.
+
1999-06-09 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* rs6000-tdep.c (skip_prologue): Don't mistake a branch for a
@@ -1376,6 +1680,12 @@ Tue May 25 16:05:11 1999 Andrew Cagney <cagney@b1.cygnus.com>
(value_from_register, value_of_register): Remove #ifdef
REGISTER_CONVERTIBLE. Assume REGISTER_CONVERTIBLE etc defined.
+1999-05-25 Keith Seitz <keiths@cygnus.com>
+
+ * config/mcore/tm-mcore.h (FRAME_NUM_ARGS): Re-write definition of
+ FRAME_NUM_ARGS so that it returns NUM_ARGS as a result instead of
+ setting a variable as a side effect.
+
Tue May 25 16:18:25 1999 Andrew Cagney <cagney@amy.cygnus.com>
* remote-d10v.c (d10v_eva_prepare_to_trace,
@@ -1622,6 +1932,16 @@ Thu May 20 12:18:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
1999-05-19 Keith Seitz <keiths@cygnus.com>
+ * config/mcore/tm-mcore.h (BELIEVE_PCC_PROMOTION): Define. We
+ really do want to believe what gcc tells us about types...
+
+1999-05-19 Keith Seitz <keiths@cygnus.com>
+
+ * config/mcore/tm-mcore.h (FRAME_ARGS_ADDRESS): Define to a function.
+ (FRAME_LOCALS_ADDRESS): Ditto.
+ * mcore-tdep.c (mcore_frame_args_addcress): New function.
+ (mcore_frame_locals_address): New function.
+
* monitor.c (monitor_open): Only assume we have eight
breakpoints if the monitor implementation does not tell
us how many there really are. Alloc memory for these
@@ -1637,11 +1957,23 @@ Thu May 20 12:18:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
individual monitor implementations can tell us how many
breakpoints the monitor supports.
+ * mcore-rom.c (init_picobug_cmds): Add number of breakpoints supported
+ by picobug monitor.
+
1999-05-18 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
From Philippe De Muyter <phdm@macqel.be>:
* event-loop.h: Include sys/wait.h only if HAVE_SYS_WAIT_H.
+1999-05-17 Keith Seitz <keiths@cygnus.com>
+
+ * configure.tgt: Add MCore target.
+ * Makefile.in: Add mcore-tdep.c and mcore-rom.c
+ * config/mcore/tm-mcore.h: New file.
+ * config/mcore/mcore.mt: New file.
+ * mcore-rom.c: New file.
+ * mcore-tdep.c: New file.
+
1999-05-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
* top.c (print_command_line): Added the missing stream argument.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 5cbeae5..41fa52f 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -224,7 +224,7 @@ CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
ADD_DEPS = $(REGEX1) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
-VERSION = 19990802
+VERSION = 19990809
DIST=gdb
LINT=/usr/5bin/lint
@@ -381,6 +381,7 @@ SFILES = ax-general.c ax-gdb.c bcache.c blockframe.c breakpoint.c \
event-loop.c event-top.c \
expprint.c f-exp.y f-lang.c f-typeprint.c f-valprint.c \
findvar.c gdbarch.c gdbtypes.c infcmd.c inflow.c infrun.c language.c \
+ kod.c kod-cisco.c \
jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c \
m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c main.c maint.c \
mem-break.c minsyms.c mipsread.c nlmread.c objfiles.c parse.c \
@@ -508,6 +509,7 @@ COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o stack.o thread.o \
event-loop.o event-top.o \
gdbarch.o gdbtypes.o copying.o $(DEPFILES) \
mem-break.o target.o parse.o language.o $(YYOBJ) buildsym.o \
+ kod.o kod-cisco.o \
exec.o bcache.o objfiles.o minsyms.o maint.o demangle.o \
dbxread.o coffread.o elfread.o \
dwarfread.o dwarf2read.o mipsread.o stabsread.o corefile.o \
@@ -954,6 +956,7 @@ ALLDEPFILES = 29k-share/udi/udip2soc.c 29k-share/udi/udr.c \
lynx-nat.c m3-nat.c \
m68k-tdep.c \
m88k-nat.c m88k-tdep.c mac-nat.c \
+ mcore-tdep.c \
mips-nat.c \
mips-tdep.c mipsm3-nat.c mipsv4-nat.c news-xdep.c \
nindy-share/Onindy.c nindy-share/nindy.c \
@@ -1231,6 +1234,10 @@ jv-valprint.o: jv-valprint.c $(bfd_h) $(defs_h) $(symtab_h) $(gdbtypes_h) \
$(expression_h) $(value_h) $(INCLUDE_DIR)/demangle.h valprint.h \
language.h jv-lang.h c-lang.h gdbcore.h annotate.h
+kod.o: kod.c $(defs_h) $(command_h) $(gdbcmd_h) target.h gdb_string.h
+
+kod-cisco.o: kod-cisco.c $(defs_h) gdb_string.h
+
language.o: language.c $(bfd_h) $(defs_h) $(expression_h) $(frame_h) \
$(gdbcmd_h) $(gdbtypes_h) language.h parser-defs.h $(symtab_h) \
target.h $(value_h) gdb_string.h
@@ -1270,6 +1277,11 @@ main.o: main.c top.h $(defs_h) gdb_string.h $(event_loop_h)
maint.o: maint.c $(defs_h) $(gdbcmd_h) $(gdbtypes_h) $(symtab_h) language.h \
$(expression_h) objfiles.h symfile.h
+mcore-tdep.o: mcore-tdep.c $(defs_h) $(frame_h) $(gdbcmd_h) $(value_h) $(symtab_h)
+
+mcore-rom.o: mcore-rom.c $(defs_h) $(gdbcore_h) target.h monitor.h \
+ gdb_string.h
+
mdebugread.o: mdebugread.c buildsym.h complaints.h $(bfd_h) $(defs_h) \
$(expression_h) gdb-stabs.h $(gdbcore_h) $(gdbtypes_h) language.h \
objfiles.h partial-stab.h stabsread.h symfile.h $(symtab_h) \
diff --git a/gdb/NEWS b/gdb/NEWS
index 080bfb2..0b2cd2f 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -5,6 +5,7 @@
* New targets
+Motorola MCore mcore-*-*
x86 VxWorks i[3456]86-*-vxworks*
PowerPC VxWorks powerpc-*-vxworks*
TI TMS320C80 tic80-*-*
@@ -34,6 +35,12 @@ instead of 64 bits has been fixed.
The command ``set remote-mips64-transfers-32bit-regs on'' has been
added to provide backward compatibility with older versions of GDB.
+* ``set remotebinarydownload'' replaced by ``set remote X-packet''
+
+The command ``set remotebinarydownload'' command has been replaced by
+``set remote X-packet''. Other commands in ``set remote'' family
+include ``set remote P-packet''.
+
*** Changes in GDB-4.18:
* New native configurations
diff --git a/gdb/a29k-tdep.c b/gdb/a29k-tdep.c
index 92474a1..5370106 100644
--- a/gdb/a29k-tdep.c
+++ b/gdb/a29k-tdep.c
@@ -922,7 +922,7 @@ setup_arbitrary_frame (argc, argv)
frame = create_new_frame (argv[0], argv[1]);
if (!frame)
- fatal ("internal: create_new_frame returned invalid frame id");
+ internal_error ("create_new_frame returned invalid frame id");
/* Creating a new frame munges the `frame' value from the current
GR1, so we restore it again here. FIXME, untangle all this
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index eb760af..994e48f 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -47,30 +47,45 @@
#define ROUND_DOWN(n,a) ((n) & ~((a) - 1))
#define ROUND_UP(n,a) (((n) + (a) - 1) & ~((a) - 1))
-static char *APCS_register_names[] =
-{"a1", "a2", "a3", "a4", /* 0 1 2 3 */
- "v1", "v2", "v3", "v4", /* 4 5 6 7 */
- "v5", "v6", "sl", "fp", /* 8 9 10 11 */
- "ip", "sp", "lr", "pc", /* 12 13 14 15 */
- "f0", "f1", "f2", "f3", /* 16 17 18 19 */
- "f4", "f5", "f6", "f7", /* 20 21 22 23 */
- "fps", "ps"} /* 24 25 */ ;
+static char *apcs_register_names[] =
+{ "a1", "a2", "a3", "a4", /* 0 1 2 3 */
+ "v1", "v2", "v3", "v4", /* 4 5 6 7 */
+ "v5", "v6", "sl", "fp", /* 8 9 10 11 */
+ "ip", "sp", "lr", "pc", /* 12 13 14 15 */
+ "f0", "f1", "f2", "f3", /* 16 17 18 19 */
+ "f4", "f5", "f6", "f7", /* 20 21 22 23 */
+ "fps","ps" } /* 24 25 */;
/* These names are the ones which gcc emits, and
I find them less confusing. Toggle between them
using the `othernames' command. */
static char *additional_register_names[] =
-{"r0", "r1", "r2", "r3", /* 0 1 2 3 */
- "r4", "r5", "r6", "r7", /* 4 5 6 7 */
- "r8", "r9", "r10", "r11", /* 8 9 10 11 */
- "r12", "r13", "r14", "pc", /* 12 13 14 15 */
- "f0", "f1", "f2", "f3", /* 16 17 18 19 */
- "f4", "f5", "f6", "f7", /* 20 21 22 23 */
- "fps", "ps"} /* 24 25 */ ;
+{ "r0", "r1", "r2", "r3", /* 0 1 2 3 */
+ "r4", "r5", "r6", "r7", /* 4 5 6 7 */
+ "r8", "r9", "r10", "r11", /* 8 9 10 11 */
+ "r12", "r13", "r14", "pc", /* 12 13 14 15 */
+ "f0", "f1", "f2", "f3", /* 16 17 18 19 */
+ "f4", "f5", "f6", "f7", /* 20 21 22 23 */
+ "fps","ps" } /* 24 25 */;
/* By default use the APCS registers names */
-char **arm_register_names = APCS_register_names;
+char **arm_register_names = apcs_register_names;
+/* This is the variable the is set with "set disassembly-flavor",
+ and its legitimate values. */
+static char apcs_flavor[] = "apcs";
+static char r_prefix_flavor[] = "r-prefix";
+static char *valid_flavors[] = {
+ apcs_flavor,
+ r_prefix_flavor,
+ NULL
+};
+static char *disassembly_flavor = apcs_flavor;
+
+/* This is used to keep the bfd arch_info in sync with the disassembly flavor. */
+static void set_disassembly_flavor_sfunc PARAMS ((char *, int, \
+ struct cmd_list_element *));
+static void set_disassembly_flavor ();
/* Should call_function allocate stack space for a struct return? */
/* The system C compiler uses a similar structure return convention to gcc */
@@ -167,12 +182,17 @@ int
arm_frameless_function_invocation (fi)
struct frame_info *fi;
{
- int frameless;
CORE_ADDR func_start, after_prologue;
+ int frameless;
+
func_start = (get_pc_function_start ((fi)->pc) + FUNCTION_START_OFFSET);
after_prologue = func_start;
SKIP_PROLOGUE (after_prologue);
- frameless = (after_prologue == func_start);
+ /* There are some frameless functions whose first two instructions
+ follow the standard APCS form, in which case after_prologue
+ will be func_start + 8. */
+
+ frameless = (after_prologue < func_start + 12);
return frameless;
}
@@ -226,11 +246,12 @@ arm_skip_prologue (pc)
CORE_ADDR func_addr, func_end;
struct symtab_and_line sal;
- /* See what the symbol table says. */
+ /* See what the symbol table says. */
+
if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
{
sal = find_pc_line (func_addr, 0);
- if (sal.line != 0 && sal.end < func_end)
+ if ((sal.line != 0) && (sal.end < func_end))
return sal.end;
}
@@ -464,20 +485,65 @@ save_prologue_cache (fi)
4) the offset from the stack pointer to the frame pointer
This information is stored in the "extra" fields of the frame_info.
- A typical Arm function prologue might look like this:
- mov ip, sp
- stmfd sp!, {fp, ip, lr, pc}
- sub fp, ip, #4
- sub sp, sp, #16
+ There are two basic forms for the ARM prologue. The fixed argument
+ function call will look like:
+
+ mov ip, sp
+ stmfd sp!, {fp, ip, lr, pc}
+ sub fp, ip, #4
+ [sub sp, sp, #4]
+
Which would create this stack frame (offsets relative to FP):
- IP -> 4 (caller's stack)
- FP -> 0 PC (points to address of stmfd instruction + 12 in callee)
- -4 LR (return address in caller)
- -8 IP (copy of caller's SP)
- -12 FP (caller's FP)
- SP -> -28 Local variables
+ IP -> 4 (caller's stack)
+ FP -> 0 PC (points to address of stmfd instruction + 8 in callee)
+ -4 LR (return address in caller)
+ -8 IP (copy of caller's SP)
+ -12 FP (caller's FP)
+ SP -> -28 Local variables
+
The frame size would thus be 32 bytes, and the frame offset would be
- 28 bytes. */
+ 28 bytes. The stmfd call can also save any of the vN registers it
+ plans to use, which increases the frame size accordingly.
+
+ Note: The stored PC is 8 off of the STMFD instruction that stored it
+ because the ARM Store instructions always store PC + 8 when you read
+ the PC register.
+
+ A variable argument function call will look like:
+
+ mov ip, sp
+ stmfd sp!, {a1, a2, a3, a4}
+ stmfd sp!, {fp, ip, lr, pc}
+ sub fp, ip, #20
+
+ Which would create this stack frame (offsets relative to FP):
+ IP -> 20 (caller's stack)
+ 16 A4
+ 12 A3
+ 8 A2
+ 4 A1
+ FP -> 0 PC (points to address of stmfd instruction + 8 in callee)
+ -4 LR (return address in caller)
+ -8 IP (copy of caller's SP)
+ -12 FP (caller's FP)
+ SP -> -28 Local variables
+
+ The frame size would thus be 48 bytes, and the frame offset would be
+ 28 bytes.
+
+ There is another potential complication, which is that the optimizer
+ will try to separate the store of fp in the "stmfd" instruction from
+ the "sub fp, ip, #NN" instruction. Almost anything can be there, so
+ we just key on the stmfd, and then scan for the "sub fp, ip, #NN"...
+
+ Also, note, the original version of the ARM toolchain claimed that there
+ should be an
+
+ instruction at the end of the prologue. I have never seen GCC produce
+ this, and the ARM docs don't mention it. We still test for it below in
+ case it happens...
+
+*/
static void
arm_scan_prologue (fi)
@@ -519,56 +585,106 @@ arm_scan_prologue (fi)
else
{
/* Get address of the stmfd in the prologue of the callee; the saved
- PC is the address of the stmfd + 12. */
- prologue_start = ADDR_BITS_REMOVE (read_memory_integer (fi->frame, 4)) - 12;
- prologue_end = prologue_start + 40; /* FIXME: should be big enough */
+ PC is the address of the stmfd + 8. */
+ prologue_start = ADDR_BITS_REMOVE(read_memory_integer (fi->frame, 4))
+ - 8;
+ prologue_end = prologue_start + 64; /* This is all the insn's
+ that could be in the prologue,
+ plus room for 5 insn's inserted
+ by the scheduler. */
}
/* Now search the prologue looking for instructions that set up the
- frame pointer, adjust the stack pointer, and save registers. */
+ frame pointer, adjust the stack pointer, and save registers.
+
+ Be careful, however, and if it doesn't look like a prologue,
+ don't try to scan it. If, for instance, a frameless function
+ begins with stmfd sp!, then we will tell ourselves there is
+ a frame, which will confuse stack traceback, as well ad"finish"
+ and other operations that rely on a knowledge of the stack
+ traceback.
+
+ In the APCS, the prologue should start with "mov ip, sp" so
+ if we don't see this as the first insn, we will stop. */
sp_offset = fp_offset = 0;
- for (current_pc = prologue_start; current_pc < prologue_end; current_pc += 4)
- {
- unsigned int insn = read_memory_unsigned_integer (current_pc, 4);
- if ((insn & 0xffff0000) == 0xe92d0000) /* stmfd sp!, {..., r7, lr} */
- {
- int mask = insn & 0xffff;
-
- /* Calculate offsets of saved registers. */
- for (regno = PC_REGNUM; regno >= 0; regno--)
- if (mask & (1 << regno))
- {
- sp_offset -= 4;
- fi->fsr.regs[regno] = sp_offset;
- }
- }
- else if ((insn & 0xfffff000) == 0xe24cb000) /* sub fp, ip #n */
- {
- unsigned imm = insn & 0xff; /* immediate value */
- unsigned rot = (insn & 0xf00) >> 7; /* rotate amount */
- imm = (imm >> rot) | (imm << (32 - rot));
- fp_offset = -imm;
- fi->framereg = FP_REGNUM;
- }
- else if ((insn & 0xfffff000) == 0xe24dd000) /* sub sp, sp #n */
- {
- unsigned imm = insn & 0xff; /* immediate value */
- unsigned rot = (insn & 0xf00) >> 7; /* rotate amount */
- imm = (imm >> rot) | (imm << (32 - rot));
- sp_offset -= imm;
- }
- else if ((insn & 0xffff7fff) == 0xed6d0103) /* stfe f?, [sp, -#c]! */
+ if (read_memory_unsigned_integer (prologue_start, 4)
+ == 0xe1a0c00d) /* mov ip, sp */
+ {
+ for (current_pc = prologue_start +4; current_pc < prologue_end;
+ current_pc += 4)
{
- sp_offset -= 12;
- regno = F0_REGNUM + ((insn >> 12) & 0x07);
- fi->fsr.regs[regno] = sp_offset;
+ unsigned int insn = read_memory_unsigned_integer (current_pc, 4);
+
+ if ((insn & 0xffff0000) == 0xe92d0000)
+ /* stmfd sp!, {..., fp, ip, lr, pc}
+ or
+ stmfd sp!, {a1, a2, a3, a4} */
+ {
+ int mask = insn & 0xffff;
+
+ /* Calculate offsets of saved registers. */
+ for (regno = PC_REGNUM; regno >= 0; regno--)
+ if (mask & (1 << regno))
+ {
+ sp_offset -= 4;
+ fi->fsr.regs[regno] = sp_offset;
+ }
+ }
+ else if ((insn & 0xfffff000) == 0xe24cb000) /* sub fp, ip #n */
+ {
+ unsigned imm = insn & 0xff; /* immediate value */
+ unsigned rot = (insn & 0xf00) >> 7; /* rotate amount */
+ imm = (imm >> rot) | (imm << (32-rot));
+ fp_offset = -imm;
+ fi->framereg = FP_REGNUM;
+ }
+ else if ((insn & 0xfffff000) == 0xe24dd000) /* sub sp, sp #n */
+ {
+ unsigned imm = insn & 0xff; /* immediate value */
+ unsigned rot = (insn & 0xf00) >> 7; /* rotate amount */
+ imm = (imm >> rot) | (imm << (32-rot));
+ sp_offset -= imm;
+ }
+ else if ((insn & 0xffff7fff) == 0xed6d0103) /* stfe f?, [sp, -#c]! */
+ {
+ sp_offset -= 12;
+ regno = F0_REGNUM + ((insn >> 12) & 0x07);
+ fi->fsr.regs[regno] = sp_offset;
+ }
+ else if ((insn & 0xffbf0fff) == 0xec2d0200) /* sfmfd f0, 4, [sp!] */
+ {
+ int n_saved_fp_regs, i;
+ unsigned int fp_start_reg, fp_bound_reg;
+
+ if ((insn & 0x800) == 0x800) /* N0 is set */
+ {
+ if ((insn & 0x40000) == 0x40000) /* N1 is set */
+ n_saved_fp_regs = 3;
+ else
+ n_saved_fp_regs = 1;
+ }
+ else
+ {
+ if ((insn & 0x40000) == 0x40000) /* N1 is set */
+ n_saved_fp_regs = 2;
+ else
+ n_saved_fp_regs = 4;
+ }
+
+ fp_start_reg = F0_REGNUM + ((insn >> 12) & 0x7);
+ fp_bound_reg = fp_start_reg + n_saved_fp_regs;
+ for (; fp_start_reg < fp_bound_reg; fp_start_reg++)
+ {
+ sp_offset -= 12;
+ fi->fsr.regs[fp_start_reg++] = sp_offset;
+ }
+ }
+ else
+ continue; /* The optimizer might shove anything into the
+ prologue, so we just skip what we don't recognize. */
}
- else if (insn == 0xe1a0c00d) /* mov ip, sp */
- continue;
- else
- break; /* not a recognized prologue instruction */
}
/* The frame size is just the negative of the offset (from the original SP)
@@ -576,7 +692,7 @@ arm_scan_prologue (fi)
[new FP] - [new SP]. */
fi->framesize = -sp_offset;
fi->frameoffset = fp_offset - sp_offset;
-
+
save_prologue_cache (fi);
}
@@ -685,11 +801,15 @@ arm_frame_chain (fi)
sp. This is tricky because we sometimes don't use an explicit
frame pointer, and the previous stack pointer isn't necessarily recorded
on the stack. The only reliable way to get this info is to
- examine the prologue. */
+ examine the prologue.
+ FROMLEAF is a little confusing, it means this is the next frame up
+ the chain AFTER a frameless function. If this is true, then the
+ frame value for this frame is still in the fp register. */
void
-arm_init_extra_frame_info (fi)
- struct frame_info *fi;
+arm_init_extra_frame_info (fromleaf, fi)
+ int fromleaf;
+ struct frame_info * fi;
{
int reg;
@@ -715,12 +835,16 @@ arm_init_extra_frame_info (fi)
if (!fi->next) /* this is the innermost frame? */
fi->frame = read_register (fi->framereg);
- else
- /* not the innermost frame */
- /* If we have an FP, the callee saved it. */ if (fi->framereg == FP_REGNUM || fi->framereg == THUMB_FP_REGNUM)
- if (fi->next->fsr.regs[fi->framereg] != 0)
- fi->frame = read_memory_integer (fi->next->fsr.regs[fi->framereg],
- 4);
+ else /* not the innermost frame */
+ /* If we have an FP, the callee saved it. */
+ if (fi->framereg == FP_REGNUM || fi->framereg == THUMB_FP_REGNUM)
+ if (fi->next->fsr.regs[fi->framereg] != 0)
+ fi->frame = read_memory_integer (fi->next->fsr.regs[fi->framereg],
+ 4);
+ else if (fromleaf) /* If we were called by a frameless fn.
+ then our frame is still in the frame pointer
+ register on the board... */
+ fi->frame = read_fp ();
/* Calculate actual addresses of saved registers using offsets determined
by arm_scan_prologue. */
@@ -1058,7 +1182,7 @@ arm_float_info ()
type = (status >> 24) & 127;
printf ("%s FPU type %d\n",
- (status & (1 << 31)) ? "Hardware" : "Software",
+ (status & (1<<31)) ? "Hardware" : "Software",
type);
fputs ("mask: ", stdout);
print_fpu_flags (status >> 16);
@@ -1066,21 +1190,57 @@ arm_float_info ()
print_fpu_flags (status);
}
+/* If the disassembly mode is APCS, we have to also switch the
+ bfd mach_type. This function is run in the set disassembly_flavor
+ command, and does that. */
+
static void
-arm_othernames ()
+set_disassembly_flavor_sfunc (args, from_tty, c)
+ char *args;
+ int from_tty;
+ struct cmd_list_element *c;
{
+ set_disassembly_flavor ();
+
+ if (disassembly_flavor_hook != NULL)
+ disassembly_flavor_hook(args, from_tty);
+}
- if (arm_register_names == APCS_register_names)
+static void
+set_disassembly_flavor ()
+{
+ if (disassembly_flavor == apcs_flavor)
{
- arm_register_names = additional_register_names;
- arm_toggle_regnames ();
+ if (arm_toggle_regnames () == 0)
+ arm_toggle_regnames ();
+ arm_register_names = apcs_register_names;
+ }
+ else if (disassembly_flavor == r_prefix_flavor)
+ {
+ if (arm_toggle_regnames () == 1)
+ arm_toggle_regnames ();
+ arm_register_names = additional_register_names;
+ }
+}
+
+/* arm_othernames implements the "othernames" command. This is kind of
+ hacky, and I prefer the set-show disassembly-flavor which is also used
+ for the x86 gdb. I will keep this around, however, in case anyone is
+ actually using it. */
+
+static void
+arm_othernames ()
+{
+ if (disassembly_flavor == r_prefix_flavor)
+ {
+ disassembly_flavor = apcs_flavor;
+ set_disassembly_flavor ();
}
else
{
- arm_register_names = APCS_register_names;
- arm_toggle_regnames ();
+ disassembly_flavor = r_prefix_flavor;
+ set_disassembly_flavor ();
}
-
}
/* FIXME: Fill in with the 'right thing', see asm
@@ -1646,23 +1806,37 @@ arm_skip_stub (pc)
void
_initialize_arm_tdep ()
{
- int regname_is_APCS = (arm_register_names == APCS_register_names);
+ struct cmd_list_element *new_cmd;
tm_print_insn = gdb_print_insn_arm;
-
+
/* Sync the opcode insn printer with our register viewer: */
- if (arm_toggle_regnames () != regname_is_APCS)
+ if (arm_toggle_regnames () != 1)
arm_toggle_regnames ();
+ /* Add the deprecated "othernames" command */
+
add_com ("othernames", class_obscure, arm_othernames,
"Switch to the other set of register names.");
+ /* Add the disassembly-flavor command */
+
+ new_cmd = add_set_enum_cmd ("disassembly-flavor", no_class,
+ valid_flavors,
+ (char *) &disassembly_flavor,
+ "Set the disassembly flavor, \
+the valid values are \"apcs\" and \"r-prefix\", \
+and the default value is \"apcs\".",
+ &setlist);
+ new_cmd->function.sfunc = set_disassembly_flavor_sfunc;
+ add_show_from_set(new_cmd, &showlist);
+
/* ??? Maybe this should be a boolean. */
add_show_from_set (add_set_cmd ("apcs32", no_class,
- var_zinteger, (char *) &arm_apcs_32,
- "Set usage of ARM 32-bit mode.\n", &setlist),
- &showlist);
+ var_zinteger, (char *)&arm_apcs_32,
+ "Set usage of ARM 32-bit mode.\n", &setlist),
+ & showlist);
}
diff --git a/gdb/arm-xdep.c b/gdb/arm-xdep.c
index 48c416d..09b3d5c 100644
--- a/gdb/arm-xdep.c
+++ b/gdb/arm-xdep.c
@@ -538,7 +538,7 @@ xfer_core_file (memaddr, myaddr, len)
{
/* Address did not classify into one of the known ranges.
This shouldn't happen; we catch the endpoints. */
- fatal ("Internal: Bad case logic in xfer_core_file.");
+ internal_error ("Bad case logic in xfer_core_file.");
}
/* Now we know which file to use.
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index f791e4c..f888262 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -403,10 +403,13 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
}
else
{
- fprintf_filtered (stream, TYPE_UNSIGNED (type) ? "%u" : "%d",
- unpack_long (type, valaddr + embedded_offset));
+ val = unpack_long (type, valaddr + embedded_offset);
+ if (TYPE_UNSIGNED (type))
+ fprintf_filtered (stream, "%u", (unsigned int) val);
+ else
+ fprintf_filtered (stream, "%d", (int) val);
fputs_filtered (" ", stream);
- LA_PRINT_CHAR ((unsigned char) unpack_long (type, valaddr + embedded_offset), stream);
+ LA_PRINT_CHAR ((unsigned char) val, stream);
}
break;
diff --git a/gdb/ch-exp.c b/gdb/ch-exp.c
index 62e9bfd..1b22e25 100644
--- a/gdb/ch-exp.c
+++ b/gdb/ch-exp.c
@@ -217,7 +217,7 @@ peek_token_ (i)
int i;
{
if (i > MAX_LOOK_AHEAD)
- fatal ("internal error - too much lookahead");
+ internal_error ("ch-exp.c - too much lookahead");
if (terminal_buffer[i] == TOKEN_NOT_READ)
{
terminal_buffer[i] = ch_lex ();
@@ -235,7 +235,7 @@ pushback_token (code, node)
{
int i;
if (terminal_buffer[MAX_LOOK_AHEAD] != TOKEN_NOT_READ)
- fatal ("internal error - cannot pushback token");
+ internal_error ("ch-exp.c - cannot pushback token");
for (i = MAX_LOOK_AHEAD; i > 0; i--)
{
terminal_buffer[i] = terminal_buffer[i - 1];
@@ -269,9 +269,7 @@ require (token)
{
if (PEEK_TOKEN () != token)
{
- char buf[80];
- sprintf (buf, "internal parser error - expected token %d", (int) token);
- fatal (buf);
+ internal_error ("ch-exp.c - expected token %d", (int) token);
}
FORWARD_TOKEN ();
}
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 1a923eb..29ec665 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -193,7 +193,6 @@ static struct type *coff_read_enum_type PARAMS ((int, int, int));
static struct symbol *process_coff_symbol PARAMS ((struct coff_symbol *,
union internal_auxent *,
- struct section_offsets *,
struct objfile *));
static void patch_opaque_types PARAMS ((struct symtab *));
@@ -218,8 +217,7 @@ static void read_one_sym PARAMS ((struct coff_symbol *,
struct internal_syment *,
union internal_auxent *));
-static void coff_symtab_read PARAMS ((long, int, struct section_offsets *,
- struct objfile *));
+static void coff_symtab_read PARAMS ((long, int, struct objfile *));
static void find_linenos PARAMS ((bfd *, sec_ptr, PTR));
@@ -227,8 +225,7 @@ static void coff_symfile_init PARAMS ((struct objfile *));
static void coff_new_init PARAMS ((struct objfile *));
-static void coff_symfile_read PARAMS ((struct objfile *,
- struct section_offsets *, int));
+static void coff_symfile_read PARAMS ((struct objfile *, int));
static void coff_symfile_finish PARAMS ((struct objfile *));
@@ -596,9 +593,8 @@ static bfd *symfile_bfd;
/* ARGSUSED */
static void
-coff_symfile_read (objfile, section_offsets, mainline)
+coff_symfile_read (objfile, mainline)
struct objfile *objfile;
- struct section_offsets *section_offsets;
int mainline;
{
struct coff_symfile_info *info;
@@ -673,8 +669,7 @@ coff_symfile_read (objfile, section_offsets, mainline)
/* Now that the executable file is positioned at symbol table,
process it and define symbols accordingly. */
- coff_symtab_read ((long) symtab_offset, num_symbols, section_offsets,
- objfile);
+ coff_symtab_read ((long) symtab_offset, num_symbols, objfile);
/* Sort symbols alphabetically within each block. */
@@ -712,7 +707,6 @@ coff_symfile_read (objfile, section_offsets, mainline)
stabstrsize = bfd_section_size (abfd, info->stabstrsect);
coffstab_build_psymtabs (objfile,
- section_offsets,
mainline,
info->textaddr, info->textsize,
info->stabsects,
@@ -750,10 +744,9 @@ coff_symfile_finish (objfile)
We read them one at a time using read_one_sym (). */
static void
-coff_symtab_read (symtab_offset, nsyms, section_offsets, objfile)
+coff_symtab_read (symtab_offset, nsyms, objfile)
long symtab_offset;
int nsyms;
- struct section_offsets *section_offsets;
struct objfile *objfile;
{
register struct context_stack *new;
@@ -841,7 +834,7 @@ coff_symtab_read (symtab_offset, nsyms, section_offsets, objfile)
if (ISFCN (cs->c_type) && cs->c_sclass != C_TPDEF)
{
/* Record all functions -- external and static -- in minsyms. */
- tmpaddr = cs->c_value + ANOFFSET (section_offsets, SECT_OFF_TEXT);
+ tmpaddr = cs->c_value + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
record_minimal_symbol (cs->c_name, tmpaddr, mst_text, objfile);
fcn_line_ptr = main_aux.x_sym.x_fcnary.x_fcn.x_lnnoptr;
@@ -906,7 +899,7 @@ coff_symtab_read (symtab_offset, nsyms, section_offsets, objfile)
followed by a later file with no symbols. */
if (in_source_file)
complete_symtab (filestring,
- cs->c_value + ANOFFSET (section_offsets, SECT_OFF_TEXT),
+ cs->c_value + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT),
main_aux.x_scn.x_scnlen);
in_source_file = 0;
}
@@ -965,7 +958,7 @@ coff_symtab_read (symtab_offset, nsyms, section_offsets, objfile)
tmpaddr = cs->c_value;
if (cs->c_sclass == C_EXT || cs->c_sclass == C_THUMBEXTFUNC
|| cs->c_sclass == C_THUMBEXT)
- tmpaddr += ANOFFSET (section_offsets, sec);
+ tmpaddr += ANOFFSET (objfile->section_offsets, sec);
switch (sec)
{
@@ -1012,7 +1005,7 @@ coff_symtab_read (symtab_offset, nsyms, section_offsets, objfile)
{
struct symbol *sym;
sym = process_coff_symbol
- (cs, &main_aux, section_offsets, objfile);
+ (cs, &main_aux, objfile);
SYMBOL_VALUE (sym) = tmpaddr;
SYMBOL_SECTION (sym) = sec;
}
@@ -1039,8 +1032,7 @@ coff_symtab_read (symtab_offset, nsyms, section_offsets, objfile)
new = push_context (depth, fcn_start_addr);
fcn_cs_saved.c_name = getsymname (&fcn_sym_saved);
new->name =
- process_coff_symbol (&fcn_cs_saved, &fcn_aux_saved,
- section_offsets, objfile);
+ process_coff_symbol (&fcn_cs_saved, &fcn_aux_saved, objfile);
}
else if (STREQ (cs->c_name, ".ef"))
{
@@ -1084,7 +1076,7 @@ coff_symtab_read (symtab_offset, nsyms, section_offsets, objfile)
fcn_first_line_addr);
else
enter_linenos (fcn_line_ptr, fcn_first_line, fcn_last_line,
- section_offsets);
+ objfile->section_offsets);
finish_block (new->name, &local_symbols, new->old_blocks,
new->start_addr,
@@ -1098,11 +1090,11 @@ coff_symtab_read (symtab_offset, nsyms, section_offsets, objfile)
of the epilogue. */
cs->c_value
+ FUNCTION_EPILOGUE_SIZE
- + ANOFFSET (section_offsets, SECT_OFF_TEXT),
+ + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT),
#else
fcn_cs_saved.c_value
+ fcn_aux_saved.x_sym.x_misc.x_fsize
- + ANOFFSET (section_offsets, SECT_OFF_TEXT),
+ + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT),
#endif
objfile
);
@@ -1114,7 +1106,7 @@ coff_symtab_read (symtab_offset, nsyms, section_offsets, objfile)
if (STREQ (cs->c_name, ".bb"))
{
tmpaddr = cs->c_value;
- tmpaddr += ANOFFSET (section_offsets, SECT_OFF_TEXT);
+ tmpaddr += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
push_context (++depth, tmpaddr);
}
else if (STREQ (cs->c_name, ".eb"))
@@ -1134,7 +1126,7 @@ coff_symtab_read (symtab_offset, nsyms, section_offsets, objfile)
if (local_symbols && context_stack_depth > 0)
{
tmpaddr =
- cs->c_value + ANOFFSET (section_offsets, SECT_OFF_TEXT);
+ cs->c_value + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
/* Make a block for the local symbols within. */
finish_block (0, &local_symbols, new->old_blocks,
new->start_addr, tmpaddr, objfile);
@@ -1145,7 +1137,7 @@ coff_symtab_read (symtab_offset, nsyms, section_offsets, objfile)
break;
default:
- process_coff_symbol (cs, &main_aux, section_offsets, objfile);
+ process_coff_symbol (cs, &main_aux, objfile);
break;
}
}
@@ -1521,10 +1513,9 @@ patch_opaque_types (s)
}
static struct symbol *
-process_coff_symbol (cs, aux, section_offsets, objfile)
+process_coff_symbol (cs, aux, objfile)
register struct coff_symbol *cs;
register union internal_auxent *aux;
- struct section_offsets *section_offsets;
struct objfile *objfile;
{
register struct symbol *sym
@@ -1547,7 +1538,7 @@ process_coff_symbol (cs, aux, section_offsets, objfile)
if (ISFCN (cs->c_type))
{
- SYMBOL_VALUE (sym) += ANOFFSET (section_offsets, SECT_OFF_TEXT);
+ SYMBOL_VALUE (sym) += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
SYMBOL_TYPE (sym) =
lookup_function_type (decode_function_type (cs, cs->c_type, aux));
@@ -1577,7 +1568,7 @@ process_coff_symbol (cs, aux, section_offsets, objfile)
case C_EXT:
SYMBOL_CLASS (sym) = LOC_STATIC;
SYMBOL_VALUE_ADDRESS (sym) = (CORE_ADDR) cs->c_value;
- SYMBOL_VALUE_ADDRESS (sym) += ANOFFSET (section_offsets, SECT_OFF_TEXT);
+ SYMBOL_VALUE_ADDRESS (sym) += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
add_symbol_to_list (sym, &global_symbols);
break;
@@ -1586,7 +1577,7 @@ process_coff_symbol (cs, aux, section_offsets, objfile)
case C_STAT:
SYMBOL_CLASS (sym) = LOC_STATIC;
SYMBOL_VALUE_ADDRESS (sym) = (CORE_ADDR) cs->c_value;
- SYMBOL_VALUE_ADDRESS (sym) += ANOFFSET (section_offsets, SECT_OFF_TEXT);
+ SYMBOL_VALUE_ADDRESS (sym) += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
if (within_function)
{
/* Static symbol of local scope */
@@ -2211,8 +2202,7 @@ static struct sym_fns coff_sym_fns =
coff_symfile_init, /* sym_init: read initial info, setup for sym_read() */
coff_symfile_read, /* sym_read: read a symbol file into symtab */
coff_symfile_finish, /* sym_finish: finished with file, cleanup */
- default_symfile_offsets,
- /* sym_offsets: xlate external to internal form */
+ default_symfile_offsets, /* sym_offsets: xlate external to internal form */
NULL /* next: pointer to next struct sym_fns */
};
diff --git a/gdb/command.c b/gdb/command.c
index fd8b814..dc39265 100644
--- a/gdb/command.c
+++ b/gdb/command.c
@@ -1418,6 +1418,8 @@ do_setshow_command (arg, from_tty, c)
else
error ("gdb internal error: bad cmd_type in do_setshow_command");
(*c->function.sfunc) (NULL, from_tty, c);
+ if (c->type == set_cmd && set_hook)
+ set_hook (c);
}
/* Show all the settings in a list of show commands. */
diff --git a/gdb/complaints.c b/gdb/complaints.c
index 3c05912..5903a4e 100644
--- a/gdb/complaints.c
+++ b/gdb/complaints.c
@@ -60,24 +60,11 @@ extern int info_verbose;
/* Print a complaint about the input symbols, and link the complaint block
into a chain for later handling. */
-/* VARARGS */
void
-#ifdef ANSI_PROTOTYPES
complain (struct complaint *complaint,...)
-#else
-complain (va_alist)
- va_dcl
-#endif
{
va_list args;
-#ifdef ANSI_PROTOTYPES
va_start (args, complaint);
-#else
- struct complaint *complaint;
-
- va_start (args);
- complaint = va_arg (args, struct complaint *);
-#endif
complaint->counter++;
if (complaint->next == NULL)
diff --git a/gdb/config.in b/gdb/config.in
index 1093eaf..e691b8a 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -135,9 +135,6 @@
/* Define if you have the bzero function. */
#undef HAVE_BZERO
-/* Define if you have the poll function. */
-#undef HAVE_POLL
-
/* Define if you have the dcgettext function. */
#undef HAVE_DCGETTEXT
@@ -153,6 +150,9 @@
/* Define if you have the munmap function. */
#undef HAVE_MUNMAP
+/* Define if you have the poll function. */
+#undef HAVE_POLL
+
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
@@ -171,6 +171,9 @@
/* Define if you have the sigaction function. */
#undef HAVE_SIGACTION
+/* Define if you have the socketpair function. */
+#undef HAVE_SOCKETPAIR
+
/* Define if you have the stpcpy function. */
#undef HAVE_STPCPY
diff --git a/gdb/config/arm/tm-arm.h b/gdb/config/arm/tm-arm.h
index 8a3553f..4fbeafd 100644
--- a/gdb/config/arm/tm-arm.h
+++ b/gdb/config/arm/tm-arm.h
@@ -290,8 +290,10 @@ extern use_struct_convention_fn arm_use_struct_convention;
int frameoffset; \
int framereg;
-extern void arm_init_extra_frame_info PARAMS ((struct frame_info * fi));
-#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) arm_init_extra_frame_info (fi)
+extern void arm_init_extra_frame_info PARAMS ((int fromleaf,
+ struct frame_info *fi));
+#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
+ arm_init_extra_frame_info (fromleaf, fi)
/* Return the frame address. On ARM, it is R11; on Thumb it is R7. */
CORE_ADDR arm_target_read_fp PARAMS ((void));
@@ -314,11 +316,25 @@ extern int arm_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
/* Define other aspects of the stack frame. */
-/* An expression that tells us whether the function invocation represented
- by FI does not have a frame on the stack associated with it. */
-extern int arm_frameless_function_invocation PARAMS ((struct frame_info * frame));
-#define FRAMELESS_FUNCTION_INVOCATION(FI) (arm_frameless_function_invocation (FI))
-
+/* A macro that tells us whether the function invocation represented
+ by FI does not have a frame on the stack associated with it. If it
+ does not, FRAMELESS is set to 1, else 0.
+
+ Sometimes we have functions that do a little setup (like saving the vN
+ registers with the stmdb instruction, but DO NOT set up a frame.
+ The symbol table will report this as a prologue. However, it is
+ important not to try to parse these partial frames as frames, or we
+ will get really confused.
+
+ So I will demand 3 instructions between the start & end of the prologue
+ before I call it a real prologue, i.e. at least
+ mov ip, sp,
+ stmdb sp!, {}
+ sub sp, ip, #4. */
+
+#define FRAMELESS_FUNCTION_INVOCATION(FI) \
+(arm_frameless_function_invocation (FI))
+
/* Saved Pc. */
#define FRAME_SAVED_PC(FRAME) arm_frame_saved_pc (FRAME)
diff --git a/gdb/config/mcore/mcore.mt b/gdb/config/mcore/mcore.mt
new file mode 100644
index 0000000..ed9a923
--- /dev/null
+++ b/gdb/config/mcore/mcore.mt
@@ -0,0 +1,5 @@
+# Target: Motorola MCore processor
+TDEPFILES= mcore-tdep.o mcore-rom.o monitor.o dsrec.o
+TM_FILE= tm-mcore.h
+SIM_OBS = remote-sim.o
+SIM = ../sim/mcore/libsim.a
diff --git a/gdb/config/mcore/tm-mcore.h b/gdb/config/mcore/tm-mcore.h
new file mode 100644
index 0000000..aab7b74
--- /dev/null
+++ b/gdb/config/mcore/tm-mcore.h
@@ -0,0 +1,160 @@
+/* Parameters for execution on a Motorola MCore.
+ Copyright (C) 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. */
+
+/* The mcore is big endian */
+#define TARGET_BYTE_ORDER_DEFAULT BIG_ENDIAN
+
+/* All registers are 32 bits */
+#define REGISTER_SIZE 4
+#define MAX_REGISTER_RAW_SIZE 4
+
+#define REGISTER_VIRTUAL_TYPE(REG) builtin_type_int
+
+#define REGISTER_BYTE(REG) ((REG) * REGISTER_SIZE)
+#define REGISTER_VIRTUAL_SIZE(REG) 4
+#define REGISTER_RAW_SIZE(REG) 4
+
+#define MAX_REGISTER_VIRTUAL_SIZE 4
+
+#define REGISTER_BYTES (NUM_REGS * REGISTER_SIZE)
+
+extern char *mcore_register_names[];
+#define REGISTER_NAME(I) mcore_register_names[I]
+
+/* Registers. The Motorola MCore contains:
+
+ 16 32-bit general purpose registers (r0-r15)
+ 16 32-bit alternate file registers (ar0-ar15)
+ 32 32-bit control registers (cr0-cr31)
+ + 1 pc
+ ------
+ 65 registers */
+#define NUM_REGS 65
+#define PC_REGNUM 64
+#define SP_REGNUM 0
+#define FP_REGNUM (SP_REGNUM)
+#define PR_REGNUM 15
+#define FIRST_ARGREG 2
+#define LAST_ARGREG 7
+#define RETVAL_REGNUM 2
+
+/* Offset from address of function to start of its code.
+ Zero on most machines. */
+#define FUNCTION_START_OFFSET 0
+
+#define DECR_PC_AFTER_BREAK 0
+
+/* BREAKPOINT_FROM_PC uses the program counter value to determine
+ the breakpoint that should be used. */
+extern breakpoint_from_pc_fn mcore_breakpoint_from_pc;
+#define BREAKPOINT_FROM_PC(PCPTR, LENPTR) mcore_breakpoint_from_pc (PCPTR, LENPTR)
+
+#define INNER_THAN(LHS,RHS) ((LHS) < (RHS))
+
+#define SAVED_PC_AFTER_CALL(FRAME) read_register (PR_REGNUM)
+
+struct frame_info;
+struct type;
+struct value;
+
+extern void mcore_init_extra_frame_info (struct frame_info *fi);
+#define INIT_EXTRA_FRAME_INFO(FROMLEAF, FI) mcore_init_extra_frame_info ((FI))
+#define INIT_FRAME_PC /* Not necessary */
+#define FRAME_INIT_SAVED_REGS(FI) /* handled by init_extra_frame_info */
+
+extern CORE_ADDR mcore_frame_chain (struct frame_info *fi);
+#define FRAME_CHAIN(FI) mcore_frame_chain ((FI))
+#define FRAME_CHAIN_VALID(FP, FI) generic_frame_chain_valid ((FP), (FI))
+
+extern CORE_ADDR mcore_frame_saved_pc (struct frame_info *);
+#define FRAME_SAVED_PC(FI) (mcore_frame_saved_pc ((FI)))
+
+/* Extracting/storing return values. */
+extern void mcore_store_return_value (struct type *type, char *valbuf);
+#define STORE_RETURN_VALUE(TYPE, VALBUF) mcore_store_return_value ((TYPE), (VALBUF))
+
+extern void mcore_extract_return_value (struct type *type, char *regbut, char *valbuf);
+#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+ mcore_extract_return_value ((TYPE), (REGBUF), (VALBUF));
+
+#define STORE_STRUCT_RETURN(ADDR, SP) /* handled by mcore_push_arguments */
+
+extern CORE_ADDR mcore_extract_struct_value_address (char *regbuf);
+#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+ mcore_extract_struct_value_address (REGBUF)
+
+extern CORE_ADDR mcore_skip_prologue (CORE_ADDR pc);
+#define SKIP_PROLOGUE(PC) (PC) = mcore_skip_prologue ((PC))
+
+#define FRAME_ARGS_SKIP 0
+extern CORE_ADDR mcore_frame_args_address (struct frame_info *fi);
+#define FRAME_ARGS_ADDRESS(FI) mcore_frame_args_address ((FI))
+extern CORE_ADDR mcore_frame_locals_address (struct frame_info *fi);
+#define FRAME_LOCALS_ADDRESS(FI) mcore_frame_locals_address ((FI))
+#define FRAME_NUM_ARGS(FI) (-1)
+
+
+extern void mcore_pop_frame (struct frame_info *fi);
+#define POP_FRAME mcore_pop_frame (get_current_frame ())
+
+#define USE_GENERIC_DUMMY_FRAMES 1
+#define CALL_DUMMY {0}
+#define CALL_DUMMY_START_OFFSET (0)
+#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
+#define CALL_DUMMY_LOCATION AT_ENTRY_POINT
+#define FIX_CALL_DUMMY(DUMMY, START, FUNADDR, NARGS, ARGS, TYPE, GCCP)
+#define CALL_DUMMY_ADDRESS() entry_point_address ()
+#define SIZEOF_CALL_DUMMY_WORDS 0
+
+extern CORE_ADDR mcore_push_return_address PARAMS ((CORE_ADDR, CORE_ADDR));
+#define PUSH_RETURN_ADDRESS(PC, SP) mcore_push_return_address (PC, SP)
+
+#define PUSH_DUMMY_FRAME generic_push_dummy_frame ()
+
+extern CORE_ADDR mcore_push_arguments PARAMS ((int, struct value **, CORE_ADDR,
+ unsigned char, CORE_ADDR));
+#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
+ (SP) = mcore_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
+
+#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
+
+/* MCore will never pass a sturcture by reference. It will always be split
+ between registers and stack. */
+#define REG_STRUCT_HAS_ADDR(GCC_P, TYPE) 0
+
+extern use_struct_convention_fn mcore_use_struct_convention;
+#define USE_STRUCT_CONVENTION(GCC_P, TYPE) mcore_use_struct_convention (GCC_P, TYPE)
+
+/* override the default get_saved_register function with
+ one that takes account of generic CALL_DUMMY frames */
+#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
+ generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
+
+/* Cons up virtual frame pointer for trace */
+extern void mcore_virtual_frame_pointer PARAMS ((CORE_ADDR, long *, long *));
+#define TARGET_VIRTUAL_FRAME_POINTER(PC, REGP, OFFP) \
+ mcore_virtual_frame_pointer ((PC), (REGP), (OFFP))
+
+/* MCore can be bi-endian. */
+#define TARGET_BYTE_ORDER_SELECTABLE_P 1
+
+/* For PE, gcc will tell us what th real type of
+ arguments are when it promotes arguments. */
+#define BELIEVE_PCC_PROMOTION 1
diff --git a/gdb/configure b/gdb/configure
index 16f9ab8..b2d683c 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -16,6 +16,8 @@ ac_help="$ac_help
ac_help="$ac_help
--with-included-gettext use the GNU gettext library included here"
ac_help="$ac_help
+ --enable-multi-ice Build the multi-ice-gdb-server"
+ac_help="$ac_help
--enable-tui Enable full-screen terminal user interface"
ac_help="$ac_help
--enable-netrom Enable NetROM support"
@@ -76,7 +78,6 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
-sitefile=
srcdir=
target=NONE
verbose=
@@ -191,7 +192,6 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
- --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -362,11 +362,6 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
- -site-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
-
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -532,16 +527,12 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
+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
-else
- CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -585,7 +576,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:589: checking for $ac_word" >&5
+echo "configure:580: 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
@@ -615,7 +606,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:619: checking for $ac_word" >&5
+echo "configure:610: 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
@@ -666,7 +657,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:670: checking for $ac_word" >&5
+echo "configure:661: 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
@@ -698,7 +689,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:702: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:693: 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.
@@ -709,12 +700,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 713 "configure"
+#line 704 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:709: \"$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
@@ -740,12 +731,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:744: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:735: 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:749: checking whether we are using GNU C" >&5
+echo "configure:740: 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
@@ -754,7 +745,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:758: \"$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:749: \"$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
@@ -773,7 +764,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:777: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:768: 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
@@ -805,7 +796,7 @@ else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:809: checking how to run the C preprocessor" >&5
+echo "configure:800: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -820,13 +811,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 824 "configure"
+#line 815 "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:830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:821: \"$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
:
@@ -837,13 +828,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 841 "configure"
+#line 832 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -854,13 +845,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 858 "configure"
+#line 849 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:855: \"$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,9 +876,9 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:889: checking for AIX" >&5
+echo "configure:880: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
-#line 891 "configure"
+#line 882 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
@@ -909,7 +900,7 @@ rm -f conftest*
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:913: checking for POSIXized ISC" >&5
+echo "configure:904: 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
@@ -933,7 +924,7 @@ fi
echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
-echo "configure:937: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:928: 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
@@ -949,7 +940,7 @@ for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__
do
CC="$ac_save_CC $ac_arg"
cat > conftest.$ac_ext <<EOF
-#line 953 "configure"
+#line 944 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
@@ -986,7 +977,7 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
; return 0; }
EOF
-if { (eval echo configure:990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_prog_cc_stdc="$ac_arg"; break
else
@@ -1057,7 +1048,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:1061: checking host system type" >&5
+echo "configure:1052: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -1078,7 +1069,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:1082: checking target system type" >&5
+echo "configure:1073: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -1096,7 +1087,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:1100: checking build system type" >&5
+echo "configure:1091: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -1121,7 +1112,7 @@ test "$host_alias" != "$target_alias" &&
ALL_LINGUAS=
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1125: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1116: 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
@@ -1150,7 +1141,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:1154: checking for $ac_word" >&5
+echo "configure:1145: 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
@@ -1178,12 +1169,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1182: checking for ANSI C header files" >&5
+echo "configure:1173: 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 1187 "configure"
+#line 1178 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1191,7 +1182,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1186: \"$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*
@@ -1208,7 +1199,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 1212 "configure"
+#line 1203 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1226,7 +1217,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 1230 "configure"
+#line 1221 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1247,7 +1238,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1251 "configure"
+#line 1242 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1258,7 +1249,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1282,12 +1273,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1286: checking for working const" >&5
+echo "configure:1277: 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 1291 "configure"
+#line 1282 "configure"
#include "confdefs.h"
int main() {
@@ -1336,7 +1327,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:1340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1357,21 +1348,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1361: checking for inline" >&5
+echo "configure:1352: 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 1368 "configure"
+#line 1359 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -1397,12 +1388,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1401: checking for off_t" >&5
+echo "configure:1392: 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 1406 "configure"
+#line 1397 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1430,12 +1421,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1434: checking for size_t" >&5
+echo "configure:1425: 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 1439 "configure"
+#line 1430 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1465,19 +1456,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:1469: checking for working alloca.h" >&5
+echo "configure:1460: 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 1474 "configure"
+#line 1465 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1472: \"$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
@@ -1498,12 +1489,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1502: checking for alloca" >&5
+echo "configure:1493: 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 1507 "configure"
+#line 1498 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -1531,7 +1522,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1526: \"$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
@@ -1563,12 +1554,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1567: checking whether alloca needs Cray hooks" >&5
+echo "configure:1558: 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 1572 "configure"
+#line 1563 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -1593,12 +1584,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:1597: checking for $ac_func" >&5
+echo "configure:1588: 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 1602 "configure"
+#line 1593 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1621,7 +1612,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1616: \"$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
@@ -1648,7 +1639,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1652: checking stack direction for C alloca" >&5
+echo "configure:1643: 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
@@ -1656,7 +1647,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1660 "configure"
+#line 1651 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -1675,7 +1666,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:1679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1670: \"$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
@@ -1700,17 +1691,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:1704: checking for $ac_hdr" >&5
+echo "configure:1695: 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 1709 "configure"
+#line 1700 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1705: \"$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*
@@ -1739,12 +1730,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1743: checking for $ac_func" >&5
+echo "configure:1734: 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 1748 "configure"
+#line 1739 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1767,7 +1758,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1762: \"$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
@@ -1792,7 +1783,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1796: checking for working mmap" >&5
+echo "configure:1787: 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
@@ -1800,7 +1791,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 1804 "configure"
+#line 1795 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -1940,7 +1931,7 @@ main()
}
EOF
-if { (eval echo configure:1944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1935: \"$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
@@ -1968,17 +1959,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:1972: checking for $ac_hdr" >&5
+echo "configure:1963: 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 1977 "configure"
+#line 1968 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1973: \"$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*
@@ -2008,12 +1999,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2012: checking for $ac_func" >&5
+echo "configure:2003: 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 2017 "configure"
+#line 2008 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2036,7 +2027,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2031: \"$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
@@ -2065,12 +2056,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2069: checking for $ac_func" >&5
+echo "configure:2060: 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 2074 "configure"
+#line 2065 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2093,7 +2084,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2088: \"$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
@@ -2127,19 +2118,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2131: checking for LC_MESSAGES" >&5
+echo "configure:2122: 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 2136 "configure"
+#line 2127 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:2143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2134: \"$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
@@ -2160,7 +2151,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2164: checking whether NLS is requested" >&5
+echo "configure:2155: 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"
@@ -2180,7 +2171,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2184: checking whether included gettext is requested" >&5
+echo "configure:2175: 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"
@@ -2199,17 +2190,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2203: checking for libintl.h" >&5
+echo "configure:2194: 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 2208 "configure"
+#line 2199 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2204: \"$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*
@@ -2226,19 +2217,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:2230: checking for gettext in libc" >&5
+echo "configure:2221: 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 2235 "configure"
+#line 2226 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2233: \"$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
@@ -2254,7 +2245,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:2258: checking for bindtextdomain in -lintl" >&5
+echo "configure:2249: 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
@@ -2262,7 +2253,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2266 "configure"
+#line 2257 "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
@@ -2273,7 +2264,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:2277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2268: \"$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
@@ -2289,19 +2280,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:2293: checking for gettext in libintl" >&5
+echo "configure:2284: 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 2298 "configure"
+#line 2289 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2296: \"$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
@@ -2329,7 +2320,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:2333: checking for $ac_word" >&5
+echo "configure:2324: 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
@@ -2363,12 +2354,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2367: checking for $ac_func" >&5
+echo "configure:2358: 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 2372 "configure"
+#line 2363 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2391,7 +2382,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2386: \"$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
@@ -2418,7 +2409,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:2422: checking for $ac_word" >&5
+echo "configure:2413: 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
@@ -2454,7 +2445,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:2458: checking for $ac_word" >&5
+echo "configure:2449: 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
@@ -2486,7 +2477,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 2490 "configure"
+#line 2481 "configure"
#include "confdefs.h"
int main() {
@@ -2494,7 +2485,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:2498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -2526,7 +2517,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:2530: checking for $ac_word" >&5
+echo "configure:2521: 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
@@ -2560,7 +2551,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:2564: checking for $ac_word" >&5
+echo "configure:2555: 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
@@ -2596,7 +2587,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:2600: checking for $ac_word" >&5
+echo "configure:2591: 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
@@ -2686,7 +2677,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2690: checking for catalogs to be installed" >&5
+echo "configure:2681: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -2714,17 +2705,17 @@ echo "configure:2690: 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:2718: checking for linux/version.h" >&5
+echo "configure:2709: 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 2723 "configure"
+#line 2714 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2719: \"$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*
@@ -2793,6 +2784,22 @@ CONFIG_SRCS=
configdirs="doc testsuite"
+# Check whether --enable-multi-ice or --disable-multi-ice was given.
+if test "${enable_multi_ice+set}" = set; then
+ enableval="$enable_multi_ice"
+ case "${enableval}" in
+ yes ) enable_multi_ice="yes" ;;
+ no) enable_multi_ice="no" ;;
+ *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;;
+ esac
+
+fi
+
+
+if test "${enable_multi_ice}" = "yes"; then
+ configdirs="${configdirs} multi-ice"
+fi
+
. ${srcdir}/configure.host
@@ -2804,7 +2811,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:2808: checking for $ac_word" >&5
+echo "configure:2815: 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
@@ -2845,7 +2852,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:2849: checking for a BSD compatible install" >&5
+echo "configure:2856: 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
@@ -2906,7 +2913,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2910: checking for $ac_word" >&5
+echo "configure:2917: 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
@@ -2938,7 +2945,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:2942: checking for $ac_word" >&5
+echo "configure:2949: 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
@@ -2970,7 +2977,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:2974: checking for $ac_word" >&5
+echo "configure:2981: 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
@@ -3007,7 +3014,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:3011: checking for $ac_word" >&5
+echo "configure:3018: 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
@@ -3059,12 +3066,12 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3063: checking return type of signal handlers" >&5
+echo "configure:3070: 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 3068 "configure"
+#line 3075 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -3081,7 +3088,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:3085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -3101,12 +3108,12 @@ EOF
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3105: checking for ANSI C header files" >&5
+echo "configure:3112: 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 3110 "configure"
+#line 3117 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -3114,7 +3121,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3125: \"$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*
@@ -3131,7 +3138,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 3135 "configure"
+#line 3142 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -3149,7 +3156,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 3153 "configure"
+#line 3160 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -3170,7 +3177,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 3174 "configure"
+#line 3181 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3181,7 +3188,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:3185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -3213,17 +3220,17 @@ for ac_hdr in ctype.h curses.h endian.h link.h \
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3217: checking for $ac_hdr" >&5
+echo "configure:3224: 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 3222 "configure"
+#line 3229 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3234: \"$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*
@@ -3250,12 +3257,12 @@ fi
done
echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:3254: checking whether stat file-mode macros are broken" >&5
+echo "configure:3261: 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 3259 "configure"
+#line 3266 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -3307,12 +3314,12 @@ fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:3311: checking for working const" >&5
+echo "configure:3318: 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 3316 "configure"
+#line 3323 "configure"
#include "confdefs.h"
int main() {
@@ -3361,7 +3368,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:3365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -3382,15 +3389,16 @@ EOF
fi
-for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc poll
+for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc poll \
+ socketpair
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3389: checking for $ac_func" >&5
+echo "configure:3397: 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 3394 "configure"
+#line 3402 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3413,7 +3421,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3425: \"$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
@@ -3440,19 +3448,19 @@ done
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:3444: checking for working alloca.h" >&5
+echo "configure:3452: 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 3449 "configure"
+#line 3457 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:3456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3464: \"$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
@@ -3473,12 +3481,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3477: checking for alloca" >&5
+echo "configure:3485: 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 3482 "configure"
+#line 3490 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -3506,7 +3514,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:3510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3518: \"$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
@@ -3538,12 +3546,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3542: checking whether alloca needs Cray hooks" >&5
+echo "configure:3550: 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 3547 "configure"
+#line 3555 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -3568,12 +3576,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:3572: checking for $ac_func" >&5
+echo "configure:3580: 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 3577 "configure"
+#line 3585 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3596,7 +3604,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3608: \"$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
@@ -3623,7 +3631,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3627: checking stack direction for C alloca" >&5
+echo "configure:3635: 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
@@ -3631,7 +3639,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 3635 "configure"
+#line 3643 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -3650,7 +3658,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:3654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3662: \"$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
@@ -3673,12 +3681,12 @@ fi
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:3677: checking whether malloc must be declared" >&5
+echo "configure:3685: 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 3682 "configure"
+#line 3690 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3699,7 +3707,7 @@ int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:3703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_malloc=no
else
@@ -3720,12 +3728,12 @@ EOF
fi
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:3724: checking whether realloc must be declared" >&5
+echo "configure:3732: 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 3729 "configure"
+#line 3737 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3746,7 +3754,7 @@ int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:3750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_realloc=no
else
@@ -3767,12 +3775,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:3771: checking whether free must be declared" >&5
+echo "configure:3779: 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 3776 "configure"
+#line 3784 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3793,7 +3801,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:3797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -3814,12 +3822,12 @@ EOF
fi
echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
-echo "configure:3818: checking whether strerror must be declared" >&5
+echo "configure:3826: 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 3823 "configure"
+#line 3831 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3840,7 +3848,7 @@ int main() {
char *(*pfn) = (char *(*)) strerror
; return 0; }
EOF
-if { (eval echo configure:3844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strerror=no
else
@@ -3861,12 +3869,12 @@ EOF
fi
echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
-echo "configure:3865: checking whether strdup must be declared" >&5
+echo "configure:3873: 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 3870 "configure"
+#line 3878 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3887,7 +3895,7 @@ int main() {
char *(*pfn) = (char *(*)) strdup
; return 0; }
EOF
-if { (eval echo configure:3891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strdup=no
else
@@ -3908,12 +3916,12 @@ EOF
fi
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:3912: checking whether strstr must be declared" >&5
+echo "configure:3920: 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 3917 "configure"
+#line 3925 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3934,7 +3942,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:3938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -3961,9 +3969,9 @@ fi
# could be expunged. --jsm 1999-03-22
echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
-echo "configure:3965: checking for HPUX save_state structure" >&5
+echo "configure:3973: checking for HPUX save_state structure" >&5
cat > conftest.$ac_ext <<EOF
-#line 3967 "configure"
+#line 3975 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -3978,7 +3986,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 3982 "configure"
+#line 3990 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -4030,7 +4038,7 @@ EOF
gdb_cv_hostos_is_solaris=yes ;;
esac
echo $ac_n "checking for directory proc entries""... $ac_c" 1>&6
-echo "configure:4034: checking for directory proc entries" >&5
+echo "configure:4042: checking for directory proc entries" >&5
# The [gdb_host != sun4sol2] hack is because Solaris does provide the
# multiple procfs files as of Solaris 2.6, but GDB can't use it right now.
if test "$ac_cv_header_sys_procfs_h" = yes -a \
@@ -4052,19 +4060,19 @@ 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:4056: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:4064: 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 4061 "configure"
+#line 4069 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main() {
pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:4068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
@@ -4086,19 +4094,19 @@ 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:4090: checking for prrun_t in sys/procfs.h" >&5
+echo "configure:4098: 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 4095 "configure"
+#line 4103 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main() {
prrun_t avar
; return 0; }
EOF
-if { (eval echo configure:4102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prrun_t=yes
else
@@ -4120,19 +4128,19 @@ 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:4124: checking for gregset_t in sys/procfs.h" >&5
+echo "configure:4132: 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 4129 "configure"
+#line 4137 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main() {
gregset_t avar
; return 0; }
EOF
-if { (eval echo configure:4136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_gregset_t=yes
else
@@ -4154,19 +4162,19 @@ 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:4158: checking for fpregset_t in sys/procfs.h" >&5
+echo "configure:4166: 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 4163 "configure"
+#line 4171 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main() {
fpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:4170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_fpregset_t=yes
else
@@ -4190,12 +4198,12 @@ EOF
echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4194: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
+echo "configure:4202: 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 4199 "configure"
+#line 4207 "configure"
#include "confdefs.h"
#include <unistd.h>
#include <sys/types.h>
@@ -4208,7 +4216,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_procfs_piocset=yes
else
@@ -4230,7 +4238,7 @@ EOF
fi
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:4234: checking for main in -lm" >&5
+echo "configure:4242: 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
@@ -4238,14 +4246,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4242 "configure"
+#line 4250 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:4249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4257: \"$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
@@ -4274,7 +4282,7 @@ fi
echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
-echo "configure:4278: checking for wctype in -lc" >&5
+echo "configure:4286: checking for wctype in -lc" >&5
ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4282,7 +4290,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4286 "configure"
+#line 4294 "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
@@ -4293,7 +4301,7 @@ int main() {
wctype()
; return 0; }
EOF
-if { (eval echo configure:4297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4305: \"$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
@@ -4312,7 +4320,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
-echo "configure:4316: checking for wctype in -lw" >&5
+echo "configure:4324: 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
@@ -4320,7 +4328,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lw $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4324 "configure"
+#line 4332 "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
@@ -4331,7 +4339,7 @@ int main() {
wctype()
; return 0; }
EOF
-if { (eval echo configure:4335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4343: \"$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
@@ -4363,12 +4371,12 @@ fi
echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
-echo "configure:4367: checking for long long support in compiler" >&5
+echo "configure:4375: 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 4372 "configure"
+#line 4380 "configure"
#include "confdefs.h"
int main() {
@@ -4378,7 +4386,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_c_long_long=yes
else
@@ -4400,7 +4408,7 @@ fi
echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
-echo "configure:4404: checking for long long support in printf" >&5
+echo "configure:4412: 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
@@ -4408,7 +4416,7 @@ else
gdb_cv_printf_has_long_long=no
else
cat > conftest.$ac_ext <<EOF
-#line 4412 "configure"
+#line 4420 "configure"
#include "confdefs.h"
int main () {
@@ -4422,7 +4430,7 @@ int main () {
return (strcmp ("0x0123456789abcdef", buf));
}
EOF
-if { (eval echo configure:4426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4434: \"$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
@@ -4446,19 +4454,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:4450: checking for long double support in compiler" >&5
+echo "configure:4458: 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 4455 "configure"
+#line 4463 "configure"
#include "confdefs.h"
int main() {
long double foo;
; return 0; }
EOF
-if { (eval echo configure:4462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_long_double=yes
else
@@ -4480,7 +4488,7 @@ fi
echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
-echo "configure:4484: checking for long double support in printf" >&5
+echo "configure:4492: 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
@@ -4488,7 +4496,7 @@ else
gdb_cv_printf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 4492 "configure"
+#line 4500 "configure"
#include "confdefs.h"
int main () {
@@ -4498,7 +4506,7 @@ int main () {
return (strncmp ("3.14159", buf, 7));
}
EOF
-if { (eval echo configure:4502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4510: \"$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
@@ -4522,7 +4530,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:4526: checking for long double support in scanf" >&5
+echo "configure:4534: 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
@@ -4530,7 +4538,7 @@ else
gdb_cv_scanf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 4534 "configure"
+#line 4542 "configure"
#include "confdefs.h"
int main () {
@@ -4540,7 +4548,7 @@ int main () {
return !(f > 3.14159 && f < 3.14160);
}
EOF
-if { (eval echo configure:4544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4552: \"$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
@@ -4566,17 +4574,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:4570: checking for $ac_hdr" >&5
+echo "configure:4578: 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 4575 "configure"
+#line 4583 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4588: \"$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*
@@ -4605,12 +4613,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4609: checking for $ac_func" >&5
+echo "configure:4617: 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 4614 "configure"
+#line 4622 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4633,7 +4641,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4645: \"$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
@@ -4658,7 +4666,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:4662: checking for working mmap" >&5
+echo "configure:4670: 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
@@ -4666,7 +4674,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 4670 "configure"
+#line 4678 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -4806,7 +4814,7 @@ main()
}
EOF
-if { (eval echo configure:4810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4818: \"$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
@@ -4835,7 +4843,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:4839: checking for HPUX/OSF thread support" >&5
+echo "configure:4847: 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
@@ -4854,7 +4862,7 @@ EOF
;;
solaris*)
echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
-echo "configure:4858: checking for Solaris thread debugging library" >&5
+echo "configure:4866: 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
@@ -4864,7 +4872,7 @@ EOF
CONFIG_OBS="${CONFIG_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:4868: checking for dlopen in -ldl" >&5
+echo "configure:4876: 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
@@ -4872,7 +4880,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4876 "configure"
+#line 4884 "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
@@ -4883,7 +4891,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:4887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4895: \"$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
@@ -4915,17 +4923,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:4919: checking for the ld -export-dynamic flag" >&5
+echo "configure:4927: checking for the ld -export-dynamic flag" >&5
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
cat > conftest.$ac_ext <<EOF
-#line 4922 "configure"
+#line 4930 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:4929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
found=yes
else
@@ -4944,13 +4952,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:4948: checking if <proc_service.h> is old" >&5
+echo "configure:4956: 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 4954 "configure"
+#line 4962 "configure"
#include "confdefs.h"
#include <proc_service.h>
@@ -4961,7 +4969,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_proc_service_is_old=no
else
@@ -5096,12 +5104,12 @@ fi
# In the Cygwin environment, we need some additional flags.
echo $ac_n "checking for cygwin""... $ac_c" 1>&6
-echo "configure:5223: checking for cygwin" >&5
+echo "configure:5231: 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 5228 "configure"
+#line 5236 "configure"
#include "confdefs.h"
#if defined (__CYGWIN__) || defined (__CYGWIN32__)
@@ -5135,7 +5143,7 @@ if test x$gdb_cv_os_cygwin = xyes; then
else
TERM_LIB=
echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:5262: checking for tgetent in -lncurses" >&5
+echo "configure:5270: checking for tgetent in -lncurses" >&5
ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5143,7 +5151,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5270 "configure"
+#line 5278 "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
@@ -5154,7 +5162,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5289: \"$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
@@ -5173,7 +5181,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
-echo "configure:5300: checking for tgetent in -lHcurses" >&5
+echo "configure:5308: checking for tgetent in -lHcurses" >&5
ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5181,7 +5189,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lHcurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5308 "configure"
+#line 5316 "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
@@ -5192,7 +5200,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5327: \"$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
@@ -5211,7 +5219,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
-echo "configure:5338: checking for tgetent in -ltermlib" >&5
+echo "configure:5346: checking for tgetent in -ltermlib" >&5
ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5219,7 +5227,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltermlib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5346 "configure"
+#line 5354 "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
@@ -5230,7 +5238,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5365: \"$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
@@ -5249,7 +5257,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:5376: checking for tgetent in -ltermcap" >&5
+echo "configure:5384: checking for tgetent in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5257,7 +5265,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltermcap $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5384 "configure"
+#line 5392 "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
@@ -5268,7 +5276,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5403: \"$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
@@ -5287,7 +5295,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:5414: checking for tgetent in -lcurses" >&5
+echo "configure:5422: checking for tgetent in -lcurses" >&5
ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5295,7 +5303,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5422 "configure"
+#line 5430 "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
@@ -5306,7 +5314,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5441: \"$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
@@ -5325,7 +5333,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
-echo "configure:5452: checking for tgetent in -lterminfo" >&5
+echo "configure:5460: checking for tgetent in -lterminfo" >&5
ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5333,7 +5341,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lterminfo $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5460 "configure"
+#line 5468 "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
@@ -5344,7 +5352,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5479: \"$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
@@ -5396,7 +5404,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:6607: checking for X" >&5
+echo "configure:6615: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -5458,12 +5466,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 6669 "configure"
+#line 6677 "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:6674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6682: \"$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*
@@ -5532,14 +5540,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 6743 "configure"
+#line 6751 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:6750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6758: \"$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.
@@ -5781,6 +5789,13 @@ s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
fi
+SUBDIRS="doc testsuite nlm"
+if test "${enable_multi_ice}" = "yes"; then
+ SUBDIRS="${SUBDIRS} multi-ice"
+fi
+
+
+
# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
# (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
# corresponding links. But we have to remove the xm.h files and tm.h
@@ -5812,12 +5827,12 @@ fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:7094: checking for Cygwin environment" >&5
+echo "configure:7109: 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 7099 "configure"
+#line 7114 "configure"
#include "confdefs.h"
int main() {
@@ -5828,7 +5843,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:7110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -5845,19 +5860,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:7127: checking for mingw32 environment" >&5
+echo "configure:7142: 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 7132 "configure"
+#line 7147 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:7139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -5876,7 +5891,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:7158: checking for executable suffix" >&5
+echo "configure:7173: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5886,7 +5901,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:7168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:7183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -6176,6 +6191,7 @@ s%@host_makefile_frag@%%g
/@target_makefile_frag@/r $target_makefile_frag
s%@target_makefile_frag@%%g
s%@frags@%$frags%g
+s%@SUBDIRS@%$SUBDIRS%g
s%@LN_S@%$LN_S%g
s%@EXEEXT@%$EXEEXT%g
s%@subdirs@%$subdirs%g
diff --git a/gdb/configure.in b/gdb/configure.in
index 82cd0d0..ba70e75 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -44,6 +44,19 @@ CONFIG_SRCS=
configdirs="doc testsuite"
+AC_ARG_ENABLE(multi-ice,
+[ --enable-multi-ice Build the multi-ice-gdb-server],
+[case "${enableval}" in
+ yes ) enable_multi_ice="yes" ;;
+ no) enable_multi_ice="no" ;;
+ *) AC_MSG_ERROR(Bad value for --enable-multi-ice: ${enableval}) ;;
+ esac
+])
+
+if test "${enable_multi_ice}" = "yes"; then
+ configdirs="${configdirs} multi-ice"
+fi
+
dnl
changequote(,)dnl
@@ -75,7 +88,8 @@ AC_HEADER_STAT
AC_C_CONST
-AC_CHECK_FUNCS(setpgid sbrk sigaction isascii bzero bcopy btowc poll)
+AC_CHECK_FUNCS(setpgid sbrk sigaction isascii bzero bcopy btowc poll \
+ socketpair)
AC_FUNC_ALLOCA
BFD_NEED_DECLARATION(malloc)
@@ -604,6 +618,13 @@ s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
fi
changequote([,])
+SUBDIRS="doc testsuite nlm"
+if test "${enable_multi_ice}" = "yes"; then
+ SUBDIRS="${SUBDIRS} multi-ice"
+fi
+
+AC_SUBST(SUBDIRS)
+
# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
# (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
# corresponding links. But we have to remove the xm.h files and tm.h
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index 60a02e3..af1255c 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -160,6 +160,7 @@ m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
m88*-motorola-*) gdb_target=delta88 ;;
m88*-*-*) gdb_target=m88k ;;
+mcore*-*-*) gdb_target=mcore ;;
mips64*-big-*) gdb_target=bigmips64 ;;
mips*-big-*) gdb_target=bigmips ;;
mips*-dec-mach3*) gdb_target=mach3 ;;
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 258daed..73eb3f4 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -286,12 +286,10 @@ static void
dbx_psymtab_to_symtab_1 PARAMS ((struct partial_symtab *));
static void
-read_dbx_dynamic_symtab PARAMS ((struct section_offsets *,
- struct objfile * objfile));
+read_dbx_dynamic_symtab PARAMS ((struct objfile * objfile));
static void
-read_dbx_symtab PARAMS ((struct section_offsets *, struct objfile *,
- CORE_ADDR, int));
+read_dbx_symtab PARAMS ((struct objfile *, CORE_ADDR, int));
static void
free_bincl_list PARAMS ((struct objfile *));
@@ -318,7 +316,7 @@ static void
dbx_new_init PARAMS ((struct objfile *));
static void
-dbx_symfile_read PARAMS ((struct objfile *, struct section_offsets *, int));
+dbx_symfile_read PARAMS ((struct objfile *, int));
static void
dbx_symfile_finish PARAMS ((struct objfile *));
@@ -579,9 +577,8 @@ record_minimal_symbol (name, address, type, objfile)
table (as opposed to a shared lib or dynamically loaded file). */
static void
-dbx_symfile_read (objfile, section_offsets, mainline)
+dbx_symfile_read (objfile, mainline)
struct objfile *objfile;
- struct section_offsets *section_offsets;
int mainline; /* FIXME comments above */
{
bfd *sym_bfd;
@@ -631,13 +628,13 @@ dbx_symfile_read (objfile, section_offsets, mainline)
/* Now that the symbol table data of the executable file are all in core,
process them and define symbols accordingly. */
- read_dbx_symtab (section_offsets, objfile,
+ read_dbx_symtab (objfile,
DBX_TEXT_ADDR (objfile),
DBX_TEXT_SIZE (objfile));
/* Add the dynamic symbols. */
- read_dbx_dynamic_symtab (section_offsets, objfile);
+ read_dbx_dynamic_symtab (objfile);
/* Install any minimal symbols that have been collected as the current
minimal symbols for this objfile. */
@@ -1103,8 +1100,7 @@ free_bincl_list (objfile)
add them to the minimal symbol table. */
static void
-read_dbx_dynamic_symtab (section_offsets, objfile)
- struct section_offsets *section_offsets;
+read_dbx_dynamic_symtab (objfile)
struct objfile *objfile;
{
bfd *abfd = objfile->obfd;
@@ -1163,17 +1159,17 @@ read_dbx_dynamic_symtab (section_offsets, objfile)
if (bfd_get_section_flags (abfd, sec) & SEC_CODE)
{
- sym_value += ANOFFSET (section_offsets, SECT_OFF_TEXT);
+ sym_value += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
type = N_TEXT;
}
else if (bfd_get_section_flags (abfd, sec) & SEC_DATA)
{
- sym_value += ANOFFSET (section_offsets, SECT_OFF_DATA);
+ sym_value += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA);
type = N_DATA;
}
else if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC)
{
- sym_value += ANOFFSET (section_offsets, SECT_OFF_BSS);
+ sym_value += ANOFFSET (objfile->section_offsets, SECT_OFF_BSS);
type = N_BSS;
}
else
@@ -1214,7 +1210,7 @@ read_dbx_dynamic_symtab (section_offsets, objfile)
{
arelent *rel = *relptr;
CORE_ADDR address =
- rel->address + ANOFFSET (section_offsets, SECT_OFF_DATA);
+ rel->address + ANOFFSET (objfile->section_offsets, SECT_OFF_DATA);
switch (bfd_get_arch (abfd))
{
@@ -1251,8 +1247,7 @@ read_dbx_dynamic_symtab (section_offsets, objfile)
of the file (a set of zeros if the mainline program). */
static void
-read_dbx_symtab (section_offsets, objfile, text_addr, text_size)
- struct section_offsets *section_offsets;
+read_dbx_symtab (objfile, text_addr, text_size)
struct objfile *objfile;
CORE_ADDR text_addr;
int text_size;
@@ -1307,7 +1302,7 @@ read_dbx_symtab (section_offsets, objfile, text_addr, text_size)
last_source_file = NULL;
- lowest_text_address = (CORE_ADDR) - 1;
+ lowest_text_address = (CORE_ADDR) -1;
symfile_bfd = objfile->obfd; /* For next_text_symbol */
abfd = objfile->obfd;
@@ -1389,8 +1384,8 @@ read_dbx_symtab (section_offsets, objfile, text_addr, text_size)
{
/* Don't set pst->texthigh lower than it already is. */
CORE_ADDR text_end =
- (lowest_text_address == (CORE_ADDR) - 1
- ? (text_addr + section_offsets->offsets[SECT_OFF_TEXT])
+ (lowest_text_address == (CORE_ADDR) -1
+ ? (text_addr + objfile->section_offsets->offsets[SECT_OFF_TEXT])
: lowest_text_address)
+ text_size;
@@ -2525,11 +2520,10 @@ process_one_symbol (type, desc, valu, name, section_offsets, objfile)
adjusted for coff details. */
void
-coffstab_build_psymtabs (objfile, section_offsets, mainline,
+coffstab_build_psymtabs (objfile, mainline,
textaddr, textsize, stabsects,
stabstroffset, stabstrsize)
struct objfile *objfile;
- struct section_offsets *section_offsets;
int mainline;
CORE_ADDR textaddr;
unsigned int textsize;
@@ -2603,7 +2597,7 @@ coffstab_build_psymtabs (objfile, section_offsets, mainline,
symbuf_read = 0;
}
- dbx_symfile_read (objfile, section_offsets, 0);
+ dbx_symfile_read (objfile, 0);
}
/* Scan and build partial symbols for an ELF symbol file.
@@ -2627,11 +2621,10 @@ coffstab_build_psymtabs (objfile, section_offsets, mainline,
adjusted for elf details. */
void
-elfstab_build_psymtabs (objfile, section_offsets, mainline,
+elfstab_build_psymtabs (objfile, mainline,
staboffset, stabsize,
stabstroffset, stabstrsize)
struct objfile *objfile;
- struct section_offsets *section_offsets;
int mainline;
file_ptr staboffset;
unsigned int stabsize;
@@ -2684,7 +2677,7 @@ elfstab_build_psymtabs (objfile, section_offsets, mainline,
/* In an elf file, we've already installed the minimal symbols that came
from the elf (non-stab) symbol table, so always act like an
incremental load here. */
- dbx_symfile_read (objfile, section_offsets, 0);
+ dbx_symfile_read (objfile, 0);
}
/* Scan and build partial symbols for a file with special sections for stabs
@@ -2705,10 +2698,9 @@ elfstab_build_psymtabs (objfile, section_offsets, mainline,
This routine is mostly copied from dbx_symfile_init and dbx_symfile_read. */
void
-stabsect_build_psymtabs (objfile, section_offsets, mainline, stab_name,
+stabsect_build_psymtabs (objfile, mainline, stab_name,
stabstr_name, text_name)
struct objfile *objfile;
- struct section_offsets *section_offsets;
int mainline;
char *stab_name;
char *stabstr_name;
@@ -2773,7 +2765,7 @@ stabsect_build_psymtabs (objfile, section_offsets, mainline, stab_name,
/* Now, do an incremental load */
processing_acc_compilation = 1;
- dbx_symfile_read (objfile, section_offsets, 0);
+ dbx_symfile_read (objfile, 0);
}
static struct sym_fns aout_sym_fns =
@@ -2783,8 +2775,7 @@ static struct sym_fns aout_sym_fns =
dbx_symfile_init, /* sym_init: read initial info, setup for sym_read() */
dbx_symfile_read, /* sym_read: read a symbol file into symtab */
dbx_symfile_finish, /* sym_finish: finished with file, cleanup */
- default_symfile_offsets,
- /* sym_offsets: parse user's offsets to internal form */
+ default_symfile_offsets, /* sym_offsets: parse user's offsets to internal form */
NULL /* next: pointer to next struct sym_fns */
};
diff --git a/gdb/defs.h b/gdb/defs.h
index 0bfb612..c596ed9 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -48,11 +48,7 @@
#include "ansidecl.h"
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
+#include <stdarg.h> /* for va_list */
#include "libiberty.h"
@@ -226,7 +222,7 @@ struct cleanup
#endif
#ifndef ATTR_FORMAT
-# if defined(__GNUC__) && __GNUC__ >= 2 && __GNUC_MINOR__ >= 4 && defined (__ANSI_PROTOTYPES)
+# if defined(__GNUC__) && __GNUC__ >= 2 && __GNUC_MINOR__ >= 4
# define ATTR_FORMAT(type, x, y) __attribute__ ((format(type, x, y)))
# else
# define ATTR_FORMAT(type, x, y) /* nothing */
@@ -823,7 +819,7 @@ extern NORETURN void error PARAMS((const char *, ...)) ATTR_NORETURN;
extern void error_begin PARAMS ((void));
-extern NORETURN void fatal PARAMS((char *, ...)) ATTR_NORETURN;
+extern NORETURN void internal_error (char *, ...) ATTR_NORETURN;
extern NORETURN void nomem PARAMS ((long)) ATTR_NORETURN;
@@ -1159,6 +1155,7 @@ extern void (*readline_begin_hook) PARAMS ((char *, ...));
extern char * (*readline_hook) PARAMS ((char *));
extern void (*readline_end_hook) PARAMS ((void));
extern void (*register_changed_hook) PARAMS ((int regno));
+extern void (*disassembly_flavor_hook) PARAMS((char *args, int from_tty));
extern void (*memory_changed_hook) PARAMS ((CORE_ADDR addr, int len));
extern void (*context_hook) PARAMS ((int));
extern int (*target_wait_hook) PARAMS ((int pid,
@@ -1167,6 +1164,8 @@ extern int (*target_wait_hook) PARAMS ((int pid,
extern void (*call_command_hook) PARAMS ((struct cmd_list_element *c,
char *cmd, int from_tty));
+extern void (*set_hook) PARAMS ((struct cmd_list_element *c));
+
extern NORETURN void (*error_hook) PARAMS ((void)) ATTR_NORETURN;
extern void (*error_begin_hook) PARAMS ((void));
@@ -1229,4 +1228,15 @@ extern int use_windows;
#endif
#endif
+/* Define well known filenos if the system does not define them. */
+#ifndef STDIN_FILENO
+#define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+#define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+#define STDERR_FILENO 2
+#endif
+
#endif /* #ifndef DEFS_H */
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index a6507bd..2d0b2ee 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,16 @@
+1999-08-06 Tom Tromey <tromey@cygnus.com>
+
+ * gdb.texinfo (KOD): New node.
+
+Fri Aug 6 17:05:48 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.texi (Rcmd): Fix minor formatting typos.
+
+Thu Aug 5 17:57:41 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.texi (protocol qRcmd): Allow ``OK'' and ``O...'' response
+ packets.
+
1999-07-14 Jim Blandy <jimb@zwingli.cygnus.com>
* gdbint.texinfo (PREPARE_TO_PROCEED, ADDR_BITS_REMOVE): Doc
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index fec3571..92e4a21 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -8325,6 +8325,7 @@ targets}).
* Target Commands:: Commands for managing targets
* Byte Order:: Choosing target byte order
* Remote:: Remote debugging
+* KOD:: Kernel Object Display
@end menu
@@ -8703,7 +8704,7 @@ Note that these commands merely adjust interpretation of symbolic
data on the host, and that they have absolutely no effect on the
target system.
-@node Remote, , Byte Order, Targets
+@node Remote, KOD, Byte Order, Targets
@section Remote debugging
@cindex remote debugging
@@ -8742,6 +8743,44 @@ configuration of @value{GDBN}; use @code{help target} to list them.
@include remote.texi
+@node KOD, , Remote, Targets
+@section Kernel Object Display
+@cindex kernel object display
+@cindex kernel object
+@cindex KOD
+
+Some targets support kernel object display. Using this facility,
+@value{GDBN} communicates specially with the underlying operating system
+and can display information about operating system-level objects such as
+mutexes and other synchronization objects. Exactly which objects can be
+displayed is determined on a per-OS basis.
+
+Use the @code{set os} command to set the operating system. This tells
+@value{GDBN} which kernel object display module to initialize:
+
+@example
+(gdb) set os cisco
+@end example
+
+If @code{set os} succeeds, @value{GDBN} will display some information
+about the operating system, and will create a new @code{info} command
+which can be used to query the target. The @code{info} command is named
+after the operating system:
+
+@example
+(gdb) info cisco
+List of Cisco Kernel Objects
+Object Description
+any Any and all objects
+@end example
+
+Further subcommands can be used to query about particular objects known
+by the kernel.
+
+There is currently no way to determine whether a given operating system
+is supported other than to try it.
+
+
@node Controlling GDB
@chapter Controlling @value{GDBN}
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index a94fcc4..1dfd133 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -361,7 +361,7 @@ command), and it can also read more symbols via the ``add-file'' and
Symbol files are initially opened by code in @file{symfile.c} using the
BFD library. BFD identifies the type of the file by examining its
-header. @code{symfile_init} then uses this identification to locate a
+header. @code{find_sym_fns} then uses this identification to locate a
set of symbol-reading functions.
Symbol reading modules identify themselves to GDB by calling
diff --git a/gdb/doc/remote.texi b/gdb/doc/remote.texi
index 7b3c057..d8636da 100644
--- a/gdb/doc/remote.texi
+++ b/gdb/doc/remote.texi
@@ -770,9 +770,13 @@ See @code{remote.c:remote_unpack_thread_info_response()}.
execution. @emph{Implementors should note that providing access to a
stubs's interpreter may have security implications}.
@item
-@tab reply @var{OUTPUT}
+@tab reply @var{OUTPUT} or @code{OK}
@tab
-The @var{OUTPUT} (hex encoded). Must be non-empty.
+The @var{OUTPUT} is the hex encoded output from the command. @code{OK}
+is returned when the @var{OUTPUT} would have been empty. The target may
+also respond with a number of intermediate @code{O}@var{OUTPUT} console
+output packets.
+
@item
@tab reply @samp{}
@tab
diff --git a/gdb/dsrec.c b/gdb/dsrec.c
index 9fae341..4cfe835 100644
--- a/gdb/dsrec.c
+++ b/gdb/dsrec.c
@@ -257,8 +257,8 @@ make_srec (srec, targ_addr, abfd, sect, sectoff, maxrecsize, flags)
else if (tmp & SREC_4_BYTE_ADDR)
addr_size = 4;
else
- fatal ("make_srec: Bad address (0x%x), or bad flags (0x%x).",
- targ_addr, flags);
+ internal_error ("make_srec: Bad address (0x%x), or bad flags (0x%x).",
+ targ_addr, flags);
/* Now that we know the address size, we can figure out how much
data this record can hold. */
diff --git a/gdb/dstread.c b/gdb/dstread.c
index 1561586..8ed415b 100644
--- a/gdb/dstread.c
+++ b/gdb/dstread.c
@@ -68,7 +68,7 @@ static void
dst_new_init PARAMS ((struct objfile *));
static void
-dst_symfile_read PARAMS ((struct objfile *, struct section_offsets *, int));
+dst_symfile_read PARAMS ((struct objfile *, int));
static void
dst_symfile_finish PARAMS ((struct objfile *));
@@ -263,9 +263,8 @@ static bfd *symfile_bfd;
/* ARGSUSED */
static void
-dst_symfile_read (objfile, section_offsets, mainline)
+dst_symfile_read (objfile, mainline)
struct objfile *objfile;
- struct section_offsets *section_offsets;
int mainline;
{
bfd *abfd = objfile->obfd;
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index b27ac49..6a617b3 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -1003,7 +1003,7 @@ dwarf2_build_psymtabs_hard (objfile, section_offsets, mainline)
/* Allocate a new partial symbol table structure */
pst = start_psymtab_common (objfile, section_offsets,
- comp_unit_die.name ? comp_unit_die.name : "",
+ comp_unit_die.name ? comp_unit_die.name : "",
comp_unit_die.lowpc,
objfile->global_psymbols.next,
objfile->static_psymbols.next);
diff --git a/gdb/elfread.c b/gdb/elfread.c
index f0ad2be..69e8e77 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -71,7 +71,7 @@ static void
elf_new_init PARAMS ((struct objfile *));
static void
-elf_symfile_read PARAMS ((struct objfile *, struct section_offsets *, int));
+elf_symfile_read PARAMS ((struct objfile *, int));
static void
elf_symfile_finish PARAMS ((struct objfile *));
@@ -584,9 +584,8 @@ elf_symtab_read (abfd, addr, objfile, dynamic)
capability even for files compiled without -g. */
static void
-elf_symfile_read (objfile, section_offsets, mainline)
+elf_symfile_read (objfile, mainline)
struct objfile *objfile;
- struct section_offsets *section_offsets;
int mainline;
{
bfd *abfd = objfile->obfd;
@@ -610,7 +609,7 @@ elf_symfile_read (objfile, section_offsets, mainline)
which can later be used by elfstab_offset_sections. */
/* FIXME, should take a section_offsets param, not just an offset. */
- offset = ANOFFSET (section_offsets, 0);
+ offset = ANOFFSET (objfile->section_offsets, 0);
elf_symtab_read (abfd, offset, objfile, 0);
/* Add the dynamic symbols. */
@@ -653,7 +652,7 @@ elf_symfile_read (objfile, section_offsets, mainline)
swap = get_elf_backend_data (abfd)->elf_backend_ecoff_debug_swap;
if (swap)
elfmdebug_build_psymtabs (objfile, swap, ei.mdebugsect,
- section_offsets);
+ objfile->section_offsets);
}
if (ei.stabsect)
{
@@ -666,7 +665,6 @@ elf_symfile_read (objfile, section_offsets, mainline)
/* FIXME should probably warn about a stab section without a stabstr. */
if (str_sect)
elfstab_build_psymtabs (objfile,
- section_offsets,
mainline,
ei.stabsect->filepos,
bfd_section_size (abfd, ei.stabsect),
@@ -676,13 +674,13 @@ elf_symfile_read (objfile, section_offsets, mainline)
if (dwarf2_has_info (abfd))
{
/* DWARF 2 sections */
- dwarf2_build_psymtabs (objfile, section_offsets, mainline);
+ dwarf2_build_psymtabs (objfile, objfile->section_offsets, mainline);
}
else if (ei.dboffset && ei.lnoffset)
{
/* DWARF sections */
dwarf_build_psymtabs (objfile,
- section_offsets, mainline,
+ objfile->section_offsets, mainline,
ei.dboffset, ei.dbsize,
ei.lnoffset, ei.lnsize);
}
@@ -818,10 +816,7 @@ elfstab_offset_sections (objfile, pst)
/* Found it! Allocate a new psymtab struct, and fill it in. */
maybe->found++;
pst->section_offsets = (struct section_offsets *)
- obstack_alloc (&objfile->psymbol_obstack,
- sizeof (struct section_offsets) +
- sizeof (pst->section_offsets->offsets) * (SECT_OFF_MAX - 1));
-
+ obstack_alloc (&objfile->psymbol_obstack, SIZEOF_SECTION_OFFSETS);
for (i = 0; i < SECT_OFF_MAX; i++)
ANOFFSET (pst->section_offsets, i) = maybe->sections[i];
return;
@@ -841,8 +836,7 @@ static struct sym_fns elf_sym_fns =
elf_symfile_init, /* sym_init: read initial info, setup for sym_read() */
elf_symfile_read, /* sym_read: read a symbol file into symtab */
elf_symfile_finish, /* sym_finish: finished with file, cleanup */
- default_symfile_offsets,
- /* sym_offsets: Translate ext. to int. relocation */
+ default_symfile_offsets, /* sym_offsets: Translate ext. to int. relocation */
NULL /* next: pointer to next struct sym_fns */
};
diff --git a/gdb/f-lang.c b/gdb/f-lang.c
index 6e67fbc..1a7bfa3 100644
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -920,7 +920,7 @@ get_bf_for_fcn (the_function)
item at the head of the queue is the one you want) */
if (saved_bf_list == NULL)
- fatal ("cannot get .bf node off empty list");
+ internal_error ("cannot get .bf node off empty list");
if (current_head_bf_list != NULL)
if (current_head_bf_list->symnum_fcn == the_function)
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 489761f..df8475f 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -606,9 +606,11 @@ value_of_register (regnum)
memcpy (VALUE_CONTENTS_RAW (reg_val), raw_buffer,
REGISTER_RAW_SIZE (regnum));
else
- fatal ("Register \"%s\" (%d) has conflicting raw (%d) and virtual (%d) size",
- REGISTER_NAME (regnum), regnum,
- REGISTER_RAW_SIZE (regnum), REGISTER_VIRTUAL_SIZE (regnum));
+ internal_error ("Register \"%s\" (%d) has conflicting raw (%d) and virtual (%d) size",
+ REGISTER_NAME (regnum),
+ regnum,
+ REGISTER_RAW_SIZE (regnum),
+ REGISTER_VIRTUAL_SIZE (regnum));
VALUE_LVAL (reg_val) = lval;
VALUE_ADDRESS (reg_val) = addr;
VALUE_REGNO (reg_val) = regnum;
@@ -1025,7 +1027,7 @@ generic_target_read_pc (pid)
return pc_val;
}
#endif
- fatal ("generic_target_read_pc");
+ internal_error ("generic_target_read_pc");
return 0;
}
@@ -1073,7 +1075,7 @@ generic_target_write_pc (pc, pid)
#endif
#endif
#else
- fatal ("generic_target_write_pc");
+ internal_error ("generic_target_write_pc");
#endif
}
@@ -1113,7 +1115,7 @@ generic_target_read_sp ()
if (SP_REGNUM >= 0)
return read_register (SP_REGNUM);
#endif
- fatal ("generic_target_read_sp");
+ internal_error ("generic_target_read_sp");
}
CORE_ADDR
@@ -1137,7 +1139,7 @@ generic_target_write_sp (val)
return;
}
#endif
- fatal ("generic_target_write_sp");
+ internal_error ("generic_target_write_sp");
}
void
@@ -1158,7 +1160,7 @@ generic_target_read_fp ()
if (FP_REGNUM >= 0)
return read_register (FP_REGNUM);
#endif
- fatal ("generic_target_read_fp");
+ internal_error ("generic_target_read_fp");
}
CORE_ADDR
@@ -1182,7 +1184,7 @@ generic_target_write_fp (val)
return;
}
#endif
- fatal ("generic_target_write_fp");
+ internal_error ("generic_target_write_fp");
}
void
@@ -1609,7 +1611,7 @@ value_from_register (type, regnum, frame)
VALUE_ADDRESS (v) = first_addr;
}
else
- fatal ("value_from_register: Value not stored anywhere!");
+ internal_error ("value_from_register: Value not stored anywhere!");
VALUE_OPTIMIZED_OUT (v) = optim;
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 65d76f8..b102c69 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -1,22 +1,24 @@
-/* *INDENT-OFF* */ /* typedef (f)();'' confuses indent */
/* Dynamic architecture support for GDB, the GNU debugger.
Copyright 1998-1999, Free Software Foundation, Inc.
-This file is part of GDB.
+ 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 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.
-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. */
-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. */
+/* *INDENT-OFF* */ /* typedef (f)();'' confuses indent */
#include "defs.h"
@@ -336,235 +338,235 @@ verify_gdbarch (gdbarch)
return;
/* fundamental */
if (gdbarch->byte_order == 0)
- fatal ("verify_gdbarch: byte-order unset");
+ internal_error ("verify_gdbarch: byte-order unset");
if (gdbarch->bfd_arch_info == NULL)
- fatal ("verify_gdbarch: bfd_arch_info unset");
+ internal_error ("verify_gdbarch: bfd_arch_info unset");
/* Check those that need to be defined for the given multi-arch level. */
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->ptr_bit == 0))
- fatal ("gdbarch: verify_gdbarch: ptr_bit invalid");
+ internal_error ("gdbarch: verify_gdbarch: ptr_bit invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->short_bit == 0))
- fatal ("gdbarch: verify_gdbarch: short_bit invalid");
+ internal_error ("gdbarch: verify_gdbarch: short_bit invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->int_bit == 0))
- fatal ("gdbarch: verify_gdbarch: int_bit invalid");
+ internal_error ("gdbarch: verify_gdbarch: int_bit invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->long_bit == 0))
- fatal ("gdbarch: verify_gdbarch: long_bit invalid");
+ internal_error ("gdbarch: verify_gdbarch: long_bit invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->long_long_bit == 0))
- fatal ("gdbarch: verify_gdbarch: long_long_bit invalid");
+ internal_error ("gdbarch: verify_gdbarch: long_long_bit invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->float_bit == 0))
- fatal ("gdbarch: verify_gdbarch: float_bit invalid");
+ internal_error ("gdbarch: verify_gdbarch: float_bit invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->double_bit == 0))
- fatal ("gdbarch: verify_gdbarch: double_bit invalid");
+ internal_error ("gdbarch: verify_gdbarch: double_bit invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->long_double_bit == 0))
- fatal ("gdbarch: verify_gdbarch: long_double_bit invalid");
+ internal_error ("gdbarch: verify_gdbarch: long_double_bit invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->read_pc == 0))
- fatal ("gdbarch: verify_gdbarch: read_pc invalid");
+ internal_error ("gdbarch: verify_gdbarch: read_pc invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->write_pc == 0))
- fatal ("gdbarch: verify_gdbarch: write_pc invalid");
+ internal_error ("gdbarch: verify_gdbarch: write_pc invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->read_fp == 0))
- fatal ("gdbarch: verify_gdbarch: read_fp invalid");
+ internal_error ("gdbarch: verify_gdbarch: read_fp invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->write_fp == 0))
- fatal ("gdbarch: verify_gdbarch: write_fp invalid");
+ internal_error ("gdbarch: verify_gdbarch: write_fp invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->read_sp == 0))
- fatal ("gdbarch: verify_gdbarch: read_sp invalid");
+ internal_error ("gdbarch: verify_gdbarch: read_sp invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->write_sp == 0))
- fatal ("gdbarch: verify_gdbarch: write_sp invalid");
+ internal_error ("gdbarch: verify_gdbarch: write_sp invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->num_regs == -1))
- fatal ("gdbarch: verify_gdbarch: num_regs invalid");
+ internal_error ("gdbarch: verify_gdbarch: num_regs invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->sp_regnum == -1))
- fatal ("gdbarch: verify_gdbarch: sp_regnum invalid");
+ internal_error ("gdbarch: verify_gdbarch: sp_regnum invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->fp_regnum == -1))
- fatal ("gdbarch: verify_gdbarch: fp_regnum invalid");
+ internal_error ("gdbarch: verify_gdbarch: fp_regnum invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->pc_regnum == -1))
- fatal ("gdbarch: verify_gdbarch: pc_regnum invalid");
+ internal_error ("gdbarch: verify_gdbarch: pc_regnum invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->register_name == 0))
- fatal ("gdbarch: verify_gdbarch: register_name invalid");
+ internal_error ("gdbarch: verify_gdbarch: register_name invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->register_size == -1))
- fatal ("gdbarch: verify_gdbarch: register_size invalid");
+ internal_error ("gdbarch: verify_gdbarch: register_size invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->register_bytes == -1))
- fatal ("gdbarch: verify_gdbarch: register_bytes invalid");
+ internal_error ("gdbarch: verify_gdbarch: register_bytes invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->register_byte == 0))
- fatal ("gdbarch: verify_gdbarch: register_byte invalid");
+ internal_error ("gdbarch: verify_gdbarch: register_byte invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->register_raw_size == 0))
- fatal ("gdbarch: verify_gdbarch: register_raw_size invalid");
+ internal_error ("gdbarch: verify_gdbarch: register_raw_size invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->max_register_raw_size == -1))
- fatal ("gdbarch: verify_gdbarch: max_register_raw_size invalid");
+ internal_error ("gdbarch: verify_gdbarch: max_register_raw_size invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->register_virtual_size == 0))
- fatal ("gdbarch: verify_gdbarch: register_virtual_size invalid");
+ internal_error ("gdbarch: verify_gdbarch: register_virtual_size invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->max_register_virtual_size == -1))
- fatal ("gdbarch: verify_gdbarch: max_register_virtual_size invalid");
+ internal_error ("gdbarch: verify_gdbarch: max_register_virtual_size invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->register_virtual_type == 0))
- fatal ("gdbarch: verify_gdbarch: register_virtual_type invalid");
+ internal_error ("gdbarch: verify_gdbarch: register_virtual_type invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->use_generic_dummy_frames == -1))
- fatal ("gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
+ internal_error ("gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->call_dummy_location == 0))
- fatal ("gdbarch: verify_gdbarch: call_dummy_location invalid");
+ internal_error ("gdbarch: verify_gdbarch: call_dummy_location invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
- fatal ("gdbarch: verify_gdbarch: call_dummy_address invalid");
+ internal_error ("gdbarch: verify_gdbarch: call_dummy_address invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->call_dummy_start_offset == -1))
- fatal ("gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
+ internal_error ("gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->call_dummy_breakpoint_offset == -1))
- fatal ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
+ internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->call_dummy_breakpoint_offset_p == -1))
- fatal ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
+ internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->call_dummy_length == -1))
- fatal ("gdbarch: verify_gdbarch: call_dummy_length invalid");
+ internal_error ("gdbarch: verify_gdbarch: call_dummy_length invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->pc_in_call_dummy == 0))
- fatal ("gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
+ internal_error ("gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->call_dummy_p == -1))
- fatal ("gdbarch: verify_gdbarch: call_dummy_p invalid");
+ internal_error ("gdbarch: verify_gdbarch: call_dummy_p invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->call_dummy_stack_adjust_p == -1))
- fatal ("gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
+ internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
- fatal ("gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
+ internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->fix_call_dummy == 0))
- fatal ("gdbarch: verify_gdbarch: fix_call_dummy invalid");
+ internal_error ("gdbarch: verify_gdbarch: fix_call_dummy invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->get_saved_register == 0))
- fatal ("gdbarch: verify_gdbarch: get_saved_register invalid");
+ internal_error ("gdbarch: verify_gdbarch: get_saved_register invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->register_convertible == 0))
- fatal ("gdbarch: verify_gdbarch: register_convertible invalid");
+ internal_error ("gdbarch: verify_gdbarch: register_convertible invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->register_convert_to_virtual == 0))
- fatal ("gdbarch: verify_gdbarch: register_convert_to_virtual invalid");
+ internal_error ("gdbarch: verify_gdbarch: register_convert_to_virtual invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->register_convert_to_raw == 0))
- fatal ("gdbarch: verify_gdbarch: register_convert_to_raw invalid");
+ internal_error ("gdbarch: verify_gdbarch: register_convert_to_raw invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->extract_return_value == 0))
- fatal ("gdbarch: verify_gdbarch: extract_return_value invalid");
+ internal_error ("gdbarch: verify_gdbarch: extract_return_value invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->push_arguments == 0))
- fatal ("gdbarch: verify_gdbarch: push_arguments invalid");
+ internal_error ("gdbarch: verify_gdbarch: push_arguments invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->push_dummy_frame == 0))
- fatal ("gdbarch: verify_gdbarch: push_dummy_frame invalid");
+ internal_error ("gdbarch: verify_gdbarch: push_dummy_frame invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->push_return_address == 0))
- fatal ("gdbarch: verify_gdbarch: push_return_address invalid");
+ internal_error ("gdbarch: verify_gdbarch: push_return_address invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->pop_frame == 0))
- fatal ("gdbarch: verify_gdbarch: pop_frame invalid");
+ internal_error ("gdbarch: verify_gdbarch: pop_frame invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->d10v_make_daddr == 0))
- fatal ("gdbarch: verify_gdbarch: d10v_make_daddr invalid");
+ internal_error ("gdbarch: verify_gdbarch: d10v_make_daddr invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->d10v_make_iaddr == 0))
- fatal ("gdbarch: verify_gdbarch: d10v_make_iaddr invalid");
+ internal_error ("gdbarch: verify_gdbarch: d10v_make_iaddr invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->d10v_daddr_p == 0))
- fatal ("gdbarch: verify_gdbarch: d10v_daddr_p invalid");
+ internal_error ("gdbarch: verify_gdbarch: d10v_daddr_p invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->d10v_iaddr_p == 0))
- fatal ("gdbarch: verify_gdbarch: d10v_iaddr_p invalid");
+ internal_error ("gdbarch: verify_gdbarch: d10v_iaddr_p invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->d10v_convert_daddr_to_raw == 0))
- fatal ("gdbarch: verify_gdbarch: d10v_convert_daddr_to_raw invalid");
+ internal_error ("gdbarch: verify_gdbarch: d10v_convert_daddr_to_raw invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->d10v_convert_iaddr_to_raw == 0))
- fatal ("gdbarch: verify_gdbarch: d10v_convert_iaddr_to_raw invalid");
+ internal_error ("gdbarch: verify_gdbarch: d10v_convert_iaddr_to_raw invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->store_struct_return == 0))
- fatal ("gdbarch: verify_gdbarch: store_struct_return invalid");
+ internal_error ("gdbarch: verify_gdbarch: store_struct_return invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->store_return_value == 0))
- fatal ("gdbarch: verify_gdbarch: store_return_value invalid");
+ internal_error ("gdbarch: verify_gdbarch: store_return_value invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->extract_struct_value_address == 0))
- fatal ("gdbarch: verify_gdbarch: extract_struct_value_address invalid");
+ internal_error ("gdbarch: verify_gdbarch: extract_struct_value_address invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->use_struct_convention == 0))
- fatal ("gdbarch: verify_gdbarch: use_struct_convention invalid");
+ internal_error ("gdbarch: verify_gdbarch: use_struct_convention invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->frame_init_saved_regs == 0))
- fatal ("gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
+ internal_error ("gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->init_extra_frame_info == 0))
- fatal ("gdbarch: verify_gdbarch: init_extra_frame_info invalid");
+ internal_error ("gdbarch: verify_gdbarch: init_extra_frame_info invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->skip_prologue == 0))
- fatal ("gdbarch: verify_gdbarch: skip_prologue invalid");
+ internal_error ("gdbarch: verify_gdbarch: skip_prologue invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->inner_than == 0))
- fatal ("gdbarch: verify_gdbarch: inner_than invalid");
+ internal_error ("gdbarch: verify_gdbarch: inner_than invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->breakpoint_from_pc == 0))
- fatal ("gdbarch: verify_gdbarch: breakpoint_from_pc invalid");
+ internal_error ("gdbarch: verify_gdbarch: breakpoint_from_pc invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->decr_pc_after_break == -1))
- fatal ("gdbarch: verify_gdbarch: decr_pc_after_break invalid");
+ internal_error ("gdbarch: verify_gdbarch: decr_pc_after_break invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->function_start_offset == -1))
- fatal ("gdbarch: verify_gdbarch: function_start_offset invalid");
+ internal_error ("gdbarch: verify_gdbarch: function_start_offset invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->remote_translate_xfer_address == 0))
- fatal ("gdbarch: verify_gdbarch: remote_translate_xfer_address invalid");
+ internal_error ("gdbarch: verify_gdbarch: remote_translate_xfer_address invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->frame_args_skip == -1))
- fatal ("gdbarch: verify_gdbarch: frame_args_skip invalid");
+ internal_error ("gdbarch: verify_gdbarch: frame_args_skip invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->frameless_function_invocation == 0))
- fatal ("gdbarch: verify_gdbarch: frameless_function_invocation invalid");
+ internal_error ("gdbarch: verify_gdbarch: frameless_function_invocation invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->frame_chain == 0))
- fatal ("gdbarch: verify_gdbarch: frame_chain invalid");
+ internal_error ("gdbarch: verify_gdbarch: frame_chain invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->frame_chain_valid == 0))
- fatal ("gdbarch: verify_gdbarch: frame_chain_valid invalid");
+ internal_error ("gdbarch: verify_gdbarch: frame_chain_valid invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->frame_saved_pc == 0))
- fatal ("gdbarch: verify_gdbarch: frame_saved_pc invalid");
+ internal_error ("gdbarch: verify_gdbarch: frame_saved_pc invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->frame_args_address == 0))
- fatal ("gdbarch: verify_gdbarch: frame_args_address invalid");
+ internal_error ("gdbarch: verify_gdbarch: frame_args_address invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->frame_locals_address == 0))
- fatal ("gdbarch: verify_gdbarch: frame_locals_address invalid");
+ internal_error ("gdbarch: verify_gdbarch: frame_locals_address invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->saved_pc_after_call == 0))
- fatal ("gdbarch: verify_gdbarch: saved_pc_after_call invalid");
+ internal_error ("gdbarch: verify_gdbarch: saved_pc_after_call invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->frame_num_args == 0))
- fatal ("gdbarch: verify_gdbarch: frame_num_args invalid");
+ internal_error ("gdbarch: verify_gdbarch: frame_num_args invalid");
}
@@ -908,7 +910,7 @@ gdbarch_ptr_bit (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->ptr_bit == 0)
- fatal ("gdbarch: gdbarch_ptr_bit invalid");
+ internal_error ("gdbarch: gdbarch_ptr_bit invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
@@ -928,7 +930,7 @@ gdbarch_short_bit (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->short_bit == 0)
- fatal ("gdbarch: gdbarch_short_bit invalid");
+ internal_error ("gdbarch: gdbarch_short_bit invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
@@ -948,7 +950,7 @@ gdbarch_int_bit (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->int_bit == 0)
- fatal ("gdbarch: gdbarch_int_bit invalid");
+ internal_error ("gdbarch: gdbarch_int_bit invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
@@ -968,7 +970,7 @@ gdbarch_long_bit (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->long_bit == 0)
- fatal ("gdbarch: gdbarch_long_bit invalid");
+ internal_error ("gdbarch: gdbarch_long_bit invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
@@ -988,7 +990,7 @@ gdbarch_long_long_bit (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->long_long_bit == 0)
- fatal ("gdbarch: gdbarch_long_long_bit invalid");
+ internal_error ("gdbarch: gdbarch_long_long_bit invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
@@ -1008,7 +1010,7 @@ gdbarch_float_bit (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->float_bit == 0)
- fatal ("gdbarch: gdbarch_float_bit invalid");
+ internal_error ("gdbarch: gdbarch_float_bit invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
@@ -1028,7 +1030,7 @@ gdbarch_double_bit (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->double_bit == 0)
- fatal ("gdbarch: gdbarch_double_bit invalid");
+ internal_error ("gdbarch: gdbarch_double_bit invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
@@ -1048,7 +1050,7 @@ gdbarch_long_double_bit (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->long_double_bit == 0)
- fatal ("gdbarch: gdbarch_long_double_bit invalid");
+ internal_error ("gdbarch: gdbarch_long_double_bit invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
@@ -1067,7 +1069,7 @@ CORE_ADDR
gdbarch_read_pc (struct gdbarch *gdbarch, int pid)
{
if (gdbarch->read_pc == 0)
- fatal ("gdbarch: gdbarch_read_pc invalid");
+ internal_error ("gdbarch: gdbarch_read_pc invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
@@ -1086,7 +1088,7 @@ void
gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, int pid)
{
if (gdbarch->write_pc == 0)
- fatal ("gdbarch: gdbarch_write_pc invalid");
+ internal_error ("gdbarch: gdbarch_write_pc invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
@@ -1105,7 +1107,7 @@ CORE_ADDR
gdbarch_read_fp (struct gdbarch *gdbarch)
{
if (gdbarch->read_fp == 0)
- fatal ("gdbarch: gdbarch_read_fp invalid");
+ internal_error ("gdbarch: gdbarch_read_fp invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
@@ -1124,7 +1126,7 @@ void
gdbarch_write_fp (struct gdbarch *gdbarch, CORE_ADDR val)
{
if (gdbarch->write_fp == 0)
- fatal ("gdbarch: gdbarch_write_fp invalid");
+ internal_error ("gdbarch: gdbarch_write_fp invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_write_fp called\n");
@@ -1143,7 +1145,7 @@ CORE_ADDR
gdbarch_read_sp (struct gdbarch *gdbarch)
{
if (gdbarch->read_sp == 0)
- fatal ("gdbarch: gdbarch_read_sp invalid");
+ internal_error ("gdbarch: gdbarch_read_sp invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
@@ -1162,7 +1164,7 @@ void
gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
{
if (gdbarch->write_sp == 0)
- fatal ("gdbarch: gdbarch_write_sp invalid");
+ internal_error ("gdbarch: gdbarch_write_sp invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
@@ -1182,7 +1184,7 @@ gdbarch_num_regs (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->num_regs == -1)
- fatal ("gdbarch: gdbarch_num_regs invalid");
+ internal_error ("gdbarch: gdbarch_num_regs invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
@@ -1202,7 +1204,7 @@ gdbarch_sp_regnum (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->sp_regnum == -1)
- fatal ("gdbarch: gdbarch_sp_regnum invalid");
+ internal_error ("gdbarch: gdbarch_sp_regnum invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
@@ -1222,7 +1224,7 @@ gdbarch_fp_regnum (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->fp_regnum == -1)
- fatal ("gdbarch: gdbarch_fp_regnum invalid");
+ internal_error ("gdbarch: gdbarch_fp_regnum invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
@@ -1242,7 +1244,7 @@ gdbarch_pc_regnum (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->pc_regnum == -1)
- fatal ("gdbarch: gdbarch_pc_regnum invalid");
+ internal_error ("gdbarch: gdbarch_pc_regnum invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
@@ -1260,8 +1262,8 @@ set_gdbarch_pc_regnum (gdbarch, pc_regnum)
char *
gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
{
- if (gdbarch->register_name == 0)
- fatal ("gdbarch: gdbarch_register_name invalid");
+ if (gdbarch->register_name == 0 || 1)
+ internal_error ("gdbarch: gdbarch_register_name invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
@@ -1281,7 +1283,7 @@ gdbarch_register_size (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->register_size == -1)
- fatal ("gdbarch: gdbarch_register_size invalid");
+ internal_error ("gdbarch: gdbarch_register_size invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
@@ -1301,7 +1303,7 @@ gdbarch_register_bytes (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->register_bytes == -1)
- fatal ("gdbarch: gdbarch_register_bytes invalid");
+ internal_error ("gdbarch: gdbarch_register_bytes invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
@@ -1320,7 +1322,7 @@ int
gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
{
if (gdbarch->register_byte == 0)
- fatal ("gdbarch: gdbarch_register_byte invalid");
+ internal_error ("gdbarch: gdbarch_register_byte invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
@@ -1339,7 +1341,7 @@ int
gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
{
if (gdbarch->register_raw_size == 0)
- fatal ("gdbarch: gdbarch_register_raw_size invalid");
+ internal_error ("gdbarch: gdbarch_register_raw_size invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
@@ -1359,7 +1361,7 @@ gdbarch_max_register_raw_size (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->max_register_raw_size == -1)
- fatal ("gdbarch: gdbarch_max_register_raw_size invalid");
+ internal_error ("gdbarch: gdbarch_max_register_raw_size invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
@@ -1378,7 +1380,7 @@ int
gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
{
if (gdbarch->register_virtual_size == 0)
- fatal ("gdbarch: gdbarch_register_virtual_size invalid");
+ internal_error ("gdbarch: gdbarch_register_virtual_size invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
@@ -1398,7 +1400,7 @@ gdbarch_max_register_virtual_size (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->max_register_virtual_size == -1)
- fatal ("gdbarch: gdbarch_max_register_virtual_size invalid");
+ internal_error ("gdbarch: gdbarch_max_register_virtual_size invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
@@ -1417,7 +1419,7 @@ struct type *
gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
{
if (gdbarch->register_virtual_type == 0)
- fatal ("gdbarch: gdbarch_register_virtual_type invalid");
+ internal_error ("gdbarch: gdbarch_register_virtual_type invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
@@ -1437,7 +1439,7 @@ gdbarch_use_generic_dummy_frames (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->use_generic_dummy_frames == -1)
- fatal ("gdbarch: gdbarch_use_generic_dummy_frames invalid");
+ internal_error ("gdbarch: gdbarch_use_generic_dummy_frames invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_use_generic_dummy_frames called\n");
@@ -1457,7 +1459,7 @@ gdbarch_call_dummy_location (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->call_dummy_location == 0)
- fatal ("gdbarch: gdbarch_call_dummy_location invalid");
+ internal_error ("gdbarch: gdbarch_call_dummy_location invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
@@ -1476,7 +1478,7 @@ CORE_ADDR
gdbarch_call_dummy_address (struct gdbarch *gdbarch)
{
if (gdbarch->call_dummy_address == 0)
- fatal ("gdbarch: gdbarch_call_dummy_address invalid");
+ internal_error ("gdbarch: gdbarch_call_dummy_address invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
@@ -1496,7 +1498,7 @@ gdbarch_call_dummy_start_offset (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->call_dummy_start_offset == -1)
- fatal ("gdbarch: gdbarch_call_dummy_start_offset invalid");
+ internal_error ("gdbarch: gdbarch_call_dummy_start_offset invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
@@ -1516,7 +1518,7 @@ gdbarch_call_dummy_breakpoint_offset (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->call_dummy_breakpoint_offset == -1)
- fatal ("gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
+ internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
@@ -1536,7 +1538,7 @@ gdbarch_call_dummy_breakpoint_offset_p (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->call_dummy_breakpoint_offset_p == -1)
- fatal ("gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
+ internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
@@ -1556,7 +1558,7 @@ gdbarch_call_dummy_length (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->call_dummy_length == -1)
- fatal ("gdbarch: gdbarch_call_dummy_length invalid");
+ internal_error ("gdbarch: gdbarch_call_dummy_length invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
@@ -1575,7 +1577,7 @@ int
gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
{
if (gdbarch->pc_in_call_dummy == 0)
- fatal ("gdbarch: gdbarch_pc_in_call_dummy invalid");
+ internal_error ("gdbarch: gdbarch_pc_in_call_dummy invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n");
@@ -1595,7 +1597,7 @@ gdbarch_call_dummy_p (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->call_dummy_p == -1)
- fatal ("gdbarch: gdbarch_call_dummy_p invalid");
+ internal_error ("gdbarch: gdbarch_call_dummy_p invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
@@ -1651,7 +1653,7 @@ gdbarch_call_dummy_stack_adjust_p (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->call_dummy_stack_adjust_p == -1)
- fatal ("gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
+ internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
@@ -1671,7 +1673,7 @@ gdbarch_call_dummy_stack_adjust (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
- fatal ("gdbarch: gdbarch_call_dummy_stack_adjust invalid");
+ internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
@@ -1690,7 +1692,7 @@ void
gdbarch_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p)
{
if (gdbarch->fix_call_dummy == 0)
- fatal ("gdbarch: gdbarch_fix_call_dummy invalid");
+ internal_error ("gdbarch: gdbarch_fix_call_dummy invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
@@ -1745,7 +1747,7 @@ void
gdbarch_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval)
{
if (gdbarch->get_saved_register == 0)
- fatal ("gdbarch: gdbarch_get_saved_register invalid");
+ internal_error ("gdbarch: gdbarch_get_saved_register invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
@@ -1764,7 +1766,7 @@ int
gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
{
if (gdbarch->register_convertible == 0)
- fatal ("gdbarch: gdbarch_register_convertible invalid");
+ internal_error ("gdbarch: gdbarch_register_convertible invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
@@ -1783,7 +1785,7 @@ void
gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
{
if (gdbarch->register_convert_to_virtual == 0)
- fatal ("gdbarch: gdbarch_register_convert_to_virtual invalid");
+ internal_error ("gdbarch: gdbarch_register_convert_to_virtual invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
@@ -1802,7 +1804,7 @@ void
gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
{
if (gdbarch->register_convert_to_raw == 0)
- fatal ("gdbarch: gdbarch_register_convert_to_raw invalid");
+ internal_error ("gdbarch: gdbarch_register_convert_to_raw invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
@@ -1821,7 +1823,7 @@ void
gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
{
if (gdbarch->extract_return_value == 0)
- fatal ("gdbarch: gdbarch_extract_return_value invalid");
+ internal_error ("gdbarch: gdbarch_extract_return_value invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
@@ -1840,7 +1842,7 @@ CORE_ADDR
gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
{
if (gdbarch->push_arguments == 0)
- fatal ("gdbarch: gdbarch_push_arguments invalid");
+ internal_error ("gdbarch: gdbarch_push_arguments invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
@@ -1859,7 +1861,7 @@ void
gdbarch_push_dummy_frame (struct gdbarch *gdbarch)
{
if (gdbarch->push_dummy_frame == 0)
- fatal ("gdbarch: gdbarch_push_dummy_frame invalid");
+ internal_error ("gdbarch: gdbarch_push_dummy_frame invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n");
@@ -1878,7 +1880,7 @@ CORE_ADDR
gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
{
if (gdbarch->push_return_address == 0)
- fatal ("gdbarch: gdbarch_push_return_address invalid");
+ internal_error ("gdbarch: gdbarch_push_return_address invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
@@ -1897,7 +1899,7 @@ void
gdbarch_pop_frame (struct gdbarch *gdbarch)
{
if (gdbarch->pop_frame == 0)
- fatal ("gdbarch: gdbarch_pop_frame invalid");
+ internal_error ("gdbarch: gdbarch_pop_frame invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n");
@@ -1916,7 +1918,7 @@ CORE_ADDR
gdbarch_d10v_make_daddr (struct gdbarch *gdbarch, CORE_ADDR x)
{
if (gdbarch->d10v_make_daddr == 0)
- fatal ("gdbarch: gdbarch_d10v_make_daddr invalid");
+ internal_error ("gdbarch: gdbarch_d10v_make_daddr invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_daddr called\n");
@@ -1935,7 +1937,7 @@ CORE_ADDR
gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch, CORE_ADDR x)
{
if (gdbarch->d10v_make_iaddr == 0)
- fatal ("gdbarch: gdbarch_d10v_make_iaddr invalid");
+ internal_error ("gdbarch: gdbarch_d10v_make_iaddr invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_iaddr called\n");
@@ -1954,7 +1956,7 @@ int
gdbarch_d10v_daddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
{
if (gdbarch->d10v_daddr_p == 0)
- fatal ("gdbarch: gdbarch_d10v_daddr_p invalid");
+ internal_error ("gdbarch: gdbarch_d10v_daddr_p invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_daddr_p called\n");
@@ -1973,7 +1975,7 @@ int
gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
{
if (gdbarch->d10v_iaddr_p == 0)
- fatal ("gdbarch: gdbarch_d10v_iaddr_p invalid");
+ internal_error ("gdbarch: gdbarch_d10v_iaddr_p invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_iaddr_p called\n");
@@ -1992,7 +1994,7 @@ CORE_ADDR
gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
{
if (gdbarch->d10v_convert_daddr_to_raw == 0)
- fatal ("gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
+ internal_error ("gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_daddr_to_raw called\n");
@@ -2011,7 +2013,7 @@ CORE_ADDR
gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
{
if (gdbarch->d10v_convert_iaddr_to_raw == 0)
- fatal ("gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
+ internal_error ("gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_iaddr_to_raw called\n");
@@ -2030,7 +2032,7 @@ void
gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
{
if (gdbarch->store_struct_return == 0)
- fatal ("gdbarch: gdbarch_store_struct_return invalid");
+ internal_error ("gdbarch: gdbarch_store_struct_return invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
@@ -2049,7 +2051,7 @@ void
gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
{
if (gdbarch->store_return_value == 0)
- fatal ("gdbarch: gdbarch_store_return_value invalid");
+ internal_error ("gdbarch: gdbarch_store_return_value invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
@@ -2068,7 +2070,7 @@ CORE_ADDR
gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
{
if (gdbarch->extract_struct_value_address == 0)
- fatal ("gdbarch: gdbarch_extract_struct_value_address invalid");
+ internal_error ("gdbarch: gdbarch_extract_struct_value_address invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
@@ -2087,7 +2089,7 @@ int
gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
{
if (gdbarch->use_struct_convention == 0)
- fatal ("gdbarch: gdbarch_use_struct_convention invalid");
+ internal_error ("gdbarch: gdbarch_use_struct_convention invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
@@ -2106,7 +2108,7 @@ void
gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
{
if (gdbarch->frame_init_saved_regs == 0)
- fatal ("gdbarch: gdbarch_frame_init_saved_regs invalid");
+ internal_error ("gdbarch: gdbarch_frame_init_saved_regs invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n");
@@ -2125,7 +2127,7 @@ void
gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
{
if (gdbarch->init_extra_frame_info == 0)
- fatal ("gdbarch: gdbarch_init_extra_frame_info invalid");
+ internal_error ("gdbarch: gdbarch_init_extra_frame_info invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n");
@@ -2144,7 +2146,7 @@ CORE_ADDR
gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
{
if (gdbarch->skip_prologue == 0)
- fatal ("gdbarch: gdbarch_skip_prologue invalid");
+ internal_error ("gdbarch: gdbarch_skip_prologue invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
@@ -2163,7 +2165,7 @@ int
gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
{
if (gdbarch->inner_than == 0)
- fatal ("gdbarch: gdbarch_inner_than invalid");
+ internal_error ("gdbarch: gdbarch_inner_than invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
@@ -2182,7 +2184,7 @@ unsigned char *
gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
{
if (gdbarch->breakpoint_from_pc == 0)
- fatal ("gdbarch: gdbarch_breakpoint_from_pc invalid");
+ internal_error ("gdbarch: gdbarch_breakpoint_from_pc invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
@@ -2202,7 +2204,7 @@ gdbarch_decr_pc_after_break (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->decr_pc_after_break == -1)
- fatal ("gdbarch: gdbarch_decr_pc_after_break invalid");
+ internal_error ("gdbarch: gdbarch_decr_pc_after_break invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
@@ -2222,7 +2224,7 @@ gdbarch_function_start_offset (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->function_start_offset == -1)
- fatal ("gdbarch: gdbarch_function_start_offset invalid");
+ internal_error ("gdbarch: gdbarch_function_start_offset invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
@@ -2241,7 +2243,7 @@ void
gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
{
if (gdbarch->remote_translate_xfer_address == 0)
- fatal ("gdbarch: gdbarch_remote_translate_xfer_address invalid");
+ internal_error ("gdbarch: gdbarch_remote_translate_xfer_address invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
@@ -2261,7 +2263,7 @@ gdbarch_frame_args_skip (gdbarch)
struct gdbarch *gdbarch;
{
if (gdbarch->frame_args_skip == -1)
- fatal ("gdbarch: gdbarch_frame_args_skip invalid");
+ internal_error ("gdbarch: gdbarch_frame_args_skip invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
@@ -2280,7 +2282,7 @@ int
gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
{
if (gdbarch->frameless_function_invocation == 0)
- fatal ("gdbarch: gdbarch_frameless_function_invocation invalid");
+ internal_error ("gdbarch: gdbarch_frameless_function_invocation invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
@@ -2299,7 +2301,7 @@ CORE_ADDR
gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
{
if (gdbarch->frame_chain == 0)
- fatal ("gdbarch: gdbarch_frame_chain invalid");
+ internal_error ("gdbarch: gdbarch_frame_chain invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n");
@@ -2318,7 +2320,7 @@ int
gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
{
if (gdbarch->frame_chain_valid == 0)
- fatal ("gdbarch: gdbarch_frame_chain_valid invalid");
+ internal_error ("gdbarch: gdbarch_frame_chain_valid invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n");
@@ -2337,7 +2339,7 @@ CORE_ADDR
gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
{
if (gdbarch->frame_saved_pc == 0)
- fatal ("gdbarch: gdbarch_frame_saved_pc invalid");
+ internal_error ("gdbarch: gdbarch_frame_saved_pc invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n");
@@ -2356,7 +2358,7 @@ CORE_ADDR
gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
{
if (gdbarch->frame_args_address == 0)
- fatal ("gdbarch: gdbarch_frame_args_address invalid");
+ internal_error ("gdbarch: gdbarch_frame_args_address invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
@@ -2375,7 +2377,7 @@ CORE_ADDR
gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
{
if (gdbarch->frame_locals_address == 0)
- fatal ("gdbarch: gdbarch_frame_locals_address invalid");
+ internal_error ("gdbarch: gdbarch_frame_locals_address invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
@@ -2394,7 +2396,7 @@ CORE_ADDR
gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
{
if (gdbarch->saved_pc_after_call == 0)
- fatal ("gdbarch: gdbarch_saved_pc_after_call invalid");
+ internal_error ("gdbarch: gdbarch_saved_pc_after_call invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
@@ -2413,7 +2415,7 @@ int
gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
{
if (gdbarch->frame_num_args == 0)
- fatal ("gdbarch: gdbarch_frame_num_args invalid");
+ internal_error ("gdbarch: gdbarch_frame_num_args invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
@@ -2500,7 +2502,7 @@ gdbarch_data (data)
struct gdbarch_data *data;
{
if (data->index >= current_gdbarch->nr_data)
- fatal ("gdbarch_data: request for non-existant data.");
+ internal_error ("gdbarch_data: request for non-existant data.");
return current_gdbarch->data[data->index];
}
@@ -2625,7 +2627,7 @@ register_gdbarch_init (bfd_architecture, init)
bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
if (bfd_arch_info == NULL)
{
- fatal ("gdbarch: Attempt to register unknown architecture (%d)", bfd_architecture);
+ internal_error ("gdbarch: Attempt to register unknown architecture (%d)", bfd_architecture);
}
/* Check that we haven't seen this architecture before */
for (curr = &gdbarch_init_registrary;
@@ -2633,7 +2635,7 @@ register_gdbarch_init (bfd_architecture, init)
curr = &(*curr)->next)
{
if (bfd_architecture == (*curr)->bfd_architecture)
- fatal ("gdbarch: Duplicate registraration of architecture (%s)",
+ internal_error ("gdbarch: Duplicate registraration of architecture (%s)",
bfd_arch_info->printable_name);
}
/* log it */
@@ -3157,7 +3159,7 @@ set_architecture_from_arch_mach (arch, mach)
if (wanted != NULL)
set_arch (wanted, set_arch_manual);
else
- fatal ("gdbarch: hardwired architecture/machine not reconized");
+ internal_error ("gdbarch: hardwired architecture/machine not reconized");
}
/* Set the architecture from a BFD */
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 7daabca..3d57097 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -1013,10 +1013,10 @@ extern disassemble_info tm_print_insn_info;
#define GDB_TARGET_IS_D10V (TARGET_ARCHITECTURE->arch == bfd_arch_d10v)
#ifndef D10V_MAKE_DADDR
-#define D10V_MAKE_DADDR(X) (fatal ("gdbarch: D10V_MAKE_DADDR"), 0)
+#define D10V_MAKE_DADDR(X) (internal_error ("gdbarch: D10V_MAKE_DADDR"), 0)
#endif
#ifndef D10V_MAKE_IADDR
-#define D10V_MAKE_IADDR(X) (fatal ("gdbarch: D10V_MAKE_IADDR"), 0)
+#define D10V_MAKE_IADDR(X) (internal_error ("gdbarch: D10V_MAKE_IADDR"), 0)
#endif
@@ -1042,7 +1042,7 @@ extern int generic_register_convertible_not PARAMS ((int reg_nr));
/* Fallback definition for EXTRACT_STRUCT_VALUE_ADDRESS */
#ifndef EXTRACT_STRUCT_VALUE_ADDRESS
#define EXTRACT_STRUCT_VALUE_ADDRESS_P (0)
-#define EXTRACT_STRUCT_VALUE_ADDRESS(X) (fatal ("gdbarch: EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
+#define EXTRACT_STRUCT_VALUE_ADDRESS(X) (internal_error ("gdbarch: EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
#else
#ifndef EXTRACT_STRUCT_VALUE_ADDRESS_P
#define EXTRACT_STRUCT_VALUE_ADDRESS_P (1)
diff --git a/gdb/hppah-nat.c b/gdb/hppah-nat.c
index 4aec8ee..585ba71 100644
--- a/gdb/hppah-nat.c
+++ b/gdb/hppah-nat.c
@@ -157,7 +157,7 @@ fetch_register (regno)
+ (REGISTER_BYTE (regno) - REGISTER_BYTE (1)));
else
- fatal ("hppa-nat.c (fetch_register): unexpected register size");
+ internal_error ("hppa-nat.c (fetch_register): unexpected register size");
for (i = 0; i < len; i += sizeof (int))
{
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 2388790..babae1c 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -62,8 +62,6 @@ static char *disassembly_flavor = att_flavor;
static void set_disassembly_flavor_sfunc PARAMS ((char *, int, struct cmd_list_element *));
static void set_disassembly_flavor ();
-void (*disassembly_flavor_hook) PARAMS ((char *args, int from_tty));
-
/* Stdio style buffering was used to minimize calls to ptrace, but this
buffering did not take into account that the code section being accessed
may not be an even number of buffers long (even if the buffer is only
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 297b2a0..3a41f6a 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -1,5 +1,5 @@
/* Memory-access and commands for "inferior" process, for GDB.
- Copyright 1986, 87, 88, 89, 91, 92, 95, 96, 1998
+ Copyright 1986, 87, 88, 89, 91, 92, 95, 96, 1998, 1999
Free Software Foundation, Inc.
This file is part of GDB.
@@ -35,6 +35,7 @@
#include "symfile.h"
#include "objfiles.h"
#include "event-loop.h"
+#include "parser-defs.h"
/* Functions exported for general use: */
@@ -64,6 +65,8 @@ static void float_info PARAMS ((char *, int));
static void detach_command PARAMS ((char *, int));
+static void interrupt_target_command (char *args, int from_tty);
+
#if !defined (DO_REGISTERS_INFO)
static void do_registers_info PARAMS ((int, int));
#endif
@@ -707,10 +710,6 @@ breakpoint_auto_delete_contents (arg)
Otherwise, run_stack-dummy returns 1 (the frame will eventually be popped
when we do hit that breakpoint). */
-/* DEBUG HOOK: 4 => return instead of letting the stack dummy run. */
-
-static int stack_dummy_testing = 0;
-
int
run_stack_dummy (addr, buffer)
CORE_ADDR addr;
@@ -720,11 +719,7 @@ run_stack_dummy (addr, buffer)
/* Now proceed, having reached the desired place. */
clear_proceed_status ();
- if (stack_dummy_testing & 4)
- {
- POP_FRAME;
- return (0);
- }
+
if (CALL_DUMMY_BREAKPOINT_OFFSET_P)
{
struct breakpoint *bpt;
@@ -899,7 +894,7 @@ finish_command_continuation (arg)
value_type = TYPE_TARGET_TYPE (SYMBOL_TYPE (function));
if (!value_type)
- fatal ("internal: finish_command: function has no target type");
+ internal_error ("finish_command: function has no target type");
if (TYPE_CODE (value_type) == TYPE_CODE_VOID)
{
@@ -1052,7 +1047,7 @@ finish_command (arg, from_tty)
value_type = TYPE_TARGET_TYPE (SYMBOL_TYPE (function));
if (!value_type)
- fatal ("internal: finish_command: function has no target type");
+ internal_error ("finish_command: function has no target type");
/* FIXME: Shouldn't we do the cleanups before returning? */
if (TYPE_CODE (value_type) == TYPE_CODE_VOID)
diff --git a/gdb/infptrace.c b/gdb/infptrace.c
index eec7c6a..32bd52c 100644
--- a/gdb/infptrace.c
+++ b/gdb/infptrace.c
@@ -330,7 +330,7 @@ _initialize_kernel_u_addr ()
if (nlist ("/vmunix", names) == 0)
kernel_u_addr = names[0].n_value;
else
- fatal ("Unable to get kernel u area address.");
+ internal_error ("Unable to get kernel u area address.");
#endif /* KERNEL_U_ADDR_BSD. */
}
diff --git a/gdb/infrun.c b/gdb/infrun.c
index efb1caf..5d7fd76 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -38,33 +38,66 @@
/* Prototypes for local functions */
-static void signals_info PARAMS ((char *, int));
+static void signals_info (char *, int);
-static void handle_command PARAMS ((char *, int));
+static void handle_command (char *, int);
-static void sig_print_info PARAMS ((enum target_signal));
+static void sig_print_info (enum target_signal);
-static void sig_print_header PARAMS ((void));
+static void sig_print_header (void);
-static void resume_cleanups PARAMS ((int));
+static void resume_cleanups (int);
-static int hook_stop_stub PARAMS ((PTR));
+static int hook_stop_stub (void *);
-static void delete_breakpoint_current_contents PARAMS ((PTR));
+static void delete_breakpoint_current_contents (void *);
-static void set_follow_fork_mode_command PARAMS ((char *arg, int from_tty, struct cmd_list_element * c));
+static void set_follow_fork_mode_command (char *arg, int from_tty,
+ struct cmd_list_element * c);
-static void complete_execution PARAMS ((void));
+static void complete_execution (void);
+
+static struct inferior_status *xmalloc_inferior_status (void);
+
+static void free_inferior_status (struct inferior_status *);
+
+static int restore_selected_frame (void *);
+
+static void build_infrun (void);
+
+static void follow_inferior_fork (int parent_pid, int child_pid,
+ int has_forked, int has_vforked);
+
+static void follow_fork (int parent_pid, int child_pid);
+
+static void follow_vfork (int parent_pid, int child_pid);
+
+static void set_schedlock_func (char *args, int from_tty,
+ struct cmd_list_element * c);
+
+static int is_internal_shlib_eventpoint (struct breakpoint * ep);
+
+static int stopped_for_internal_shlib_event (bpstat bs);
+
+struct execution_control_state;
+
+static int currently_stepping (struct execution_control_state *ecs);
+
+static void xdb_handle_command (char *args, int from_tty);
+
+void _initialize_infrun (void);
int inferior_ignoring_startup_exec_events = 0;
int inferior_ignoring_leading_exec_events = 0;
/* In asynchronous mode, but simulating synchronous execution. */
+
int sync_execution = 0;
/* wait_for_inferior and normal_stop use this to notify the user
when the inferior stopped in a different thread than it had been
- running in. */
+ running in. */
+
static int switched_from_inferior_pid;
/* This will be true for configurations that may actually report an
@@ -98,7 +131,8 @@ static int may_follow_exec = MAY_FOLLOW_EXEC;
Versions of gdb which don't use the "step == this thread steps
and others continue" model but instead use the "step == this
- thread steps and others wait" shouldn't do this. */
+ thread steps and others wait" shouldn't do this. */
+
static int thread_step_needed = 0;
/* This is true if thread_step_needed should actually be used. At
@@ -110,34 +144,6 @@ static int thread_step_needed = 0;
static int use_thread_step_needed = USE_THREAD_STEP_NEEDED;
-static void follow_inferior_fork PARAMS ((int parent_pid,
- int child_pid,
- int has_forked,
- int has_vforked));
-
-static void follow_fork PARAMS ((int parent_pid, int child_pid));
-
-static void follow_vfork PARAMS ((int parent_pid, int child_pid));
-
-static void set_schedlock_func PARAMS ((char *args, int from_tty,
- struct cmd_list_element * c));
-
-static int is_internal_shlib_eventpoint PARAMS ((struct breakpoint * ep));
-
-static int stopped_for_internal_shlib_event PARAMS ((bpstat bs));
-
-static int stopped_for_shlib_catchpoint PARAMS ((bpstat bs,
- struct breakpoint ** cp_p));
-
-#if __STDC__
-struct execution_control_state;
-#endif
-static int currently_stepping PARAMS ((struct execution_control_state * ecs));
-
-static void xdb_handle_command PARAMS ((char *args, int from_tty));
-
-void _initialize_infrun PARAMS ((void));
-
/* GET_LONGJMP_TARGET returns the PC at which longjmp() will resume the
program. It needs to examine the jmp_buf argument and extract the PC
from it. The return value is non-zero on success, zero otherwise. */
@@ -393,19 +399,15 @@ static char *follow_fork_mode_string = NULL;
static void
-follow_inferior_fork (parent_pid, child_pid, has_forked, has_vforked)
- int parent_pid;
- int child_pid;
- int has_forked;
- int has_vforked;
+follow_inferior_fork (int parent_pid, int child_pid, int has_forked,
+ int has_vforked)
{
int followed_parent = 0;
int followed_child = 0;
- int ima_clone = 0;
/* Which process did the user want us to follow? */
char *follow_mode =
- savestring (follow_fork_mode_string, strlen (follow_fork_mode_string));
+ savestring (follow_fork_mode_string, strlen (follow_fork_mode_string));
/* Or, did the user not know, and want us to ask? */
if (STREQ (follow_fork_mode_string, "ask"))
@@ -568,21 +570,17 @@ follow_inferior_fork (parent_pid, child_pid, has_forked, has_vforked)
}
static void
-follow_fork (parent_pid, child_pid)
- int parent_pid;
- int child_pid;
+follow_fork (int parent_pid, int child_pid)
{
follow_inferior_fork (parent_pid, child_pid, 1, 0);
}
/* Forward declaration. */
-static void follow_exec PARAMS ((int, char *));
+static void follow_exec (int, char *);
static void
-follow_vfork (parent_pid, child_pid)
- int parent_pid;
- int child_pid;
+follow_vfork (int parent_pid, int child_pid)
{
follow_inferior_fork (parent_pid, child_pid, 0, 1);
@@ -597,9 +595,7 @@ follow_vfork (parent_pid, child_pid)
}
static void
-follow_exec (pid, execd_pathname)
- int pid;
- char *execd_pathname;
+follow_exec (int pid, char *execd_pathname)
{
int saved_pid = pid;
struct target_ops *tgt;
@@ -707,8 +703,7 @@ static int singlestep_breakpoints_inserted_p = 0;
/* Things to clean up if we QUIT out of resume (). */
/* ARGSUSED */
static void
-resume_cleanups (arg)
- int arg;
+resume_cleanups (int arg)
{
normal_stop ();
}
@@ -721,10 +716,7 @@ static char *scheduler_enums[] =
{schedlock_off, schedlock_on, schedlock_step};
static void
-set_schedlock_func (args, from_tty, c)
- char *args;
- int from_tty;
- struct cmd_list_element *c;
+set_schedlock_func (char *args, int from_tty, struct cmd_list_element *c)
{
if (c->type == set_cmd)
if (!target_can_lock_scheduler)
@@ -745,9 +737,7 @@ set_schedlock_func (args, from_tty, c)
STEP nonzero if we should step (zero to continue instead).
SIG is the signal to give the inferior (zero for none). */
void
-resume (step, sig)
- int step;
- enum target_signal sig;
+resume (int step, enum target_signal sig)
{
int should_resume = 1;
struct cleanup *old_cleanups = make_cleanup ((make_cleanup_func)
@@ -867,7 +857,7 @@ resume (step, sig)
First do this, then set the ones you want, then call `proceed'. */
void
-clear_proceed_status ()
+clear_proceed_status (void)
{
trap_expected = 0;
step_range_start = 0;
@@ -896,10 +886,7 @@ clear_proceed_status ()
You should call clear_proceed_status before calling proceed. */
void
-proceed (addr, siggnal, step)
- CORE_ADDR addr;
- enum target_signal siggnal;
- int step;
+proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
{
int oneproc = 0;
@@ -1031,8 +1018,9 @@ static char *prev_func_name;
/* Start remote-debugging of a machine over a serial link. */
+
void
-start_remote ()
+start_remote (void)
{
init_thread_list ();
init_wait_for_inferior ();
@@ -1061,7 +1049,7 @@ start_remote ()
/* Initialize static vars when a new inferior begins. */
void
-init_wait_for_inferior ()
+init_wait_for_inferior (void)
{
/* These are meaningless until the first time through wait_for_inferior. */
prev_pc = 0;
@@ -1090,8 +1078,7 @@ init_wait_for_inferior ()
}
static void
-delete_breakpoint_current_contents (arg)
- PTR arg;
+delete_breakpoint_current_contents (void *arg)
{
struct breakpoint **breakpointp = (struct breakpoint **) arg;
if (*breakpointp != NULL)
@@ -1145,9 +1132,9 @@ struct execution_control_state
int wait_some_more;
};
-void init_execution_control_state PARAMS ((struct execution_control_state * ecs));
+void init_execution_control_state (struct execution_control_state * ecs);
-void handle_inferior_event PARAMS ((struct execution_control_state * ecs));
+void handle_inferior_event (struct execution_control_state * ecs);
/* Wait for control to return from inferior to debugger.
If inferior gets a signal, we may decide to start it up again
@@ -1156,7 +1143,7 @@ void handle_inferior_event PARAMS ((struct execution_control_state * ecs));
should be left stopped and GDB should read more commands. */
void
-wait_for_inferior ()
+wait_for_inferior (void)
{
struct cleanup *old_cleanups;
struct execution_control_state ecss;
@@ -1219,7 +1206,7 @@ struct execution_control_state async_ecss;
struct execution_control_state *async_ecs;
void
-fetch_inferior_event ()
+fetch_inferior_event (void)
{
static struct cleanup *old_cleanups;
@@ -1279,8 +1266,7 @@ fetch_inferior_event ()
wait_for_inferior-type loop. */
void
-init_execution_control_state (ecs)
- struct execution_control_state *ecs;
+init_execution_control_state (struct execution_control_state *ecs)
{
ecs->random_signal = 0;
ecs->remove_breakpoints_on_following_step = 0;
@@ -1302,7 +1288,7 @@ init_execution_control_state (ecs)
sanity check. We should never be setting a new
step_resume_breakpoint when we have an old one active. */
static void
-check_for_old_step_resume_breakpoint ()
+check_for_old_step_resume_breakpoint (void)
{
if (step_resume_breakpoint)
warning ("GDB bug: infrun.c (wait_for_inferior): dropping old step_resume breakpoint");
@@ -1313,8 +1299,7 @@ check_for_old_step_resume_breakpoint ()
appropriate action. */
void
-handle_inferior_event (ecs)
- struct execution_control_state *ecs;
+handle_inferior_event (struct execution_control_state *ecs)
{
CORE_ADDR tmp;
int stepped_after_stopped_by_watchpoint;
@@ -1599,8 +1584,9 @@ handle_inferior_event (ecs)
inferior_ignoring_leading_exec_events =
target_reported_exec_events_per_exec_call () - 1;
- pending_follow.execd_pathname = savestring (ecs->ws.value.execd_pathname,
- strlen (ecs->ws.value.execd_pathname));
+ pending_follow.execd_pathname =
+ savestring (ecs->ws.value.execd_pathname,
+ strlen (ecs->ws.value.execd_pathname));
/* Did inferior_pid exec, or did a (possibly not-yet-followed)
child of a vfork exec?
@@ -3046,8 +3032,7 @@ stop_stepping:
/* Are we in the middle of stepping? */
static int
-currently_stepping (ecs)
- struct execution_control_state *ecs;
+currently_stepping (struct execution_control_state *ecs)
{
return ((through_sigtramp_breakpoint == NULL
&& !ecs->handling_longjmp
@@ -3064,8 +3049,7 @@ currently_stepping (ecs)
something gdb sets for its own use, and isn't ever shown to a
user.) */
static int
-is_internal_shlib_eventpoint (ep)
- struct breakpoint *ep;
+is_internal_shlib_eventpoint (struct breakpoint *ep)
{
return
(ep->type == bp_shlib_event)
@@ -3075,9 +3059,9 @@ is_internal_shlib_eventpoint (ep)
/* This function returns TRUE if bs indicates that the inferior
stopped due to a shared library (aka dynamically-linked library)
event. */
+
static int
-stopped_for_internal_shlib_event (bs)
- bpstat bs;
+stopped_for_internal_shlib_event (bpstat bs)
{
/* Note that multiple eventpoints may've caused the stop. Any
that are associated with shlib events will be accepted. */
@@ -3091,45 +3075,15 @@ stopped_for_internal_shlib_event (bs)
/* If we get here, then no candidate was found. */
return 0;
}
-
-/* This function returns TRUE if bs indicates that the inferior
- stopped due to a shared library (aka dynamically-linked library)
- event caught by a catchpoint.
-
- If TRUE, cp_p is set to point to the catchpoint.
-
- Else, the value of cp_p is undefined. */
-static int
-stopped_for_shlib_catchpoint (bs, cp_p)
- bpstat bs;
- struct breakpoint **cp_p;
-{
- /* Note that multiple eventpoints may've caused the stop. Any
- that are associated with shlib events will be accepted. */
- *cp_p = NULL;
-
- for (; bs != NULL; bs = bs->next)
- {
- if ((bs->breakpoint_at != NULL)
- && ep_is_shlib_catchpoint (bs->breakpoint_at))
- {
- *cp_p = bs->breakpoint_at;
- return 1;
- }
- }
-
- /* If we get here, then no candidate was found. */
- return 0;
-}
-
/* Reset proper settings after an asynchronous command has finished.
If the execution command was in synchronous mode, register stdin
with the event loop, and reset the prompt. */
+
static void
-complete_execution ()
+complete_execution (void)
{
- extern cleanup_sigint_signal_handler PARAMS ((void));
+ extern int cleanup_sigint_signal_handler (void);
target_executing = 0;
if (sync_execution)
@@ -3151,7 +3105,7 @@ complete_execution ()
attempting to insert breakpoints. */
void
-normal_stop ()
+normal_stop (void)
{
/* As with the notification of thread events, we want to delay
notifying the user that we've switched thread context until
@@ -3313,47 +3267,43 @@ done:
}
static int
-hook_stop_stub (cmd)
- PTR cmd;
+hook_stop_stub (void *cmd)
{
execute_user_command ((struct cmd_list_element *) cmd, 0);
return (0);
}
int
-signal_stop_state (signo)
- int signo;
+signal_stop_state (int signo)
{
return signal_stop[signo];
}
int
-signal_print_state (signo)
- int signo;
+signal_print_state (int signo)
{
return signal_print[signo];
}
int
-signal_pass_state (signo)
- int signo;
+signal_pass_state (int signo)
{
return signal_program[signo];
}
static void
-sig_print_header ()
+sig_print_header (void)
{
printf_filtered ("\
Signal Stop\tPrint\tPass to program\tDescription\n");
}
static void
-sig_print_info (oursig)
- enum target_signal oursig;
+sig_print_info (enum target_signal oursig)
{
char *name = target_signal_to_name (oursig);
int name_padding = 13 - strlen (name);
+
if (name_padding <= 0)
name_padding = 0;
@@ -3369,9 +3319,7 @@ sig_print_info (oursig)
/* Specify how various signals in the inferior should be handled. */
static void
-handle_command (args, from_tty)
- char *args;
- int from_tty;
+handle_command (char *args, int from_tty)
{
char **argv;
int digits, wordlen;
@@ -3553,9 +3501,7 @@ Are you sure you want to change it? ",
}
static void
-xdb_handle_command (args, from_tty)
- char *args;
- int from_tty;
+xdb_handle_command (char *args, int from_tty)
{
char **argv;
struct cleanup *old_chain;
@@ -3627,9 +3573,7 @@ xdb_handle_command (args, from_tty)
targets, all signals should be in the signal tables). */
static void
-signals_info (signum_exp, from_tty)
- char *signum_exp;
- int from_tty;
+signals_info (char *signum_exp, int from_tty)
{
enum target_signal oursig;
sig_print_header ();
@@ -3695,10 +3639,8 @@ struct inferior_status
int proceed_to_finish;
};
-
-static struct inferior_status *xmalloc_inferior_status PARAMS ((void));
static struct inferior_status *
-xmalloc_inferior_status ()
+xmalloc_inferior_status (void)
{
struct inferior_status *inf_status;
inf_status = xmalloc (sizeof (struct inferior_status));
@@ -3707,10 +3649,8 @@ xmalloc_inferior_status ()
return inf_status;
}
-static void free_inferior_status PARAMS ((struct inferior_status *));
static void
-free_inferior_status (inf_status)
- struct inferior_status *inf_status;
+free_inferior_status (struct inferior_status *inf_status)
{
free (inf_status->registers);
free (inf_status->stop_registers);
@@ -3718,10 +3658,8 @@ free_inferior_status (inf_status)
}
void
-write_inferior_status_register (inf_status, regno, val)
- struct inferior_status *inf_status;
- int regno;
- LONGEST val;
+write_inferior_status_register (struct inferior_status *inf_status, int regno,
+ LONGEST val)
{
int size = REGISTER_RAW_SIZE (regno);
void *buf = alloca (size);
@@ -3729,15 +3667,12 @@ write_inferior_status_register (inf_status, regno, val)
memcpy (&inf_status->registers[REGISTER_BYTE (regno)], buf, size);
}
-
-
/* Save all of the information associated with the inferior<==>gdb
connection. INF_STATUS is a pointer to a "struct inferior_status"
(defined in inferior.h). */
struct inferior_status *
-save_inferior_status (restore_stack_info)
- int restore_stack_info;
+save_inferior_status (int restore_stack_info)
{
struct inferior_status *inf_status = xmalloc_inferior_status ();
@@ -3778,11 +3713,8 @@ struct restore_selected_frame_args
int level;
};
-static int restore_selected_frame PARAMS ((PTR));
-
static int
-restore_selected_frame (args)
- PTR args;
+restore_selected_frame (void *args)
{
struct restore_selected_frame_args *fr =
(struct restore_selected_frame_args *) args;
@@ -3813,8 +3745,7 @@ restore_selected_frame (args)
}
void
-restore_inferior_status (inf_status)
- struct inferior_status *inf_status;
+restore_inferior_status (struct inferior_status *inf_status)
{
stop_signal = inf_status->stop_signal;
stop_pc = inf_status->stop_pc;
@@ -3871,8 +3802,7 @@ restore_inferior_status (inf_status)
}
void
-discard_inferior_status (inf_status)
- struct inferior_status *inf_status;
+discard_inferior_status (struct inferior_status *inf_status)
{
/* See save_inferior_status for info on stop_bpstat. */
bpstat_clear (&inf_status->stop_bpstat);
@@ -3880,10 +3810,8 @@ discard_inferior_status (inf_status)
}
static void
-set_follow_fork_mode_command (arg, from_tty, c)
- char *arg;
- int from_tty;
- struct cmd_list_element *c;
+set_follow_fork_mode_command (char *arg, int from_tty,
+ struct cmd_list_element *c)
{
if (!STREQ (arg, "parent") &&
!STREQ (arg, "child") &&
@@ -3896,18 +3824,14 @@ set_follow_fork_mode_command (arg, from_tty, c)
follow_fork_mode_string = savestring (arg, strlen (arg));
}
-
-
-static void build_infrun PARAMS ((void));
static void
-build_infrun ()
+build_infrun (void)
{
stop_registers = xmalloc (REGISTER_BYTES);
}
-
void
-_initialize_infrun ()
+_initialize_infrun (void)
{
register int i;
register int numsigs;
diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c
index 35445f7..dc9abe0 100644
--- a/gdb/irix5-nat.c
+++ b/gdb/irix5-nat.c
@@ -845,7 +845,7 @@ symbol_add_stub (arg)
lowest_sect = bfd_get_section_by_name (so->abfd, ".text");
if (lowest_sect == NULL)
bfd_map_over_sections (so->abfd, find_lowest_section,
- (PTR) & lowest_sect);
+ (PTR) &lowest_sect);
if (lowest_sect)
text_addr = bfd_section_vma (so->abfd, lowest_sect) + LM_OFFSET (so);
}
diff --git a/gdb/kod-cisco.c b/gdb/kod-cisco.c
new file mode 100644
index 0000000..b33b9e5
--- /dev/null
+++ b/gdb/kod-cisco.c
@@ -0,0 +1,321 @@
+/* Kernel Object Display facility for Cisco
+ Copyright 1999 Free Software Foundation, Inc.
+
+ Written by Tom Tromey <tromey@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. */
+
+#include "defs.h"
+#include "gdb_string.h"
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+/* Define this to turn off communication with target. */
+/* #define FAKE_PACKET */
+
+/* Size of buffer used for remote communication. */
+#define PBUFSIZ 400
+
+/* Pointers to gdb callbacks. */
+static void (*gdb_kod_display) (char *);
+static void (*gdb_kod_query) (char *, char *, int *);
+
+
+
+/* Initialize and return library name and version.
+ The gdb side of KOD, kod.c, passes us two functions: one for
+ displaying output (presumably to the user) and the other for
+ querying the target. */
+char *
+cisco_kod_open (char *arg,
+ void (*display_func) (char *),
+ void (*query_func) (char *, char *, int *))
+{
+ char buffer[PBUFSIZ];
+ int bufsiz = PBUFSIZ;
+ int i, count;
+
+ gdb_kod_display = display_func;
+ gdb_kod_query = query_func;
+
+ /* Get the OS info, and check the version field. This is the stub
+ version, which we use to see whether we will understand what
+ comes back. This is lame, but the `qKoL' request doesn't
+ actually provide enough configurability.
+
+ Right now the only defined version number is `0.0.0'.
+ This stub supports qKoI and the `a' (any) object requests qKaL
+ and qKaI. Each `a' object is returned as a 4-byte integer ID.
+ An info request on an object returns a pair of 4-byte integers;
+ the first is the object pointer and the second is the thread ID. */
+
+#ifndef FAKE_PACKET
+ (*gdb_kod_query) ("oI;", buffer, &bufsiz);
+#else
+ strcpy (buffer, "Cisco IOS/Classic/13.4 0.0.0");
+#endif
+
+ count = 2;
+ for (i = 0; count && buffer[i] != '\0'; ++i)
+ {
+ if (buffer[i] == ' ')
+ --count;
+ }
+
+ if (buffer[i] == '\0')
+ error ("Remote returned malformed packet\n");
+ if (strcmp (&buffer[i], "0.0.0"))
+ error ("Remote returned unknown stub version: %s\n", &buffer[i]);
+
+ /* Return name, version, and description. I hope we have enough
+ space. */
+ return (strdup ("gdbkodcisco v0.0.0 - Cisco Kernel Object Display"));
+}
+
+/* Close the connection. */
+void
+cisco_kod_close ()
+{
+}
+
+/* Print a "bad packet" message. */
+static void
+bad_packet ()
+{
+ (*gdb_kod_display) ("Remote target returned malformed packet.\n");
+}
+
+/* Print information about currently known kernel objects.
+ We currently ignore the argument. There is only one mode of
+ querying the Cisco kernel: we ask for a dump of everything, and
+ it returns it. */
+void
+cisco_kod_request (char *arg, int from_tty)
+{
+ char buffer[PBUFSIZ], command[PBUFSIZ];
+ int done = 0, i;
+ int fail = 0;
+
+ char **sync_ids;
+ int sync_len = 0;
+ int sync_next = 0;
+ char *prev_id = NULL;
+
+ if (! arg || strcmp (arg, "any"))
+ {
+ /* "Top-level" command. This is really silly, but it also seems
+ to be how KOD is defined. */
+ /* Even sillier is the fact that this first line must start
+ with the word "List". See kod.tcl. */
+ (*gdb_kod_display) ("List of Cisco Kernel Objects\n");
+ (*gdb_kod_display) ("Object\tDescription\n");
+ (*gdb_kod_display) ("any\tAny and all objects\n");
+ return;
+ }
+
+ while (! done)
+ {
+ int off = 0; /* Where we are in the string. */
+ long count; /* Number of objects in this packet. */
+ int bufsiz = PBUFSIZ;
+ char *s_end;
+
+ strcpy (command, "aL");
+ if (prev_id)
+ {
+ strcat (command, ",");
+ strcat (command, prev_id);
+ }
+ strcat (command, ";");
+
+#ifndef FAKE_PACKET
+ /* We talk to the target by calling through the query function
+ passed to us when we were initialized. */
+ (*gdb_kod_query) (command, buffer, &bufsiz);
+#else
+ /* Fake up a multi-part packet. */
+ if (! strncmp (&command[3], "a500005a", 8))
+ strcpy (buffer, "KAL,01,1,f500005f;f500005f;");
+ else
+ strcpy (buffer, "KAL,02,0,a500005a;a500005a;de02869f;");
+#endif
+
+ /* Empty response is an error. */
+ if (strlen (buffer) == 0)
+ {
+ (*gdb_kod_display) ("Remote target did not recognize kernel object query command.\n");
+ fail = 1;
+ break;
+ }
+
+ /* If we don't get a `K' response then the buffer holds the
+ target's error message. */
+ if (buffer[0] != 'K')
+ {
+ (*gdb_kod_display) (buffer);
+ fail = 1;
+ break;
+ }
+
+ /* Make sure we get the response we expect. */
+ if (strncmp (buffer, "KAL,", 4))
+ {
+ bad_packet ();
+ fail = 1;
+ break;
+ }
+ off += 4;
+
+ /* Parse out the count. We expect to convert exactly two
+ characters followed by a comma. */
+ count = strtol (&buffer[off], &s_end, 16);
+ if (s_end - &buffer[off] != 2 || buffer[off + 2] != ',')
+ {
+ bad_packet ();
+ fail = 1;
+ break;
+ }
+ off += 3;
+
+ /* Parse out the `done' flag. */
+ if ((buffer[off] != '0' && buffer[off] != '1')
+ || buffer[off + 1] != ',')
+ {
+ bad_packet ();
+ fail = 1;
+ break;
+ }
+ done = buffer[off] == '1';
+ off += 2;
+
+ /* Id of the last item; we might this to construct the next
+ request. */
+ prev_id = &buffer[off];
+ if (strlen (prev_id) < 8 || buffer[off + 8] != ';')
+ {
+ bad_packet ();
+ fail = 1;
+ break;
+ }
+ buffer[off + 8] = '\0';
+ off += 9;
+
+ if (sync_len == 0)
+ sync_ids = (char **) xmalloc (count * sizeof (char *));
+ else
+ sync_ids = (char **) xrealloc (sync_ids,
+ (sync_len + count) * sizeof (char *));
+ sync_len += count;
+
+ for (i = 0; i < count; ++i)
+ {
+ if (strlen (&buffer[off]) < 8 || buffer[off + 8] != ';')
+ {
+ bad_packet ();
+ fail = 1;
+ break;
+ }
+ buffer[off + 8] = '\0';
+ sync_ids[sync_next++] = xstrdup (&buffer[off]);
+ off += 9;
+ }
+
+ if (buffer[off] != '\0')
+ {
+ bad_packet ();
+ fail = 1;
+ break;
+ }
+ }
+
+ /* We've collected all the sync object IDs. Now query to get the
+ specific information, and arrange to print this info. */
+ if (! fail)
+ {
+ (*gdb_kod_display) ("Object ID\tObject Pointer\tThread ID\n");
+
+ for (i = 0; i < sync_next; ++i)
+ {
+ int off = 0;
+ int bufsiz = PBUFSIZ;
+
+ /* For now assume a query can be accomplished in a single
+ transaction. This is implied in the protocol document.
+ See comments above, and the KOD protocol document, to
+ understand the parsing of the return value. */
+ strcpy (command, "aI,");
+ strcat (command, sync_ids[i]);
+ strcat (command, ";");
+
+#ifndef FAKE_PACKET
+ (*gdb_kod_query) (command, buffer, &bufsiz);
+#else
+ strcpy (buffer, "KAI,");
+ strcat (buffer, sync_ids[i]);
+ strcat (buffer, ",ffef00a0,cd00123d;");
+#endif
+
+ if (strlen (buffer) == 0)
+ {
+ (*gdb_kod_display) ("Remote target did not recognize KOD command.\n");
+ break;
+ }
+
+ if (strncmp (buffer, "KAI,", 4))
+ {
+ bad_packet ();
+ break;
+ }
+ off += 4;
+
+ if (strncmp (&buffer[off], sync_ids[i], 8)
+ || buffer[off + 8] != ',')
+ {
+ bad_packet ();
+ break;
+ }
+ off += 9;
+
+ /* Extract thread id and sync object pointer. */
+ if (strlen (&buffer[off]) != 2 * 8 + 2
+ || buffer[off + 8] != ','
+ || buffer[off + 17] != ';')
+ {
+ bad_packet ();
+ break;
+ }
+
+ buffer[off + 8] = '\0';
+ buffer[off + 17] = '\0';
+
+ /* Display the result. */
+ (*gdb_kod_display) (sync_ids[i]);
+ (*gdb_kod_display) ("\t");
+ (*gdb_kod_display) (&buffer[off]);
+ (*gdb_kod_display) ("\t");
+ (*gdb_kod_display) (&buffer[off + 9]);
+ (*gdb_kod_display) ("\n");
+ }
+ }
+
+ /* Free memory. */
+ for (i = 0; i < sync_next; ++i)
+ free (sync_ids[i]);
+ free (sync_ids);
+}
diff --git a/gdb/kod.c b/gdb/kod.c
new file mode 100644
index 0000000..a096910
--- /dev/null
+++ b/gdb/kod.c
@@ -0,0 +1,239 @@
+/* Kernel Object Display generic routines and callbacks
+ Copyright 1998, 1999 Free Software Foundation, Inc.
+
+ Written by Fernando Nasser <fnasser@cygnus.com> for Cygnus Solutions.
+
+ 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 "command.h"
+#include "gdbcmd.h"
+#include "target.h"
+#include "gdb_string.h"
+
+/* Prototypes for exported functions. */
+void _initialize_kod (void);
+
+/* Prototypes for local functions. */
+static void show_kod (char *, int);
+static void info_kod_command (char *, int);
+static void load_kod_library (char *);
+
+/* Prototypes for callbacks. These are passed into the KOD modules. */
+static void gdb_kod_display (char *);
+static void gdb_kod_query (char *, char *, int *);
+
+/* These functions are imported from the KOD module.
+
+ gdb_kod_open - initiates the KOD connection to the remote. The
+ first argument is the display function the module should use to
+ communicate with the user. The second argument is the query
+ function the display should use to communicate with the target.
+ This should call error() if there is an error. Otherwise it should
+ return a malloc()d string of the form:
+
+ NAME VERSION - DESCRIPTION
+
+ Neither NAME nor VERSION should contain a hyphen.
+
+
+ gdb_kod_request - This is used when the user enters an "info
+ <module>" request. The remaining arguments are passed as the first
+ argument. The second argument is the standard `from_tty'
+ argument.
+
+
+ gdb_kod_close - This is called when the KOD connection to the
+ remote should be terminated. */
+
+static char *(*gdb_kod_open) (void *, void *);
+static void (*gdb_kod_request) (char *, int);
+static void (*gdb_kod_close) ();
+
+
+/* Name of inferior's operating system. */
+char *operating_system;
+
+/* We save a copy of the OS so that we can properly reset when
+ switching OS's. */
+static char *old_operating_system;
+
+/* Functions imported from the library for all supported OSes.
+ FIXME: we really should do something better, such as dynamically
+ loading the KOD modules. */
+extern char *ecos_kod_open (void *, void *);
+extern void ecos_kod_request (char *, int);
+extern void ecos_kod_close ();
+extern char *cisco_kod_open (void *, void *);
+extern void cisco_kod_request (char *, int);
+extern void cisco_kod_close ();
+
+
+/* Print a line of data generated by the module. */
+
+static void
+gdb_kod_display (char *arg)
+{
+ printf_filtered ("%s", arg);
+}
+
+/* Queries the target on behalf of the module. */
+
+static void
+gdb_kod_query (char *arg, char *result, int *maxsiz)
+{
+ int bufsiz = 0;
+
+ /* Check if current target has remote_query capabilities.
+ If not, it does not have kod either. */
+ if (! current_target.to_query)
+ {
+ strcpy (result,
+ "ERR: Kernel Object Display not supported by current target\n");
+ return;
+ }
+
+ /* Just get the maximum buffer size. */
+ target_query ((int) 'K', 0, 0, &bufsiz);
+
+ /* Check if *we* were called just for getting the buffer size. */
+ if (*maxsiz == 0)
+ {
+ *maxsiz = bufsiz;
+ strcpy (result, "OK");
+ return;
+ }
+
+ /* Check if caller can handle a buffer this large, if not, adjust. */
+ if (bufsiz > *maxsiz)
+ bufsiz = *maxsiz;
+
+ /* See if buffer can hold the query (usually it can, as the query is
+ short). */
+ if (strlen (arg) >= bufsiz)
+ error ("kod: query argument too long");
+
+ /* Send actual request. */
+ if (target_query ((int) 'K', arg, result, &bufsiz))
+ strcpy (result, "ERR: remote query failed");
+}
+
+/* Print name of kod command after selecting the appropriate kod
+ formatting library module. As a side effect we create a new "info"
+ subcommand which is what the user actually uses to query the OS. */
+
+static void
+kod_set_os (char *arg, int from_tty, struct cmd_list_element *command)
+{
+ char *p;
+
+ if (command->type != set_cmd)
+ return;
+
+ /* If we had already had an open OS, close it. */
+ if (gdb_kod_close)
+ (*gdb_kod_close) ();
+
+ /* Also remove the old OS's command. */
+ if (old_operating_system)
+ {
+ delete_cmd (old_operating_system, &infolist);
+ free (old_operating_system);
+ }
+ old_operating_system = strdup (operating_system);
+
+ if (! operating_system || ! *operating_system)
+ {
+ /* If user set operating system to empty, we want to forget we
+ had a module open. Setting these variables is just nice for
+ debugging and clarity. */
+ gdb_kod_open = NULL;
+ gdb_kod_request = NULL;
+ gdb_kod_close = NULL;
+ }
+ else
+ {
+ char *kodlib;
+
+ load_kod_library (operating_system);
+
+ kodlib = (*gdb_kod_open) (gdb_kod_display, gdb_kod_query);
+
+ /* Add kod related info commands to gdb. */
+ add_info (operating_system, info_kod_command,
+ "Displays information about Kernel Objects.");
+
+ p = strrchr (kodlib, '-');
+ if (p != NULL)
+ p++;
+ else
+ p = "Unknown KOD library";
+ printf_filtered ("%s - %s\n", operating_system, p);
+
+ free (kodlib);
+ }
+}
+
+/* Print information about currently known kernel objects of the
+ specified type or a list of all known kernel object types if
+ argument is empty. */
+
+static void
+info_kod_command (char *arg, int from_tty)
+{
+ (*gdb_kod_request) (arg, from_tty);
+}
+
+/* Print name of kod command after selecting the appropriate kod
+ formatting library module. */
+
+static void
+load_kod_library (char *lib)
+{
+#if 0
+ /* FIXME: Don't have the eCos code here. */
+ if (! strcmp (lib, "ecos"))
+ {
+ gdb_kod_open = ecos_kod_open;
+ gdb_kod_request = ecos_kod_request;
+ gdb_kod_close = ecos_kod_close;
+ }
+ else
+#endif /* 0 */
+ if (! strcmp (lib, "cisco"))
+ {
+ gdb_kod_open = cisco_kod_open;
+ gdb_kod_request = cisco_kod_request;
+ gdb_kod_close = cisco_kod_close;
+ }
+ else
+ error ("Unknown operating system: %s\n", operating_system);
+}
+
+void
+_initialize_kod ()
+{
+ struct cmd_list_element *c;
+
+ c = add_set_cmd ("os", no_class, var_string,
+ (char *) &operating_system,
+ "Set operating system",
+ &setlist);
+ c->function.sfunc = kod_set_os;
+ add_show_from_set (c, &showlist);
+}
diff --git a/gdb/language.c b/gdb/language.c
index d177918..1aeb237 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -1076,21 +1076,10 @@ op_error (fmt, op, fatal)
by the value of warning_pre_print and we do not return to the top level. */
void
-#ifdef ANSI_PROTOTYPES
type_error (char *string,...)
-#else
-type_error (va_alist)
- va_dcl
-#endif
{
va_list args;
-#ifdef ANSI_PROTOTYPES
va_start (args, string);
-#else
- char *string;
- va_start (args);
- string = va_arg (args, char *);
-#endif
if (type_check == type_check_warn)
fprintf_filtered (gdb_stderr, warning_pre_print);
@@ -1105,21 +1094,10 @@ type_error (va_alist)
}
void
-#ifdef ANSI_PROTOTYPES
range_error (char *string,...)
-#else
-range_error (va_alist)
- va_dcl
-#endif
{
va_list args;
-#ifdef ANSI_PROTOTYPES
va_start (args, string);
-#else
- char *string;
- va_start (args);
- string = va_arg (args, char *);
-#endif
if (range_check == range_check_warn)
fprintf_filtered (gdb_stderr, warning_pre_print);
diff --git a/gdb/m3-nat.c b/gdb/m3-nat.c
index 61274bd..6e53546 100644
--- a/gdb/m3-nat.c
+++ b/gdb/m3-nat.c
@@ -1683,9 +1683,9 @@ catch_exception_raise (port, thread, task, exception, code, subcode)
}
if (exception < 0 || exception > MAX_EXCEPTION)
- fatal ("catch_exception_raise: unknown exception code %d thread %d",
- exception,
- mid);
+ internal_error ("catch_exception_raise: unknown exception code %d thread %d",
+ exception,
+ mid);
if (!MACH_PORT_VALID (inferior_task))
error ("got an exception, but inferior_task is null or dead");
@@ -3598,7 +3598,7 @@ mach3_exception_actions (w, force_print_only, who)
stop_code);
break;
default:
- fatal ("Unknown exception");
+ internal_error ("Unknown exception");
}
}
}
@@ -3624,13 +3624,13 @@ setup_notify_port (create_new)
MACH_PORT_RIGHT_RECEIVE,
&our_notify_port);
if (ret != KERN_SUCCESS)
- fatal ("Creating notify port %s", mach_error_string (ret));
+ internal_error ("Creating notify port %s", mach_error_string (ret));
ret = mach_port_move_member (mach_task_self (),
our_notify_port,
inferior_wait_port_set);
if (ret != KERN_SUCCESS)
- fatal ("initial move member %s", mach_error_string (ret));
+ internal_error ("initial move member %s", mach_error_string (ret));
}
}
@@ -4650,7 +4650,7 @@ _initialize_m3_nat ()
MACH_PORT_RIGHT_PORT_SET,
&inferior_wait_port_set);
if (ret != KERN_SUCCESS)
- fatal ("initial port set %s", mach_error_string (ret));
+ internal_error ("initial port set %s", mach_error_string (ret));
/* mach_really_wait now waits for this */
currently_waiting_for = inferior_wait_port_set;
diff --git a/gdb/main.c b/gdb/main.c
index 26a97cd..d6481e4 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -684,7 +684,9 @@ Options:\n\n\
fputs_unfiltered ("\
--mapped Use mapped symbol files if supported on this system.\n\
--nw Do not use a window interface.\n\
- --nx Do not read .gdbinit file.\n\
+ --nx Do not read ", stream);
+ fputs_unfiltered (gdbinit, stream);
+ fputs_unfiltered (" file.\n\
--quiet Do not print version number on startup.\n\
--readnow Fully read symbol files on first access.\n\
", stream);
diff --git a/gdb/mcore-rom.c b/gdb/mcore-rom.c
new file mode 100644
index 0000000..e28fddc
--- /dev/null
+++ b/gdb/mcore-rom.c
@@ -0,0 +1,206 @@
+/* Remote debugging interface to Motorola picobug monitor for gdb,
+ the GNU debugger.
+ Copyright 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. */
+
+#include "defs.h"
+#include "gdbcore.h"
+#include "target.h"
+#include "monitor.h"
+#include "gdb_string.h"
+
+/* Functions used only in this file. */
+
+static void init_picobug_cmds (void);
+
+
+/* Functions exported from this file. */
+
+void _initialize_picobug_rom (void);
+
+void picobug_open (char *args, int from_tty);
+
+int picobug_dumpregs (void);
+
+
+static char *picobug_inits[] =
+{"\r", NULL};
+
+static struct target_ops picobug_ops;
+static struct monitor_ops picobug_cmds;
+
+/* Picobug only supports a subset of registers from MCore. In reality,
+ it doesn't support ss1, either. */
+/* *INDENT-OFF* */
+static char *picobug_regnames[] = {
+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ "psr", "vbr", "epsr", "fpsr", "epc", "fpc", 0, "ss1",
+ "ss2", "ss3", "ss4", 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ "pc" };
+/* *INDENT-ON* */
+
+
+
+void
+picobug_open (char *args, int from_tty)
+{
+ monitor_open (args, &picobug_cmds, from_tty);
+}
+/* *INDENT-OFF* */
+/* We choose to write our own dumpregs routine, since the output of
+ the register dumping is rather difficult to encapsulate in a
+ regexp:
+
+picobug> rd
+ pc 2f00031e epc 2f00031e fpc 00000000
+ psr 80000101 epsr 80000101 fpsr 00000000
+ss0-ss4 bad0beef 00000000 00000000 00000000 00000000 vbr 30005c00
+ r0-r7 2f0fff4c 00000090 00000001 00000002 00000003 00000004 00000005 00000006
+ r8-r15 2f0fff64 00000000 00000000 00000000 00000000 00000000 00000000 2f00031e */
+/* *INDENT-ON* */
+
+
+
+int
+picobug_dumpregs ()
+{
+ char buf[1024];
+ int resp_len;
+ char *p;
+
+ /* Send the dump register command to the monitor and
+ get the reply. */
+ monitor_printf (picobug_cmds.dump_registers);
+ resp_len = monitor_expect_prompt (buf, sizeof (buf));
+
+ p = strtok (buf, " \t\r\n");
+ while (p)
+ {
+ if (strchr (p, '-'))
+ {
+ /* got a range. either r0-r7, r8-r15 or ss0-ss4 */
+ if (STREQN (p, "r0", 2) || STREQN (p, "r8", 2))
+ {
+ int rn = (p[1] == '0' ? 0 : 8);
+ int i = 0;
+
+ /* Get the next 8 values and record them. */
+ while (i < 8)
+ {
+ p = strtok (NULL, " \t\r\n");
+ if (p)
+ monitor_supply_register (rn + i, p);
+ i++;
+ }
+ }
+ else if (STREQN (p, "ss", 2))
+ {
+ /* get the next five values, ignoring the first */
+ int rn;
+ p = strtok (NULL, " \t\r\n");
+ for (rn = 39; rn < 43; rn++)
+ {
+ p = strtok (NULL, " \t\r\n");
+ if (p)
+ monitor_supply_register (rn, p);
+ }
+ }
+ else
+ {
+ break;
+ }
+ }
+ else
+ {
+ /* Simple register type, paired */
+ char *name = p;
+ int i;
+
+ /* Get and record value */
+ p = strtok (NULL, " \t\r\n");
+ if (p)
+ {
+ for (i = 0; i < NUM_REGS; i++)
+ {
+ if (picobug_regnames[i] && STREQ (picobug_regnames[i], name))
+ break;
+ }
+
+ if (i <= NUM_REGS)
+ monitor_supply_register (i, p);
+ }
+ }
+ p = strtok (NULL, " \t\r\n");
+ }
+
+ return 0;
+}
+
+static void
+init_picobug_cmds (void)
+{
+ picobug_cmds.flags = MO_GETMEM_NEEDS_RANGE | MO_CLR_BREAK_USES_ADDR | MO_PRINT_PROGRAM_OUTPUT;
+
+ picobug_cmds.init = picobug_inits; /* Init strings */
+ picobug_cmds.cont = "g\n"; /* continue command */
+ picobug_cmds.step = "s\n"; /* single step */
+ picobug_cmds.set_break = "br %x\n"; /* set a breakpoint */
+ picobug_cmds.clr_break = "nobr %x\n"; /* clear a breakpoint */
+ picobug_cmds.clr_all_break = "nobr\n"; /* clear all breakpoints */
+ picobug_cmds.setmem.cmdb = "mm %x %x ;b\n"; /* setmem.cmdb (addr, value) */
+ picobug_cmds.setmem.cmdw = "mm %x %x ;h\n"; /* setmem.cmdw (addr, value) */
+ picobug_cmds.setmem.cmdl = "mm %x %x ;w\n"; /* setmem.cmdl (addr, value) */
+ picobug_cmds.getmem.cmdb = "md %x %x\n"; /* getmem.cmdb (start addr, end addr) */
+ picobug_cmds.getmem.resp_delim = ":"; /* getmem.resp_delim */
+ picobug_cmds.setreg.cmd = "rm %s %x\n"; /* setreg.cmd (name, value) */
+ picobug_cmds.getreg.cmd = "rd %s\n"; /* getreg.cmd (name) */
+ picobug_cmds.getreg.resp_delim = ":"; /* getreg.resp_delim */
+ picobug_cmds.dump_registers = "rd\n"; /* dump_registers */
+ picobug_cmds.dumpregs = picobug_dumpregs; /* dump registers parser */
+ picobug_cmds.load = "lo\n"; /* download command */
+ picobug_cmds.prompt = "picobug> "; /* monitor command prompt */
+ picobug_cmds.line_term = "\n"; /* end-of-line terminator */
+ picobug_cmds.target = &picobug_ops; /* target operations */
+ picobug_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
+ picobug_cmds.regnames = picobug_regnames; /* registers names */
+ picobug_cmds.num_breakpoints = 20; /* number of breakpoints */
+ picobug_cmds.magic = MONITOR_OPS_MAGIC; /* magic */
+}
+
+void
+_initialize_picobug_rom ()
+{
+ int i;
+
+ /* Initialize m32r RevC monitor target */
+ init_picobug_cmds ();
+ init_monitor_ops (&picobug_ops);
+ picobug_ops.to_shortname = "picobug";
+ picobug_ops.to_longname = "picobug monitor";
+ picobug_ops.to_doc = "Debug via the picobug monitor.\n\
+Specify the serial device it is connected to (e.g. /dev/ttya).";
+ picobug_ops.to_open = picobug_open;
+
+ add_target (&picobug_ops);
+}
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
new file mode 100644
index 0000000..1fc6e90
--- /dev/null
+++ b/gdb/mcore-tdep.c
@@ -0,0 +1,992 @@
+/* Target-machine dependent code for Motorola MCore for GDB, the GNU debugger
+ Copyright (C) 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. */
+
+#include "defs.h"
+#include "frame.h"
+#include "symtab.h"
+#include "value.h"
+#include "gdbcmd.h"
+
+/* Functions declared and used only in this file */
+
+static CORE_ADDR mcore_analyze_prologue (struct frame_info *fi, CORE_ADDR pc, int skip_prologue);
+
+static struct frame_info *analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame);
+
+static int get_insn (CORE_ADDR pc);
+
+/* Functions exported from this file */
+
+int mcore_use_struct_convention (int gcc_p, struct type *type);
+
+void _initialize_mcore (void);
+
+void mcore_init_extra_frame_info (struct frame_info *fi);
+
+CORE_ADDR mcore_frame_saved_pc (struct frame_info *fi);
+
+CORE_ADDR mcore_find_callers_reg (struct frame_info *fi, int regnum);
+
+CORE_ADDR mcore_frame_args_address (struct frame_info *fi);
+
+CORE_ADDR mcore_frame_locals_address (struct frame_info *fi);
+
+void mcore_virtual_frame_pointer (CORE_ADDR pc, long *reg, long *offset);
+
+CORE_ADDR mcore_push_return_address (CORE_ADDR pc, CORE_ADDR sp);
+
+CORE_ADDR mcore_push_arguments (int nargs, value_ptr * args, CORE_ADDR sp,
+ unsigned char struct_return, CORE_ADDR struct_addr);
+
+void mcore_pop_frame (struct frame_info *fi);
+
+CORE_ADDR mcore_skip_prologue (CORE_ADDR pc);
+
+CORE_ADDR mcore_frame_chain (struct frame_info *fi);
+
+unsigned char *mcore_breakpoint_from_pc (CORE_ADDR * bp_addr, int *bp_size);
+
+int mcore_use_struct_convention (int gcc_p, struct type *type);
+
+void mcore_store_return_value (struct type *type, char *valbuf);
+
+CORE_ADDR mcore_extract_struct_value_address (char *regbuf);
+
+void mcore_extract_return_value (struct type *type, char *regbuf, char *valbuf);
+
+#ifdef MCORE_DEBUG
+int mcore_debug = 0;
+#endif
+
+/* The registers of the Motorola MCore processors */
+/* *INDENT-OFF* */
+char *mcore_register_names[] =
+{ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
+ "ar0", "ar1", "ar2", "ar3", "ar4", "ar5", "ar6", "ar7",
+ "ar8", "ar9", "ar10", "ar11", "ar12", "ar13", "ar14", "ar15",
+ "psr", "vbr", "epsr", "fpsr", "epc", "fpc", "ss0", "ss1",
+ "ss2", "ss3", "ss4", "gcr", "gsr", "cr13", "cr14", "cr15",
+ "cr16", "cr17", "cr18", "cr19", "cr20", "cr21", "cr22", "cr23",
+ "cr24", "cr25", "cr26", "cr27", "cr28", "cr29", "cr30", "cr31",
+ "pc" };
+/* *INDENT-ON* */
+
+
+
+/* Additional info that we use for managing frames */
+struct frame_extra_info
+ {
+ /* A generic status word */
+ int status;
+
+ /* Size of this frame */
+ int framesize;
+
+ /* The register that is acting as a frame pointer, if
+ it is being used. This is undefined if status
+ does not contain the flag MY_FRAME_IN_FP. */
+ int fp_regnum;
+ };
+
+/* frame_extra_info status flags */
+
+/* The base of the current frame is actually in the stack pointer.
+ This happens when there is no frame pointer (MCore ABI does not
+ require a frame pointer) or when we're stopped in the prologue or
+ epilogue itself. In these cases, mcore_analyze_prologue will need
+ to update fi->frame before returning or analyzing the register
+ save instructions. */
+#define MY_FRAME_IN_SP 0x1
+
+/* The base of the current frame is in a frame pointer register.
+ This register is noted in frame_extra_info->fp_regnum.
+
+ Note that the existance of an FP might also indicate that the
+ function has called alloca. */
+#define MY_FRAME_IN_FP 0x2
+
+/* This flag is set to indicate that this frame is the top-most
+ frame. This tells frame chain not to bother trying to unwind
+ beyond this frame. */
+#define NO_MORE_FRAMES 0x4
+
+/* Instruction macros used for analyzing the prologue */
+#define IS_SUBI0(x) (((x) & 0xfe0f) == 0x2400) /* subi r0,oimm5 */
+#define IS_STM(x) (((x) & 0xfff0) == 0x0070) /* stm rf-r15,r0 */
+#define IS_STWx0(x) (((x) & 0xf00f) == 0x9000) /* stw rz,(r0,disp) */
+#define IS_STWxy(x) (((x) & 0xf000) == 0x9000) /* stw rx,(ry,disp) */
+#define IS_MOVx0(x) (((x) & 0xfff0) == 0x1200) /* mov rn,r0 */
+#define IS_LRW1(x) (((x) & 0xff00) == 0x7100) /* lrw r1,literal */
+#define IS_MOVI1(x) (((x) & 0xf80f) == 0x6001) /* movi r1,imm7 */
+#define IS_BGENI1(x) (((x) & 0xfe0f) == 0x3201) /* bgeni r1,imm5 */
+#define IS_BMASKI1(x) (((x) & 0xfe0f) == 0x2C01) /* bmaski r1,imm5 */
+#define IS_ADDI1(x) (((x) & 0xfe0f) == 0x2001) /* addi r1,oimm5 */
+#define IS_SUBI1(x) (((x) & 0xfe0f) == 0x2401) /* subi r1,oimm5 */
+#define IS_RSUBI1(x) (((x) & 0xfe0f) == 0x2801) /* rsubi r1,imm5 */
+#define IS_NOT1(x) (((x) & 0xffff) == 0x01f1) /* not r1 */
+#define IS_ROTLI1(x) (((x) & 0xfe0f) == 0x3801) /* rotli r1,imm5 */
+#define IS_BSETI1(x) (((x) & 0xfe0f) == 0x3401) /* bseti r1,imm5 */
+#define IS_BCLRI1(x) (((x) & 0xfe0f) == 0x3001) /* bclri r1,imm5 */
+#define IS_IXH1(x) (((x) & 0xffff) == 0x1d11) /* ixh r1,r1 */
+#define IS_IXW1(x) (((x) & 0xffff) == 0x1511) /* ixw r1,r1 */
+#define IS_SUB01(x) (((x) & 0xffff) == 0x0510) /* subu r0,r1 */
+#define IS_RTS(x) (((x) & 0xffff) == 0x00cf) /* jmp r15 */
+
+#define IS_R1_ADJUSTER(x) \
+ (IS_ADDI1(x) || IS_SUBI1(x) || IS_ROTLI1(x) || IS_BSETI1(x) \
+ || IS_BCLRI1(x) || IS_RSUBI1(x) || IS_NOT1(x) \
+ || IS_IXH1(x) || IS_IXW1(x))
+
+
+#ifdef MCORE_DEBUG
+static void
+mcore_dump_insn (char *commnt, CORE_ADDR pc, int insn)
+{
+ if (mcore_debug)
+ {
+ printf_filtered ("MCORE: %s %08x %08x ",
+ commnt, (unsigned int) pc, (unsigned int) insn);
+ (*tm_print_insn) (pc, &tm_print_insn_info);
+ printf_filtered ("\n");
+ }
+}
+#define mcore_insn_debug(args) { if (mcore_debug) printf_filtered args; }
+#else /* !MCORE_DEBUG */
+#define mcore_dump_insn(a,b,c) {}
+#define mcore_insn_debug(args) {}
+#endif
+
+/* Given the address at which to insert a breakpoint (BP_ADDR),
+ what will that breakpoint be?
+
+ For MCore, we have a breakpoint instruction. Since all MCore
+ instructions are 16 bits, this is all we need, regardless of
+ address. bpkt = 0x0000 */
+
+unsigned char *
+mcore_breakpoint_from_pc (CORE_ADDR * bp_addr, int *bp_size)
+{
+ static char breakpoint[] =
+ {0x00, 0x00};
+ *bp_size = 2;
+ return breakpoint;
+}
+
+/* Helper function for several routines below. This funtion simply
+ sets up a fake, aka dummy, frame (not a _call_ dummy frame) that
+ we can analyze with mcore_analyze_prologue. */
+
+static struct frame_info *
+analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame)
+{
+ static struct frame_info *dummy = NULL;
+
+ if (dummy == NULL)
+ {
+ dummy = (struct frame_info *) xmalloc (sizeof (struct frame_info));
+ dummy->saved_regs = (CORE_ADDR *) xmalloc (SIZEOF_FRAME_SAVED_REGS);
+ dummy->extra_info =
+ (struct frame_extra_info *) xmalloc (sizeof (struct frame_extra_info));
+ }
+
+ dummy->next = NULL;
+ dummy->prev = NULL;
+ dummy->pc = pc;
+ dummy->frame = frame;
+ dummy->extra_info->status = 0;
+ dummy->extra_info->framesize = 0;
+ memset (dummy->saved_regs, '\000', SIZEOF_FRAME_SAVED_REGS);
+ mcore_analyze_prologue (dummy, 0, 0);
+ return dummy;
+}
+
+/* Function prologues on the Motorol MCore processors consist of:
+
+ - adjustments to the stack pointer (r1 used as scratch register)
+ - store word/multiples that use r0 as the base address
+ - making a copy of r0 into another register (a "frame" pointer)
+
+ Note that the MCore really doesn't have a real frame pointer.
+ Instead, the compiler may copy the SP into a register (usually
+ r8) to act as an arg pointer. For our target-dependent purposes,
+ the frame info's "frame" member will be the beginning of the
+ frame. The SP could, in fact, point below this.
+
+ The prologue ends when an instruction fails to meet either of
+ the first two criteria or when an FP is made. We make a special
+ exception for gcc. When compiling unoptimized code, gcc will
+ setup stack slots. We need to make sure that we skip the filling
+ of these stack slots as much as possible. This is only done
+ when SKIP_PROLOGUE is set, so that it does not mess up
+ backtraces. */
+
+/* Analyze the prologue of frame FI to determine where registers are saved,
+ the end of the prologue, etc. Return the address of the first line
+ of "real" code (i.e., the end of the prologue). */
+
+static CORE_ADDR
+mcore_analyze_prologue (struct frame_info *fi, CORE_ADDR pc, int skip_prologue)
+{
+ CORE_ADDR func_addr, func_end, addr, stop;
+ CORE_ADDR stack_size;
+ int insn, rn;
+ int status, fp_regnum, flags;
+ int framesize;
+ int register_offsets[NUM_REGS];
+ char *name;
+
+ /* If provided, use the PC in the frame to look up the
+ start of this function. */
+ pc = (fi == NULL ? pc : fi->pc);
+
+ /* Find the start of this function. */
+ status = find_pc_partial_function (pc, &name, &func_addr, &func_end);
+
+ /* If the start of this function could not be found or if the debbuger
+ is stopped at the first instruction of the prologue, do nothing. */
+ if (status == 0)
+ return pc;
+
+ /* If the debugger is entry function, give up. */
+ if (func_addr == entry_point_address ())
+ {
+ if (fi != NULL)
+ fi->extra_info->status |= NO_MORE_FRAMES;
+ return pc;
+ }
+
+ /* At the start of a function, our frame is in the stack pointer. */
+ flags = MY_FRAME_IN_SP;
+
+ /* Start decoding the prologue. We start by checking two special cases:
+
+ 1. We're about to return
+ 2. We're at the first insn of the prologue.
+
+ If we're about to return, our frame has already been deallocated.
+ If we are stopped at the first instruction of a prologue,
+ then our frame has not yet been set up. */
+
+ /* Get the first insn from memory (all MCore instructions are 16 bits) */
+ mcore_insn_debug (("MCORE: starting prologue decoding\n"));
+ insn = get_insn (pc);
+ mcore_dump_insn ("got 1: ", pc, insn);
+
+ /* Check for return. */
+ if (fi != NULL && IS_RTS (insn))
+ {
+ mcore_insn_debug (("MCORE: got jmp r15"));
+ if (fi->next == NULL)
+ fi->frame = read_sp ();
+ return fi->pc;
+ }
+
+ /* Check for first insn of prologue */
+ if (fi != NULL && fi->pc == func_addr)
+ {
+ if (fi->next == NULL)
+ fi->frame = read_sp ();
+ return fi->pc;
+ }
+
+ /* Figure out where to stop scanning */
+ stop = (fi ? fi->pc : func_end);
+
+ /* Don't walk off the end of the function */
+ stop = (stop > func_end ? func_end : stop);
+
+ /* REGISTER_OFFSETS will contain offsets, from the top of the frame
+ (NOT the frame pointer), for the various saved registers or -1
+ if the register is not saved. */
+ for (rn = 0; rn < NUM_REGS; rn++)
+ register_offsets[rn] = -1;
+
+ /* Analyze the prologue. Things we determine from analyzing the
+ prologue include:
+ * the size of the frame
+ * where saved registers are located (and which are saved)
+ * FP used? */
+ mcore_insn_debug (("MCORE: Scanning prologue: func_addr=0x%x, stop=0x%x\n",
+ (unsigned int) func_addr, (unsigned int) stop));
+
+ framesize = 0;
+ for (addr = func_addr; addr < stop; addr += 2)
+ {
+ /* Get next insn */
+ insn = get_insn (addr);
+ mcore_dump_insn ("got 2: ", addr, insn);
+
+ if (IS_SUBI0 (insn))
+ {
+ int offset = 1 + ((insn >> 4) & 0x1f);
+ mcore_insn_debug (("MCORE: got subi r0,%d; contnuing\n", offset));
+ framesize += offset;
+ continue;
+ }
+ else if (IS_STM (insn))
+ {
+ /* Spill register(s) */
+ int offset;
+ int start_register;
+
+ /* BIG WARNING! The MCore ABI does not restrict functions
+ to taking only one stack allocation. Therefore, when
+ we save a register, we record the offset of where it was
+ saved relative to the current framesize. This will
+ then give an offset from the SP upon entry to our
+ function. Remember, framesize is NOT constant until
+ we're done scanning the prologue. */
+ start_register = (insn & 0xf);
+ mcore_insn_debug (("MCORE: got stm r%d-r15,(r0)\n", start_register));
+
+ for (rn = start_register, offset = 0; rn <= 15; rn++, offset += 4)
+ {
+ register_offsets[rn] = framesize - offset;
+ mcore_insn_debug (("MCORE: r%d saved at 0x%x (offset %d)\n", rn,
+ register_offsets[rn], offset));
+ }
+ mcore_insn_debug (("MCORE: continuing\n"));
+ continue;
+ }
+ else if (IS_STWx0 (insn))
+ {
+ /* Spill register: see note for IS_STM above. */
+ int imm;
+
+ rn = (insn >> 8) & 0xf;
+ imm = (insn >> 4) & 0xf;
+ register_offsets[rn] = framesize - (imm << 2);
+ mcore_insn_debug (("MCORE: r%d saved at offset 0x%x\n", rn, register_offsets[rn]));
+ mcore_insn_debug (("MCORE: continuing\n"));
+ continue;
+ }
+ else if (IS_MOVx0 (insn))
+ {
+ /* We have a frame pointer, so this prologue is over. Note
+ the register which is acting as the frame pointer. */
+ flags |= MY_FRAME_IN_FP;
+ flags &= ~MY_FRAME_IN_SP;
+ fp_regnum = insn & 0xf;
+ mcore_insn_debug (("MCORE: Found a frame pointer: r%d\n", fp_regnum));
+
+ /* If we found an FP, we're at the end of the prologue. */
+ mcore_insn_debug (("MCORE: end of prologue\n"));
+ if (skip_prologue)
+ continue;
+
+ /* If we're decoding prologue, stop here. */
+ addr += 2;
+ break;
+ }
+ else if (IS_STWxy (insn) && (flags & MY_FRAME_IN_FP) && ((insn & 0xf) == fp_regnum))
+ {
+ /* Special case. Skip over stack slot allocs, too. */
+ mcore_insn_debug (("MCORE: push arg onto stack.\n"));
+ continue;
+ }
+ else if (IS_LRW1 (insn) || IS_MOVI1 (insn)
+ || IS_BGENI1 (insn) || IS_BMASKI1 (insn))
+ {
+ int adjust = 0;
+ int offset = 0;
+ int insn2;
+
+ mcore_insn_debug (("MCORE: looking at large frame\n"));
+ if (IS_LRW1 (insn))
+ {
+ adjust =
+ read_memory_integer ((addr + 2 + ((insn & 0xff) << 2)) & 0xfffffffc, 4);
+ }
+ else if (IS_MOVI1 (insn))
+ adjust = (insn >> 4) & 0x7f;
+ else if (IS_BGENI1 (insn))
+ adjust = 1 << ((insn >> 4) & 0x1f);
+ else /* IS_BMASKI (insn) */
+ adjust = (1 << (adjust >> 4) & 0x1f) - 1;
+
+ mcore_insn_debug (("MCORE: base framesize=0x%x\n", adjust));
+
+ /* May have zero or more insns which modify r1 */
+ mcore_insn_debug (("MCORE: looking for r1 adjusters...\n"));
+ offset = 2;
+ insn2 = get_insn (addr + offset);
+ while (IS_R1_ADJUSTER (insn2))
+ {
+ int imm;
+
+ imm = (insn2 >> 4) & 0x1f;
+ mcore_dump_insn ("got 3: ", addr + offset, insn);
+ if (IS_ADDI1 (insn2))
+ {
+ adjust += (imm + 1);
+ mcore_insn_debug (("MCORE: addi r1,%d\n", imm + 1));
+ }
+ else if (IS_SUBI1 (insn2))
+ {
+ adjust -= (imm + 1);
+ mcore_insn_debug (("MCORE: subi r1,%d\n", imm + 1));
+ }
+ else if (IS_RSUBI1 (insn2))
+ {
+ adjust = imm - adjust;
+ mcore_insn_debug (("MCORE: rsubi r1,%d\n", imm + 1));
+ }
+ else if (IS_NOT1 (insn2))
+ {
+ adjust = ~adjust;
+ mcore_insn_debug (("MCORE: not r1\n"));
+ }
+ else if (IS_ROTLI1 (insn2))
+ {
+ adjust <<= imm;
+ mcore_insn_debug (("MCORE: rotli r1,%d\n", imm + 1));
+ }
+ else if (IS_BSETI1 (insn2))
+ {
+ adjust |= (1 << imm);
+ mcore_insn_debug (("MCORE: bseti r1,%d\n", imm));
+ }
+ else if (IS_BCLRI1 (insn2))
+ {
+ adjust &= ~(1 << imm);
+ mcore_insn_debug (("MCORE: bclri r1,%d\n", imm));
+ }
+ else if (IS_IXH1 (insn2))
+ {
+ adjust *= 3;
+ mcore_insn_debug (("MCORE: ix.h r1,r1\n"));
+ }
+ else if (IS_IXW1 (insn2))
+ {
+ adjust *= 5;
+ mcore_insn_debug (("MCORE: ix.w r1,r1\n"));
+ }
+
+ offset += 2;
+ insn2 = get_insn (addr + offset);
+ };
+
+ mcore_insn_debug (("MCORE: done looking for r1 adjusters\n"));
+
+ /* If the next insn adjusts the stack pointer, we keep everything;
+ if not, we scrap it and we've found the end of the prologue. */
+ if (IS_SUB01 (insn2))
+ {
+ addr += offset;
+ framesize += adjust;
+ mcore_insn_debug (("MCORE: found stack adjustment of 0x%x bytes.\n", adjust));
+ mcore_insn_debug (("MCORE: skipping to new address 0x%x\n", addr));
+ mcore_insn_debug (("MCORE: continuing\n"));
+ continue;
+ }
+
+ /* None of these instructions are prologue, so don't touch
+ anything. */
+ mcore_insn_debug (("MCORE: no subu r1,r0, NOT altering framesize.\n"));
+ break;
+ }
+
+ /* This is not a prologue insn, so stop here. */
+ mcore_insn_debug (("MCORE: insn is not a prologue insn -- ending scan\n"));
+ break;
+ }
+
+ mcore_insn_debug (("MCORE: done analyzing prologue\n"));
+ mcore_insn_debug (("MCORE: prologue end = 0x%x\n", addr));
+
+ /* Save everything we have learned about this frame into FI. */
+ if (fi != NULL)
+ {
+ fi->extra_info->framesize = framesize;
+ fi->extra_info->fp_regnum = fp_regnum;
+ fi->extra_info->status = flags;
+
+ /* Fix the frame pointer. When gcc uses r8 as a frame pointer,
+ it is really an arg ptr. We adjust fi->frame to be a "real"
+ frame pointer. */
+ if (fi->next == NULL)
+ {
+ if (fi->extra_info->status & MY_FRAME_IN_SP)
+ fi->frame = read_sp () + framesize;
+ else
+ fi->frame = read_register (fp_regnum) + framesize;
+ }
+
+ /* Note where saved registers are stored. The offsets in REGISTER_OFFSETS
+ are computed relative to the top of the frame. */
+ for (rn = 0; rn < NUM_REGS; rn++)
+ {
+ if (register_offsets[rn] >= 0)
+ {
+ fi->saved_regs[rn] = fi->frame - register_offsets[rn];
+ mcore_insn_debug (("Saved register %s stored at 0x%08x, value=0x%08x\n",
+ mcore_register_names[rn], fi->saved_regs[rn],
+ read_memory_integer (fi->saved_regs[rn], 4)));
+ }
+ }
+ }
+
+ /* Return addr of first non-prologue insn. */
+ return addr;
+}
+
+/* Given a GDB frame, determine the address of the calling function's frame.
+ This will be used to create a new GDB frame struct, and then
+ INIT_EXTRA_FRAME_INFO and INIT_FRAME_PC will be called for the new frame. */
+
+CORE_ADDR
+mcore_frame_chain (struct frame_info * fi)
+{
+ struct frame_info *dummy;
+ CORE_ADDR callers_addr;
+
+ /* Analyze the prologue of this function. */
+ if (fi->extra_info->status == 0)
+ mcore_analyze_prologue (fi, 0, 0);
+
+ /* If mcore_analyze_prologue set NO_MORE_FRAMES, quit now. */
+ if (fi->extra_info->status & NO_MORE_FRAMES)
+ return 0;
+
+ /* Now that we've analyzed our prologue, we can start to ask
+ for information about our caller. The easiest way to do
+ this is to analyze our caller's prologue.
+
+ If our caller has a frame pointer, then we need to find
+ the value of that register upon entry to our frame.
+ This value is either in fi->saved_regs[rn] if it's saved,
+ or it's still in a register.
+
+ If our caller does not have a frame pointer, then his frame base
+ is <our base> + -<caller's frame size>. */
+ dummy = analyze_dummy_frame (FRAME_SAVED_PC (fi), fi->frame);
+
+ if (dummy->extra_info->status & MY_FRAME_IN_FP)
+ {
+ int fp = dummy->extra_info->fp_regnum;
+
+ /* Our caller has a frame pointer. */
+ if (fi->saved_regs[fp] != 0)
+ {
+ /* The "FP" was saved on the stack. Don't forget to adjust
+ the "FP" with the framesize to get a real FP. */
+ callers_addr = read_memory_integer (fi->saved_regs[fp], REGISTER_SIZE)
+ + dummy->extra_info->framesize;
+ }
+ else
+ {
+ /* It's still in the register. Don't forget to adjust
+ the "FP" with the framesize to get a real FP. */
+ callers_addr = read_register (fp) + dummy->extra_info->framesize;
+ }
+ }
+ else
+ {
+ /* Our caller does not have a frame pointer. */
+ callers_addr = fi->frame + dummy->extra_info->framesize;
+ }
+
+ return callers_addr;
+}
+
+/* Skip the prologue of the function at PC. */
+
+CORE_ADDR
+mcore_skip_prologue (CORE_ADDR pc)
+{
+ CORE_ADDR func_addr, func_end;
+ struct symtab_and_line sal;
+
+ /* If we have line debugging information, then the end of the
+ prologue should the first assembly instruction of the first
+ source line */
+ if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
+ {
+ sal = find_pc_line (func_addr, 0);
+ if (sal.end && sal.end < func_end)
+ return sal.end;
+ }
+
+ return mcore_analyze_prologue (NULL, pc, 1);
+}
+
+/* Return the address at which function arguments are offset. */
+CORE_ADDR
+mcore_frame_args_address (struct frame_info * fi)
+{
+ return fi->frame - fi->extra_info->framesize;
+}
+
+CORE_ADDR
+mcore_frame_locals_address (struct frame_info * fi)
+{
+ return fi->frame - fi->extra_info->framesize;
+}
+
+/* Return the frame pointer in use at address PC. */
+
+void
+mcore_virtual_frame_pointer (CORE_ADDR pc, long *reg, long *offset)
+{
+ struct frame_info *dummy = analyze_dummy_frame (pc, 0);
+ if (dummy->extra_info->status & MY_FRAME_IN_SP)
+ {
+ *reg = SP_REGNUM;
+ *offset = 0;
+ }
+ else
+ {
+ *reg = dummy->extra_info->fp_regnum;
+ *offset = 0;
+ }
+}
+
+/* Find the value of register REGNUM in frame FI. */
+
+CORE_ADDR
+mcore_find_callers_reg (struct frame_info *fi, int regnum)
+{
+ for (; fi != NULL; fi = fi->next)
+ {
+ if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ return generic_read_register_dummy (fi->pc, fi->frame, regnum);
+ else if (fi->saved_regs[regnum] != 0)
+ return read_memory_integer (fi->saved_regs[regnum],
+ REGISTER_SIZE);
+ }
+
+ return read_register (regnum);
+}
+
+/* Find the saved pc in frame FI. */
+
+CORE_ADDR
+mcore_frame_saved_pc (struct frame_info * fi)
+{
+
+ if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ return generic_read_register_dummy (fi->pc, fi->frame, PC_REGNUM);
+ else
+ return mcore_find_callers_reg (fi, PR_REGNUM);
+}
+
+/* INFERIOR FUNCTION CALLS */
+
+/* This routine gets called when either the user uses the "return"
+ command, or the call dummy breakpoint gets hit. */
+
+void
+mcore_pop_frame (struct frame_info *fi)
+{
+ int rn;
+
+ if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ generic_pop_dummy_frame ();
+ else
+ {
+ /* Write out the PC we saved. */
+ write_register (PC_REGNUM, FRAME_SAVED_PC (fi));
+
+ /* Restore any saved registers. */
+ for (rn = 0; rn < NUM_REGS; rn++)
+ {
+ if (fi->saved_regs[rn] != 0)
+ {
+ ULONGEST value;
+
+ value = read_memory_unsigned_integer (fi->saved_regs[rn],
+ REGISTER_SIZE);
+ write_register (rn, value);
+ }
+ }
+
+ /* Actually cut back the stack. */
+ write_register (SP_REGNUM, FRAME_FP (fi));
+ }
+
+ /* Finally, throw away any cached frame information. */
+ flush_cached_frames ();
+}
+
+/* Setup arguments and PR for a call to the target. First six arguments
+ go in FIRST_ARGREG -> LAST_ARGREG, subsequent args go on to the stack.
+
+ * Types with lengths greater than REGISTER_SIZE may not be split
+ between registers and the stack, and they must start in an even-numbered
+ register. Subsequent args will go onto the stack.
+
+ * Structs may be split between registers and stack, left-aligned.
+
+ * If the function returns a struct which will not fit into registers (it's
+ more than eight bytes), we must allocate for that, too. Gdb will tell
+ us where this buffer is (STRUCT_ADDR), and we simply place it into
+ FIRST_ARGREG, since the MCORE treats struct returns (of less than eight
+ bytes) as hidden first arguments. */
+
+CORE_ADDR
+mcore_push_arguments (int nargs, value_ptr * args, CORE_ADDR sp,
+ unsigned char struct_return, CORE_ADDR struct_addr)
+{
+ int argreg;
+ int argnum;
+ struct stack_arg
+ {
+ int len;
+ char *val;
+ }
+ *stack_args;
+ int nstack_args = 0;
+
+ stack_args = (struct stack_arg *) alloca (nargs * sizeof (struct stack_arg));
+
+ argreg = FIRST_ARGREG;
+
+ /* Align the stack. This is mostly a nop, but not always. It will be needed
+ if we call a function which has argument overflow. */
+ sp &= ~3;
+
+ /* If this function returns a struct which does not fit in the
+ return registers, we must pass a buffer to the function
+ which it can use to save the return value. */
+ if (struct_return)
+ write_register (argreg++, struct_addr);
+
+ /* FIXME: what about unions? */
+ for (argnum = 0; argnum < nargs; argnum++)
+ {
+ char *val = (char *) VALUE_CONTENTS (args[argnum]);
+ int len = TYPE_LENGTH (VALUE_TYPE (args[argnum]));
+ struct type *type = VALUE_TYPE (args[argnum]);
+ int olen;
+
+ mcore_insn_debug (("MCORE PUSH: argreg=%d; len=%d; %s\n",
+ argreg, len, TYPE_CODE (type) == TYPE_CODE_STRUCT ? "struct" : "not struct"));
+ /* Arguments larger than a register must start in an even
+ numbered register. */
+ olen = len;
+
+ if (TYPE_CODE (type) != TYPE_CODE_STRUCT && len > REGISTER_SIZE && argreg % 2)
+ {
+ mcore_insn_debug (("MCORE PUSH: %d > REGISTER_SIZE: and %s is not even\n",
+ len, mcore_register_names[argreg]));
+ argreg++;
+ }
+
+ if ((argreg <= LAST_ARGREG && len <= (LAST_ARGREG - argreg + 1) * REGISTER_SIZE)
+ || (TYPE_CODE (type) == TYPE_CODE_STRUCT))
+ {
+ /* Something that will fit entirely into registers (or a struct
+ which may be split between registers and stack). */
+ mcore_insn_debug (("MCORE PUSH: arg %d going into regs\n", argnum));
+
+ if (TYPE_CODE (type) == TYPE_CODE_STRUCT && olen < REGISTER_SIZE)
+ {
+ /* Small structs must be right aligned within the register,
+ the most significant bits are undefined. */
+ write_register (argreg, extract_unsigned_integer (val, len));
+ argreg++;
+ len = 0;
+ }
+
+ while (len > 0 && argreg <= LAST_ARGREG)
+ {
+ write_register (argreg, extract_unsigned_integer (val, REGISTER_SIZE));
+ argreg++;
+ val += REGISTER_SIZE;
+ len -= REGISTER_SIZE;
+ }
+
+ /* Any remainder for the stack is noted below... */
+ }
+ else if (TYPE_CODE (VALUE_TYPE (args[argnum])) != TYPE_CODE_STRUCT
+ && len > REGISTER_SIZE)
+ {
+ /* All subsequent args go onto the stack. */
+ mcore_insn_debug (("MCORE PUSH: does not fit into regs, going onto stack\n"));
+ argnum = LAST_ARGREG + 1;
+ }
+
+ if (len > 0)
+ {
+ /* Note that this must be saved onto the stack */
+ mcore_insn_debug (("MCORE PUSH: adding arg %d to stack\n", argnum));
+ stack_args[nstack_args].val = val;
+ stack_args[nstack_args].len = len;
+ nstack_args++;
+ }
+
+ }
+
+ /* We're done with registers and stack allocation. Now do the actual
+ stack pushes. */
+ while (nstack_args--)
+ {
+ sp -= stack_args[nstack_args].len;
+ write_memory (sp, stack_args[nstack_args].val, stack_args[nstack_args].len);
+ }
+
+ /* Return adjusted stack pointer. */
+ return sp;
+}
+
+/* Store the return address for the call dummy. For MCore, we've
+ opted to use generic call dummies, so we simply store the
+ CALL_DUMMY_ADDRESS into the PR register (r15). */
+
+CORE_ADDR
+mcore_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
+{
+ write_register (PR_REGNUM, CALL_DUMMY_ADDRESS ());
+ return sp;
+}
+
+/* Setting/getting return values from functions.
+
+ The Motorola MCore processors use r2/r3 to return anything
+ not larger than 32 bits. Everything else goes into a caller-
+ supplied buffer, which is passed in via a hidden first
+ argument.
+
+ For gdb, this leaves us two routes, based on what
+ USE_STRUCT_CONVENTION (mcore_use_struct_convention) returns.
+ If this macro returns 1, gdb will call STORE_STRUCT_RETURN and
+ EXTRACT_STRUCT_VALUE_ADDRESS.
+
+ If USE_STRUCT_CONVENTION retruns 0, then gdb uses STORE_RETURN_VALUE
+ and EXTRACT_RETURN_VALUE to store/fetch the functions return value. */
+
+/* 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). */
+
+int
+mcore_use_struct_convention (int gcc_p, struct type *type)
+{
+ return (TYPE_LENGTH (type) > 8);
+}
+
+/* Where is the return value saved? For MCore, a pointer to
+ this buffer was passed as a hidden first argument, so
+ just return that address. */
+
+CORE_ADDR
+mcore_extract_struct_value_address (char *regbuf)
+{
+ return extract_address (regbuf + REGISTER_BYTE (FIRST_ARGREG), REGISTER_SIZE);
+}
+
+/* Given a function which returns a value of type TYPE, extract the
+ the function's return value and place the result into VALBUF.
+ REGBUF is the register contents of the target. */
+
+void
+mcore_extract_return_value (struct type *type, char *regbuf, char *valbuf)
+{
+ /* Copy the return value (starting) in RETVAL_REGNUM to VALBUF. */
+ /* Only getting the first byte! if len = 1, we need the last byte of
+ the register, not the first. */
+ memcpy (valbuf, regbuf + REGISTER_BYTE (RETVAL_REGNUM) +
+ (TYPE_LENGTH (type) < 4 ? 4 - TYPE_LENGTH (type) : 0), TYPE_LENGTH (type));
+}
+
+/* Store the return value in VALBUF (of type TYPE) where the caller
+ expects to see it.
+
+ Values less than 32 bits are stored in r2, right justified and
+ sign or zero extended.
+
+ Values between 32 and 64 bits are stored in r2 (most
+ significant word) and r3 (least significant word, left justified).
+ Note that this includes structures of less than eight bytes, too. */
+
+void
+mcore_store_return_value (struct type *type, char *valbuf)
+{
+ int value_size;
+ int return_size;
+ int offset;
+ char *zeros;
+
+ value_size = TYPE_LENGTH (type);
+
+ /* Return value fits into registers. */
+ return_size = (value_size + REGISTER_SIZE - 1) & ~(REGISTER_SIZE - 1);
+ offset = REGISTER_BYTE (RETVAL_REGNUM) + (return_size - value_size);
+ zeros = alloca (return_size);
+ memset (zeros, 0, return_size);
+
+ write_register_bytes (REGISTER_BYTE (RETVAL_REGNUM), zeros, return_size);
+ write_register_bytes (offset, valbuf, value_size);
+}
+
+/* Initialize our target-dependent "stuff" for this newly created frame.
+
+ This includes allocating space for saved registers and analyzing
+ the prologue of this frame. */
+
+void
+mcore_init_extra_frame_info (struct frame_info *fi)
+{
+ if (fi->next)
+ fi->pc = FRAME_SAVED_PC (fi->next);
+
+ frame_saved_regs_zalloc (fi);
+
+ fi->extra_info = (struct frame_extra_info *)
+ frame_obstack_alloc (sizeof (struct frame_extra_info));
+ fi->extra_info->status = 0;
+ fi->extra_info->framesize = 0;
+
+ if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+ {
+ /* We need to setup fi->frame here because run_stack_dummy gets it wrong
+ by assuming it's always FP. */
+ fi->frame = generic_read_register_dummy (fi->pc, fi->frame, SP_REGNUM);
+ }
+ else
+ mcore_analyze_prologue (fi, 0, 0);
+}
+
+/* Get an insturction from memory. */
+
+static int
+get_insn (CORE_ADDR pc)
+{
+ char buf[4];
+ int status = read_memory_nobpt (pc, buf, 2);
+ if (status != 0)
+ return 0;
+
+ return extract_unsigned_integer (buf, 2);
+}
+
+void
+_initialize_mcore_tdep ()
+{
+ extern int print_insn_mcore (bfd_vma, disassemble_info *);
+ tm_print_insn = print_insn_mcore;
+
+#ifdef MCORE_DEBUG
+ add_show_from_set (add_set_cmd ("mcoredebug", no_class,
+ var_boolean, (char *) &mcore_debug,
+ "Set mcore debugging.\n", &setlist),
+ &showlist);
+#endif
+}
diff --git a/gdb/mipsread.c b/gdb/mipsread.c
index 94e70a9..a388e76 100644
--- a/gdb/mipsread.c
+++ b/gdb/mipsread.c
@@ -51,8 +51,7 @@ static void
mipscoff_symfile_init PARAMS ((struct objfile *));
static void
-mipscoff_symfile_read PARAMS ((struct objfile *, struct section_offsets *,
- int));
+mipscoff_symfile_read PARAMS ((struct objfile *, int));
static void
mipscoff_symfile_finish PARAMS ((struct objfile *));
@@ -87,9 +86,8 @@ mipscoff_symfile_init (objfile)
/* Read a symbol file from a file. */
static void
-mipscoff_symfile_read (objfile, section_offsets, mainline)
+mipscoff_symfile_read (objfile, mainline)
struct objfile *objfile;
- struct section_offsets *section_offsets;
int mainline;
{
bfd *abfd = objfile->obfd;
@@ -106,11 +104,11 @@ mipscoff_symfile_read (objfile, section_offsets, mainline)
error ("Error reading symbol table: %s", bfd_errmsg (bfd_get_error ()));
mdebug_build_psymtabs (objfile, &ecoff_backend (abfd)->debug_swap,
- &ecoff_data (abfd)->debug_info, section_offsets);
+ &ecoff_data (abfd)->debug_info, objfile->section_offsets);
/* Add alpha coff dynamic symbols. */
- read_alphacoff_dynamic_symtab (section_offsets, objfile);
+ read_alphacoff_dynamic_symtab (objfile->section_offsets, objfile);
/* Install any minimal symbols that have been collected as the current
minimal symbols for this objfile. */
diff --git a/gdb/monitor.c b/gdb/monitor.c
index 306b783..01fda27 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -42,11 +42,6 @@
#include "gdbcore.h"
#include "target.h"
#include "wait.h"
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include <signal.h>
#include <ctype.h>
#include "gdb_string.h"
@@ -67,8 +62,6 @@ static void monitor_vsprintf PARAMS ((char *sndbuf, char *pattern, va_list args)
static int readchar PARAMS ((int timeout));
-static void monitor_command PARAMS ((char *args, int fromtty));
-
static void monitor_fetch_register PARAMS ((int regno));
static void monitor_store_register PARAMS ((int regno));
@@ -322,24 +315,13 @@ monitor_vsprintf (sndbuf, pattern, args)
Works just like printf. */
void
-#ifdef ANSI_PROTOTYPES
monitor_printf_noecho (char *pattern,...)
-#else
-monitor_printf_noecho (va_alist)
- va_dcl
-#endif
{
va_list args;
char sndbuf[2000];
int len;
-#if ANSI_PROTOTYPES
va_start (args, pattern);
-#else
- char *pattern;
- va_start (args);
- pattern = va_arg (args, char *);
-#endif
monitor_vsprintf (sndbuf, pattern, args);
@@ -366,24 +348,13 @@ monitor_printf_noecho (va_alist)
printf. */
void
-#ifdef ANSI_PROTOTYPES
monitor_printf (char *pattern,...)
-#else
-monitor_printf (va_alist)
- va_dcl
-#endif
{
va_list args;
char sndbuf[2000];
int len;
-#ifdef ANSI_PROTOTYPES
va_start (args, pattern);
-#else
- char *pattern;
- va_start (args);
- pattern = va_arg (args, char *);
-#endif
monitor_vsprintf (sndbuf, pattern, args);
@@ -2261,14 +2232,13 @@ monitor_stop ()
monitor_printf_noecho (current_monitor->stop);
}
-/* Put a command string, in args, out to MONITOR. Output from MONITOR
- is placed on the users terminal until the prompt is seen. FIXME: We
- read the characters ourseleves here cause of a nasty echo. */
+/* Put a COMMAND string out to MONITOR. Output from MONITOR is placed
+ in OUTPUT until the prompt is seen. FIXME: We read the characters
+ ourseleves here cause of a nasty echo. */
static void
-monitor_command (args, from_tty)
- char *args;
- int from_tty;
+monitor_rcmd (char *command,
+ struct gdb_file *outbuf)
{
char *p;
int resp_len;
@@ -2282,11 +2252,11 @@ monitor_command (args, from_tty)
/* Send the command. Note that if no args were supplied, then we're
just sending the monitor a newline, which is sometimes useful. */
- monitor_printf ("%s\r", (args ? args : ""));
+ monitor_printf ("%s\r", (command ? command : ""));
resp_len = monitor_expect_prompt (buf, sizeof buf);
- fputs_unfiltered (buf, gdb_stdout); /* Output the response */
+ fputs_unfiltered (buf, outbuf); /* Output the response */
}
/* Convert hex digit A to a number. */
@@ -2369,6 +2339,7 @@ init_base_monitor_ops (void)
monitor_ops.to_notice_signals = 0;
monitor_ops.to_thread_alive = 0;
monitor_ops.to_stop = monitor_stop;
+ monitor_ops.to_rcmd = monitor_rcmd;
monitor_ops.to_pid_to_exec_file = NULL;
monitor_ops.to_core_file_to_sym_file = NULL;
monitor_ops.to_stratum = process_stratum;
@@ -2407,7 +2378,4 @@ _initialize_remote_monitors ()
When enabled, a hashmark \'#\' is displayed.",
&setlist),
&showlist);
-
- add_com ("monitor", class_obscure, monitor_command,
- "Send a command to the debug monitor.");
}
diff --git a/gdb/nlmread.c b/gdb/nlmread.c
index 71018dd..03413b3 100644
--- a/gdb/nlmread.c
+++ b/gdb/nlmread.c
@@ -38,7 +38,7 @@ static void
nlm_symfile_init PARAMS ((struct objfile *));
static void
-nlm_symfile_read PARAMS ((struct objfile *, struct section_offsets *, int));
+nlm_symfile_read PARAMS ((struct objfile *, int));
static void
nlm_symfile_finish PARAMS ((struct objfile *));
@@ -182,9 +182,8 @@ nlm_symtab_read (abfd, addr, objfile)
is not currently used. */
static void
-nlm_symfile_read (objfile, section_offsets, mainline)
+nlm_symfile_read (objfile, mainline)
struct objfile *objfile;
- struct section_offsets *section_offsets;
int mainline;
{
bfd *abfd = objfile->obfd;
@@ -197,14 +196,14 @@ nlm_symfile_read (objfile, section_offsets, mainline)
/* FIXME, should take a section_offsets param, not just an offset. */
- offset = ANOFFSET (section_offsets, 0);
+ offset = ANOFFSET (objfile->section_offsets, 0);
/* Process the NLM export records, which become the bfd's canonical symbol
table. */
nlm_symtab_read (abfd, offset, objfile);
- stabsect_build_psymtabs (objfile, section_offsets, mainline, ".stab",
+ stabsect_build_psymtabs (objfile, mainline, ".stab",
".stabstr", ".text");
mainsym = lookup_symbol ("main", NULL, VAR_NAMESPACE, NULL, NULL);
@@ -252,8 +251,7 @@ static struct sym_fns nlm_sym_fns =
nlm_symfile_init, /* sym_init: read initial info, setup for sym_read() */
nlm_symfile_read, /* sym_read: read a symbol file into symtab */
nlm_symfile_finish, /* sym_finish: finished with file, cleanup */
- default_symfile_offsets,
- /* sym_offsets: Translate ext. to int. relocation */
+ default_symfile_offsets, /* sym_offsets: Translate ext. to int. relocation */
NULL /* next: pointer to next struct sym_fns */
};
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 436dcb8..123c230 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -74,6 +74,11 @@ int mapped_symbol_files; /* Try to use mapped symbol files */
#define TARGET_KEEP_SECTION(ASECT) 0
#endif
+/* Called via bfd_map_over_sections to build up the section table that
+ the objfile references. The objfile contains pointers to the start
+ of the table (objfile->sections) and to the first location after
+ the end of the table (objfile->sections_end). */
+
static void
add_to_objfile_sections (abfd, asect, objfile_p_char)
bfd *abfd;
@@ -103,7 +108,19 @@ add_to_objfile_sections (abfd, asect, objfile_p_char)
/* Builds a section table for OBJFILE.
Returns 0 if OK, 1 on error (in which case bfd_error contains the
- error). */
+ error).
+
+ Note that while we are building the table, which goes into the
+ psymbol obstack, we hijack the sections_end pointer to instead hold
+ a count of the number of sections. When bfd_map_over_sections
+ returns, this count is used to compute the pointer to the end of
+ the sections table, which then overwrites the count.
+
+ Also note that the OFFSET and OVLY_MAPPED in each table entry
+ are initialized to zero.
+
+ Also note that if anything else writes to the psymbol obstack while
+ we are building the table, we're pretty much hosed. */
int
build_objfile_section_table (objfile)
@@ -632,8 +649,7 @@ objfile_relocate (objfile, new_offsets)
abfd = objfile->obfd;
- for (s = objfile->sections;
- s < objfile->sections_end; ++s)
+ ALL_OBJFILE_OSECTIONS (objfile, s)
{
flagword flags;
@@ -944,8 +960,7 @@ find_pc_sect_section (pc, section)
struct obj_section *s;
struct objfile *objfile;
- ALL_OBJFILES (objfile)
- for (s = objfile->sections; s < objfile->sections_end; ++s)
+ ALL_OBJSECTIONS (objfile, s)
#if defined(HPUXHPPA)
if ((section == 0 || section == s->the_bfd_section) &&
s->addr <= pc && pc <= s->endaddr)
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index 96890be..f6fe03c 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -376,9 +376,13 @@ struct objfile
struct section_offsets *section_offsets;
int num_sections;
- /* set of section begin and end addresses used to map pc addresses
- into sections. Currently on the psymbol_obstack (which makes no
- sense, but I'm not sure it's harming anything). */
+ /* These pointers are used to locate the section table, which
+ among other thigs, is used to map pc addresses into sections.
+ SECTIONS points to the first entry in the table, and
+ SECTIONS_END points to the first location past the last entry
+ in the table. Currently the table is stored on the
+ psymbol_obstack (which makes no sense, but I'm not sure it's
+ harming anything). */
struct obj_section
*sections, *sections_end;
diff --git a/gdb/os9kread.c b/gdb/os9kread.c
index 8f439c4..92b2824 100644
--- a/gdb/os9kread.c
+++ b/gdb/os9kread.c
@@ -152,7 +152,7 @@ static void
os9k_new_init PARAMS ((struct objfile *));
static void
-os9k_symfile_read PARAMS ((struct objfile *, struct section_offsets *, int));
+os9k_symfile_read PARAMS ((struct objfile *, int));
static void
os9k_symfile_finish PARAMS ((struct objfile *));
@@ -332,9 +332,8 @@ read_minimal_symbols (objfile, section_offsets)
table (as opposed to a shared lib or dynamically loaded file). */
static void
-os9k_symfile_read (objfile, section_offsets, mainline)
+os9k_symfile_read (objfile, mainline)
struct objfile *objfile;
- struct section_offsets *section_offsets;
int mainline; /* FIXME comments above */
{
bfd *sym_bfd;
@@ -350,11 +349,11 @@ os9k_symfile_read (objfile, section_offsets, mainline)
back_to = make_cleanup (really_free_pendings, 0);
make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
- read_minimal_symbols (objfile, section_offsets);
+ read_minimal_symbols (objfile, objfile->section_offsets);
/* Now that the symbol table data of the executable file are all in core,
process them and define symbols accordingly. */
- read_os9k_psymtab (section_offsets, objfile,
+ read_os9k_psymtab (objfile->section_offsets, objfile,
DBX_TEXT_ADDR (objfile),
DBX_TEXT_SIZE (objfile));
@@ -1663,8 +1662,7 @@ static struct sym_fns os9k_sym_fns =
os9k_symfile_init, /* sym_init: read initial info, setup for sym_read() */
os9k_symfile_read, /* sym_read: read a symbol file into symtab */
os9k_symfile_finish, /* sym_finish: finished with file, cleanup */
- default_symfile_offsets,
- /* sym_offsets: parse user's offsets to internal form */
+ default_symfile_offsets, /* sym_offsets: parse user's offsets to internal form */
NULL /* next: pointer to next struct sym_fns */
};
diff --git a/gdb/osfsolib.c b/gdb/osfsolib.c
index 7539608..831fc75 100644
--- a/gdb/osfsolib.c
+++ b/gdb/osfsolib.c
@@ -591,7 +591,7 @@ symbol_add_stub (arg)
lowest_sect = bfd_get_section_by_name (so->abfd, ".text");
if (lowest_sect == NULL)
bfd_map_over_sections (so->abfd, find_lowest_section,
- (PTR) & lowest_sect);
+ (PTR) &lowest_sect);
if (lowest_sect)
text_addr = bfd_section_vma (so->abfd, lowest_sect) + LM_OFFSET (so);
}
diff --git a/gdb/partial-stab.h b/gdb/partial-stab.h
index f627c8e..2a8c010 100644
--- a/gdb/partial-stab.h
+++ b/gdb/partial-stab.h
@@ -47,19 +47,19 @@ switch (CUR_SYMBOL_TYPE)
case N_TEXT | N_EXT:
case N_NBTEXT | N_EXT:
- CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_TEXT);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
goto record_it;
case N_DATA | N_EXT:
case N_NBDATA | N_EXT:
- CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_DATA);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA);
goto record_it;
case N_BSS:
case N_BSS | N_EXT:
case N_NBBSS | N_EXT:
case N_SETV | N_EXT: /* FIXME, is this in BSS? */
- CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_BSS);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_BSS);
goto record_it;
case N_ABS | N_EXT:
@@ -86,7 +86,7 @@ switch (CUR_SYMBOL_TYPE)
case N_FN_SEQ:
case N_TEXT:
#ifdef DBXREAD_ONLY
- CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_TEXT);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
SET_NAMESTRING ();
if ((namestring[0] == '-' && namestring[1] == 'l')
|| (namestring[(nsl = strlen (namestring)) - 1] == 'o'
@@ -122,7 +122,7 @@ switch (CUR_SYMBOL_TYPE)
continue;
case N_DATA:
- CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_DATA);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA);
goto record_it;
case N_UNDF | N_EXT:
@@ -204,7 +204,7 @@ switch (CUR_SYMBOL_TYPE)
char *p;
int prev_textlow_not_set;
- valu = CUR_SYMBOL_VALUE + ANOFFSET (section_offsets, SECT_OFF_TEXT);
+ valu = CUR_SYMBOL_VALUE + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
prev_textlow_not_set = textlow_not_set;
@@ -266,7 +266,7 @@ switch (CUR_SYMBOL_TYPE)
immediately follow the first. */
if (!pst)
- pst = START_PSYMTAB (objfile, section_offsets,
+ pst = START_PSYMTAB (objfile, objfile->section_offsets,
namestring, valu,
first_so_symnum * symbol_size,
objfile->global_psymbols.next,
@@ -424,7 +424,7 @@ switch (CUR_SYMBOL_TYPE)
switch (p[1])
{
case 'S':
- CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_DATA);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA);
#ifdef STATIC_TRANSFORM_NAME
namestring = STATIC_TRANSFORM_NAME (namestring);
#endif
@@ -435,7 +435,7 @@ switch (CUR_SYMBOL_TYPE)
psymtab_language, objfile);
continue;
case 'G':
- CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_DATA);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA);
/* The addresses in these entries are reported to be
wrong. See the code that reads 'G's for symtabs. */
add_psymbol_to_list (namestring, p - namestring,
@@ -576,7 +576,7 @@ switch (CUR_SYMBOL_TYPE)
continue;
case 'f':
- CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_TEXT);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
#ifdef DBXREAD_ONLY
/* Keep track of the start of the last function so we
can handle end of function symbols. */
@@ -602,7 +602,7 @@ switch (CUR_SYMBOL_TYPE)
if (textlow_not_set
|| (CUR_SYMBOL_VALUE < pst->textlow
&& CUR_SYMBOL_VALUE
- != ANOFFSET (section_offsets, SECT_OFF_TEXT)))
+ != ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT)))
{
pst->textlow = CUR_SYMBOL_VALUE;
textlow_not_set = 0;
@@ -619,7 +619,7 @@ switch (CUR_SYMBOL_TYPE)
are put into the global psymtab like one would expect.
They're also in the minimal symbol table. */
case 'F':
- CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_TEXT);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
#ifdef DBXREAD_ONLY
/* Keep track of the start of the last function so we
can handle end of function symbols. */
@@ -644,7 +644,7 @@ switch (CUR_SYMBOL_TYPE)
if (textlow_not_set
|| (CUR_SYMBOL_VALUE < pst->textlow
&& CUR_SYMBOL_VALUE
- != ANOFFSET (section_offsets, SECT_OFF_TEXT)))
+ != ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT)))
{
pst->textlow = CUR_SYMBOL_VALUE;
textlow_not_set = 0;
diff --git a/gdb/remote-array.c b/gdb/remote-array.c
index 62a15d3..932166f 100644
--- a/gdb/remote-array.c
+++ b/gdb/remote-array.c
@@ -29,11 +29,6 @@
#include "gdbcore.h"
#include "target.h"
#include "wait.h"
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include <ctype.h>
#include <signal.h>
#include <sys/types.h>
@@ -200,24 +195,13 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
* printf_monitor -- send data to monitor. Works just like printf.
*/
static void
-#ifdef ANSI_PROTOTYPES
printf_monitor (char *pattern,...)
-#else
-printf_monitor (va_alist)
- va_dcl
-#endif
{
va_list args;
char buf[PBUFSIZ];
int i;
-#ifdef ANSI_PROTOTYPES
va_start (args, pattern);
-#else
- char *pattern;
- va_start (args);
- pattern = va_arg (args, char *);
-#endif
vsprintf (buf, pattern, args);
@@ -251,12 +235,7 @@ write_monitor (data, len)
* to be formatted and printed. A CR is added after each string is printed.
*/
static void
-#ifdef ANSI_PROTOTYPES
debuglogs (int level, char *pattern,...)
-#else
-debuglogs (va_alist)
- va_dcl
-#endif
{
va_list args;
char *p;
@@ -264,15 +243,7 @@ debuglogs (va_alist)
char newbuf[PBUFSIZ];
int i;
-#ifdef ANSI_PROTOTYPES
va_start (args, pattern);
-#else
- char *pattern;
- int level;
- va_start (args);
- level = va_arg (args, int); /* get the debug level */
- pattern = va_arg (args, char *); /* get the printf style pattern */
-#endif
if ((level < 0) || (level > 100))
{
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index 6d6329d..c92c82f 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -35,11 +35,6 @@
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
/* Microsoft C's stat.h doesn't define all the POSIX file modes. */
#ifndef S_IROTH
@@ -487,22 +482,11 @@ close_ports ()
inconsistent state. */
static NORETURN void
-#ifdef ANSI_PROTOTYPES
mips_error (char *string,...)
-#else
-mips_error (va_alist)
- va_dcl
-#endif
{
va_list args;
-#ifdef ANSI_PROTOTYPES
va_start (args, string);
-#else
- char *string;
- va_start (args);
- string = va_arg (args, char *);
-#endif
target_terminal_ours ();
wrap_here (""); /* Force out any buffered output */
@@ -1279,7 +1263,7 @@ mips_request (cmd, addr, data, perr, timeout, buff)
if (cmd != '\0')
{
if (mips_need_reply)
- fatal ("mips_request: Trying to send command before reply");
+ internal_error ("mips_request: Trying to send command before reply");
sprintf (buff, "0x0 %c 0x%s 0x%s", cmd, paddr_nz (addr), paddr_nz (data));
mips_send_packet (buff, 1);
mips_need_reply = 1;
@@ -1289,7 +1273,7 @@ mips_request (cmd, addr, data, perr, timeout, buff)
return 0;
if (!mips_need_reply)
- fatal ("mips_request: Trying to get reply before command");
+ internal_error ("mips_request: Trying to get reply before command");
mips_need_reply = 0;
diff --git a/gdb/remote-os9k.c b/gdb/remote-os9k.c
index 9bb927e..b14b460 100644
--- a/gdb/remote-os9k.c
+++ b/gdb/remote-os9k.c
@@ -41,11 +41,6 @@
#include "gdbcore.h"
#include "target.h"
#include "wait.h"
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include <signal.h>
#include "gdb_string.h"
#include <sys/types.h>
@@ -93,24 +88,13 @@ static char readbuf[16];
/* Send data to monitor. Works just like printf. */
static void
-#ifdef ANSI_PROTOTYPES
printf_monitor (char *pattern,...)
-#else
-printf_monitor (va_alist)
- va_dcl
-#endif
{
va_list args;
char buf[200];
int i;
-#ifdef ANSI_PROTOTYPES
va_start (args, pattern);
-#else
- char *pattern;
- va_start (args);
- pattern = va_arg (args, char *);
-#endif
vsprintf (buf, pattern, args);
va_end (args);
diff --git a/gdb/remote-rdi.c b/gdb/remote-rdi.c
index 7a6b9a9..49ed2c7 100644
--- a/gdb/remote-rdi.c
+++ b/gdb/remote-rdi.c
@@ -426,6 +426,7 @@ arm_rdi_close (quitting)
}
closed_already = 1;
inferior_pid = 0;
+ Adp_CloseDevice ();
}
}
diff --git a/gdb/remote-rdp.c b/gdb/remote-rdp.c
index 9b6584d..6701f74 100644
--- a/gdb/remote-rdp.c
+++ b/gdb/remote-rdp.c
@@ -42,11 +42,6 @@
#include "value.h"
#include "callback.h"
#include "command.h"
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include <ctype.h>
#include <fcntl.h>
#include "symfile.h"
@@ -379,23 +374,13 @@ rdp_init (cold, tty)
}
-#ifdef ANSI_PROTOTYPES
void
send_rdp (char *template,...)
-#else
-void
-send_rdp (char *template, va_alist)
- va_dcl
-#endif
{
char buf[200];
char *dst = buf;
va_list alist;
-#ifdef ANSI_PROTOTYPES
va_start (alist, template);
-#else
- va_start (alist);
-#endif
while (*template)
{
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 5364066..6f3af0c 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -243,25 +243,11 @@ gdb_os_flush_stderr (p)
/* GDB version of printf_filtered callback. */
-/* VARARGS */
static void
-#ifdef ANSI_PROTOTYPES
gdb_os_printf_filtered (host_callback * p, const char *format,...)
-#else
-gdb_os_printf_filtered (p, va_alist)
- host_callback *p;
- va_dcl
-#endif
{
va_list args;
-#ifdef ANSI_PROTOTYPES
va_start (args, format);
-#else
- char *format;
-
- va_start (args);
- format = va_arg (args, char *);
-#endif
vfprintf_filtered (gdb_stdout, format, args);
@@ -270,61 +256,31 @@ gdb_os_printf_filtered (p, va_alist)
/* GDB version of error vprintf_filtered. */
-/* VARARGS */
static void
-#ifdef ANSI_PROTOTYPES
gdb_os_vprintf_filtered (host_callback * p, const char *format, va_list ap)
-#else
-gdb_os_vprintf_filtered (p, format, ap)
- host_callback *p;
- char *format;
- va_list ap;
-#endif
{
vfprintf_filtered (gdb_stdout, format, ap);
}
/* GDB version of error evprintf_filtered. */
-/* VARARGS */
static void
-#ifdef ANSI_PROTOTYPES
gdb_os_evprintf_filtered (host_callback * p, const char *format, va_list ap)
-#else
-gdb_os_evprintf_filtered (p, format, ap)
- host_callback *p;
- char *format;
- va_list ap;
-#endif
{
vfprintf_filtered (gdb_stderr, format, ap);
}
/* GDB version of error callback. */
-/* VARARGS */
static void
-#ifdef ANSI_PROTOTYPES
gdb_os_error (host_callback * p, const char *format,...)
-#else
-gdb_os_error (p, va_alist)
- host_callback *p;
- va_dcl
-#endif
{
if (error_hook)
(*error_hook) ();
else
{
va_list args;
-#ifdef ANSI_PROTOTYPES
va_start (args, format);
-#else
- char *format;
-
- va_start (args);
- format = va_arg (args, char *);
-#endif
error_begin ();
vfprintf_filtered (gdb_stderr, format, args);
@@ -386,7 +342,7 @@ gdbsim_store_register (regno)
read_register_gen (regno, tmp);
nr_bytes = sim_store_register (gdbsim_desc, regno, tmp, REGISTER_RAW_SIZE (regno));
if (nr_bytes > 0 && nr_bytes != REGISTER_RAW_SIZE (regno))
- fatal ("Register size different to expected");
+ internal_error ("Register size different to expected");
if (sr_get_debug ())
{
printf_filtered ("gdbsim_store_register: %d", regno);
@@ -539,7 +495,7 @@ gdbsim_open (args, from_tty)
strcat (arg_buf, " -E little");
break;
default:
- fatal ("Value of TARGET_BYTE_ORDER unknown");
+ internal_error ("Value of TARGET_BYTE_ORDER unknown");
}
}
/* Specify the architecture of the target when it has been
diff --git a/gdb/remote-st.c b/gdb/remote-st.c
index 79c6b42..3400903 100644
--- a/gdb/remote-st.c
+++ b/gdb/remote-st.c
@@ -39,11 +39,6 @@
#include "gdbcore.h"
#include "target.h"
#include "wait.h"
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include <signal.h>
#include "gdb_string.h"
#include <sys/types.h>
@@ -71,23 +66,12 @@ static serial_t st2000_desc;
/* Send data to stdebug. Works just like printf. */
static void
-#ifdef ANSI_PROTOTYPES
printf_stdebug (char *pattern,...)
-#else
-printf_stdebug (va_alist)
- va_dcl
-#endif
{
va_list args;
char buf[200];
-#ifdef ANSI_PROTOTYPES
va_start (args, pattern);
-#else
- char *pattern;
- va_start (args);
- pattern = va_arg (args, char *);
-#endif
vsprintf (buf, pattern, args);
va_end (args);
diff --git a/gdb/remote-vx.c b/gdb/remote-vx.c
index 787bd39..8c09d2c 100644
--- a/gdb/remote-vx.c
+++ b/gdb/remote-vx.c
@@ -1026,8 +1026,8 @@ vx_wait (pid_to_wait_for, status)
sleep_ms (200); /* FIXME Don't kill the network too badly */
}
else if (pid != inferior_pid)
- fatal ("Bad pid for debugged task: %s\n",
- local_hex_string ((unsigned long) pid));
+ internal_error ("Bad pid for debugged task: %s\n",
+ local_hex_string ((unsigned long) pid));
}
while (pid == 0);
diff --git a/gdb/remote.c b/gdb/remote.c
index c697bd4..5b96705 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -18,188 +18,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* *INDENT-OFF* */
-/* Remote communication protocol.
-
- A debug packet whose contents are <data>
- is encapsulated for transmission in the form:
-
- $ <data> # CSUM1 CSUM2
-
- <data> must be ASCII alphanumeric and cannot include characters
- '$' or '#'. If <data> starts with two characters followed by
- ':', then the existing stubs interpret this as a sequence number.
-
- CSUM1 and CSUM2 are ascii hex representation of an 8-bit
- checksum of <data>, the most significant nibble is sent first.
- the hex digits 0-9,a-f are used.
-
- Receiver responds with:
-
- + - if CSUM is correct and ready for next packet
- - - if CSUM is incorrect
-
- <data> is as follows:
- Most values are encoded in ascii hex digits. Signal numbers are according
- to the numbering in target.h.
-
- Request Packet
-
- set thread Hct... Set thread for subsequent operations.
- c = 'c' for thread used in step and
- continue; t... can be -1 for all
- threads.
- c = 'g' for thread used in other
- operations. If zero, pick a thread,
- any thread.
- reply OK for success
- ENN for an error.
-
- read registers g
- reply XX....X Each byte of register data
- is described by two hex digits.
- Registers are in the internal order
- for GDB, and the bytes in a register
- are in the same order the machine uses.
- or ENN for an error.
-
- write regs GXX..XX Each byte of register data
- is described by two hex digits.
- reply OK for success
- ENN for an error
-
- write reg Pn...=r... Write register n... with value r...,
- which contains two hex digits for each
- byte in the register (target byte
- order).
- reply OK for success
- ENN for an error
- (not supported by all stubs).
-
- read mem mAA..AA,LLLL AA..AA is address, LLLL is length.
- reply XX..XX XX..XX is mem contents
- Can be fewer bytes than requested
- if able to read only part of the data.
- or ENN NN is errno
-
- write mem MAA..AA,LLLL:XX..XX
- AA..AA is address,
- LLLL is number of bytes,
- XX..XX is data
- reply OK for success
- ENN for an error (this includes the case
- where only part of the data was
- written).
-
- write mem XAA..AA,LLLL:XX..XX
- (binary) AA..AA is address,
- LLLL is number of bytes,
- XX..XX is binary data
- reply OK for success
- ENN for an error
-
- continue cAA..AA AA..AA is address to resume
- If AA..AA is omitted,
- resume at same address.
-
- step sAA..AA AA..AA is address to resume
- If AA..AA is omitted,
- resume at same address.
-
- continue with Csig;AA..AA Continue with signal sig (hex signal
- signal number). If ;AA..AA is omitted,
- resume at same address.
-
- step with Ssig;AA..AA Like 'C' but step not continue.
- signal
-
- last signal ? Reply the current reason for stopping.
- This is the same reply as is generated
- for step or cont : SAA where AA is the
- signal number.
-
- detach D Reply OK.
-
- There is no immediate reply to step or cont.
- The reply comes when the machine stops.
- It is SAA AA is the signal number.
-
- or... TAAn...:r...;n...:r...;n...:r...;
- AA = signal number
- n... = register number (hex)
- r... = register contents
- n... = `thread'
- r... = thread process ID. This is
- a hex integer.
- n... = other string not starting
- with valid hex digit.
- gdb should ignore this n,r pair
- and go on to the next. This way
- we can extend the protocol.
- or... WAA The process exited, and AA is
- the exit status. This is only
- applicable for certains sorts of
- targets.
- or... XAA The process terminated with signal
- AA.
- or (obsolete) NAA;tttttttt;dddddddd;bbbbbbbb
- AA = signal number
- tttttttt = address of symbol "_start"
- dddddddd = base of data section
- bbbbbbbb = base of bss section.
- Note: only used by Cisco Systems
- targets. The difference between this
- reply and the "qOffsets" query is that
- the 'N' packet may arrive spontaneously
- whereas the 'qOffsets' is a query
- initiated by the host debugger.
- or... OXX..XX XX..XX is hex encoding of ASCII data. This
- can happen at any time while the
- program is running and the debugger
- should continue to wait for
- 'W', 'T', etc.
-
- thread alive TXX Find out if the thread XX is alive.
- reply OK thread is still alive
- ENN thread is dead
-
- remote restart RXX Restart the remote server
-
- extended ops ! Use the extended remote protocol.
- Sticky -- only needs to be set once.
-
- kill request k
-
- toggle debug d toggle debug flag (see 386 & 68k stubs)
- reset r reset -- see sparc stub.
- reserved <other> On other requests, the stub should
- ignore the request and send an empty
- response ($#<checksum>). This way
- we can extend the protocol and GDB
- can tell whether the stub it is
- talking to uses the old or the new.
- search tAA:PP,MM Search backwards starting at address
- AA for a match with pattern PP and
- mask MM. PP and MM are 4 bytes.
- Not supported by all stubs.
-
- general query qXXXX Request info about XXXX.
- general set QXXXX=yyyy Set value of XXXX to yyyy.
- query sect offs qOffsets Get section offsets. Reply is
- Text=xxx;Data=yyy;Bss=zzz
-
- Responses can be run-length encoded to save space. A '*' means that
- the next character is an ASCII encoding giving a repeat count which
- stands for that many repititions of the character preceding the '*'.
- The encoding is n+29, yielding a printable character where n >=3
- (which is where rle starts to win). Don't use an n > 126.
-
- So
- "0* " means the same as "0000". */
-/* *INDENT-ON* */
-
-
+/* See the GDB User Guide for details of the GDB remote protocol. */
#include "defs.h"
#include "gdb_string.h"
@@ -401,6 +221,13 @@ static void set_remote_protocol_P_packet_cmd PARAMS ((char *args,
static void show_remote_protocol_P_packet_cmd PARAMS ((char *args,
int from_tty));
+static void set_remote_protocol_Z_packet_cmd PARAMS ((char *args,
+ int from_tty,
+ struct cmd_list_element * c));
+
+static void show_remote_protocol_Z_packet_cmd PARAMS ((char *args,
+ int from_tty));
+
@@ -447,17 +274,6 @@ static serial_t remote_desc = NULL;
to denote that the target is in kernel mode. */
static int cisco_kernel_mode = 0;
-/* This variable (available to the user via "set remotebinarydownload")
- dictates whether downloads are sent in binary (via the 'X' packet).
- We assume that the stub can, and attempt to do it. This will be cleared if
- the stub does not understand it. This switch is still needed, though
- in cases when the packet is supported in the stub, but the connection
- does not allow it (i.e., 7-bit serial connection only). */
-static int remote_binary_download = 1;
-
-/* Have we already checked whether binary downloads work? */
-static int remote_binary_checked;
-
/* Maximum number of bytes to read/write at once. The value here
is chosen to fill up a packet (the headers account for the 32). */
#define MAXBUFBYTES(N) (((N)-32)/2)
@@ -558,7 +374,7 @@ set_packet_config_cmd (config, c)
config->support = PACKET_SUPPORT_UNKNOWN;
}
else
- fatal ("Bad enum value");
+ internal_error ("Bad enum value");
}
static void
@@ -657,6 +473,54 @@ show_remote_protocol_P_packet_cmd (args, from_tty)
show_packet_config_cmd (&remote_protocol_P);
}
+/* Should we try the 'Z' (set breakpoint) request? */
+
+static struct packet_config remote_protocol_Z;
+
+static void
+set_remote_protocol_Z_packet_cmd (args, from_tty, c)
+ char *args;
+ int from_tty;
+ struct cmd_list_element *c;
+{
+ set_packet_config_cmd (&remote_protocol_Z, c);
+}
+
+static void
+show_remote_protocol_Z_packet_cmd (args, from_tty)
+ char *args;
+ int from_tty;
+{
+ show_packet_config_cmd (&remote_protocol_Z);
+}
+
+/* Should we try the 'X' (remote binary download) packet?
+
+ This variable (available to the user via "set remote X-packet")
+ dictates whether downloads are sent in binary (via the 'X' packet).
+ We assume that the stub can, and attempt to do it. This will be
+ cleared if the stub does not understand it. This switch is still
+ needed, though in cases when the packet is supported in the stub,
+ but the connection does not allow it (i.e., 7-bit serial connection
+ only). */
+
+static struct packet_config remote_protocol_binary_download;
+
+static void
+set_remote_protocol_binary_download_cmd (char *args,
+ int from_tty,
+ struct cmd_list_element *c)
+{
+ set_packet_config_cmd (&remote_protocol_binary_download, c);
+}
+
+static void
+show_remote_protocol_binary_download_cmd (char *args,
+ int from_tty)
+{
+ show_packet_config_cmd (&remote_protocol_binary_download);
+}
+
/* Tokens for use by the asynchronous signal handlers for SIGINT */
PTR sigint_remote_twice_token;
@@ -1742,7 +1606,7 @@ remote_cisco_section_offsets (text_addr, data_addr, bss_addr,
* Relocate the symbol file for a remote target.
*/
-static void
+void
remote_cisco_objfile_relocate (text_off, data_off, bss_off)
bfd_signed_vma text_off;
bfd_signed_vma data_off;
@@ -1902,13 +1766,14 @@ serial device is attached to the remote system (e.g. /dev/ttya).");
push_target (target); /* Switch to using remote target now */
init_packet_config (&remote_protocol_P);
-
+ init_packet_config (&remote_protocol_Z);
+
general_thread = -2;
continue_thread = -2;
/* Force remote_write_bytes to check whether target supports
binary downloading. */
- remote_binary_checked = 0;
+ init_packet_config (&remote_protocol_binary_download);
/* Without this, some commands which require an active target (such
as kill) won't work. This variable serves (at least) double duty
@@ -1992,13 +1857,14 @@ serial device is attached to the remote system (e.g. /dev/ttya).");
push_target (target); /* Switch to using remote target now */
init_packet_config (&remote_protocol_P);
+ init_packet_config (&remote_protocol_Z);
general_thread = -2;
continue_thread = -2;
/* Force remote_write_bytes to check whether target supports
binary downloading. */
- remote_binary_checked = 0;
+ init_packet_config (&remote_protocol_binary_download);
/* If running asynchronously, set things up for telling the target
to use the extended protocol. This will happen only after the
@@ -2074,6 +1940,7 @@ remote_detach (args, from_tty)
pop_target ();
if (from_tty)
puts_filtered ("Ending remote debugging.\n");
+
}
/* Same as remote_detach, but with async support. */
@@ -3103,41 +2970,52 @@ remote_address_masked (addr)
the whole packet, since many stubs strip the eighth bit and subsequently
compute a wrong checksum, which causes real havoc with remote_write_bytes.
- NOTE: This can still lose if the serial line is not eight-bit clean. In
- cases like this, the user should clear "remotebinarydownload". */
+ NOTE: This can still lose if the serial line is not eight-bit
+ clean. In cases like this, the user should clear "remote
+ X-packet". */
+
static void
check_binary_download (addr)
CORE_ADDR addr;
{
- if (remote_binary_download && !remote_binary_checked)
+ switch (remote_protocol_binary_download.support)
{
- char *buf = alloca (PBUFSIZ);
- char *p;
- remote_binary_checked = 1;
-
- p = buf;
- *p++ = 'X';
- p += hexnumstr (p, (ULONGEST) addr);
- *p++ = ',';
- p += hexnumstr (p, (ULONGEST) 0);
- *p++ = ':';
- *p = '\0';
-
- putpkt_binary (buf, (int) (p - buf));
- getpkt (buf, 0);
-
- if (buf[0] == '\0')
- remote_binary_download = 0;
- }
+ case PACKET_DISABLE:
+ break;
+ case PACKET_ENABLE:
+ break;
+ case PACKET_SUPPORT_UNKNOWN:
+ {
+ char *buf = alloca (PBUFSIZ);
+ char *p;
+
+ p = buf;
+ *p++ = 'X';
+ p += hexnumstr (p, (ULONGEST) addr);
+ *p++ = ',';
+ p += hexnumstr (p, (ULONGEST) 0);
+ *p++ = ':';
+ *p = '\0';
+
+ putpkt_binary (buf, (int) (p - buf));
+ getpkt (buf, 0);
- if (remote_debug)
- {
- if (remote_binary_download)
- fprintf_unfiltered (gdb_stdlog,
- "binary downloading suppported by target\n");
- else
- fprintf_unfiltered (gdb_stdlog,
- "binary downloading NOT suppported by target\n");
+ if (buf[0] == '\0')
+ {
+ if (remote_debug)
+ fprintf_unfiltered (gdb_stdlog,
+ "binary downloading NOT suppported by target\n");
+ remote_protocol_binary_download.support = PACKET_DISABLE;
+ }
+ else
+ {
+ if (remote_debug)
+ fprintf_unfiltered (gdb_stdlog,
+ "binary downloading suppported by target\n");
+ remote_protocol_binary_download.support = PACKET_ENABLE;
+ }
+ break;
+ }
}
}
@@ -3182,15 +3060,18 @@ remote_write_bytes (memaddr, myaddr, len)
/* sprintf (buf, "M%lx,%x:", (unsigned long) memaddr, todo); */
memaddr = remote_address_masked (memaddr);
p = buf;
- if (remote_binary_download)
+ switch (remote_protocol_binary_download.support)
{
+ case PACKET_ENABLE:
*p++ = 'X';
todo = min (len, max_buf_size);
- }
- else
- {
+ break;
+ case PACKET_DISABLE:
*p++ = 'M';
todo = min (len, max_buf_size / 2); /* num bytes that will fit */
+ break;
+ case PACKET_SUPPORT_UNKNOWN:
+ internal_error ("remote_write_bytes: bad switch");
}
p += hexnumstr (p, (ULONGEST) memaddr);
@@ -3204,50 +3085,57 @@ remote_write_bytes (memaddr, myaddr, len)
/* We send target system values byte by byte, in increasing byte
addresses, each byte encoded as two hex characters (or one
binary character). */
- if (remote_binary_download)
+ switch (remote_protocol_binary_download.support)
{
- int escaped = 0;
- for (i = 0;
- (i < todo) && (i + escaped) < (max_buf_size - 2);
- i++)
- {
- switch (myaddr[i] & 0xff)
- {
- case '$':
- case '#':
- case 0x7d:
- /* These must be escaped */
- escaped++;
- *p++ = 0x7d;
- *p++ = (myaddr[i] & 0xff) ^ 0x20;
- break;
- default:
- *p++ = myaddr[i] & 0xff;
- break;
- }
- }
-
- if (i < todo)
- {
- /* Escape chars have filled up the buffer prematurely,
- and we have actually sent fewer bytes than planned.
- Fix-up the length field of the packet. */
-
- /* FIXME: will fail if new len is a shorter string than
- old len. */
-
- plen += hexnumstr (plen, (ULONGEST) i);
- *plen++ = ':';
- }
- }
- else
- {
- for (i = 0; i < todo; i++)
- {
- *p++ = tohex ((myaddr[i] >> 4) & 0xf);
- *p++ = tohex (myaddr[i] & 0xf);
- }
- *p = '\0';
+ case PACKET_ENABLE:
+ {
+ int escaped = 0;
+ for (i = 0;
+ (i < todo) && (i + escaped) < (max_buf_size - 2);
+ i++)
+ {
+ switch (myaddr[i] & 0xff)
+ {
+ case '$':
+ case '#':
+ case 0x7d:
+ /* These must be escaped */
+ escaped++;
+ *p++ = 0x7d;
+ *p++ = (myaddr[i] & 0xff) ^ 0x20;
+ break;
+ default:
+ *p++ = myaddr[i] & 0xff;
+ break;
+ }
+ }
+
+ if (i < todo)
+ {
+ /* Escape chars have filled up the buffer prematurely,
+ and we have actually sent fewer bytes than planned.
+ Fix-up the length field of the packet. */
+
+ /* FIXME: will fail if new len is a shorter string than
+ old len. */
+
+ plen += hexnumstr (plen, (ULONGEST) i);
+ *plen++ = ':';
+ }
+ break;
+ }
+ case PACKET_DISABLE:
+ {
+ for (i = 0; i < todo; i++)
+ {
+ *p++ = tohex ((myaddr[i] >> 4) & 0xf);
+ *p++ = tohex (myaddr[i] & 0xf);
+ }
+ *p = '\0';
+ break;
+ }
+ case PACKET_SUPPORT_UNKNOWN:
+ internal_error ("remote_write_bytes: bad switch");
}
putpkt_binary (buf, (int) (p - buf));
@@ -4032,7 +3920,52 @@ remote_insert_breakpoint (addr, contents_cache)
{
#ifdef REMOTE_BREAKPOINT
int val;
+#endif
+ int bp_size;
+
+ /* Try the "Z" packet if it is not already disabled.
+ If it succeeds, then set the support to PACKET_ENABLE.
+ If it fails, and the user has explicitly requested the Z support
+ then report an error, otherwise, mark it disabled and go on. */
+
+ if ((remote_protocol_Z.support == PACKET_ENABLE)
+ || (remote_protocol_Z.support == PACKET_SUPPORT_UNKNOWN))
+ {
+ char buf[PBUFSIZ], *p = buf;
+
+ addr = remote_address_masked (addr);
+ *(p++) = 'Z';
+ *(p++) = '0';
+ *(p++) = ',';
+ p += hexnumstr (p, (ULONGEST) addr);
+ BREAKPOINT_FROM_PC (&addr, &bp_size);
+ sprintf (p, ",%d", bp_size);
+
+ putpkt (buf);
+ getpkt (buf, 0);
+
+ if (buf[0] != '\0')
+ {
+ remote_protocol_Z.support = PACKET_ENABLE;
+ return (buf[0] == 'E');
+ }
+
+ /* The stub does not support the 'Z' request. If the user has
+ explicitly requested the Z support, or if the stub previously
+ said it supported the packet, this is an error,
+ otherwise, mark it disabled. */
+
+ else if (remote_protocol_Z.support == PACKET_ENABLE)
+ {
+ error ("Protocol error: Z packet not recognized by stub");
+ }
+ else
+ {
+ remote_protocol_Z.support = PACKET_DISABLE;
+ }
+ }
+#ifdef REMOTE_BREAKPOINT
val = target_read_memory (addr, contents_cache, sizeof big_break_insn);
if (val == 0)
@@ -4056,6 +3989,29 @@ remote_remove_breakpoint (addr, contents_cache)
CORE_ADDR addr;
char *contents_cache;
{
+ char buf[PBUFSIZ];
+ int bp_size;
+
+ if ((remote_protocol_Z.support == PACKET_ENABLE)
+ || (remote_protocol_Z.support == PACKET_SUPPORT_UNKNOWN))
+ {
+ char buf[PBUFSIZ], *p = buf;
+
+ *(p++) = 'z';
+ *(p++) = '0';
+ *(p++) = ',';
+
+ addr = remote_address_masked (addr);
+ p += hexnumstr (p, (ULONGEST) addr);
+ BREAKPOINT_FROM_PC (&addr, &bp_size);
+ sprintf (p, ",%d", bp_size);
+
+ putpkt (buf);
+ getpkt (buf, 0);
+
+ return (buf[0] == 'E');
+ }
+
#ifdef REMOTE_BREAKPOINT
return target_write_memory (addr, contents_cache, sizeof big_break_insn);
#else
@@ -4063,6 +4019,107 @@ remote_remove_breakpoint (addr, contents_cache)
#endif /* REMOTE_BREAKPOINT */
}
+#ifdef TARGET_HAS_HARDWARE_WATCHPOINTS
+int
+remote_insert_watchpoint (addr, len, type)
+ CORE_ADDR addr;
+ int len;
+ int type;
+{
+ char buf[PBUFSIZ], *p;
+
+ if (remote_protocol_Z.support == PACKET_DISABLE)
+ error ("Can't set hardware watchpoints without the 'Z' packet\n");
+
+ sprintf (buf, "Z%x,", type + 2 );
+ p = strchr (buf, '\0');
+ addr = remote_address_masked (addr);
+ p += hexnumstr (p, (ULONGEST) addr);
+ sprintf (p, ",%lx", len);
+
+ putpkt (buf);
+ getpkt (buf, 0);
+
+ if (buf[0] == '\0' || buf [0] == 'E')
+ return -1;
+
+ return 0;
+}
+
+int
+remote_remove_watchpoint (addr, len, type)
+ CORE_ADDR addr;
+ int len;
+ int type;
+{
+ char buf[PBUFSIZ], *p;
+
+ sprintf (buf, "z%x,", type + 2 );
+ p = strchr (buf, '\0');
+ addr = remote_address_masked (addr);
+ p += hexnumstr (p, (ULONGEST) addr);
+ sprintf (p, ",%lx", len);
+ putpkt (buf);
+ getpkt (buf, 0);
+
+ if (buf[0] == '\0' || buf [0] == 'E')
+ return -1;
+
+ return 0;
+}
+
+int
+remote_insert_hw_breakpoint (addr, len)
+ CORE_ADDR addr;
+ int len;
+{
+ char buf[PBUFSIZ], *p = buf;
+
+ if (remote_protocol_Z.support == PACKET_DISABLE)
+ error ("Can't set hardware breakpoints without the 'Z' packet\n");
+
+ *(p++) = 'Z';
+ *(p++) = '1';
+ *(p++) = ',';
+
+ addr = remote_address_masked (addr);
+ p += hexnumstr (p, (ULONGEST) addr);
+ *p = '\0';
+
+ putpkt (buf);
+ getpkt (buf, 0);
+
+ if (buf[0] == '\0' || buf [0] == 'E')
+ return -1;
+
+ return 0;
+}
+
+int
+remote_remove_hw_breakpoint (addr, len)
+ CORE_ADDR addr;
+ int len;
+{
+ char buf[PBUFSIZ], *p = buf;
+
+ *(p++) = 'z';
+ *(p++) = '1';
+ *(p++) = ',';
+
+ addr = remote_address_masked (addr);
+ p += hexnumstr (p, (ULONGEST) addr);
+ *p = '\0';
+
+ putpkt(buf);
+ getpkt (buf, 0);
+
+ if (buf[0] == '\0' || buf [0] == 'E')
+ return -1;
+
+ return 0;
+}
+#endif
+
/* Some targets are only capable of doing downloads, and afterwards
they switch to the remote serial protocol. This function provides
a clean way to get from the download target to the remote target.
@@ -4287,6 +4344,59 @@ remote_query (query_type, buf, outbuf, bufsiz)
}
static void
+remote_rcmd (char *command,
+ struct gdb_file *outbuf)
+{
+ int i;
+ char *buf = alloca (PBUFSIZ);
+ char *p = buf;
+
+ if (!remote_desc)
+ error ("remote rcmd is only available after target open");
+
+ /* The query prefix */
+ strcpy (buf, "qRcmd,");
+ p = strchr (buf, '\0');
+
+ if ((strlen (buf) + strlen (command) * 2 + 8/*misc*/) > PBUFSIZ)
+ error ("\"monitor\" command ``%s'' is too long\n", command);
+
+ /* Encode the actual command */
+ for (i = 0; command[i]; i++)
+ {
+ *p++ = tohex ((command[i] >> 4) & 0xf);
+ *p++ = tohex (command[i] & 0xf);
+ }
+ *p = '\0';
+
+ if (putpkt (buf) < 0)
+ error ("Communication problem with target\n");
+
+ /* get/display the response */
+ while (1)
+ {
+ /* XXX - see also tracepoint.c:remote_get_noisy_reply() */
+ buf[0] = '\0';
+ getpkt (buf, 0);
+ if (buf[0] == '\0')
+ error ("Target does not support this command\n");
+ if (buf[0] == 'O' && buf[1] != 'K')
+ {
+ remote_console_output (buf + 1); /* 'O' message from stub */
+ continue;
+ }
+ if (strcmp (buf, "OK") == 0)
+ break;
+ for (p = buf; p[0] != '\0' && p[1] != '\0'; p += 2)
+ {
+ char c = (fromhex (p[0]) << 4) + fromhex (p[1]);
+ fputc_unfiltered (c, outbuf);
+ }
+ break;
+ }
+}
+
+static void
packet_command (args, from_tty)
char *args;
int from_tty;
@@ -4498,6 +4608,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
remote_ops.to_find_new_threads = remote_threads_info;
remote_ops.to_stop = remote_stop;
remote_ops.to_query = remote_query;
+ remote_ops.to_rcmd = remote_rcmd;
remote_ops.to_stratum = process_stratum;
remote_ops.to_has_all_memory = 1;
remote_ops.to_has_memory = 1;
@@ -4623,13 +4734,14 @@ device is attached to the remote system (e.g. host:port).");
push_target (&remote_cisco_ops); /* Switch to using cisco target now */
init_packet_config (&remote_protocol_P);
+ init_packet_config (&remote_protocol_Z);
general_thread = -2;
continue_thread = -2;
/* Force remote_write_bytes to check whether target supports
binary downloading. */
- remote_binary_checked = 0;
+ init_packet_config (&remote_protocol_binary_download);
/* Without this, some commands which require an active target (such
as kill) won't work. This variable serves (at least) double duty
@@ -4952,6 +5064,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
remote_async_ops.to_find_new_threads = remote_threads_info;
remote_async_ops.to_stop = remote_stop;
remote_async_ops.to_query = remote_query;
+ remote_async_ops.to_rcmd = remote_rcmd;
remote_async_ops.to_stratum = process_stratum;
remote_async_ops.to_has_all_memory = 1;
remote_async_ops.to_has_memory = 1;
@@ -5088,11 +5201,20 @@ in a memory packet.\n",
&setlist),
&showlist);
+ add_packet_config_cmd (&remote_protocol_binary_download,
+ "X", "binary-download",
+ set_remote_protocol_binary_download_cmd,
+ show_remote_protocol_binary_download_cmd,
+ &remote_set_cmdlist, &remote_show_cmdlist);
+#if 0
+ /* XXXX - should ``set remotebinarydownload'' be retained for
+ compatibility. */
add_show_from_set
(add_set_cmd ("remotebinarydownload", no_class,
var_boolean, (char *) &remote_binary_download,
"Set binary downloads.\n", &setlist),
&showlist);
+#endif
add_info ("remote-process", remote_info_process,
"Query the remote system for process info.");
@@ -5101,4 +5223,9 @@ in a memory packet.\n",
set_remote_protocol_P_packet_cmd,
show_remote_protocol_P_packet_cmd,
&remote_set_cmdlist, &remote_show_cmdlist);
+
+ add_packet_config_cmd (&remote_protocol_Z, "Z", "breakpoint",
+ set_remote_protocol_Z_packet_cmd,
+ show_remote_protocol_Z_packet_cmd,
+ &remote_set_cmdlist, &remote_show_cmdlist);
}
diff --git a/gdb/ser-pipe.c b/gdb/ser-pipe.c
index 3c37f14..4941845 100644
--- a/gdb/ser-pipe.c
+++ b/gdb/ser-pipe.c
@@ -23,7 +23,9 @@
#include "defs.h"
#include "serial.h"
#include <sys/types.h>
+#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
+#endif
#include <sys/socket.h>
#include <sys/time.h>
#include <fcntl.h>
@@ -70,7 +72,7 @@ pipe_open (scb, name)
serial_t scb;
const char *name;
{
-#if !defined(O_NONBLOCK) || !defined(F_GETFL) || !defined(F_SETFL)
+#if !defined(O_NONBLOCK) || !defined(F_GETFL) || !defined(F_SETFL) || !HAVE_SOCKETPAIR
return -1;
#else
struct pipe_state *state;
diff --git a/gdb/serial.c b/gdb/serial.c
index dca48bc..9dd316f 100644
--- a/gdb/serial.c
+++ b/gdb/serial.c
@@ -492,27 +492,12 @@ connect_command (args, fromtty)
}
#endif /* 0 */
-/* VARARGS */
void
-#ifdef ANSI_PROTOTYPES
serial_printf (serial_t desc, const char *format,...)
-#else
-serial_printf (va_alist)
- va_dcl
-#endif
{
va_list args;
char *buf;
-#ifdef ANSI_PROTOTYPES
va_start (args, format);
-#else
- serial_t desc;
- char *format;
-
- va_start (args);
- desc = va_arg (args, serial_t);
- format = va_arg (args, char *);
-#endif
vasprintf (&buf, format, args);
SERIAL_WRITE (desc, buf, strlen (buf));
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 72c6cbd..38d7929 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -620,7 +620,7 @@ sh_target_architecture_hook (ap)
}
}
- fatal ("Architecture `%s' unreconized", ap->printable_name);
+ internal_error ("Architecture `%s' unreconized", ap->printable_name);
}
/* Print the registers in a form similar to the E7000 */
diff --git a/gdb/solib.c b/gdb/solib.c
index 65b35e7..cfb230d 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -1033,7 +1033,7 @@ symbol_add_stub (arg)
lowest_sect = bfd_get_section_by_name (so->abfd, ".text");
if (lowest_sect == NULL)
bfd_map_over_sections (so->abfd, find_lowest_section,
- (PTR) & lowest_sect);
+ (PTR) &lowest_sect);
if (lowest_sect)
text_addr = bfd_section_vma (so->abfd, lowest_sect)
+ (CORE_ADDR) LM_ADDR (so);
diff --git a/gdb/somread.c b/gdb/somread.c
index bbbaa98..861f34d 100644
--- a/gdb/somread.c
+++ b/gdb/somread.c
@@ -43,7 +43,7 @@ static void
som_new_init PARAMS ((struct objfile *));
static void
-som_symfile_read PARAMS ((struct objfile *, struct section_offsets *, int));
+som_symfile_read PARAMS ((struct objfile *, int));
static void
som_symfile_finish PARAMS ((struct objfile *));
@@ -53,7 +53,7 @@ som_symtab_read PARAMS ((bfd *, struct objfile *,
struct section_offsets *));
static struct section_offsets *
- som_symfile_offsets PARAMS ((struct objfile *, CORE_ADDR));
+som_symfile_offsets PARAMS ((struct objfile *, CORE_ADDR));
/* FIXME: These should really be in a common header somewhere */
@@ -356,9 +356,8 @@ som_symtab_read (abfd, objfile, section_offsets)
capability even for files compiled without -g. */
static void
-som_symfile_read (objfile, section_offsets, mainline)
+som_symfile_read (objfile, mainline)
struct objfile *objfile;
- struct section_offsets *section_offsets;
int mainline;
{
bfd *abfd = objfile->obfd;
@@ -386,20 +385,20 @@ som_symfile_read (objfile, section_offsets, mainline)
actually scan the DNTT. It does scan the linker symbol
table and thus build up a "minimal symbol table". */
- som_symtab_read (abfd, objfile, section_offsets);
+ som_symtab_read (abfd, objfile, objfile->section_offsets);
/* Now read information from the stabs debug sections.
This is a no-op for SOM.
Perhaps it is intended for some kind of mixed STABS/SOM
situation? */
- stabsect_build_psymtabs (objfile, section_offsets, mainline,
+ stabsect_build_psymtabs (objfile, mainline,
"$GDB_SYMBOLS$", "$GDB_STRINGS$", "$TEXT$");
/* Now read the native debug information.
This builds the psymtab. This used to be done via a scan of
the DNTT, but is now done via the PXDB-built quick-lookup tables
together with a scan of the GNTT. See hp-psymtab-read.c. */
- hpread_build_psymtabs (objfile, section_offsets, mainline);
+ hpread_build_psymtabs (objfile, objfile->section_offsets, mainline);
/* Install any minimal symbols that have been collected as the current
minimal symbols for this objfile.
diff --git a/gdb/source.c b/gdb/source.c
index ca1ddda..928782c 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -205,7 +205,7 @@ select_source_symtab (s)
{
if (cs_pst->readin)
{
- fatal ("Internal: select_source_symtab: readin pst found and no symtabs.");
+ internal_error ("select_source_symtab: readin pst found and no symtabs.");
}
else
{
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index c3ff952..04e3d4d 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -454,7 +454,7 @@ setup_arbitrary_frame (argc, argv)
frame = create_new_frame (argv[0], 0);
if (!frame)
- fatal ("internal: create_new_frame returned invalid frame");
+ internal_error ("create_new_frame returned invalid frame");
frame->bottom = argv[1];
frame->pc = FRAME_SAVED_PC (frame);
@@ -974,7 +974,7 @@ sparc_frame_find_saved_regs (fi, saved_regs_addr)
CORE_ADDR frame_addr = FRAME_FP (fi);
if (!fi)
- fatal ("Bad frame info struct in FRAME_FIND_SAVED_REGS");
+ internal_error ("Bad frame info struct in FRAME_FIND_SAVED_REGS");
memset (saved_regs_addr, 0, sizeof (*saved_regs_addr));
@@ -1735,7 +1735,7 @@ gdb_print_insn_sparc (memaddr, info)
disassemble_info *info;
{
/* It's necessary to override mach again because print_insn messes it up. */
- info->mach = TM_PRINT_INSN_MACH;
+ info->mach = TARGET_ARCHITECTURE->mach;
return print_insn_sparc (memaddr, info);
}
diff --git a/gdb/stabsread.h b/gdb/stabsread.h
index 013a99a..648eea3 100644
--- a/gdb/stabsread.h
+++ b/gdb/stabsread.h
@@ -208,7 +208,6 @@ process_one_symbol PARAMS ((int, int, CORE_ADDR, char *,
extern void elfstab_build_psymtabs
PARAMS ((struct objfile * objfile,
- struct section_offsets * section_offsets,
int mainline,
file_ptr staboff, unsigned int stabsize,
file_ptr stabstroffset,
@@ -216,7 +215,6 @@ extern void elfstab_build_psymtabs
extern void coffstab_build_psymtabs
PARAMS ((struct objfile * objfile,
- struct section_offsets * section_offsets,
int mainline,
CORE_ADDR textaddr, unsigned int textsize,
struct stab_section_list * stabs,
@@ -225,7 +223,6 @@ extern void coffstab_build_psymtabs
extern void stabsect_build_psymtabs
PARAMS ((struct objfile * objfile,
- struct section_offsets * section_offsets,
int mainline,
char *stab_name,
char *stabstr_name,
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 42d9e4f..c951866 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -483,14 +483,16 @@ default_symfile_offsets (objfile, addr)
/* Process a symbol file, as either the main file or as a dynamically
loaded file.
- NAME is the file name (which will be tilde-expanded and made
- absolute herein) (but we don't free or modify NAME itself).
- FROM_TTY says how verbose to be. MAINLINE specifies whether this
- is the main symbol file, or whether it's an extra symbol file such
- as dynamically loaded code. If !mainline, ADDR is the address
- where the text segment was loaded. If VERBO, the caller has printed
- a verbose message about the symbol reading (and complaints can be
- more terse about it). */
+ OBJFILE is where the symbols are to be read from.
+
+ ADDR is the address where the text segment was loaded, unless the
+ objfile is the main symbol file, in which case it is zero.
+
+ MAINLINE is nonzero if this is the main symbol file, or zero if
+ it's an extra symbol file such as dynamically loaded code.
+
+ VERBO is nonzero if the caller has printed a verbose message about
+ the symbol reading (and complaints can be more terse about it). */
void
syms_from_objfile (objfile, addr, mainline, verbo)
@@ -546,7 +548,7 @@ syms_from_objfile (objfile, addr, mainline, verbo)
lowest_sect = bfd_get_section_by_name (objfile->obfd, ".text");
if (lowest_sect == NULL)
bfd_map_over_sections (objfile->obfd, find_lowest_section,
- (PTR) & lowest_sect);
+ (PTR) &lowest_sect);
if (lowest_sect == NULL)
warning ("no loadable sections found in added symbol-file %s",
@@ -557,7 +559,7 @@ syms_from_objfile (objfile, addr, mainline, verbo)
warning ("Lowest section in %s is %s at 0x%lx",
objfile->name,
bfd_section_name (objfile->obfd, lowest_sect),
- (unsigned long) bfd_section_vma (objfile->obfd, lowest_sect));
+ (unsigned long) bfd_section_vma (objfile->obfd, lowest_sect));
if (lowest_sect)
addr -= bfd_section_vma (objfile->obfd, lowest_sect);
@@ -587,7 +589,7 @@ syms_from_objfile (objfile, addr, mainline, verbo)
Section offsets are built similarly, except that they are built
by adding addr in all cases because there is no clear mapping
from section_offsets into actual sections. Note that solib.c
- has a different algorythm for finding section offsets.
+ has a different algorithm for finding section offsets.
These should probably all be collapsed into some target
independent form of shared library support. FIXME. */
@@ -596,7 +598,7 @@ syms_from_objfile (objfile, addr, mainline, verbo)
{
struct obj_section *s;
- for (s = objfile->sections; s < objfile->sections_end; ++s)
+ ALL_OBJFILE_OSECTIONS (objfile, s)
{
s->addr -= s->offset;
s->addr += addr;
@@ -607,7 +609,7 @@ syms_from_objfile (objfile, addr, mainline, verbo)
}
#endif /* not IBM6000_TARGET */
- (*objfile->sf->sym_read) (objfile, section_offsets, mainline);
+ (*objfile->sf->sym_read) (objfile, mainline);
if (!have_partial_symbols () && !have_full_symbols ())
{
@@ -633,10 +635,10 @@ syms_from_objfile (objfile, addr, mainline, verbo)
discard_cleanups (old_chain);
-/* Call this after reading in a new symbol table to give target dependant code
- a crack at the new symbols. For instance, this could be used to update the
- values of target-specific symbols GDB needs to keep track of (such as
- _sigtramp, or whatever). */
+ /* Call this after reading in a new symbol table to give target
+ dependant code a crack at the new symbols. For instance, this
+ could be used to update the values of target-specific symbols GDB
+ needs to keep track of (such as _sigtramp, or whatever). */
TARGET_SYMFILE_POSTREAD (objfile);
}
@@ -1506,7 +1508,7 @@ reread_symbols ()
/* The "mainline" parameter is a hideous hack; I think leaving it
zero is OK since dbxread.c also does what it needs to do if
objfile->global_psymbols.size is 0. */
- (*objfile->sf->sym_read) (objfile, objfile->section_offsets, 0);
+ (*objfile->sf->sym_read) (objfile, 0);
if (!have_partial_symbols () && !have_full_symbols ())
{
wrap_here ("");
diff --git a/gdb/symfile.h b/gdb/symfile.h
index 6390d1a..875f1b5 100644
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -88,7 +88,7 @@ struct sym_fns
symbol file (e.g. shared library or dynamically loaded file)
is being read. */
- void (*sym_read) PARAMS ((struct objfile *, struct section_offsets *, int));
+ void (*sym_read) PARAMS ((struct objfile *, int));
/* Called when we are finished with an objfile. Should do all cleanup
that is specific to the object file format for the particular objfile. */
@@ -116,7 +116,7 @@ struct sym_fns
do anything special. */
extern struct section_offsets *
- default_symfile_offsets PARAMS ((struct objfile * objfile, CORE_ADDR addr));
+default_symfile_offsets PARAMS ((struct objfile * objfile, CORE_ADDR addr));
extern void
diff --git a/gdb/symm-nat.c b/gdb/symm-nat.c
index d1ad863..1ec3a60 100644
--- a/gdb/symm-nat.c
+++ b/gdb/symm-nat.c
@@ -543,7 +543,7 @@ child_wait (pid, status)
}
break;
case PTS_WATCHPT_HIT:
- fatal ("PTS_WATCHPT_HIT\n");
+ internal_error ("PTS_WATCHPT_HIT\n");
break;
default:
/* stopped by signal */
@@ -873,8 +873,8 @@ _initialize_symm_nat ()
rv = mptrace (XPT_MPDEBUGGER, 0, 0, 0);
if (-1 == rv)
{
- fatal ("_initialize_symm_nat(): mptrace(XPT_MPDEBUGGER): %s",
- safe_strerror (errno));
+ internal_error ("_initialize_symm_nat(): mptrace(XPT_MPDEBUGGER): %s",
+ safe_strerror (errno));
}
/*
@@ -891,14 +891,14 @@ _initialize_symm_nat ()
rv = sigaddset (&set, SIGCHLD);
if (-1 == rv)
{
- fatal ("_initialize_symm_nat(): sigaddset(SIGCHLD): %s",
- safe_strerror (errno));
+ internal_error ("_initialize_symm_nat(): sigaddset(SIGCHLD): %s",
+ safe_strerror (errno));
}
rv = sigprocmask (SIG_BLOCK, &set, (sigset_t *) NULL);
if (-1 == rv)
{
- fatal ("_initialize_symm_nat(): sigprocmask(SIG_BLOCK): %s",
- safe_strerror (errno));
+ internal_error ("_initialize_symm_nat(): sigprocmask(SIG_BLOCK): %s",
+ safe_strerror (errno));
}
sact.sa_handler = sigchld_handler;
@@ -907,8 +907,8 @@ _initialize_symm_nat ()
rv = sigaction (SIGCHLD, &sact, (struct sigaction *) NULL);
if (-1 == rv)
{
- fatal ("_initialize_symm_nat(): sigaction(SIGCHLD): %s",
- safe_strerror (errno));
+ internal_error ("_initialize_symm_nat(): sigaction(SIGCHLD): %s",
+ safe_strerror (errno));
}
#endif
}
diff --git a/gdb/target.c b/gdb/target.c
index 3c18b40..d0b9482 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -444,6 +444,7 @@ cleanup_target (t)
de_fault (to_thread_alive, (int (*)PARAMS ((int))) target_ignore);
de_fault (to_stop, (void (*)PARAMS ((void))) target_ignore);
de_fault (to_query, (int (*)PARAMS ((int /*char */ , char *, char *, int *))) target_ignore);
+ de_fault (to_rcmd, (void (*) (char *, struct gdb_file *)) tcomplain);
de_fault (to_enable_exception_callback, (struct symtab_and_line * (*)PARAMS ((enum exception_event_kind, int))) nosupport_runtime);
de_fault (to_get_current_exception_event, (struct exception_event_record * (*)PARAMS ((void))) nosupport_runtime);
@@ -527,6 +528,7 @@ update_current_target ()
INHERIT (to_find_new_threads, t);
INHERIT (to_stop, t);
INHERIT (to_query, t);
+ INHERIT (to_rcmd, t);
INHERIT (to_enable_exception_callback, t);
INHERIT (to_get_current_exception_event, t);
INHERIT (to_pid_to_exec_file, t);
@@ -1937,7 +1939,7 @@ debug_to_open (args, from_tty)
{
debug_target.to_open (args, from_tty);
- fprintf_unfiltered (gdb_stderr, "target_open (%s, %d)\n", args, from_tty);
+ fprintf_unfiltered (gdb_stdlog, "target_open (%s, %d)\n", args, from_tty);
}
static void
@@ -1946,7 +1948,7 @@ debug_to_close (quitting)
{
debug_target.to_close (quitting);
- fprintf_unfiltered (gdb_stderr, "target_close (%d)\n", quitting);
+ fprintf_unfiltered (gdb_stdlog, "target_close (%d)\n", quitting);
}
static void
@@ -1956,7 +1958,7 @@ debug_to_attach (args, from_tty)
{
debug_target.to_attach (args, from_tty);
- fprintf_unfiltered (gdb_stderr, "target_attach (%s, %d)\n", args, from_tty);
+ fprintf_unfiltered (gdb_stdlog, "target_attach (%s, %d)\n", args, from_tty);
}
@@ -1966,7 +1968,7 @@ debug_to_post_attach (pid)
{
debug_target.to_post_attach (pid);
- fprintf_unfiltered (gdb_stderr, "target_post_attach (%d)\n", pid);
+ fprintf_unfiltered (gdb_stdlog, "target_post_attach (%d)\n", pid);
}
static void
@@ -1976,7 +1978,7 @@ debug_to_require_attach (args, from_tty)
{
debug_target.to_require_attach (args, from_tty);
- fprintf_unfiltered (gdb_stderr,
+ fprintf_unfiltered (gdb_stdlog,
"target_require_attach (%s, %d)\n", args, from_tty);
}
@@ -1987,7 +1989,7 @@ debug_to_detach (args, from_tty)
{
debug_target.to_detach (args, from_tty);
- fprintf_unfiltered (gdb_stderr, "target_detach (%s, %d)\n", args, from_tty);
+ fprintf_unfiltered (gdb_stdlog, "target_detach (%s, %d)\n", args, from_tty);
}
static void
@@ -1998,7 +2000,7 @@ debug_to_require_detach (pid, args, from_tty)
{
debug_target.to_require_detach (pid, args, from_tty);
- fprintf_unfiltered (gdb_stderr,
+ fprintf_unfiltered (gdb_stdlog,
"target_require_detach (%d, %s, %d)\n", pid, args, from_tty);
}
@@ -2010,7 +2012,7 @@ debug_to_resume (pid, step, siggnal)
{
debug_target.to_resume (pid, step, siggnal);
- fprintf_unfiltered (gdb_stderr, "target_resume (%d, %s, %s)\n", pid,
+ fprintf_unfiltered (gdb_stdlog, "target_resume (%d, %s, %s)\n", pid,
step ? "step" : "continue",
target_signal_to_name (siggnal));
}
@@ -2024,40 +2026,40 @@ debug_to_wait (pid, status)
retval = debug_target.to_wait (pid, status);
- fprintf_unfiltered (gdb_stderr,
+ fprintf_unfiltered (gdb_stdlog,
"target_wait (%d, status) = %d, ", pid, retval);
- fprintf_unfiltered (gdb_stderr, "status->kind = ");
+ fprintf_unfiltered (gdb_stdlog, "status->kind = ");
switch (status->kind)
{
case TARGET_WAITKIND_EXITED:
- fprintf_unfiltered (gdb_stderr, "exited, status = %d\n",
+ fprintf_unfiltered (gdb_stdlog, "exited, status = %d\n",
status->value.integer);
break;
case TARGET_WAITKIND_STOPPED:
- fprintf_unfiltered (gdb_stderr, "stopped, signal = %s\n",
+ fprintf_unfiltered (gdb_stdlog, "stopped, signal = %s\n",
target_signal_to_name (status->value.sig));
break;
case TARGET_WAITKIND_SIGNALLED:
- fprintf_unfiltered (gdb_stderr, "signalled, signal = %s\n",
+ fprintf_unfiltered (gdb_stdlog, "signalled, signal = %s\n",
target_signal_to_name (status->value.sig));
break;
case TARGET_WAITKIND_LOADED:
- fprintf_unfiltered (gdb_stderr, "loaded\n");
+ fprintf_unfiltered (gdb_stdlog, "loaded\n");
break;
case TARGET_WAITKIND_FORKED:
- fprintf_unfiltered (gdb_stderr, "forked\n");
+ fprintf_unfiltered (gdb_stdlog, "forked\n");
break;
case TARGET_WAITKIND_VFORKED:
- fprintf_unfiltered (gdb_stderr, "vforked\n");
+ fprintf_unfiltered (gdb_stdlog, "vforked\n");
break;
case TARGET_WAITKIND_EXECD:
- fprintf_unfiltered (gdb_stderr, "execd\n");
+ fprintf_unfiltered (gdb_stdlog, "execd\n");
break;
case TARGET_WAITKIND_SPURIOUS:
- fprintf_unfiltered (gdb_stderr, "spurious\n");
+ fprintf_unfiltered (gdb_stdlog, "spurious\n");
break;
default:
- fprintf_unfiltered (gdb_stderr, "unknown???\n");
+ fprintf_unfiltered (gdb_stdlog, "unknown???\n");
break;
}
@@ -2071,7 +2073,7 @@ debug_to_post_wait (pid, status)
{
debug_target.to_post_wait (pid, status);
- fprintf_unfiltered (gdb_stderr, "target_post_wait (%d, %d)\n",
+ fprintf_unfiltered (gdb_stdlog, "target_post_wait (%d, %d)\n",
pid, status);
}
@@ -2081,13 +2083,13 @@ debug_to_fetch_registers (regno)
{
debug_target.to_fetch_registers (regno);
- fprintf_unfiltered (gdb_stderr, "target_fetch_registers (%s)",
+ fprintf_unfiltered (gdb_stdlog, "target_fetch_registers (%s)",
regno != -1 ? REGISTER_NAME (regno) : "-1");
if (regno != -1)
- fprintf_unfiltered (gdb_stderr, " = 0x%x %d",
+ fprintf_unfiltered (gdb_stdlog, " = 0x%x %d",
(unsigned long) read_register (regno),
read_register (regno));
- fprintf_unfiltered (gdb_stderr, "\n");
+ fprintf_unfiltered (gdb_stdlog, "\n");
}
static void
@@ -2097,12 +2099,12 @@ debug_to_store_registers (regno)
debug_target.to_store_registers (regno);
if (regno >= 0 && regno < NUM_REGS)
- fprintf_unfiltered (gdb_stderr, "target_store_registers (%s) = 0x%x %d\n",
+ fprintf_unfiltered (gdb_stdlog, "target_store_registers (%s) = 0x%x %d\n",
REGISTER_NAME (regno),
(unsigned long) read_register (regno),
(unsigned long) read_register (regno));
else
- fprintf_unfiltered (gdb_stderr, "target_store_registers (%d)\n", regno);
+ fprintf_unfiltered (gdb_stdlog, "target_store_registers (%d)\n", regno);
}
static void
@@ -2110,7 +2112,7 @@ debug_to_prepare_to_store ()
{
debug_target.to_prepare_to_store ();
- fprintf_unfiltered (gdb_stderr, "target_prepare_to_store ()\n");
+ fprintf_unfiltered (gdb_stdlog, "target_prepare_to_store ()\n");
}
static int
@@ -2125,7 +2127,7 @@ debug_to_xfer_memory (memaddr, myaddr, len, write, target)
retval = debug_target.to_xfer_memory (memaddr, myaddr, len, write, target);
- fprintf_unfiltered (gdb_stderr,
+ fprintf_unfiltered (gdb_stdlog,
"target_xfer_memory (0x%x, xxx, %d, %s, xxx) = %d",
(unsigned int) memaddr, /* possable truncate long long */
len, write ? "write" : "read", retval);
@@ -2136,16 +2138,16 @@ debug_to_xfer_memory (memaddr, myaddr, len, write, target)
{
int i;
- fputs_unfiltered (", bytes =", gdb_stderr);
+ fputs_unfiltered (", bytes =", gdb_stdlog);
for (i = 0; i < retval; i++)
{
if ((((long) &(myaddr[i])) & 0xf) == 0)
- fprintf_unfiltered (gdb_stderr, "\n");
- fprintf_unfiltered (gdb_stderr, " %02x", myaddr[i] & 0xff);
+ fprintf_unfiltered (gdb_stdlog, "\n");
+ fprintf_unfiltered (gdb_stdlog, " %02x", myaddr[i] & 0xff);
}
}
- fputc_unfiltered ('\n', gdb_stderr);
+ fputc_unfiltered ('\n', gdb_stdlog);
return retval;
}
@@ -2156,7 +2158,7 @@ debug_to_files_info (target)
{
debug_target.to_files_info (target);
- fprintf_unfiltered (gdb_stderr, "target_files_info (xxx)\n");
+ fprintf_unfiltered (gdb_stdlog, "target_files_info (xxx)\n");
}
static int
@@ -2168,7 +2170,7 @@ debug_to_insert_breakpoint (addr, save)
retval = debug_target.to_insert_breakpoint (addr, save);
- fprintf_unfiltered (gdb_stderr,
+ fprintf_unfiltered (gdb_stdlog,
"target_insert_breakpoint (0x%x, xxx) = %d\n",
(unsigned long) addr, retval);
return retval;
@@ -2183,7 +2185,7 @@ debug_to_remove_breakpoint (addr, save)
retval = debug_target.to_remove_breakpoint (addr, save);
- fprintf_unfiltered (gdb_stderr,
+ fprintf_unfiltered (gdb_stdlog,
"target_remove_breakpoint (0x%x, xxx) = %d\n",
(unsigned long) addr, retval);
return retval;
@@ -2194,7 +2196,7 @@ debug_to_terminal_init ()
{
debug_target.to_terminal_init ();
- fprintf_unfiltered (gdb_stderr, "target_terminal_init ()\n");
+ fprintf_unfiltered (gdb_stdlog, "target_terminal_init ()\n");
}
static void
@@ -2202,7 +2204,7 @@ debug_to_terminal_inferior ()
{
debug_target.to_terminal_inferior ();
- fprintf_unfiltered (gdb_stderr, "target_terminal_inferior ()\n");
+ fprintf_unfiltered (gdb_stdlog, "target_terminal_inferior ()\n");
}
static void
@@ -2210,7 +2212,7 @@ debug_to_terminal_ours_for_output ()
{
debug_target.to_terminal_ours_for_output ();
- fprintf_unfiltered (gdb_stderr, "target_terminal_ours_for_output ()\n");
+ fprintf_unfiltered (gdb_stdlog, "target_terminal_ours_for_output ()\n");
}
static void
@@ -2218,7 +2220,7 @@ debug_to_terminal_ours ()
{
debug_target.to_terminal_ours ();
- fprintf_unfiltered (gdb_stderr, "target_terminal_ours ()\n");
+ fprintf_unfiltered (gdb_stdlog, "target_terminal_ours ()\n");
}
static void
@@ -2228,7 +2230,7 @@ debug_to_terminal_info (arg, from_tty)
{
debug_target.to_terminal_info (arg, from_tty);
- fprintf_unfiltered (gdb_stderr, "target_terminal_info (%s, %d)\n", arg,
+ fprintf_unfiltered (gdb_stdlog, "target_terminal_info (%s, %d)\n", arg,
from_tty);
}
@@ -2237,7 +2239,7 @@ debug_to_kill ()
{
debug_target.to_kill ();
- fprintf_unfiltered (gdb_stderr, "target_kill ()\n");
+ fprintf_unfiltered (gdb_stdlog, "target_kill ()\n");
}
static void
@@ -2247,7 +2249,7 @@ debug_to_load (args, from_tty)
{
debug_target.to_load (args, from_tty);
- fprintf_unfiltered (gdb_stderr, "target_load (%s, %d)\n", args, from_tty);
+ fprintf_unfiltered (gdb_stdlog, "target_load (%s, %d)\n", args, from_tty);
}
static int
@@ -2259,7 +2261,7 @@ debug_to_lookup_symbol (name, addrp)
retval = debug_target.to_lookup_symbol (name, addrp);
- fprintf_unfiltered (gdb_stderr, "target_lookup_symbol (%s, xxx)\n", name);
+ fprintf_unfiltered (gdb_stdlog, "target_lookup_symbol (%s, xxx)\n", name);
return retval;
}
@@ -2272,7 +2274,7 @@ debug_to_create_inferior (exec_file, args, env)
{
debug_target.to_create_inferior (exec_file, args, env);
- fprintf_unfiltered (gdb_stderr, "target_create_inferior (%s, %s, xxx)\n",
+ fprintf_unfiltered (gdb_stdlog, "target_create_inferior (%s, %s, xxx)\n",
exec_file, args);
}
@@ -2282,7 +2284,7 @@ debug_to_post_startup_inferior (pid)
{
debug_target.to_post_startup_inferior (pid);
- fprintf_unfiltered (gdb_stderr, "target_post_startup_inferior (%d)\n",
+ fprintf_unfiltered (gdb_stdlog, "target_post_startup_inferior (%d)\n",
pid);
}
@@ -2292,7 +2294,7 @@ debug_to_acknowledge_created_inferior (pid)
{
debug_target.to_acknowledge_created_inferior (pid);
- fprintf_unfiltered (gdb_stderr, "target_acknowledge_created_inferior (%d)\n",
+ fprintf_unfiltered (gdb_stdlog, "target_acknowledge_created_inferior (%d)\n",
pid);
}
@@ -2303,7 +2305,7 @@ debug_to_clone_and_follow_inferior (child_pid, followed_child)
{
debug_target.to_clone_and_follow_inferior (child_pid, followed_child);
- fprintf_unfiltered (gdb_stderr,
+ fprintf_unfiltered (gdb_stdlog,
"target_clone_and_follow_inferior (%d, %d)\n",
child_pid, *followed_child);
}
@@ -2313,7 +2315,7 @@ debug_to_post_follow_inferior_by_clone ()
{
debug_target.to_post_follow_inferior_by_clone ();
- fprintf_unfiltered (gdb_stderr, "target_post_follow_inferior_by_clone ()\n");
+ fprintf_unfiltered (gdb_stdlog, "target_post_follow_inferior_by_clone ()\n");
}
static int
@@ -2324,7 +2326,7 @@ debug_to_insert_fork_catchpoint (pid)
retval = debug_target.to_insert_fork_catchpoint (pid);
- fprintf_unfiltered (gdb_stderr, "target_insert_fork_catchpoint (%d) = %d\n",
+ fprintf_unfiltered (gdb_stdlog, "target_insert_fork_catchpoint (%d) = %d\n",
pid, retval);
return retval;
@@ -2338,7 +2340,7 @@ debug_to_remove_fork_catchpoint (pid)
retval = debug_target.to_remove_fork_catchpoint (pid);
- fprintf_unfiltered (gdb_stderr, "target_remove_fork_catchpoint (%d) = %d\n",
+ fprintf_unfiltered (gdb_stdlog, "target_remove_fork_catchpoint (%d) = %d\n",
pid, retval);
return retval;
@@ -2352,7 +2354,7 @@ debug_to_insert_vfork_catchpoint (pid)
retval = debug_target.to_insert_vfork_catchpoint (pid);
- fprintf_unfiltered (gdb_stderr, "target_insert_vfork_catchpoint (%d)= %d\n",
+ fprintf_unfiltered (gdb_stdlog, "target_insert_vfork_catchpoint (%d)= %d\n",
pid, retval);
return retval;
@@ -2366,7 +2368,7 @@ debug_to_remove_vfork_catchpoint (pid)
retval = debug_target.to_remove_vfork_catchpoint (pid);
- fprintf_unfiltered (gdb_stderr, "target_remove_vfork_catchpoint (%d) = %d\n",
+ fprintf_unfiltered (gdb_stdlog, "target_remove_vfork_catchpoint (%d) = %d\n",
pid, retval);
return retval;
@@ -2381,7 +2383,7 @@ debug_to_has_forked (pid, child_pid)
has_forked = debug_target.to_has_forked (pid, child_pid);
- fprintf_unfiltered (gdb_stderr, "target_has_forked (%d, %d) = %d\n",
+ fprintf_unfiltered (gdb_stdlog, "target_has_forked (%d, %d) = %d\n",
pid, *child_pid, has_forked);
return has_forked;
@@ -2396,7 +2398,7 @@ debug_to_has_vforked (pid, child_pid)
has_vforked = debug_target.to_has_vforked (pid, child_pid);
- fprintf_unfiltered (gdb_stderr, "target_has_vforked (%d, %d) = %d\n",
+ fprintf_unfiltered (gdb_stdlog, "target_has_vforked (%d, %d) = %d\n",
pid, *child_pid, has_vforked);
return has_vforked;
@@ -2409,7 +2411,7 @@ debug_to_can_follow_vfork_prior_to_exec ()
can_immediately_follow_vfork = debug_target.to_can_follow_vfork_prior_to_exec ();
- fprintf_unfiltered (gdb_stderr, "target_can_follow_vfork_prior_to_exec () = %d\n",
+ fprintf_unfiltered (gdb_stdlog, "target_can_follow_vfork_prior_to_exec () = %d\n",
can_immediately_follow_vfork);
return can_immediately_follow_vfork;
@@ -2424,7 +2426,7 @@ debug_to_post_follow_vfork (parent_pid, followed_parent, child_pid, followed_chi
{
debug_target.to_post_follow_vfork (parent_pid, followed_parent, child_pid, followed_child);
- fprintf_unfiltered (gdb_stderr,
+ fprintf_unfiltered (gdb_stdlog,
"target_post_follow_vfork (%d, %d, %d, %d)\n",
parent_pid, followed_parent, child_pid, followed_child);
}
@@ -2437,7 +2439,7 @@ debug_to_insert_exec_catchpoint (pid)
retval = debug_target.to_insert_exec_catchpoint (pid);
- fprintf_unfiltered (gdb_stderr, "target_insert_exec_catchpoint (%d) = %d\n",
+ fprintf_unfiltered (gdb_stdlog, "target_insert_exec_catchpoint (%d) = %d\n",
pid, retval);
return retval;
@@ -2451,7 +2453,7 @@ debug_to_remove_exec_catchpoint (pid)
retval = debug_target.to_remove_exec_catchpoint (pid);
- fprintf_unfiltered (gdb_stderr, "target_remove_exec_catchpoint (%d) = %d\n",
+ fprintf_unfiltered (gdb_stdlog, "target_remove_exec_catchpoint (%d) = %d\n",
pid, retval);
return retval;
@@ -2466,7 +2468,7 @@ debug_to_has_execd (pid, execd_pathname)
has_execd = debug_target.to_has_execd (pid, execd_pathname);
- fprintf_unfiltered (gdb_stderr, "target_has_execd (%d, %s) = %d\n",
+ fprintf_unfiltered (gdb_stdlog, "target_has_execd (%d, %s) = %d\n",
pid, (*execd_pathname ? *execd_pathname : "<NULL>"),
has_execd);
@@ -2480,7 +2482,7 @@ debug_to_reported_exec_events_per_exec_call ()
reported_exec_events = debug_target.to_reported_exec_events_per_exec_call ();
- fprintf_unfiltered (gdb_stderr,
+ fprintf_unfiltered (gdb_stdlog,
"target_reported_exec_events_per_exec_call () = %d\n",
reported_exec_events);
@@ -2512,7 +2514,7 @@ debug_to_has_syscall_event (pid, kind, syscall_id)
}
}
- fprintf_unfiltered (gdb_stderr,
+ fprintf_unfiltered (gdb_stdlog,
"target_has_syscall_event (%d, %s, %d) = %d\n",
pid, kind_spelling, *syscall_id, has_syscall_event);
@@ -2529,7 +2531,7 @@ debug_to_has_exited (pid, wait_status, exit_status)
has_exited = debug_target.to_has_exited (pid, wait_status, exit_status);
- fprintf_unfiltered (gdb_stderr, "target_has_exited (%d, %d, %d) = %d\n",
+ fprintf_unfiltered (gdb_stdlog, "target_has_exited (%d, %d, %d) = %d\n",
pid, wait_status, *exit_status, has_exited);
return has_exited;
@@ -2540,7 +2542,7 @@ debug_to_mourn_inferior ()
{
debug_target.to_mourn_inferior ();
- fprintf_unfiltered (gdb_stderr, "target_mourn_inferior ()\n");
+ fprintf_unfiltered (gdb_stdlog, "target_mourn_inferior ()\n");
}
static int
@@ -2550,7 +2552,7 @@ debug_to_can_run ()
retval = debug_target.to_can_run ();
- fprintf_unfiltered (gdb_stderr, "target_can_run () = %d\n", retval);
+ fprintf_unfiltered (gdb_stdlog, "target_can_run () = %d\n", retval);
return retval;
}
@@ -2561,7 +2563,7 @@ debug_to_notice_signals (pid)
{
debug_target.to_notice_signals (pid);
- fprintf_unfiltered (gdb_stderr, "target_notice_signals (%d)\n", pid);
+ fprintf_unfiltered (gdb_stdlog, "target_notice_signals (%d)\n", pid);
}
static int
@@ -2572,7 +2574,7 @@ debug_to_thread_alive (pid)
retval = debug_target.to_thread_alive (pid);
- fprintf_unfiltered (gdb_stderr, "target_thread_alive (%d) = %d\n",
+ fprintf_unfiltered (gdb_stdlog, "target_thread_alive (%d) = %d\n",
pid, retval);
return retval;
@@ -2583,7 +2585,7 @@ debug_to_stop ()
{
debug_target.to_stop ();
- fprintf_unfiltered (gdb_stderr, "target_stop ()\n");
+ fprintf_unfiltered (gdb_stdlog, "target_stop ()\n");
}
static int
@@ -2597,11 +2599,19 @@ debug_to_query (type, req, resp, siz)
retval = debug_target.to_query (type, req, resp, siz);
- fprintf_unfiltered (gdb_stderr, "target_query (%c, %s, %s, %d) = %d\n", type, req, resp, *siz, retval);
+ fprintf_unfiltered (gdb_stdlog, "target_query (%c, %s, %s, %d) = %d\n", type, req, resp, *siz, retval);
return retval;
}
+static void
+debug_to_rcmd (char *command,
+ struct gdb_file *outbuf)
+{
+ debug_target.to_rcmd (command, outbuf);
+ fprintf_unfiltered (gdb_stdlog, "target_rcmd (%s, ...)\n", command);
+}
+
static struct symtab_and_line *
debug_to_enable_exception_callback (kind, enable)
enum exception_event_kind kind;
@@ -2609,7 +2619,7 @@ debug_to_enable_exception_callback (kind, enable)
{
struct symtab_and_line *result;
result = debug_target.to_enable_exception_callback (kind, enable);
- fprintf_unfiltered (gdb_stderr,
+ fprintf_unfiltered (gdb_stdlog,
"target get_exception_callback_sal (%d, %d)\n",
kind, enable);
return result;
@@ -2620,7 +2630,7 @@ debug_to_get_current_exception_event ()
{
struct exception_event_record *result;
result = debug_target.to_get_current_exception_event ();
- fprintf_unfiltered (gdb_stderr, "target get_current_exception_event ()\n");
+ fprintf_unfiltered (gdb_stdlog, "target get_current_exception_event ()\n");
return result;
}
@@ -2632,7 +2642,7 @@ debug_to_pid_to_exec_file (pid)
exec_file = debug_target.to_pid_to_exec_file (pid);
- fprintf_unfiltered (gdb_stderr, "target_pid_to_exec_file (%d) = %s\n",
+ fprintf_unfiltered (gdb_stdlog, "target_pid_to_exec_file (%d) = %s\n",
pid, exec_file);
return exec_file;
@@ -2646,7 +2656,7 @@ debug_to_core_file_to_sym_file (core)
sym_file = debug_target.to_core_file_to_sym_file (core);
- fprintf_unfiltered (gdb_stderr, "target_core_file_to_sym_file (%s) = %s\n",
+ fprintf_unfiltered (gdb_stdlog, "target_core_file_to_sym_file (%s) = %s\n",
core, sym_file);
return sym_file;
@@ -2707,6 +2717,7 @@ setup_target_debug ()
current_target.to_thread_alive = debug_to_thread_alive;
current_target.to_stop = debug_to_stop;
current_target.to_query = debug_to_query;
+ current_target.to_rcmd = debug_to_rcmd;
current_target.to_enable_exception_callback = debug_to_enable_exception_callback;
current_target.to_get_current_exception_event = debug_to_get_current_exception_event;
current_target.to_pid_to_exec_file = debug_to_pid_to_exec_file;
@@ -2720,6 +2731,19 @@ static char targ_desc[] =
Shows the entire stack of targets currently in use (including the exec-file,\n\
core-file, and process, if any), as well as the symbol file name.";
+static void
+do_monitor_command (char *cmd,
+ int from_tty)
+{
+ if ((current_target.to_rcmd == (void*) tcomplain)
+ || (current_target.to_rcmd == debug_to_rcmd
+ && (debug_target.to_rcmd == (void*) tcomplain)))
+ {
+ error ("\"monitor\" command not supported by this target.\n");
+ }
+ target_rcmd (cmd, gdb_stdtarg);
+}
+
void
initialize_targets ()
{
@@ -2736,6 +2760,10 @@ initialize_targets ()
When non-zero, target debugging is enabled.", &setlist),
&showlist);
+
+ add_com ("monitor", class_obscure, do_monitor_command,
+ "Send a command to the remote monitor (remote targets only).");
+
if (!STREQ (signals[TARGET_SIGNAL_LAST].string, "TARGET_SIGNAL_MAGIC"))
abort ();
}
diff --git a/gdb/target.h b/gdb/target.h
index f7e0a94..fd4ffe5 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -376,6 +376,7 @@ struct target_ops
void (*to_find_new_threads) PARAMS ((void));
void (*to_stop) PARAMS ((void));
int (*to_query) PARAMS ((int /*char */ , char *, char *, int *));
+ void (*to_rcmd) (char *command, struct gdb_file *output);
struct symtab_and_line *(*to_enable_exception_callback) PARAMS ((enum exception_event_kind, int));
struct exception_event_record *(*to_get_current_exception_event) PARAMS ((void));
char *(*to_pid_to_exec_file) PARAMS ((int pid));
@@ -930,6 +931,14 @@ print_section_info PARAMS ((struct target_ops *, bfd *));
#define target_query(query_type, query, resp_buffer, bufffer_size) \
(*current_target.to_query) (query_type, query, resp_buffer, bufffer_size)
+/* Send the specified COMMAND to the target's monitor
+ (shell,interpreter) for execution. The result of the query is
+ placed in OUTBUF. */
+
+#define target_rcmd(command, outbuf) \
+ (*current_target.to_rcmd) (command, outbuf)
+
+
/* Get the symbol information for a breakpointable routine called when
an exception event occurs.
Intended mainly for C++, and for those
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index c1e25ca..7d31fa8 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,32 @@
+1999-08-05 Stan Shebs <shebs@andros.cygnus.com>
+
+ * gdb.base/display.exp: Help expect by putting a newline in the
+ funky printf, remove a bogus p/a test.
+
+1999-08-05 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * gdb.base/display.exp: Make sure that when we say 'run', we are
+ connected to the target. This is necessary when running not
+ natively.
+
+1999-08-03 Stan Shebs <shebs@andros.cygnus.com>
+
+ * gdb.base/step-test.exp: Removed some extraneous messages.
+
+ * gdb.base/long_long.exp: Don't run memory examination tests
+ on little-endian targets (they will need a different set of
+ results to match).
+
+1999-08-02 Stan Shebs <shebs@andros.cygnus.com>
+
+ * gdb.c++/virtfunc.exp: Expect to fail the virtual call tests
+ until somebody decides to fix GDB.
+
+ * gdb.base/long_long.c: Stop compiler complaint by specifying long
+ constant as "ULL".
+ * gdb.base/long_long.exp: Loosen x/c test, add partial result
+ matches for a couple x/2 commands.
+
1999-07-30 Stan Shebs <shebs@andros.cygnus.com>
* gdb.c++/ref-types.cc, gdb.c++/ref-types.exp: Appease doschk
diff --git a/gdb/testsuite/gdb.base/commands.exp b/gdb/testsuite/gdb.base/commands.exp
index 62d9f10..c9cea08 100644
--- a/gdb/testsuite/gdb.base/commands.exp
+++ b/gdb/testsuite/gdb.base/commands.exp
@@ -185,7 +185,7 @@ proc infrun_breakpoint_command_test {} {
if { [istarget "hppa*-hp-hpux*"] } {
gdb_test "continue" \
"Continuing.*.*.*Breakpoint \[0-9\]*, factorial \\(value=5\\).*at.*\[0-9\]*\[ \]*if \\(value > 1\\) \{.*\[0-9\]*\[ \]*value \\*= factorial \\(value - 1\\);.*" \
- "contiune in infrun_breakpoint_command_test"
+ "continue in infrun_breakpoint_command_test"
} else {
gdb_test "continue" \
"Breakpoint \[0-9\]*, factorial \\(value=5\\).*at.*
diff --git a/gdb/testsuite/gdb.base/display.exp b/gdb/testsuite/gdb.base/display.exp
index 760a2e0..98cd73c 100644
--- a/gdb/testsuite/gdb.base/display.exp
+++ b/gdb/testsuite/gdb.base/display.exp
@@ -46,6 +46,7 @@ gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
+
# Some coverage stuff
#
gdb_test "kill" ".*The program is not being run.*"
@@ -59,9 +60,16 @@ gdb_test "detach" ".*"
# Ok, on to real life
#
-if {![runto main]} {
- fail "Could not run to main - other tests will fail."
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto_main] then {
+ fail "Could not run to main - other tests will fail."
+ continue
}
+
gdb_test "b 14" ".*Breakpoint 2.*" "break do_loops"
gdb_test "c" ".*Breakpoint 2, do_loops.*" "get to do_loops"
@@ -133,7 +141,7 @@ gdb_test "printf" ".*Argument required.*"
gdb_test "printf %d" ".*Bad format string, missing.*"
gdb_test "printf \"%d" ".*Bad format string, non-terminated.*"
gdb_test "printf \"%d%d\",i" ".*Wrong number of arguments.*"
-gdb_test "printf \"\\\\!\\a\\f\\r\\t\\v\\b\"" ".*!.*"
+gdb_test "printf \"\\\\!\\a\\f\\r\\t\\v\\b\\n\"" ".*!.*"
gdb_test "printf \"\"" ".*" "re-set term"
gdb_test "printf \"\\w\"" ".*Unrecognized escape character.*"
gdb_test "printf \"%d\" j" ".*Invalid argument syntax.*"
@@ -159,7 +167,6 @@ gdb_test "p/i sum" ".*Format letter.*is meaningless.*.*" "no i"
gdb_test "p/a &sum" ".*= $hex.*<sum>.*"
gdb_test "p/a main+1000" ".*= $hex.*<.*>.*"
gdb_test "p/a \$pc" ".*= $hex.*<do_vars+.*>.*"
-gdb_test "p/a &j" ".*= $hex.*<do_vars+.*>.*"
gdb_test "p/a &&j" ".*A parse error.*"
# Done!
diff --git a/gdb/testsuite/gdb.base/long_long.c b/gdb/testsuite/gdb.base/long_long.c
index a76e279..04fba92 100644
--- a/gdb/testsuite/gdb.base/long_long.c
+++ b/gdb/testsuite/gdb.base/long_long.c
@@ -31,7 +31,7 @@ int known_types()
*/
bin = 0x123456789abcdefLL; /* 64 bits = 16 hex digits */
oct = 01234567123456701234567LL; /* = 21+ octal digits */
- dec = 12345678901234567890LL; /* = 19+ decimal digits */
+ dec = 12345678901234567890ULL; /* = 19+ decimal digits */
/* Stop here and look!
*/
diff --git a/gdb/testsuite/gdb.base/long_long.exp b/gdb/testsuite/gdb.base/long_long.exp
index 07006b6..b779434 100644
--- a/gdb/testsuite/gdb.base/long_long.exp
+++ b/gdb/testsuite/gdb.base/long_long.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 1999 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
@@ -58,6 +58,17 @@ if { ![runto known_types] } then {
return
}
+set target_bigendian_p 1
+send_gdb "show endian\n"
+gdb_expect {
+ -re ".*little endian.*$gdb_prompt $" { set target_bigendian_p 0 }
+ -re ".*big endian.*$gdb_prompt $" { }
+ -re ".*$gdb_prompt $" {
+ fail "getting target endian"
+ }
+ default { fail "(timeout) getting target endian" }
+}
+
gdb_test "n 4" ".*38.*" "get to known place"
# Check the hack for long long prints.
@@ -87,76 +98,90 @@ gdb_test "p/a oct" ".*0x.*77053977.*"
gdb_test "p/c oct" ".*'w'.*"
gdb_test "p/f oct" ".*-5.9822653797615723e-120.*"
-gdb_test "p/d *(int *)&oct" ".*-1490098887.*"
-gdb_test "p/u *(int *)&oct" ".*2804868409.*"
-gdb_test "p/o *(int *)&oct" ".*024713562471.*"
-gdb_test "p/t *(int *)&oct" ".*10100111001011101110010100111001.*"
-gdb_test "p/a *(int *)&oct" ".*0xf*a72ee539.*"
-gdb_test "p/c *(int *)&oct" ".*57 '9'.*"
-gdb_test "p/f *(int *)&oct" ".*-2.42716126e-15.*"
-
-gdb_test "p/d *(short *)&oct" ".*-22738.*"
-gdb_test "p/u *(short *)&oct" ".*42798.*"
-gdb_test "p/o *(short *)&oct" ".*0123456.*"
-gdb_test "p/t *(short *)&oct" ".*1010011100101110.*"
-gdb_test "p/a *(short *)&oct" ".*0xf*ffffa72e.*"
-gdb_test "p/c *(short *)&oct" ".* 46 '.'.*"
-gdb_test "p/a *(short *)&oct" ".*0xf*ffffa72e.*"
-gdb_test "p/f *(short *)&oct" ".*-22738.*"
-
-gdb_test "x/x &oct" ".*0xa72ee539.*"
-gdb_test "x/d &oct" ".*.-1490098887*"
-gdb_test "x/u &oct" ".*2804868409.*"
-gdb_test "x/o &oct" ".*024713562471.*"
-gdb_test "x/t &oct" ".*10100111001011101110010100111001.*"
-gdb_test "x/a &oct" ".*0xa72ee539.*"
-gdb_test "x/c &oct" ".*-89 '\\\\247'.*"
-gdb_test "x/f &oct" ".*-5.9822653797615723e-120.*"
-
-gdb_test "x/2x &oct" ".*.*"
-gdb_test "x/2d &oct" ".*.*"
-gdb_test "x/2u &oct" ".*.*"
-gdb_test "x/2o &oct" ".*.*"
-gdb_test "x/2t &oct" ".*.*"
-gdb_test "x/2a &oct" ".*.*"
-gdb_test "x/2c &oct" ".*.*"
-gdb_test "x/2f &oct" ".*.*"
-
-gdb_test "x/2bx &oct" ".*.*"
-gdb_test "x/2bd &oct" ".*.*"
-gdb_test "x/2bu &oct" ".*.*"
-gdb_test "x/2bo &oct" ".*.*"
-gdb_test "x/2bt &oct" ".*.*"
-gdb_test "x/2ba &oct" ".*.*"
-gdb_test "x/2bc &oct" ".*.*"
-gdb_test "x/2bf &oct" ".*.*"
-
-gdb_test "x/2hx &oct" ".*.*"
-gdb_test "x/2hd &oct" ".*.*"
-gdb_test "x/2hu &oct" ".*.*"
-gdb_test "x/2ho &oct" ".*.*"
-gdb_test "x/2ht &oct" ".*.*"
-gdb_test "x/2ha &oct" ".*.*"
-gdb_test "x/2hc &oct" ".*.*"
-gdb_test "x/2hf &oct" ".*.*"
-
-gdb_test "x/2wx &oct" ".*.*"
-gdb_test "x/2wd &oct" ".*.*"
-gdb_test "x/2wu &oct" ".*.*"
-gdb_test "x/2wo &oct" ".*.*"
-gdb_test "x/2wt &oct" ".*.*"
-gdb_test "x/2wa &oct" ".*.*"
-gdb_test "x/2wc &oct" ".*.*"
-gdb_test "x/2wf &oct" ".*.*"
-
-gdb_test "x/2gx &oct" ".*.*"
-gdb_test "x/2gd &oct" ".*.*"
-gdb_test "x/2gu &oct" ".*.*"
-gdb_test "x/2go &oct" ".*.*"
-gdb_test "x/2gt &oct" ".*.*"
-gdb_test "x/2ga &oct" ".*.*"
-gdb_test "x/2gc &oct" ".*.*"
-gdb_test "x/2gf &oct" ".*.*"
+if { $target_bigendian_p } {
+
+ gdb_test "p/d *(int *)&oct" ".*-1490098887.*"
+ gdb_test "p/u *(int *)&oct" ".*2804868409.*"
+ gdb_test "p/o *(int *)&oct" ".*024713562471.*"
+ gdb_test "p/t *(int *)&oct" ".*10100111001011101110010100111001.*"
+ gdb_test "p/a *(int *)&oct" ".*0xf*a72ee539.*"
+ gdb_test "p/c *(int *)&oct" ".*57 '9'.*"
+ gdb_test "p/f *(int *)&oct" ".*-2.42716126e-15.*"
+
+ gdb_test "p/d *(short *)&oct" ".*-22738.*"
+ gdb_test "p/u *(short *)&oct" ".*42798.*"
+ gdb_test "p/o *(short *)&oct" ".*0123456.*"
+ gdb_test "p/t *(short *)&oct" ".*1010011100101110.*"
+ gdb_test "p/a *(short *)&oct" ".*0xf*ffffa72e.*"
+ gdb_test "p/c *(short *)&oct" ".* 46 '.'.*"
+ gdb_test "p/a *(short *)&oct" ".*0xf*ffffa72e.*"
+ gdb_test "p/f *(short *)&oct" ".*-22738.*"
+
+ gdb_test "x/x &oct" ".*0xa72ee539.*"
+ gdb_test "x/d &oct" ".*.-1490098887*"
+ gdb_test "x/u &oct" ".*2804868409.*"
+ gdb_test "x/o &oct" ".*024713562471.*"
+ gdb_test "x/t &oct" ".*10100111001011101110010100111001.*"
+ gdb_test "x/a &oct" ".*0xa72ee539.*"
+ gdb_test "x/c &oct" ".*-89 .*"
+ # FIXME GDB's output is correct, but this longer match fails.
+ # gdb_test "x/c &oct" ".*-89 '\\\\247'.*"
+ gdb_test "x/f &oct" ".*-5.9822653797615723e-120.*"
+
+ # FIXME Fill in the results for all the following tests. (But be careful
+ # about looking at locations with unspecified contents!)
+
+ gdb_test "x/2x &oct" ".*0xa72ee53977053977.*"
+ gdb_test "x/2d &oct" ".*-6399925985474168457.*"
+ gdb_test "x/2u &oct" ".*.*"
+ gdb_test "x/2o &oct" ".*.*"
+ gdb_test "x/2t &oct" ".*.*"
+ gdb_test "x/2a &oct" ".*.*"
+ gdb_test "x/2c &oct" ".*.*"
+ gdb_test "x/2f &oct" ".*.*"
+
+ gdb_test "x/2bx &oct" ".*.*"
+ gdb_test "x/2bd &oct" ".*.*"
+ gdb_test "x/2bu &oct" ".*.*"
+ gdb_test "x/2bo &oct" ".*.*"
+ gdb_test "x/2bt &oct" ".*.*"
+ gdb_test "x/2ba &oct" ".*.*"
+ gdb_test "x/2bc &oct" ".*.*"
+ gdb_test "x/2bf &oct" ".*.*"
+
+ gdb_test "x/2hx &oct" ".*.*"
+ gdb_test "x/2hd &oct" ".*.*"
+ gdb_test "x/2hu &oct" ".*.*"
+ gdb_test "x/2ho &oct" ".*.*"
+ gdb_test "x/2ht &oct" ".*.*"
+ gdb_test "x/2ha &oct" ".*.*"
+ gdb_test "x/2hc &oct" ".*.*"
+ gdb_test "x/2hf &oct" ".*.*"
+
+ gdb_test "x/2wx &oct" ".*.*"
+ gdb_test "x/2wd &oct" ".*.*"
+ gdb_test "x/2wu &oct" ".*.*"
+ gdb_test "x/2wo &oct" ".*.*"
+ gdb_test "x/2wt &oct" ".*.*"
+ gdb_test "x/2wa &oct" ".*.*"
+ gdb_test "x/2wc &oct" ".*.*"
+ gdb_test "x/2wf &oct" ".*.*"
+
+ gdb_test "x/2gx &oct" ".*.*"
+ gdb_test "x/2gd &oct" ".*.*"
+ gdb_test "x/2gu &oct" ".*.*"
+ gdb_test "x/2go &oct" ".*.*"
+ gdb_test "x/2gt &oct" ".*.*"
+ gdb_test "x/2ga &oct" ".*.*"
+ gdb_test "x/2gc &oct" ".*.*"
+ gdb_test "x/2gf &oct" ".*.*"
+
+} else {
+
+ # FIXME Add little-endian versions of these tests, or define a
+ # gdb_test_bi with two strings to match on.
+
+}
gdb_exit
return 0
diff --git a/gdb/testsuite/gdb.base/step-test.exp b/gdb/testsuite/gdb.base/step-test.exp
index 6eeda0b..c8232cb 100644
--- a/gdb/testsuite/gdb.base/step-test.exp
+++ b/gdb/testsuite/gdb.base/step-test.exp
@@ -149,7 +149,6 @@ test_i "stepi into function" "stepi" \
send_gdb "finish\n"
gdb_expect {
-re ".*(Program received|Program exited).*$gdb_prompt $" {
- puts "*** Matched Program recieved"
# Oops... We ran to the end of the program... Better reset
if {![runto_main]} then {
fail "Can't run to main"
@@ -162,13 +161,11 @@ gdb_expect {
fail "stepi: finish call"
}
-re ".*${decimal}.*callee.*NEXTI.*$gdb_prompt $" {
- puts "*** Matched success..."
pass "stepi: finish call"
}
-re ".*${decimal}.*callee.*STEPI.*$gdb_prompt $" {
# On PA64 we end up at a different instruction than PA32
if { [istarget "hppa2.0w-hp-hpux*"] } {
- puts "*** Matched success..."
pass "stepi: finish call 2"
} else {
fail "stepi: finish call 2"
diff --git a/gdb/testsuite/gdb.c++/virtfunc.exp b/gdb/testsuite/gdb.c++/virtfunc.exp
index e182744..dd73cab 100644
--- a/gdb/testsuite/gdb.c++/virtfunc.exp
+++ b/gdb/testsuite/gdb.c++/virtfunc.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1994, 1997, 1999 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
@@ -34,6 +34,7 @@ if [get_compiler_info ${binfile} "c++"] {
return -1
}
+source ${binfile}.ci
# Check to see if we have an executable to test. If not, then either we
# haven't tried to compile one, or the compilation failed for some reason.
@@ -678,6 +679,7 @@ 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
@@ -685,6 +687,12 @@ proc test_virtual_calls {} {
return 0
}
+ # FIXME: In fall 1998, GCC's virtual function type info was changed,
+ # which causes GDB to be unable to resolve these calls. Until the
+ # problem is fixed, XFAIL these tests. -sts 1999-08-02
+
+ if {$gcc_compiled} then { setup_xfail "*-*-*" }
+
send_gdb "print pAe->f()\n"
gdb_expect {
-re ".* = 20$nl$gdb_prompt $" { pass "print pAe->f()" }
@@ -706,6 +714,8 @@ proc test_virtual_calls {} {
eof { fail "print pAe->f() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
+ if {$gcc_compiled} then { setup_xfail "*-*-*" }
+
send_gdb "print pAa->f()\n"
gdb_expect {
-re ".* = 1$nl$gdb_prompt $" { pass "print pAa->f()" }
@@ -718,6 +728,8 @@ proc test_virtual_calls {} {
eof { fail "print pAa->f() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
+ if {$gcc_compiled} then { setup_xfail "*-*-*" }
+
send_gdb "print pDe->vg()\n"
gdb_expect {
-re ".* = 202$nl$gdb_prompt $" { pass "print pDe->vg()" }
@@ -730,6 +742,8 @@ proc test_virtual_calls {} {
eof { fail "print pDe->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
+ if {$gcc_compiled} then { setup_xfail "*-*-*" }
+
send_gdb "print pADe->vg()\n"
gdb_expect {
-re ".* = 202$nl$gdb_prompt $" { pass "print pADe->vg()" }
@@ -742,6 +756,8 @@ proc test_virtual_calls {} {
eof { fail "print pADe->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
+ if {$gcc_compiled} then { setup_xfail "*-*-*" }
+
send_gdb "print pDd->vg()\n"
gdb_expect {
-re ".* = 101$nl$gdb_prompt $" { pass "print pDd->vg()" }
@@ -754,6 +770,8 @@ proc test_virtual_calls {} {
eof { fail "print pDd->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
+ if {$gcc_compiled} then { setup_xfail "*-*-*" }
+
send_gdb "print pEe->vvb()\n"
gdb_expect {
-re ".* = 411$nl$gdb_prompt $" { pass "print pEe->vvb()" }
@@ -766,6 +784,8 @@ proc test_virtual_calls {} {
eof { fail "print pEe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
+ if {$gcc_compiled} then { setup_xfail "*-*-*" }
+
send_gdb "print pVB->vvb()\n"
gdb_expect {
-re ".* = 407$nl$gdb_prompt $" { pass "print pVB->vvb()" }
@@ -778,6 +798,8 @@ proc test_virtual_calls {} {
eof { fail "print pVB->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
+ if {$gcc_compiled} then { setup_xfail "*-*-*" }
+
send_gdb "print pBe->vvb()\n"
gdb_expect {
-re ".* = 411$nl$gdb_prompt $" { pass "print pBe->vvb()" }
@@ -790,6 +812,8 @@ proc test_virtual_calls {} {
eof { fail "print pBe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
+ if {$gcc_compiled} then { setup_xfail "*-*-*" }
+
send_gdb "print pDe->vvb()\n"
gdb_expect {
-re ".* = 411$nl$gdb_prompt $" { pass "print pDe->vvb()" }
@@ -802,6 +826,8 @@ proc test_virtual_calls {} {
eof { fail "print pDe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
+ if {$gcc_compiled} then { setup_xfail "*-*-*" }
+
send_gdb "print pEe->vd()\n"
gdb_expect {
-re ".* = 282$nl$gdb_prompt $" { pass "print pEe->vd()" }
@@ -814,6 +840,8 @@ proc test_virtual_calls {} {
eof { fail "print pEe->vd() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
+ if {$gcc_compiled} then { setup_xfail "*-*-*" }
+
send_gdb "print pEe->fvb()\n"
gdb_expect {
-re ".* = 311$nl$gdb_prompt $" { pass "print pEe->fvb()" }
@@ -826,6 +854,8 @@ proc test_virtual_calls {} {
eof { fail "print pEe->fvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
+ if {$gcc_compiled} then { setup_xfail "*-*-*" }
+
send_gdb "print pEe->D::vg()\n"
setup_xfail "*-*-*"
gdb_expect {
diff --git a/gdb/top.c b/gdb/top.c
index 5535937..40955ab 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -445,6 +445,9 @@ void (*registers_changed_hook) PARAMS ((void));
that several registers have changed (see value_assign). */
void (*register_changed_hook) PARAMS ((int regno));
+/* Tell the GUI that the disassembly flavor has changed */
+void (*disassembly_flavor_hook) PARAMS((char *args, int from_tty));
+
/* Tell the GUI someone changed LEN bytes of memory at ADDR */
void (*memory_changed_hook) PARAMS ((CORE_ADDR addr, int len));
@@ -459,6 +462,11 @@ int (*target_wait_hook) PARAMS ((int pid, struct target_waitstatus * status));
void (*call_command_hook) PARAMS ((struct cmd_list_element * c, char *cmd,
int from_tty));
+/* Called after a `set' command has finished. Is only run if the
+ `set' command succeeded. */
+
+void (*set_hook) PARAMS ((struct cmd_list_element *c));
+
/* Called when the current thread changes. Argument is thread id. */
void (*context_hook) PARAMS ((int id));
@@ -1045,7 +1053,7 @@ arg_cleanup ()
{
struct user_args *oargs = user_args;
if (!user_args)
- fatal ("Internal error, arg_cleanup called with no user args.\n");
+ internal_error ("Internal error, arg_cleanup called with no user args.\n");
user_args = user_args->next;
free (oargs);
@@ -3808,7 +3816,7 @@ init_main ()
else
{
/* initialize the prompt stack to a simple "(gdb) " prompt or to
- whatever the DEFULAT_PROMPT is. */
+ whatever the DEFAULT_PROMPT is. */
the_prompts.top = 0;
PREFIX (0) = "";
#ifdef DEFAULT_PROMPT
diff --git a/gdb/utils.c b/gdb/utils.c
index 23374cf..58cefdf 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -66,9 +66,6 @@ static void malloc_botch PARAMS ((void));
#endif
static void
-fatal_dump_core PARAMS ((char *,...));
-
-static void
prompt_for_continue PARAMS ((void));
static void
@@ -431,24 +428,11 @@ warning_begin ()
The primary difference between warnings and errors is that a warning
does not force the return to command level. */
-/* VARARGS */
void
-#ifdef ANSI_PROTOTYPES
warning (const char *string,...)
-#else
-warning (va_alist)
- va_dcl
-#endif
{
va_list args;
-#ifdef ANSI_PROTOTYPES
va_start (args, string);
-#else
- char *string;
-
- va_start (args);
- string = va_arg (args, char *);
-#endif
if (warning_hook)
(*warning_hook) (string, args);
else
@@ -487,36 +471,17 @@ error_begin ()
The first argument STRING is the error message, used as a fprintf string,
and the remaining args are passed as arguments to it. */
-/* VARARGS */
NORETURN void
-#ifdef ANSI_PROTOTYPES
error (const char *string,...)
-#else
-error (va_alist)
- va_dcl
-#endif
{
va_list args;
-#ifdef ANSI_PROTOTYPES
va_start (args, string);
-#else
- va_start (args);
-#endif
if (error_hook)
(*error_hook) ();
else
{
error_begin ();
-#ifdef ANSI_PROTOTYPES
vfprintf_filtered (gdb_stderr, string, args);
-#else
- {
- char *string1;
-
- string1 = va_arg (args, char *);
- vfprintf_filtered (gdb_stderr, string1, args);
- }
-#endif
fprintf_filtered (gdb_stderr, "\n");
va_end (args);
return_to_top_level (RETURN_ERROR);
@@ -524,69 +489,46 @@ error (va_alist)
}
-/* Print an error message and exit reporting failure.
- This is for a error that we cannot continue from.
- The arguments are printed a la printf.
-
- This function cannot be declared volatile (NORETURN) in an
- ANSI environment because exit() is not declared volatile. */
+/* Print a message reporting an internal error. Ask the user if they
+ want to continue, dump core, or just exit. */
-/* VARARGS */
NORETURN void
-#ifdef ANSI_PROTOTYPES
-fatal (char *string,...)
-#else
-fatal (va_alist)
- va_dcl
-#endif
+internal_error (char *string, ...)
{
+ static char msg[] = "Internal GDB error: recursive internal error.\n";
+ static int dejavu = 0;
va_list args;
-#ifdef ANSI_PROTOTYPES
- va_start (args, string);
-#else
- char *string;
- va_start (args);
- string = va_arg (args, char *);
-#endif
- fprintf_unfiltered (gdb_stderr, "\ngdb: ");
- vfprintf_unfiltered (gdb_stderr, string, args);
- fprintf_unfiltered (gdb_stderr, "\n");
- va_end (args);
- exit (1);
-}
-/* Print an error message and exit, dumping core.
- The arguments are printed a la printf (). */
+ /* don't allow infinite error recursion. */
+ switch (dejavu)
+ {
+ case 0:
+ dejavu = 1;
+ break;
+ case 1:
+ dejavu = 2;
+ fputs_unfiltered (msg, gdb_stderr);
+ abort ();
+ default:
+ dejavu = 3;
+ write (STDERR_FILENO, msg, sizeof (msg));
+ exit (1);
+ }
-/* VARARGS */
-static void
-#ifdef ANSI_PROTOTYPES
-fatal_dump_core (char *string,...)
-#else
-fatal_dump_core (va_alist)
- va_dcl
-#endif
-{
- va_list args;
-#ifdef ANSI_PROTOTYPES
+ /* Try to get the message out */
+ fputs_unfiltered ("\nGDB-INTERNAL-ERROR: ", gdb_stderr);
va_start (args, string);
-#else
- char *string;
-
- va_start (args);
- string = va_arg (args, char *);
-#endif
- /* "internal error" is always correct, since GDB should never dump
- core, no matter what the input. */
- fprintf_unfiltered (gdb_stderr, "\ngdb internal error: ");
vfprintf_unfiltered (gdb_stderr, string, args);
- fprintf_unfiltered (gdb_stderr, "\n");
va_end (args);
+ fputs_unfiltered ("\n", gdb_stderr);
+
+ if (query ("\
+An internal GDB error has been detected.\n\
+Do you want to quit GDB (dumping core)? "))
+ abort ();
- signal (SIGQUIT, SIG_DFL);
- kill (getpid (), SIGQUIT);
- /* We should never get here, but just in case... */
- exit (1);
+ dejavu = 0;
+ return_to_top_level (RETURN_ERROR);
}
/* The strerror() function can return NULL for errno values that are
@@ -847,7 +789,8 @@ init_malloc (md)
static void
malloc_botch ()
{
- fatal_dump_core ("Memory corruption");
+ fprintf_unfiltered (gdb_stderr, "Memory corruption\n");
+ abort ();
}
/* Attempt to install hooks in mmalloc/mrealloc/mfree for the heap specified
@@ -898,11 +841,11 @@ nomem (size)
{
if (size > 0)
{
- fatal ("virtual memory exhausted: can't allocate %ld bytes.", size);
+ internal_error ("virtual memory exhausted: can't allocate %ld bytes.", size);
}
else
{
- fatal ("virtual memory exhausted.");
+ internal_error ("virtual memory exhausted.");
}
}
@@ -1075,25 +1018,14 @@ gdb_print_address (addr, stream)
/* VARARGS */
int
-#ifdef ANSI_PROTOTYPES
query (char *ctlstr,...)
-#else
-query (va_alist)
- va_dcl
-#endif
{
va_list args;
register int answer;
register int ans2;
int retval;
-#ifdef ANSI_PROTOTYPES
va_start (args, ctlstr);
-#else
- char *ctlstr;
- va_start (args);
- ctlstr = va_arg (args, char *);
-#endif
if (query_hook)
{
@@ -2443,50 +2375,20 @@ vprintf_unfiltered (format, args)
vfprintf_unfiltered (gdb_stdout, format, args);
}
-/* VARARGS */
void
-#ifdef ANSI_PROTOTYPES
fprintf_filtered (GDB_FILE * stream, const char *format,...)
-#else
-fprintf_filtered (va_alist)
- va_dcl
-#endif
{
va_list args;
-#ifdef ANSI_PROTOTYPES
va_start (args, format);
-#else
- GDB_FILE *stream;
- char *format;
-
- va_start (args);
- stream = va_arg (args, GDB_FILE *);
- format = va_arg (args, char *);
-#endif
vfprintf_filtered (stream, format, args);
va_end (args);
}
-/* VARARGS */
void
-#ifdef ANSI_PROTOTYPES
fprintf_unfiltered (GDB_FILE * stream, const char *format,...)
-#else
-fprintf_unfiltered (va_alist)
- va_dcl
-#endif
{
va_list args;
-#ifdef ANSI_PROTOTYPES
va_start (args, format);
-#else
- GDB_FILE *stream;
- char *format;
-
- va_start (args);
- stream = va_arg (args, GDB_FILE *);
- format = va_arg (args, char *);
-#endif
vfprintf_unfiltered (stream, format, args);
va_end (args);
}
@@ -2494,28 +2396,11 @@ fprintf_unfiltered (va_alist)
/* Like fprintf_filtered, but prints its result indented.
Called as fprintfi_filtered (spaces, stream, format, ...); */
-/* VARARGS */
void
-#ifdef ANSI_PROTOTYPES
fprintfi_filtered (int spaces, GDB_FILE * stream, const char *format,...)
-#else
-fprintfi_filtered (va_alist)
- va_dcl
-#endif
{
va_list args;
-#ifdef ANSI_PROTOTYPES
va_start (args, format);
-#else
- int spaces;
- GDB_FILE *stream;
- char *format;
-
- va_start (args);
- spaces = va_arg (args, int);
- stream = va_arg (args, GDB_FILE *);
- format = va_arg (args, char *);
-#endif
print_spaces_filtered (spaces, stream);
vfprintf_filtered (stream, format, args);
@@ -2523,47 +2408,21 @@ fprintfi_filtered (va_alist)
}
-/* VARARGS */
void
-#ifdef ANSI_PROTOTYPES
printf_filtered (const char *format,...)
-#else
-printf_filtered (va_alist)
- va_dcl
-#endif
{
va_list args;
-#ifdef ANSI_PROTOTYPES
va_start (args, format);
-#else
- char *format;
-
- va_start (args);
- format = va_arg (args, char *);
-#endif
vfprintf_filtered (gdb_stdout, format, args);
va_end (args);
}
-/* VARARGS */
void
-#ifdef ANSI_PROTOTYPES
printf_unfiltered (const char *format,...)
-#else
-printf_unfiltered (va_alist)
- va_dcl
-#endif
{
va_list args;
-#ifdef ANSI_PROTOTYPES
va_start (args, format);
-#else
- char *format;
-
- va_start (args);
- format = va_arg (args, char *);
-#endif
vfprintf_unfiltered (gdb_stdout, format, args);
va_end (args);
}
@@ -2571,26 +2430,11 @@ printf_unfiltered (va_alist)
/* Like printf_filtered, but prints it's result indented.
Called as printfi_filtered (spaces, format, ...); */
-/* VARARGS */
void
-#ifdef ANSI_PROTOTYPES
printfi_filtered (int spaces, const char *format,...)
-#else
-printfi_filtered (va_alist)
- va_dcl
-#endif
{
va_list args;
-#ifdef ANSI_PROTOTYPES
va_start (args, format);
-#else
- int spaces;
- char *format;
-
- va_start (args);
- spaces = va_arg (args, int);
- format = va_arg (args, char *);
-#endif
print_spaces_filtered (spaces, gdb_stdout);
vfprintf_filtered (gdb_stdout, format, args);
va_end (args);
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index c6e605b..060200f 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -873,7 +873,7 @@ v850_target_architecture_hook (ap)
}
}
- fatal ("Architecture `%s' unreconized", ap->printable_name);
+ internal_error ("Architecture `%s' unreconized", ap->printable_name);
}
void
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index ef73399..059bc1d 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -196,7 +196,7 @@ static struct complaint eb_complaint =
{"Mismatched .eb symbol ignored starting at symnum %d", 0, 0};
static void
-xcoff_initial_scan PARAMS ((struct objfile *, struct section_offsets *, int));
+xcoff_initial_scan PARAMS ((struct objfile *, int));
static void
scan_xcoff_symtab PARAMS ((struct section_offsets *, struct objfile *));
@@ -2230,7 +2230,7 @@ scan_xcoff_symtab (section_offsets, objfile)
char *sraw_symbol;
struct internal_syment symbol;
- union internal_auxent main_aux;
+ union internal_auxent main_aux[5];
unsigned int ssymnum;
char *last_csect_name = NULL; /* last seen csect's name and value */
@@ -2279,7 +2279,7 @@ scan_xcoff_symtab (section_offsets, objfile)
union internal_auxent csect_aux;
unsigned int symnum_before = ssymnum;
- swap_sym (&symbol, &main_aux, &namestring, &sraw_symbol,
+ swap_sym (&symbol, &main_aux[0], &namestring, &sraw_symbol,
&ssymnum, objfile);
if (symbol.n_numaux > 1)
{
@@ -2293,7 +2293,7 @@ scan_xcoff_symtab (section_offsets, objfile)
&csect_aux);
}
else
- csect_aux = main_aux;
+ csect_aux = main_aux[0];
/* If symbol name starts with ".$" or "$", ignore it. */
if (namestring[0] == '$'
@@ -2401,7 +2401,7 @@ scan_xcoff_symtab (section_offsets, objfile)
if (first_fun_line_offset == 0 && symbol.n_numaux > 1)
first_fun_line_offset =
- main_aux.x_sym.x_fcnary.x_fcn.x_lnnoptr;
+ main_aux[0].x_sym.x_fcnary.x_fcn.x_lnnoptr;
RECORD_MINIMAL_SYMBOL
(namestring, symbol.n_value,
sclass == C_HIDEXT ? mst_file_text : mst_text,
@@ -2476,7 +2476,7 @@ scan_xcoff_symtab (section_offsets, objfile)
unsigned int symnum_before;
symnum_before = ssymnum;
- swap_sym (&symbol, &main_aux, &namestring, &sraw_symbol,
+ swap_sym (&symbol, &main_aux[0], &namestring, &sraw_symbol,
&ssymnum, objfile);
/* See if the last csect needs to be recorded. */
@@ -2510,7 +2510,7 @@ scan_xcoff_symtab (section_offsets, objfile)
exists, otherwise use the symbol itself. */
if (!strcmp (namestring, ".file") && symbol.n_numaux > 0)
{
- filestring = coff_getfilename (&main_aux, objfile);
+ filestring = coff_getfilename (&main_aux[0], objfile);
}
else
filestring = namestring;
@@ -2600,7 +2600,7 @@ scan_xcoff_symtab (section_offsets, objfile)
case C_STSYM:
stype = N_LSYM;
pstab:;
- swap_sym (&symbol, &main_aux, &namestring, &sraw_symbol,
+ swap_sym (&symbol, &main_aux[0], &namestring, &sraw_symbol,
&ssymnum, objfile);
#define CUR_SYMBOL_TYPE stype
#define CUR_SYMBOL_VALUE symbol.n_value
@@ -2654,9 +2654,8 @@ get_toc_offset (objfile)
table (as opposed to a shared lib or dynamically loaded file). */
static void
-xcoff_initial_scan (objfile, section_offsets, mainline)
+xcoff_initial_scan (objfile, mainline)
struct objfile *objfile;
- struct section_offsets *section_offsets;
int mainline; /* FIXME comments above */
{
bfd *abfd;
@@ -2751,7 +2750,7 @@ xcoff_initial_scan (objfile, section_offsets, mainline)
/* Now that the symbol table data of the executable file are all in core,
process them and define symbols accordingly. */
- scan_xcoff_symtab (section_offsets, objfile);
+ scan_xcoff_symtab (objfile->section_offsets, objfile);
/* Install any minimal symbols that have been collected as the current
minimal symbols for this objfile. */
@@ -2771,10 +2770,7 @@ xcoff_symfile_offsets (objfile, addr)
objfile->num_sections = SECT_OFF_MAX;
section_offsets = (struct section_offsets *)
- obstack_alloc
- (&objfile->psymbol_obstack,
- sizeof (struct section_offsets)
- + sizeof (section_offsets->offsets) * objfile->num_sections);
+ obstack_alloc (&objfile->psymbol_obstack, SIZEOF_SECTION_OFFSETS);
/* syms_from_objfile kindly subtracts from addr the bfd_section_vma
of the .text section. This strikes me as wrong--whether the