aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>1999-10-05 23:13:56 +0000
committerJason Molenda <jmolenda@apple.com>1999-10-05 23:13:56 +0000
commit2acceee2182a942e6a79a972009540990f4dfabf (patch)
tree2ed7ca473f0b49181f1d0214c3450a7eb17f7bcb
parent3e9c42873ee1d0bbb03039baea78c617174f9269 (diff)
downloadgdb-2acceee2182a942e6a79a972009540990f4dfabf.zip
gdb-2acceee2182a942e6a79a972009540990f4dfabf.tar.gz
gdb-2acceee2182a942e6a79a972009540990f4dfabf.tar.bz2
import gdb-1999-10-04 snapshot
-rw-r--r--gdb/ChangeLog430
-rw-r--r--gdb/Makefile.in13
-rw-r--r--gdb/alpha-nat.c16
-rw-r--r--gdb/breakpoint.c10
-rw-r--r--gdb/coff-solib.c5
-rw-r--r--gdb/command.c8
-rw-r--r--gdb/config.in3
-rwxr-xr-xgdb/configure566
-rw-r--r--gdb/configure.in3
-rw-r--r--gdb/configure.tgt1
-rw-r--r--gdb/core-aout.c8
-rw-r--r--gdb/core-regset.c8
-rw-r--r--gdb/core-sol2.c8
-rw-r--r--gdb/corefile.c22
-rw-r--r--gdb/corelow.c128
-rw-r--r--gdb/cxux-nat.c7
-rw-r--r--gdb/defs.h5
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/gdb.texinfo8
-rw-r--r--gdb/dstread.c2
-rw-r--r--gdb/dwarf2read.c8
-rw-r--r--gdb/event-loop.c44
-rw-r--r--gdb/event-loop.h3
-rw-r--r--gdb/event-top.c21
-rw-r--r--gdb/event-top.h10
-rw-r--r--gdb/gdb-stabs.h2
-rw-r--r--gdb/gdbcore.h24
-rw-r--r--gdb/gnu-nat.c2
-rw-r--r--gdb/go32-nat.c2
-rw-r--r--gdb/hppa-tdep.c2
-rw-r--r--gdb/i386-tdep.c1
-rw-r--r--gdb/i386aix-nat.c8
-rw-r--r--gdb/i386mach-nat.c8
-rw-r--r--gdb/i960-tdep.c2
-rw-r--r--gdb/inf-loop.c113
-rw-r--r--gdb/inf-loop.h28
-rw-r--r--gdb/infcmd.c11
-rw-r--r--gdb/inflow.c3
-rw-r--r--gdb/infrun.c35
-rw-r--r--gdb/inftarg.c2
-rw-r--r--gdb/irix4-nat.c8
-rw-r--r--gdb/irix5-nat.c15
-rw-r--r--gdb/lynx-nat.c8
-rw-r--r--gdb/m3-nat.c2
-rw-r--r--gdb/m68k-stub.c2
-rw-r--r--gdb/m68k-tdep.c1
-rw-r--r--gdb/mac-nat.c2
-rw-r--r--gdb/main.c7
-rw-r--r--gdb/mips-nat.c8
-rw-r--r--gdb/mips-tdep.c3
-rw-r--r--gdb/ns32knbsd-nat.c8
-rw-r--r--gdb/objfiles.h4
-rw-r--r--gdb/osfsolib.c7
-rw-r--r--gdb/pa64solib.c5
-rw-r--r--gdb/printcmd.c26
-rw-r--r--gdb/procfs.c2
-rw-r--r--gdb/remote-rdi.c2
-rw-r--r--gdb/remote-sim.c2
-rw-r--r--gdb/remote-udi.c2
-rw-r--r--gdb/remote-vx.c2
-rw-r--r--gdb/remote.c86
-rw-r--r--gdb/rs6000-nat.c10
-rw-r--r--gdb/rs6000-tdep.c3
-rw-r--r--gdb/ser-pipe.c15
-rw-r--r--gdb/ser-tcp.c2
-rw-r--r--gdb/ser-unix.c340
-rw-r--r--gdb/ser-unix.h2
-rw-r--r--gdb/serial.c78
-rw-r--r--gdb/serial.h44
-rw-r--r--gdb/sh-stub.c2
-rw-r--r--gdb/solib.c7
-rw-r--r--gdb/somread.c10
-rw-r--r--gdb/somsolib.c5
-rw-r--r--gdb/sparc-nat.c8
-rw-r--r--gdb/sparc-tdep.c2
-rw-r--r--gdb/sun3-nat.c8
-rw-r--r--gdb/symfile.c390
-rw-r--r--gdb/symfile.h6
-rw-r--r--gdb/symtab.h22
-rw-r--r--gdb/target.c4
-rw-r--r--gdb/target.h19
-rw-r--r--gdb/testsuite/ChangeLog12
-rw-r--r--gdb/testsuite/gdb.base/break.c3
-rw-r--r--gdb/testsuite/gdb.base/break.exp20
-rw-r--r--gdb/testsuite/gdb.base/help.exp2
-rw-r--r--gdb/top.c2
-rw-r--r--gdb/ultra3-nat.c8
-rw-r--r--gdb/utils.c54
-rw-r--r--gdb/win32-nat.c7
-rw-r--r--gdb/xcoffread.c4
-rw-r--r--gdb/xcoffsolib.c2
-rw-r--r--sim/ChangeLog5
-rw-r--r--sim/arm/ChangeLog5
-rw-r--r--sim/arm/armos.c6
-rw-r--r--sim/common/ChangeLog9
-rw-r--r--sim/common/cgen-defs.h6
-rwxr-xr-xsim/configure84
-rw-r--r--sim/configure.in3
-rw-r--r--sim/fr30/ChangeLog10
-rw-r--r--sim/fr30/sem-switch.c28
-rw-r--r--sim/fr30/sem.c32
-rw-r--r--sim/fr30/traps.c5
-rw-r--r--sim/i960/ChangeLog10
-rw-r--r--sim/i960/i960-desc.h1
-rw-r--r--sim/i960/sem-switch.c16
-rw-r--r--sim/i960/sem.c20
-rw-r--r--sim/i960/traps.c5
-rw-r--r--sim/m32r/ChangeLog11
-rw-r--r--sim/m32r/mloop.in2
-rw-r--r--sim/m32r/sem-switch.c14
-rw-r--r--sim/m32r/sem.c18
-rw-r--r--sim/m32r/traps.c9
112 files changed, 2319 insertions, 858 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0802506..4a55501 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,430 @@
+1999-10-04 James Ingham <jingham@leda.cygnus.com>
+
+ * remote-rdi.c (arm_rdi_open): If the angel_RDI_Open fails, close
+ the serial port and raise an error. If you try to go on, you will
+ stall forever down in the rdi-share code.
+
+1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * printcmd.c (output_command): Makes sure result from the output
+ command is printed before the next prompt.
+
+1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * printcmd.c (print_formatted): Add missing stream parameter.
+ (do_examine, print_command_1, output_command, do_one_display):
+ Adjust call to print_formatted().
+
+1999-10-04 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * infcmd.c: Remove include of event-loop.h.
+ * utils.c: Ditto.
+ * top.c: Ditto.
+
+ * infrun.c (fetch_inferior_event): Call inferior_event_handler
+ when inferior stops, instead of doing work ourselves.
+ (fetch_inferior_event): Use void* instead of gdb_client_data.
+ Remove includes of event-top.h and event-loop.h. Add include of
+ inf-loop.h.
+ (complete_execution): Move from here.
+
+ * inf-loop.c (complete_execution): To here.
+ (inferior_event_handler): Handle inferior's execution completion
+ case as well.
+ * inf-loop.h: Add def of INF_LOOP_H.
+
+ * event-top.h: Don't use gdb_client_data, use void*, to avoid
+ dependency on event-loop.h.
+
+ * remote.c (remote_async_resume): Set target_executing only after we
+ actually register the inferior with the event loop.
+
+1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * corefile.c (memory_error): Use error_stream() and eliminate call
+ to return_to_top_level().
+
+1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * utils.c (error): Save error message text (w/o new line).
+ (error_last_message): New function. Returns the last message
+ issued by gdb.
+ (error_init): New function. Initializes error handling machinery.
+ (error_stream): New function. Allows the error message to be
+ passed on a stream buffer.
+ * defs.h: Add prototypes for error_stream() and
+ error_last_message().
+ * main.c (main): Add call to error_init().
+
+1999-10-04 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * utils.c (tui_sfileopen): New function. Replaces
+ gdb_file_init_astring().
+ * defs.h: Add prototype for the above.
+
+Mon Oct 4 19:25:55 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * symfile.c (add_symbol_file_command): Fix -Wformat on query call.
+
+1999-10-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * target.c (cleanup_target): Type of to_async param is now
+ function with enum inferior_event_type param.
+
+ * target.h (target_ops): Adjust to_async accordingly. Move enum
+ inferior_event_type to this file. Don't have a typedef for
+ inferior_event_type. Add more enumeration constants INF_QUIT_REQ,
+ INF_EXEC_COMPLETE. Remove INF_SIGINT_FIRST, INF_SIGINT_SECOND.
+
+ * inf-loop.c (inferior_event_handler): Change first param to tell
+ the type of event we are dealing with. Deal with INF_ERROR and
+ INF_REG_EVENT, for the moment.
+ Include target.h.
+
+ * inf-loop.h (inferior_event_handler): Adjust prototype. Remove
+ enum inferior_event_type from here.
+
+ * remote.c (remote_async_serial_handler): Pass INF_REG_EVENT to
+ the client callback.
+ (remote_async): Change callback's param type to inferior_event_type.
+ (async_client_callback): Change type as above.
+
+1999-10-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-top.c (stdin_event_handler): Delete fd parameter, use
+ input_fd instead.
+ * event-top.h (stdin_event_handler): Delete fd parameter.
+
+ * inf-loop.c (inferior_event_handler): Delete fd parameter. Use
+ target_async() to unregister the inferior fd in case of errors.
+ * inf-loop.h(inferior_event_handler): Delete fd parameter.
+
+ * ser-unix.c (fd_event): Delete fd parameter. Use scb->fd,
+ instead.
+
+ * remote.c (async_client_callback): Delete fd parameter.
+ (remote_async_serial_handler): Ditto.
+ (remote_async): Adjust to new type of callback function.
+
+ * target.c (cleanup_target): Adjust parameters for to_async
+ default case.
+ * target.h (*to_async): Delete fd parameter from cb function.
+
+ * event-loop.h (handler_func): Delete fd parameter.
+ * event-loop.c (handle_file_event): Delete fd param from call to
+ proc. Do not include inferior.h.
+
+1999-10-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-loop.c (inferior_event_handler,
+ inferior_event_handler_wrapper): Move from here.
+ * inf-loop.c: To here. New file.
+
+ * event-loop.h (inferior_event_handler): Move from here.
+ * inf-loop.h: To here. New file.
+
+ * remote.c: Include inf-loop.h.
+ (set_extende_protocol): Remove unused prototpye.
+
+ * Makefile.in (SFILES): Add inf-loop.c.
+ (inf_loop_h): Define.
+ (COMMON_OBS): Add inf-loop.o.
+ (inf-loop.o): Add rule.
+ (remote.o): Add dependency on inf-loop.h.
+
+Fri Oct 1 19:59:31 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * ser-unix.c: Add some notes on how the async code works.
+
+Fri Oct 1 01:45:32 1999 Jeffrey A Law (law@cygnus.com)
+
+ * somread.c (som_symfile_offsets): Fix typo in last change.
+
+1999-09-30 Fred Fish <fnf@cygnus.com>
+
+ * coff-solib.c (coff_solib_add): Adjust call to symbol_file_add.
+ * cxux-nat.c (add_shared_symbol_files): Ditto.
+ * irix5-nat.c (symbol_add_stub): Ditto.
+ * osfsolib.c (symbol_add_stub): Ditto.
+ * pa64solib.c (pa64_solib_add_solib_objfile): Ditto.
+ * remote-mm.c (mm_load): Ditto.
+ * remote-udi.c (udi_load): Ditto.
+ * remote-vx.c (vx_add_symbols): Ditto.
+ * solib.c (symbol_add_stub): Ditto.
+ * somsolib.c (som_solib_add_solib_objfile): Ditto.
+ * win32-nat.c (handle_load_dll): Ditto.
+
+ * irix5-nat.c (symbol_add_stub): Add section_addrs, zero it.
+ * cxux-nat.c (add_shared_symbol_files): Ditto.
+ * osfsolib.c (symbol_add_stub): Ditto.
+ * pa64solib.c (pa64_solib_add_solib_objfile): Ditto.
+ * solib.c (symbol_add_stub): Ditto.
+ * somsolib.c (som_solib_add_solib_objfile): Ditto.
+ * symfile.c (symbol_file_command): Ditto.
+ * win32-nat.c (handle_load_dll): Ditto.
+
+ * irix5-nat.c (symbol_add_stub): Use section_addrs to pass text addr.
+ * cxux-nat.c (add_shared_symbol_files): Ditto.
+ * osfsolib.c (symbol_add_stub): Ditto.
+ * pa64solib.c (pa64_solib_add_solib_objfile): Ditto.
+ * solib.c (symbol_add_stub): Ditto.
+ * somsolib.c (som_solib_add_solib_objfile): Ditto.
+ * symfile.c (symbol_file_command): Ditto.
+ * win32-nat.c (handle_load_dll): Ditto.
+
+ * coff-solib.c (coff_solib_add): Call symbol_file_add with NULL ptr.
+ * cxux-nat.c (add_shared_symbol_files): Ditto.
+ * remote-udi.c (udi_load): Ditto.
+ * remote-vx.c (vx_add_symbols): Ditto.
+ * symfile.c (symbol_file_command): Ditto.
+
+ * dstread.c (dst_symfile_offsets): Take "section_addr_info *"
+ instead of CORE_ADDR.
+ * somread.c (som_symfile_offsets): Ditto.
+ * symfile.c (default_symfile_offsets): Ditto.
+ * xcoffread.c (xcoff_symfile_offsets): Ditto.
+
+ * symfile.h (default_symfile_offsets): Adjust prototype.
+ (syms_from_objfile): Ditto.
+ * symtab.h (symbol_file_add): Ditto.
+
+ * rs6000-nat.c (objfile_symbol_add): Call syms_from_objfile with NULL.
+ * xcoffsolib.c (solib_add): Ditto.
+ * gdb-stabs.h (SECT_OFF_MAX): Increase from 4 to 16.
+ * symtab.h (MAX_SECTIONS): Define.
+ (struct section_addr_info): New struct for better control over
+ changing load addresses of sections.
+ * objfiles.h (OBJF_READNOW): Add new flag bit.
+ * symfile.h (sym_offsets): Change second param from CORE_ADDR to
+ "section_addr_info *".
+
+ * symfile.c (symbol_file_add): Replace scalar arg "CORE_ADDR addr"
+ with "struct section_addr_info *addrs".
+ (syms_from_objfile): Ditto.
+ (add_symbol_file_command): Remove local variables "readnow" and
+ "mapped". Replaced with general "flags" variable.
+ (symbol_file_command): Ditto.
+ (add_symbol_file_command): Add local variables i, sec_num, argcnt,
+ expecting_option, option_index, and opt. Rework option parsing code
+ to handle additional options.
+ (_initialize_symfile): Adjust add-symbol-file usage to match new
+ option handling.
+ (symbol_file_add): Remove parameters "mapped" and "readnow",
+ replace with general "flags".
+ (symbol_file_add): In call to allocate_objfile, replace "mapped"
+ with extracted OBJF_MAPPED bit from flags.
+ (symbol_file_add): Use OBJF_READNOW bit from flags, instead of
+ "readnow" variable.
+ (symbol_file_command): Set OBJF_MAPPED and OBJF_READNOW bits
+ from parsed options. Pass flags to symbol_file_add.
+ (add_symbol_file_command): Ditto.
+ (syms_from_objfile): Add local variables i, sect, lower_sect,
+ lower_offset, and local_addr. Substitute local_addr for addrs
+ when addrs is NULL. Find lowest loadable section to be used as
+ starting point for contiguous sections. Adjust offsets if segments
+ are not contiguous. Call sym_offsets with section_addr_info
+ instead of single addr.
+ (default_symfile_offsets): Initialize objfile's section_offsets
+ with user specified offsets.
+ (symbol_file_add): Call syms_from_objfile with offsets.
+ (unknown_option_complaint): Add.
+ (add_symbol_file_command): Add "section_addrs", zero it with memset.
+
+1999-09-30 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * configure.in: Call config.sub explicitly instead of misusing the
+ autoconf internal variable $ac_config_sub.
+ * configure: Regenerated.
+
+Thu Sep 30 15:53:59 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote.c (readchar): When EOF mourn the inferior.
+ (getpkt): Try QUIT. Might not be a watchdog timer timeout.
+ (remote_async_serial_handler): Pass ``-1'' as the dummy FD. Safer
+ than ZERO == STDIN.
+
+ * serial.h (enum serial_rc): Replace #define SERIAL_ERROR,
+ SERIAL_TIMEOUT and SERIAL_EOF.
+ (struct _serial_t): Add more notes on termios specific fields.
+
+ * ser-unix.c (generic_readchar): Make SERIAL_ERROR sticky.
+ (do_hardwire_readchar, do_unix_readchar): Don't use bufcnt as a
+ tempoary for the return-value from read.
+
+ * serial.c (serial_logchar): Add a stream parameter.
+ (serial_readchar, serial_write, serial_send_break): Update.
+ (serial_readchar): Add serial debug trace.
+
+Thu Sep 30 12:07:03 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * serial.h (struct _serial_t): Add field async_state. Better
+ document field bufcnt.
+ (SERIAL_ERROR): Delete comment about errno.
+ * serial.c (serial_open, serial_fdopen): Initialize async_state.
+
+ * ser-unix.c (push_event, fd_event, reschedule): New functions.
+ Handle ASYNC serial input.
+ (ser_unix_async): Update.
+ (generic_readchar): New function. Handle event scheduling. Make
+ EOF condition sticky.
+ (do_unix_readchar): Rename ser_unix_readchar.
+ (ser_unix_readchar): New function, call do_unix_readchar via
+ generic_readchar.
+ (do_hardwire_readchar, hardwire_readchar): Ditto.
+
+ * ser-unix.c (ser_unix_readchar): Delete code working around ASYNC
+ fifo bugs.
+ (hardwire_readchar): Delete code working around ASYNC fifo bugs.
+
+Wed Sep 29 21:27:16 1999 Jeffrey A Law (law@cygnus.com)
+
+ * breakpoint.c (insert_breakpoints): Addresses are CORE_ADDRs,
+ not "int"s.
+ (remove_breakpoint): Likewise.
+
+1999-09-29 Fred Fish <fnf@cygnus.com>
+
+ * breakpoint.c (breakpoint_1): Replace cast "(CORE_ADDR) - 1"
+ with the more obviously intended expression "(CORE_ADDR) -1".
+ * dwarf2read.c (scan_partial_symbols, read_file_scope): Ditto.
+ * gnu-nat.c (gnu_create_inferior): Ditto.
+ * go32-nat.c (go32_create_inferior): Ditto.
+ * hppa-tdep.c (hppa_pop_frame): Ditto.
+ * infcmd.c (continue_command, step_1, signal_command): Ditto.
+ (until_next_command, finish_command): Ditto.
+ * infrun.c (proceed): Ditto.
+ * inftarg.c (child_create_inferior): Ditto.
+ * m3-nat.c (m3_create_inferior): Ditto.
+ * mac-nat.c (child_create_inferior): Ditto.
+ * procfs.c (procfs_create_inferior): Ditto.
+ * remote-sim.c (gdbsim_create_inferior): Ditto.
+ * target.c (target_link): Ditto.
+ * win32-nat.c (child_create_inferior): Ditto.
+ * varobj.c (varobj_create, new_root_variable): Ditto.
+
+Thu Sep 30 10:36:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * ser-unix.c (ser_unix_flush_input): New function. Discard input
+ buffer.
+ (hardwire_flush_input): Use ser_unix_flush_input.
+ (ser_unix_nop_flush_input): Delete.
+ * ser-unix.h (ser_unix_flush_input): Update.
+ ser-tcp.c (_initialize_ser_tcp), ser-pipe.c
+ (_initialize_ser_pipe): Update.
+
+ * ser-unix.c (hardwire_write): Delete.
+ (_initialize_ser_hardwire): Update, use ser_unix_write.
+
+Thu Sep 30 10:16:50 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * ser-pipe.c (pipe_open): Don't make the FD non-blocking. Already
+ being handled in ser_unix_wait_for by a select.
+
+Thu Sep 30 10:00:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * serial.h (struct _serial_t): Add field debug_p.
+ (SERIAL_DEBUG, SERIAL_DEBUG_P): Define.
+
+ * serial.c (serial_open, serial_fdopen): Initialize debug_p.
+ (serial_debug, serial_debug_p): New functions.
+ (global_serial_debug_p): New variable.
+ (_initialize_serial): Add ``set serialdebug'' command.
+
+Thu Sep 30 09:09:38 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * serial.h (serial_event_ftype): Replace FD and ERROR args with
+ SERRIAL_T arg.
+ * ser-unix.c (ser_unix_event): Update.
+
+ * remote.c (remote_async_serial_handler): New function. Handle
+ serial events.
+ (remote_async): Pass remote_async_serial_handler to SERIAL.
+ (async_client_callback, async_client_context): New variables.
+
+ * remote.c (extended_remote_async_create_inferior): Use
+ target_async to register the inferior event handler.
+
+Thu Sep 30 00:02:03 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure.in (AC_CHECK_FUNCS): Test for sigprocmask.
+ * configure, config.in: Re-generate.
+ * event-top.c (async_stop_sig): Use sigprocmask when available.
+
+1999-09-29 Doug Evans <devans@casey.cygnus.com>
+
+ * sh-stub.c (handle_exception): Fix typo in patch of 1999-08-26.
+ * m68k-stub.c (handle_exception): Ditto.
+
+1999-09-28 Fred Fish <fnf@cygnus.com>
+
+ * alpha-nat.c (alpha_osf_core_fns, alpha_elf_core_fns):
+ Add default entries for check_format and core_sniffer.
+ * core-aout.c (aout_core_fns): Ditto.
+ * core-regset.c (regset_core_fns): Ditto.
+ * core-sol2.c (solaris_core_fns): Ditto.
+ * i386aix-nat.c (i386aix_core_fns): Ditto.
+ * i386mach-nat.c (i386mach_core_fns): Ditto.
+ * irix4-nat.c (irix4_core_fns): Ditto.
+ * irix5-nat.c (irix5_core_fns): Ditto.
+ * lynx-nat.c (lynx_core_fns): Ditto.
+ * mips-nat.c (mips_core_fns): Ditto.
+ * ns32knbsd-nat.c (nat_core_fns): Ditto.
+ * rs6000-nat.c (rs6000_core_fns): Ditto.
+ * sparc-nat.c (sparc_core_fns): Ditto.
+ * sun-nat.c (sun3_core_fns): Ditto.
+ * ultra3-nat.c (ultra3_core_fns): Ditto.
+
+ * corelow.c (core_vec): New, for selected core file handler.
+ (sniff_core_bfd): New function.
+ (gdb_check_format): New function.
+ (default_check_format): New function.
+ (default_core_sniffer): New function.
+ (sniff_core_bfd): New function.
+ (core_close): Reset core_vec to NULL.
+ (core_open): Fall back to gdb_check_format if bfd_check_format
+ does not identify the file format. Call sniff_core_bfd to pick
+ a core file handler.
+ (get_core_registers): Remove code that is now in sniff_core_bfd.
+ Use current core_vec.
+
+ * gdbcore.h (check_format): New core_fns function, points to function
+ to try and identify a core file format.
+ (core_sniffer): New core_fns function, points to function to select
+ a specific handler for the selected core file format.
+ (default_core_sniffer): Add prototype.
+ (default_check_format): Add prototype.
+
+ * i960-tdep.c (inferior.h): Include.
+ * mips-tdep.c (read_next_frame_reg): Use ADDR_BITS_REMOVE
+ on addresses pulled from stack.
+
+1999-09-29 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * event-loop.c (poll_timers): Check whether the timer list has any
+ element on it by looking at the first element pointer, instead of
+ num_timers.
+
+Wed Sep 29 18:02:31 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * command.c: Attempt to include POSIX <sys/wait.h> before
+ <wait.h>.
+
+ * ser-unix.c (hardwire_print_tty_state): Ditto.
+ * inflow.c (child_terminal_info): Fix printf args.
+
+1999-09-28 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * remote.c (remote_async_resume): Register the inferior with the
+ event loop.
+ (remote_async_open_1): Don't put the target in async mode here,
+ just do it when executing.
+
+ * infrun.c (complete_execution): Unregister the inferior from the
+ event loop.
+
+ * event-top.c (async_disable_stdin): Don't add
+ async_enable_stdin() to the exec_cleanups chain.
+
Tue Sep 28 11:08:34 1999 Jeffrey A Law (law@cygnus.com)
* hppa-tdep.c (hppa_fix_call_dummy): Ignore IMPORT_SHLIB stubs
@@ -1157,11 +1584,8 @@ Wed Sep 1 09:22:50 1999 Andrew Cagney <cagney@b1.cygnus.com>
* dbxread.c (read_dbx_symtab): Use ANOFFSET to access section
offsets.
- * core-cisco.c (get_seg_info): Make static.
* coffread.c (enter_linenos): Pass objfile instead of section
offsets.
- * jv-vm.c (jv_vm_internal_lookup_symbol): Call allocate_objfile
- with the right number of arguments.
* dbxread.c (dbx_symfile_read): No need to explicitly pass
text addr and size. Let read_dbx_symtab find them.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 913939f..ddb8f71 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -229,7 +229,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 = 19990928
+VERSION = 19991004
DIST=gdb
LINT=/usr/5bin/lint
@@ -385,7 +385,8 @@ SFILES = ax-general.c ax-gdb.c bcache.c blockframe.c breakpoint.c \
demangle.c dwarfread.c dwarf2read.c elfread.c environ.c eval.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 \
+ findvar.c gdbarch.c gdbtypes.c \
+ inf-loop.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 \
@@ -457,6 +458,7 @@ tracepoint_h = tracepoint.h
ax_h = ax.h
event_loop_h = event-loop.h
event_top_h = event-top.h
+inf_loop_h = inf-loop.h
remote_h = remote.h
version_h = version.h
@@ -515,7 +517,7 @@ COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o stack.o thread.o \
source.o values.o eval.o valops.o valarith.o valprint.o printcmd.o \
symtab.o symfile.o symmisc.o infcmd.o infrun.o command.o \
expprint.o environ.o \
- event-loop.o event-top.o \
+ event-loop.o event-top.o inf-loop.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 \
@@ -1139,6 +1141,9 @@ event-top.o: event-top.c top.h $(readline_headers) \
$(defs_h) $(inferior_h) $(event_loop_h) $(event_top_h) terminal.h \
$(gdbcmd_h)
+inf-loop.o: inf-loop.c $(defs_h) $(inferior_h) $(inf_loop_h) $(event_loop_h) \
+ $(event_top_h)
+
exec.o: exec.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
target.h language.h gdb_string.h
@@ -1517,7 +1522,7 @@ remote-utils.o: remote-utils.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
remote.o: remote.c $(bfd_h) $(wait_h) $(defs_h) $(gdbcmd_h) \
$(inferior_h) $(remote_utils_h) symfile.h terminal.h gdb_string.h \
- $(event_loop_h) $(event_top_h) $(remote_h)
+ $(event_loop_h) $(event_top_h) $(remote_h) $(inf_loop_h)
remote-nrom.o: remote-nrom.c $(bfd_h) $(wait_h) $(defs_h) $(gdbcmd_h) \
$(inferior_h) $(remote_utils_h) symfile.h terminal.h
diff --git a/gdb/alpha-nat.c b/gdb/alpha-nat.c
index ebeb9bb..089e56f 100644
--- a/gdb/alpha-nat.c
+++ b/gdb/alpha-nat.c
@@ -280,16 +280,20 @@ static struct core_fns alpha_osf_core_fns =
{
/* This really is bfd_target_unknown_flavour. */
- bfd_target_unknown_flavour,
- fetch_osf_core_registers,
- NULL
+ bfd_target_unknown_flavour, /* core_flavour */
+ default_check_format, /* check_format */
+ default_core_sniffer, /* core_sniffer */
+ fetch_osf_core_registers, /* core_read_registers */
+ NULL /* next */
};
static struct core_fns alpha_elf_core_fns =
{
- bfd_target_elf_flavour,
- fetch_elf_core_registers,
- NULL
+ bfd_target_elf_flavour, /* core_flavour */
+ default_check_format, /* check_format */
+ default_core_sniffer, /* core_sniffer */
+ fetch_elf_core_registers, /* core_read_registers */
+ NULL /* next */
};
void
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index a6a5f4f..b9fdcb0 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -855,7 +855,8 @@ insert_breakpoints ()
/* If it's a memory location, then we must watch it. */
if (v->lval == lval_memory)
{
- int addr, len, type;
+ CORE_ADDR addr;
+ int len, type;
addr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
len = TYPE_LENGTH (VALUE_TYPE (v));
@@ -1199,7 +1200,8 @@ remove_breakpoint (b, is)
at that address. */
if (v->lval == lval_memory)
{
- int addr, len, type;
+ CORE_ADDR addr;
+ int len, type;
addr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
len = TYPE_LENGTH (VALUE_TYPE (v));
@@ -2820,7 +2822,7 @@ breakpoint_1 (bnum, allflag)
register struct breakpoint *b;
register struct command_line *l;
register struct symbol *sym;
- CORE_ADDR last_addr = (CORE_ADDR) - 1;
+ CORE_ADDR last_addr = (CORE_ADDR) -1;
int found_a_breakpoint = 0;
static ep_type_description_t bptypes[] =
{
@@ -3087,7 +3089,7 @@ breakpoint_1 (bnum, allflag)
else
/* Compare against (CORE_ADDR)-1 in case some compiler decides
that a comparison of an unsigned with -1 is always false. */
- if (last_addr != (CORE_ADDR) - 1)
+ if (last_addr != (CORE_ADDR) -1)
set_next_address (last_addr);
annotate_breakpoints_table_end ();
diff --git a/gdb/coff-solib.c b/gdb/coff-solib.c
index b25a26c..89a7b4b 100644
--- a/gdb/coff-solib.c
+++ b/gdb/coff-solib.c
@@ -92,10 +92,9 @@ coff_solib_add (arg_string, from_tty, target)
filename = (char *) ent + nameoffset * 4;
objfile = symbol_file_add (filename, from_tty,
- 0, /* addr */
+ NULL, /* no offsets */
0, /* not mainline */
- 0, /* not mapped */
- 0, /* Not readnow */
+ 0, /* flags */
0, /* Not user loaded */
1); /* Is a solib */
diff --git a/gdb/command.c b/gdb/command.c
index cb04541..94acb35 100644
--- a/gdb/command.c
+++ b/gdb/command.c
@@ -23,12 +23,10 @@
#include <ctype.h>
#include "gdb_string.h"
-#ifdef HAVE_WAIT_H
-#include <wait.h>
-#else
-#ifdef HAVE_SYS_WAIT_H
+#if HAVE_SYS_WAIT_H
#include <sys/wait.h>
-#endif
+#elif HAVE_WAIT_H
+#include <wait.h>
#endif
#include "wait.h"
diff --git a/gdb/config.in b/gdb/config.in
index a8a5636..b0f5ae8 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -171,6 +171,9 @@
/* Define if you have the sigaction function. */
#undef HAVE_SIGACTION
+/* Define if you have the sigprocmask function. */
+#undef HAVE_SIGPROCMASK
+
/* Define if you have the socketpair function. */
#undef HAVE_SOCKETPAIR
diff --git a/gdb/configure b/gdb/configure
index 778cdef..5f64962 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -78,6 +78,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -192,6 +193,7 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
+ --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -362,6 +364,11 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
+ -site-file | --site-file | --site-fil | --site-fi | --site-f)
+ ac_prev=sitefile ;;
+ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+ sitefile="$ac_optarg" ;;
+
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -527,12 +534,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+if test -z "$sitefile"; then
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
fi
+else
+ CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -576,7 +587,7 @@ fi
# 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:580: checking for $ac_word" >&5
+echo "configure:591: 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
@@ -606,7 +617,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:610: checking for $ac_word" >&5
+echo "configure:621: 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
@@ -657,7 +668,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:661: checking for $ac_word" >&5
+echo "configure:672: 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
@@ -689,7 +700,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:693: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:704: 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.
@@ -700,12 +711,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 704 "configure"
+#line 715 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:720: \"$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
@@ -731,12 +742,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:735: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:746: 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:740: checking whether we are using GNU C" >&5
+echo "configure:751: 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
@@ -745,7 +756,7 @@ else
yes;
#endif
EOF
-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
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:760: \"$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
@@ -764,7 +775,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:768: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:779: 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
@@ -796,7 +807,7 @@ else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:800: checking how to run the C preprocessor" >&5
+echo "configure:811: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -811,13 +822,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 815 "configure"
+#line 826 "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:821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:832: \"$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
:
@@ -828,13 +839,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 832 "configure"
+#line 843 "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:838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:849: \"$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
:
@@ -845,13 +856,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 849 "configure"
+#line 860 "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:855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:866: \"$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
:
@@ -876,9 +887,9 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:880: checking for AIX" >&5
+echo "configure:891: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
-#line 882 "configure"
+#line 893 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
@@ -900,7 +911,7 @@ rm -f conftest*
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:904: checking for POSIXized ISC" >&5
+echo "configure:915: 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
@@ -924,7 +935,7 @@ fi
echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
-echo "configure:928: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:939: 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
@@ -940,7 +951,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 944 "configure"
+#line 955 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
@@ -977,7 +988,7 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
; return 0; }
EOF
-if { (eval echo configure:981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_prog_cc_stdc="$ac_arg"; break
else
@@ -1048,7 +1059,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:1052: checking host system type" >&5
+echo "configure:1063: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -1069,7 +1080,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:1073: checking target system type" >&5
+echo "configure:1084: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -1087,7 +1098,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:1091: checking build system type" >&5
+echo "configure:1102: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -1112,7 +1123,7 @@ test "$host_alias" != "$target_alias" &&
ALL_LINGUAS=
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1116: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1127: 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
@@ -1141,7 +1152,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:1145: checking for $ac_word" >&5
+echo "configure:1156: 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
@@ -1169,12 +1180,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1173: checking for ANSI C header files" >&5
+echo "configure:1184: 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 1178 "configure"
+#line 1189 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1182,7 +1193,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1197: \"$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*
@@ -1199,7 +1210,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 1203 "configure"
+#line 1214 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1217,7 +1228,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 1221 "configure"
+#line 1232 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1238,7 +1249,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1242 "configure"
+#line 1253 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1249,7 +1260,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1273,12 +1284,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1277: checking for working const" >&5
+echo "configure:1288: 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 1282 "configure"
+#line 1293 "configure"
#include "confdefs.h"
int main() {
@@ -1327,7 +1338,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:1331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1348,21 +1359,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1352: checking for inline" >&5
+echo "configure:1363: 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 1359 "configure"
+#line 1370 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -1388,12 +1399,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1392: checking for off_t" >&5
+echo "configure:1403: 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 1397 "configure"
+#line 1408 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1421,12 +1432,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1425: checking for size_t" >&5
+echo "configure:1436: 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 1430 "configure"
+#line 1441 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1456,19 +1467,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:1460: checking for working alloca.h" >&5
+echo "configure:1471: 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 1465 "configure"
+#line 1476 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1483: \"$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
@@ -1489,12 +1500,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1493: checking for alloca" >&5
+echo "configure:1504: 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 1498 "configure"
+#line 1509 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -1522,7 +1533,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1537: \"$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
@@ -1554,12 +1565,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1558: checking whether alloca needs Cray hooks" >&5
+echo "configure:1569: 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 1563 "configure"
+#line 1574 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -1584,12 +1595,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:1588: checking for $ac_func" >&5
+echo "configure:1599: 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 1593 "configure"
+#line 1604 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1612,7 +1623,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1627: \"$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
@@ -1639,7 +1650,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1643: checking stack direction for C alloca" >&5
+echo "configure:1654: 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
@@ -1647,7 +1658,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1651 "configure"
+#line 1662 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -1666,7 +1677,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:1670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1681: \"$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
@@ -1691,17 +1702,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:1695: checking for $ac_hdr" >&5
+echo "configure:1706: 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 1700 "configure"
+#line 1711 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1716: \"$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*
@@ -1730,12 +1741,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1734: checking for $ac_func" >&5
+echo "configure:1745: 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 1739 "configure"
+#line 1750 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1758,7 +1769,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1773: \"$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
@@ -1783,7 +1794,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1787: checking for working mmap" >&5
+echo "configure:1798: 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
@@ -1791,7 +1802,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 1795 "configure"
+#line 1806 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -1931,7 +1942,7 @@ main()
}
EOF
-if { (eval echo configure:1935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1946: \"$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
@@ -1959,17 +1970,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:1963: checking for $ac_hdr" >&5
+echo "configure:1974: 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 1968 "configure"
+#line 1979 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1984: \"$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*
@@ -1999,12 +2010,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2003: checking for $ac_func" >&5
+echo "configure:2014: 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 2008 "configure"
+#line 2019 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2027,7 +2038,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2042: \"$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
@@ -2056,12 +2067,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2060: checking for $ac_func" >&5
+echo "configure:2071: 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 2065 "configure"
+#line 2076 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2084,7 +2095,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2099: \"$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
@@ -2118,19 +2129,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2122: checking for LC_MESSAGES" >&5
+echo "configure:2133: 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 2127 "configure"
+#line 2138 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:2134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2145: \"$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
@@ -2151,7 +2162,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2155: checking whether NLS is requested" >&5
+echo "configure:2166: 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"
@@ -2171,7 +2182,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2175: checking whether included gettext is requested" >&5
+echo "configure:2186: 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"
@@ -2190,17 +2201,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2194: checking for libintl.h" >&5
+echo "configure:2205: 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 2199 "configure"
+#line 2210 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2215: \"$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*
@@ -2217,19 +2228,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:2221: checking for gettext in libc" >&5
+echo "configure:2232: 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 2226 "configure"
+#line 2237 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2244: \"$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
@@ -2245,7 +2256,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:2249: checking for bindtextdomain in -lintl" >&5
+echo "configure:2260: 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
@@ -2253,7 +2264,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2257 "configure"
+#line 2268 "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
@@ -2264,7 +2275,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2279: \"$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
@@ -2280,19 +2291,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:2284: checking for gettext in libintl" >&5
+echo "configure:2295: 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 2289 "configure"
+#line 2300 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2307: \"$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
@@ -2320,7 +2331,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:2324: checking for $ac_word" >&5
+echo "configure:2335: 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
@@ -2354,12 +2365,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2358: checking for $ac_func" >&5
+echo "configure:2369: 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 2363 "configure"
+#line 2374 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2382,7 +2393,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2397: \"$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
@@ -2409,7 +2420,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:2413: checking for $ac_word" >&5
+echo "configure:2424: 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
@@ -2445,7 +2456,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:2449: checking for $ac_word" >&5
+echo "configure:2460: 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
@@ -2477,7 +2488,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 2481 "configure"
+#line 2492 "configure"
#include "confdefs.h"
int main() {
@@ -2485,7 +2496,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:2489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -2517,7 +2528,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:2521: checking for $ac_word" >&5
+echo "configure:2532: 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
@@ -2551,7 +2562,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:2555: checking for $ac_word" >&5
+echo "configure:2566: 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
@@ -2587,7 +2598,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:2591: checking for $ac_word" >&5
+echo "configure:2602: 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
@@ -2677,7 +2688,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2681: checking for catalogs to be installed" >&5
+echo "configure:2692: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -2705,17 +2716,17 @@ echo "configure:2681: 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:2709: checking for linux/version.h" >&5
+echo "configure:2720: 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 2714 "configure"
+#line 2725 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2730: \"$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*
@@ -2811,7 +2822,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:2815: checking for $ac_word" >&5
+echo "configure:2826: 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
@@ -2852,7 +2863,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:2856: checking for a BSD compatible install" >&5
+echo "configure:2867: 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
@@ -2913,7 +2924,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:2917: checking for $ac_word" >&5
+echo "configure:2928: 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
@@ -2945,7 +2956,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:2949: checking for $ac_word" >&5
+echo "configure:2960: 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
@@ -2977,7 +2988,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:2981: checking for $ac_word" >&5
+echo "configure:2992: 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
@@ -3014,7 +3025,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:3018: checking for $ac_word" >&5
+echo "configure:3029: 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
@@ -3066,12 +3077,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:3070: checking return type of signal handlers" >&5
+echo "configure:3081: 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 3075 "configure"
+#line 3086 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -3088,7 +3099,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:3092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -3108,12 +3119,12 @@ EOF
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3112: checking for ANSI C header files" >&5
+echo "configure:3123: 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 3117 "configure"
+#line 3128 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -3121,7 +3132,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3136: \"$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*
@@ -3138,7 +3149,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 3142 "configure"
+#line 3153 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -3156,7 +3167,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 3160 "configure"
+#line 3171 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -3177,7 +3188,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 3181 "configure"
+#line 3192 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3188,7 +3199,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:3192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -3221,17 +3232,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:3225: checking for $ac_hdr" >&5
+echo "configure:3236: 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 3230 "configure"
+#line 3241 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3246: \"$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*
@@ -3258,12 +3269,12 @@ fi
done
echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:3262: checking whether stat file-mode macros are broken" >&5
+echo "configure:3273: 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 3267 "configure"
+#line 3278 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -3315,12 +3326,12 @@ fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:3319: checking for working const" >&5
+echo "configure:3330: 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 3324 "configure"
+#line 3335 "configure"
#include "confdefs.h"
int main() {
@@ -3369,7 +3380,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:3373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -3390,15 +3401,15 @@ 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 sigprocmask
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3397: checking for $ac_func" >&5
+echo "configure:3408: 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 3402 "configure"
+#line 3413 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3421,7 +3432,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3436: \"$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
@@ -3448,19 +3459,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:3452: checking for working alloca.h" >&5
+echo "configure:3463: 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 3457 "configure"
+#line 3468 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:3464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3475: \"$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
@@ -3481,12 +3492,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3485: checking for alloca" >&5
+echo "configure:3496: 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 3490 "configure"
+#line 3501 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -3514,7 +3525,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:3518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3529: \"$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
@@ -3546,12 +3557,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3550: checking whether alloca needs Cray hooks" >&5
+echo "configure:3561: 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 3555 "configure"
+#line 3566 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -3576,12 +3587,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:3580: checking for $ac_func" >&5
+echo "configure:3591: 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 3585 "configure"
+#line 3596 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3604,7 +3615,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3619: \"$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
@@ -3631,7 +3642,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3635: checking stack direction for C alloca" >&5
+echo "configure:3646: 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
@@ -3639,7 +3650,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 3643 "configure"
+#line 3654 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -3658,7 +3669,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:3662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3673: \"$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
@@ -3681,7 +3692,7 @@ fi
echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6
-echo "configure:3685: checking for socketpair in -lsocket" >&5
+echo "configure:3696: checking for socketpair in -lsocket" >&5
ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3689,7 +3700,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3693 "configure"
+#line 3704 "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
@@ -3700,7 +3711,7 @@ int main() {
socketpair()
; return 0; }
EOF
-if { (eval echo configure:3704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3715: \"$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
@@ -3730,12 +3741,12 @@ fi
for ac_func in socketpair
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3734: checking for $ac_func" >&5
+echo "configure:3745: 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 3739 "configure"
+#line 3750 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3758,7 +3769,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3773: \"$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
@@ -3785,12 +3796,12 @@ done
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:3789: checking whether malloc must be declared" >&5
+echo "configure:3800: 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 3794 "configure"
+#line 3805 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3811,7 +3822,7 @@ int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:3815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_malloc=no
else
@@ -3832,12 +3843,12 @@ EOF
fi
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:3836: checking whether realloc must be declared" >&5
+echo "configure:3847: 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 3841 "configure"
+#line 3852 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3858,7 +3869,7 @@ int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:3862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_realloc=no
else
@@ -3879,12 +3890,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:3883: checking whether free must be declared" >&5
+echo "configure:3894: 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 3888 "configure"
+#line 3899 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3905,7 +3916,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:3909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -3926,12 +3937,12 @@ EOF
fi
echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
-echo "configure:3930: checking whether strerror must be declared" >&5
+echo "configure:3941: 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 3935 "configure"
+#line 3946 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3952,7 +3963,7 @@ int main() {
char *(*pfn) = (char *(*)) strerror
; return 0; }
EOF
-if { (eval echo configure:3956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strerror=no
else
@@ -3973,12 +3984,12 @@ EOF
fi
echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
-echo "configure:3977: checking whether strdup must be declared" >&5
+echo "configure:3988: 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 3982 "configure"
+#line 3993 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3999,7 +4010,7 @@ int main() {
char *(*pfn) = (char *(*)) strdup
; return 0; }
EOF
-if { (eval echo configure:4003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strdup=no
else
@@ -4020,12 +4031,12 @@ EOF
fi
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:4024: checking whether strstr must be declared" >&5
+echo "configure:4035: 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 4029 "configure"
+#line 4040 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4046,7 +4057,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:4050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -4073,9 +4084,9 @@ fi
# could be expunged. --jsm 1999-03-22
echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
-echo "configure:4077: checking for HPUX save_state structure" >&5
+echo "configure:4088: checking for HPUX save_state structure" >&5
cat > conftest.$ac_ext <<EOF
-#line 4079 "configure"
+#line 4090 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -4090,7 +4101,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 4094 "configure"
+#line 4105 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -4142,7 +4153,7 @@ EOF
gdb_cv_hostos_is_solaris=yes ;;
esac
echo $ac_n "checking for directory proc entries""... $ac_c" 1>&6
-echo "configure:4146: checking for directory proc entries" >&5
+echo "configure:4157: 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 \
@@ -4164,19 +4175,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:4168: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:4179: 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 4173 "configure"
+#line 4184 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main() {
pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:4180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
@@ -4198,19 +4209,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:4202: checking for prrun_t in sys/procfs.h" >&5
+echo "configure:4213: 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 4207 "configure"
+#line 4218 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main() {
prrun_t avar
; return 0; }
EOF
-if { (eval echo configure:4214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prrun_t=yes
else
@@ -4232,19 +4243,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:4236: checking for gregset_t in sys/procfs.h" >&5
+echo "configure:4247: 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 4241 "configure"
+#line 4252 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main() {
gregset_t avar
; return 0; }
EOF
-if { (eval echo configure:4248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_gregset_t=yes
else
@@ -4266,19 +4277,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:4270: checking for fpregset_t in sys/procfs.h" >&5
+echo "configure:4281: 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 4275 "configure"
+#line 4286 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main() {
fpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:4282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_fpregset_t=yes
else
@@ -4302,12 +4313,12 @@ EOF
echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4306: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
+echo "configure:4317: 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 4311 "configure"
+#line 4322 "configure"
#include "confdefs.h"
#include <unistd.h>
#include <sys/types.h>
@@ -4320,7 +4331,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_procfs_piocset=yes
else
@@ -4342,7 +4353,7 @@ EOF
fi
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:4346: checking for main in -lm" >&5
+echo "configure:4357: 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
@@ -4350,14 +4361,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4354 "configure"
+#line 4365 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:4361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4372: \"$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
@@ -4386,7 +4397,7 @@ fi
echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
-echo "configure:4390: checking for wctype in -lc" >&5
+echo "configure:4401: 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
@@ -4394,7 +4405,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4398 "configure"
+#line 4409 "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
@@ -4405,7 +4416,7 @@ int main() {
wctype()
; return 0; }
EOF
-if { (eval echo configure:4409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4420: \"$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
@@ -4424,7 +4435,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:4428: checking for wctype in -lw" >&5
+echo "configure:4439: 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
@@ -4432,7 +4443,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lw $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4436 "configure"
+#line 4447 "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
@@ -4443,7 +4454,7 @@ int main() {
wctype()
; return 0; }
EOF
-if { (eval echo configure:4447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4458: \"$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
@@ -4475,12 +4486,12 @@ fi
echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
-echo "configure:4479: checking for long long support in compiler" >&5
+echo "configure:4490: 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 4484 "configure"
+#line 4495 "configure"
#include "confdefs.h"
int main() {
@@ -4490,7 +4501,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_c_long_long=yes
else
@@ -4512,7 +4523,7 @@ fi
echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
-echo "configure:4516: checking for long long support in printf" >&5
+echo "configure:4527: 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
@@ -4520,7 +4531,7 @@ else
gdb_cv_printf_has_long_long=no
else
cat > conftest.$ac_ext <<EOF
-#line 4524 "configure"
+#line 4535 "configure"
#include "confdefs.h"
int main () {
@@ -4534,7 +4545,7 @@ int main () {
return (strcmp ("0x0123456789abcdef", buf));
}
EOF
-if { (eval echo configure:4538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4549: \"$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
@@ -4558,19 +4569,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:4562: checking for long double support in compiler" >&5
+echo "configure:4573: 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 4567 "configure"
+#line 4578 "configure"
#include "confdefs.h"
int main() {
long double foo;
; return 0; }
EOF
-if { (eval echo configure:4574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_long_double=yes
else
@@ -4592,7 +4603,7 @@ fi
echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
-echo "configure:4596: checking for long double support in printf" >&5
+echo "configure:4607: 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
@@ -4600,7 +4611,7 @@ else
gdb_cv_printf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 4604 "configure"
+#line 4615 "configure"
#include "confdefs.h"
int main () {
@@ -4610,7 +4621,7 @@ int main () {
return (strncmp ("3.14159", buf, 7));
}
EOF
-if { (eval echo configure:4614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4625: \"$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
@@ -4634,7 +4645,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:4638: checking for long double support in scanf" >&5
+echo "configure:4649: 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
@@ -4642,7 +4653,7 @@ else
gdb_cv_scanf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 4646 "configure"
+#line 4657 "configure"
#include "confdefs.h"
int main () {
@@ -4652,7 +4663,7 @@ int main () {
return !(f > 3.14159 && f < 3.14160);
}
EOF
-if { (eval echo configure:4656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4667: \"$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
@@ -4678,17 +4689,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:4682: checking for $ac_hdr" >&5
+echo "configure:4693: 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 4687 "configure"
+#line 4698 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4703: \"$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*
@@ -4717,12 +4728,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4721: checking for $ac_func" >&5
+echo "configure:4732: 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 4726 "configure"
+#line 4737 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4745,7 +4756,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4760: \"$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
@@ -4770,7 +4781,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:4774: checking for working mmap" >&5
+echo "configure:4785: 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
@@ -4778,7 +4789,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 4782 "configure"
+#line 4793 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -4918,7 +4929,7 @@ main()
}
EOF
-if { (eval echo configure:4922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4933: \"$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
@@ -4947,7 +4958,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:4951: checking for HPUX/OSF thread support" >&5
+echo "configure:4962: 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
@@ -4966,7 +4977,7 @@ EOF
;;
solaris*)
echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
-echo "configure:4970: checking for Solaris thread debugging library" >&5
+echo "configure:4981: 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
@@ -4976,7 +4987,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:4980: checking for dlopen in -ldl" >&5
+echo "configure:4991: 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
@@ -4984,7 +4995,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4988 "configure"
+#line 4999 "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
@@ -4995,7 +5006,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:4999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5010: \"$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
@@ -5027,17 +5038,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:5031: checking for the ld -export-dynamic flag" >&5
+echo "configure:5042: checking for the ld -export-dynamic flag" >&5
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
cat > conftest.$ac_ext <<EOF
-#line 5034 "configure"
+#line 5045 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:5041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
found=yes
else
@@ -5056,13 +5067,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:5060: checking if <proc_service.h> is old" >&5
+echo "configure:5071: 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 5066 "configure"
+#line 5077 "configure"
#include "confdefs.h"
#include <proc_service.h>
@@ -5073,7 +5084,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:5077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_proc_service_is_old=no
else
@@ -5219,12 +5230,12 @@ fi
# In the Cygwin environment, we need some additional flags.
echo $ac_n "checking for cygwin""... $ac_c" 1>&6
-echo "configure:5346: checking for cygwin" >&5
+echo "configure:5357: 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 5351 "configure"
+#line 5362 "configure"
#include "confdefs.h"
#if defined (__CYGWIN__) || defined (__CYGWIN32__)
@@ -5258,7 +5269,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:5385: checking for tgetent in -lncurses" >&5
+echo "configure:5396: 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
@@ -5266,7 +5277,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5393 "configure"
+#line 5404 "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
@@ -5277,7 +5288,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5415: \"$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
@@ -5296,7 +5307,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:5423: checking for tgetent in -lHcurses" >&5
+echo "configure:5434: 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
@@ -5304,7 +5315,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lHcurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5431 "configure"
+#line 5442 "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
@@ -5315,7 +5326,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5453: \"$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
@@ -5334,7 +5345,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:5461: checking for tgetent in -ltermlib" >&5
+echo "configure:5472: 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
@@ -5342,7 +5353,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltermlib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5469 "configure"
+#line 5480 "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
@@ -5353,7 +5364,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5491: \"$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
@@ -5372,7 +5383,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:5499: checking for tgetent in -ltermcap" >&5
+echo "configure:5510: 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
@@ -5380,7 +5391,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltermcap $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5507 "configure"
+#line 5518 "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
@@ -5391,7 +5402,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5529: \"$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
@@ -5410,7 +5421,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:5537: checking for tgetent in -lcurses" >&5
+echo "configure:5548: 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
@@ -5418,7 +5429,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5545 "configure"
+#line 5556 "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
@@ -5429,7 +5440,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5567: \"$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
@@ -5448,7 +5459,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:5575: checking for tgetent in -lterminfo" >&5
+echo "configure:5586: 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
@@ -5456,7 +5467,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lterminfo $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5583 "configure"
+#line 5594 "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
@@ -5467,7 +5478,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5605: \"$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
@@ -5519,7 +5530,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:6730: checking for X" >&5
+echo "configure:6741: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -5581,12 +5592,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 6792 "configure"
+#line 6803 "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:6797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6808: \"$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*
@@ -5655,14 +5666,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 6866 "configure"
+#line 6877 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:6873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6884: \"$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.
@@ -5942,12 +5953,12 @@ fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:7224: checking for Cygwin environment" >&5
+echo "configure:7235: 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 7229 "configure"
+#line 7240 "configure"
#include "confdefs.h"
int main() {
@@ -5958,7 +5969,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:7240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -5975,19 +5986,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:7257: checking for mingw32 environment" >&5
+echo "configure:7268: 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 7262 "configure"
+#line 7273 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:7269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -6006,7 +6017,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:7288: checking for executable suffix" >&5
+echo "configure:7299: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6016,10 +6027,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:7298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:7309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj) ;;
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -6584,6 +6595,7 @@ sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
mv -f Makefile.tmp Makefile
+
case x$CONFIG_HEADERS in
xconfig.h:config.in)
echo > stamp-h ;;
diff --git a/gdb/configure.in b/gdb/configure.in
index ac2620a..55ded716b 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -89,7 +89,7 @@ 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 sigprocmask)
AC_FUNC_ALLOCA
AC_CHECK_LIB(socket, socketpair)
@@ -692,6 +692,7 @@ sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
mv -f Makefile.tmp Makefile
changequote([,])dnl
+
case x$CONFIG_HEADERS in
xconfig.h:config.in)
echo > stamp-h ;;
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index 1994911..3dc6875 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -285,3 +285,4 @@ w65-*-*) gdb_target=w65 ;;
z8k-*-coff*) gdb_target=z8k ;;
esac
+
diff --git a/gdb/core-aout.c b/gdb/core-aout.c
index cb99b0f..9af47ab 100644
--- a/gdb/core-aout.c
+++ b/gdb/core-aout.c
@@ -136,9 +136,11 @@ register_addr (regno, blockend)
static struct core_fns aout_core_fns =
{
- bfd_target_unknown_flavour,
- fetch_core_registers,
- NULL
+ bfd_target_unknown_flavour, /* core_flavour */
+ default_check_format, /* check_format */
+ default_core_sniffer, /* core_sniffer */
+ fetch_core_registers, /* core_read_registers */
+ NULL /* next */
};
void
diff --git a/gdb/core-regset.c b/gdb/core-regset.c
index 71a4a79..8f96c0f 100644
--- a/gdb/core-regset.c
+++ b/gdb/core-regset.c
@@ -123,9 +123,11 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
static struct core_fns regset_core_fns =
{
- bfd_target_elf_flavour,
- fetch_core_registers,
- NULL
+ bfd_target_elf_flavour, /* core_flavour */
+ default_check_format, /* check_format */
+ default_core_sniffer, /* core_sniffer */
+ fetch_core_registers, /* core_read_registers */
+ NULL /* next */
};
void
diff --git a/gdb/core-sol2.c b/gdb/core-sol2.c
index 75d4792..3ce9cd4 100644
--- a/gdb/core-sol2.c
+++ b/gdb/core-sol2.c
@@ -122,9 +122,11 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
static struct core_fns solaris_core_fns =
{
- bfd_target_elf_flavour,
- fetch_core_registers,
- NULL
+ bfd_target_elf_flavour, /* core_flavour */
+ default_check_format, /* check_format */
+ default_core_sniffer, /* core_sniffer */
+ fetch_core_registers, /* core_read_registers */
+ NULL /* next */
};
void
diff --git a/gdb/corefile.c b/gdb/corefile.c
index ce897e1..7f94c3d 100644
--- a/gdb/corefile.c
+++ b/gdb/corefile.c
@@ -236,25 +236,27 @@ memory_error (status, memaddr)
int status;
CORE_ADDR memaddr;
{
+ GDB_FILE *tmp_stream = tui_sfileopen (130);
+ make_cleanup ((make_cleanup_func) gdb_file_deallocate, &tmp_stream);
+
+ error_begin ();
+
if (status == EIO)
{
/* Actually, address between memaddr and memaddr + len
was out of bounds. */
- error_begin ();
- printf_filtered ("Cannot access memory at address ");
- print_address_numeric (memaddr, 1, gdb_stdout);
- printf_filtered (".\n");
- return_to_top_level (RETURN_ERROR);
+ fprintf_unfiltered (tmp_stream, "Cannot access memory at address ");
+ print_address_numeric (memaddr, 1, tmp_stream);
}
else
{
- error_begin ();
- printf_filtered ("Error accessing memory address ");
- print_address_numeric (memaddr, 1, gdb_stdout);
- printf_filtered (": %s.\n",
+ fprintf_filtered (tmp_stream, "Error accessing memory address ");
+ print_address_numeric (memaddr, 1, tmp_stream);
+ fprintf_filtered (tmp_stream, ": %s.",
safe_strerror (status));
- return_to_top_level (RETURN_ERROR);
}
+
+ error_stream (tmp_stream);
}
/* Same as target_read_memory, but report an error if can't read. */
diff --git a/gdb/corelow.c b/gdb/corelow.c
index 816fbed..9e4a0f5 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -39,12 +39,21 @@
static struct core_fns *core_file_fns = NULL;
+/* The core_fns for a core file handler that is prepared to read the core
+ file currently open on core_bfd. */
+
+static struct core_fns *core_vec = NULL;
+
static void core_files_info PARAMS ((struct target_ops *));
#ifdef SOLIB_ADD
static int solib_add_stub PARAMS ((PTR));
#endif
+static struct core_fns *sniff_core_bfd PARAMS ((bfd *));
+
+static boolean gdb_check_format PARAMS ((bfd *));
+
static void core_open PARAMS ((char *, int));
static void core_detach PARAMS ((char *, int));
@@ -80,6 +89,87 @@ add_core_fns (cf)
core_file_fns = cf;
}
+/* The default function that core file handlers can use to examine a
+ core file BFD and decide whether or not to accept the job of
+ reading the core file. */
+
+int
+default_core_sniffer (our_fns, abfd)
+ struct core_fns *our_fns;
+ bfd *abfd;
+{
+ int result;
+
+ result = (bfd_get_flavour (abfd) == our_fns -> core_flavour);
+ return (result);
+}
+
+/* Walk through the list of core functions to find a set that can
+ handle the core file open on ABFD. Default to the first one in the
+ list of nothing matches. Returns pointer to set that is
+ selected. */
+
+static struct core_fns *
+sniff_core_bfd (abfd)
+ bfd *abfd;
+{
+ struct core_fns *cf;
+ struct core_fns *yummy = NULL;
+ int matches = 0;;
+
+ for (cf = core_file_fns; cf != NULL; cf = cf->next)
+ {
+ if (cf->core_sniffer (cf, abfd))
+ {
+ yummy = cf;
+ matches++;
+ }
+ }
+ if (matches > 1)
+ {
+ warning ("\"%s\": ambiguous core format, %d handlers match",
+ bfd_get_filename (abfd), matches);
+ }
+ else if (matches == 0)
+ {
+ warning ("\"%s\": no core file handler recognizes format, using default",
+ bfd_get_filename (abfd));
+ }
+ if (yummy == NULL)
+ {
+ yummy = core_file_fns;
+ }
+ return (yummy);
+}
+
+/* The default is to reject every core file format we see. Either
+ BFD has to recognize it, or we have to provide a function in the
+ core file handler that recognizes it. */
+
+int
+default_check_format (abfd)
+ bfd *abfd;
+{
+ return (0);
+}
+
+/* Attempt to recognize core file formats that BFD rejects. */
+
+static boolean
+gdb_check_format (abfd)
+ bfd *abfd;
+{
+ struct core_fns *cf;
+
+ for (cf = core_file_fns; cf != NULL; cf = cf->next)
+ {
+ if (cf->check_format (abfd))
+ {
+ return (true);
+ }
+ }
+ return (false);
+}
/* Discard all vestiges of any previous core file and mark data and stack
spaces as empty. */
@@ -114,6 +204,7 @@ core_close (quitting)
core_ops.to_sections_end = NULL;
}
}
+ core_vec = NULL;
}
#ifdef SOLIB_ADD
@@ -197,7 +288,8 @@ core_open (filename, from_tty)
if (temp_bfd == NULL)
perror_with_name (filename);
- if (!bfd_check_format (temp_bfd, bfd_core))
+ if (!bfd_check_format (temp_bfd, bfd_core) &&
+ !gdb_check_format (temp_bfd))
{
/* Do it after the err msg */
/* FIXME: should be checking for errors from bfd_close (for one thing,
@@ -215,6 +307,9 @@ core_open (filename, from_tty)
core_bfd = temp_bfd;
old_chain = make_cleanup ((make_cleanup_func) core_close, core_bfd);
+ /* Find a suitable core file handler to munch on core_bfd */
+ core_vec = sniff_core_bfd (core_bfd);
+
validate_files ();
/* Find the data section */
@@ -293,10 +388,8 @@ get_core_registers (regno)
unsigned size;
char *the_regs;
char secname[30];
- enum bfd_flavour our_flavour = bfd_get_flavour (core_bfd);
- struct core_fns *cf = NULL;
- if (core_file_fns == NULL)
+ if (core_vec == NULL)
{
fprintf_filtered (gdb_stderr,
"Can't fetch registers from this type of core file\n");
@@ -319,24 +412,10 @@ get_core_registers (regno)
goto cant;
size = bfd_section_size (core_bfd, reg_sec);
the_regs = alloca (size);
- /* Look for the core functions that match this flavor. Default to the
- first one if nothing matches. */
- for (cf = core_file_fns; cf != NULL; cf = cf->next)
- {
- if (our_flavour == cf->core_flavour)
- {
- break;
- }
- }
- if (cf == NULL)
- {
- cf = core_file_fns;
- }
- if (cf != NULL &&
- bfd_get_section_contents (core_bfd, reg_sec, the_regs, (file_ptr) 0, size) &&
- cf->core_read_registers != NULL)
+ if (bfd_get_section_contents (core_bfd, reg_sec, the_regs, (file_ptr) 0, size) &&
+ core_vec->core_read_registers != NULL)
{
- (cf->core_read_registers (the_regs, size, 0,
+ (core_vec->core_read_registers (the_regs, size, 0,
(unsigned) bfd_section_vma (abfd, reg_sec)));
}
else
@@ -353,11 +432,10 @@ get_core_registers (regno)
{
size = bfd_section_size (core_bfd, reg_sec);
the_regs = alloca (size);
- if (cf != NULL &&
- bfd_get_section_contents (core_bfd, reg_sec, the_regs, (file_ptr) 0, size) &&
- cf->core_read_registers != NULL)
+ if (bfd_get_section_contents (core_bfd, reg_sec, the_regs, (file_ptr) 0, size) &&
+ core_vec->core_read_registers != NULL)
{
- (cf->core_read_registers (the_regs, size, 2,
+ (core_vec->core_read_registers (the_regs, size, 2,
(unsigned) bfd_section_vma (abfd, reg_sec)));
}
else
diff --git a/gdb/cxux-nat.c b/gdb/cxux-nat.c
index 88a9b62..c2d8526 100644
--- a/gdb/cxux-nat.c
+++ b/gdb/cxux-nat.c
@@ -368,7 +368,7 @@ add_shared_symbol_files ()
return;
}
- objfile = symbol_file_add (LIBC_FILE, 0, 0, 0, 0, 1, 0, 0);
+ objfile = symbol_file_add (LIBC_FILE, 0, NULL, 0, OBJF_READNOW, 0, 0);
minsym = lookup_minimal_symbol (LINKS_MAP_POINTER, objfile);
ld_map = (struct link_map *)
@@ -384,7 +384,10 @@ add_shared_symbol_files ()
if (target_read_string ((CORE_ADDR) lms.l_name, &path_name,
PATH_MAX, &local_errno))
{
- symbol_file_add (path_name, 1, lms.l_addr, 0, 0, 0, 0, 0);
+ struct section_addr_info section_addrs;
+ memset (&section_addrs, 0, sizeof (section_addrs));
+ section_addrs.text_addr = lms.l_addr;
+ symbol_file_add (path_name, 1, &section_addrs, 0, 0, 0, 0);
free (path_name);
}
}
diff --git a/gdb/defs.h b/gdb/defs.h
index 6b70ab1..ca5b6e1 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -420,6 +420,7 @@ extern void *gdb_file_data PARAMS ((struct gdb_file *file));
extern struct gdb_file *stdio_fileopen PARAMS ((FILE *));
/* #if defined (TUI) */
extern struct gdb_file *tui_fileopen PARAMS ((FILE *));
+extern struct gdb_file *tui_sfileopen PARAMS ((int));
/* #endif */
/* deprecated - use gdb_file_delete */
@@ -824,6 +825,10 @@ extern void error_begin PARAMS ((void));
extern NORETURN void internal_error (char *, ...) ATTR_NORETURN;
+extern NORETURN void error_stream PARAMS ((GDB_FILE *)) ATTR_NORETURN;
+
+extern char *error_last_message PARAMS ((void));
+
extern NORETURN void nomem PARAMS ((long)) ATTR_NORETURN;
/* Reasons for calling return_to_top_level. */
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index e195e54..56f7fc2 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,8 @@
+1999-09-30 Fred Fish <fnf@cygnus.com>
+
+ * gdb.texinfo: Document additional forms of specifying section
+ names and addresses for the add-symbol-file command.
+
1999-09-14 Michael Snyder <msnyder@cleaver.cygnus.com>
* gdbint.texinfo: Fix typo, add the word "have".
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 4259095..d476d88 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -7756,12 +7756,18 @@ the program is running. To do this, use the @code{kill} command
@cindex dynamic linking
@item add-symbol-file @var{filename} @var{address}
@itemx add-symbol-file @var{filename} @var{address} @r{[} -readnow @r{]} @r{[} -mapped @r{]}
+@itemx add-symbol-file @var{filename} @var{address} @var{data_address} @var{bss_address}
+@itemx add-symbol-file @var{filename} @r{-T}@var{section} @var{address}
The @code{add-symbol-file} command reads additional symbol table information
from the file @var{filename}. You would use this command when @var{filename}
has been dynamically loaded (by some other means) into the program that
is running. @var{address} should be the memory address at which the
file has been loaded; @value{GDBN} cannot figure this out for itself.
-You can specify @var{address} as an expression.
+You can specify up to three addresses, in which case they are taken to be
+the addresses of the text, data, and bss segments respectively.
+For complicated cases, you can specify an arbitrary number of @r{-T}@var{section} @var{address}
+pairs, to give an explicit section name and base address for that section.
+You can specify any @var{address} as an expression.
The symbol table of the file @var{filename} is added to the symbol table
originally read with the @code{symbol-file} command. You can use the
diff --git a/gdb/dstread.c b/gdb/dstread.c
index 0341727..c10c1fe 100644
--- a/gdb/dstread.c
+++ b/gdb/dstread.c
@@ -1641,7 +1641,7 @@ struct section_offsets dst_symfile_faker =
void
dst_symfile_offsets (objfile, addr)
struct objfile *objfile;
- CORE_ADDR addr;
+ struct section_addr_info *addrs;
{
objfile->num_sections = 1;
objfile->section_offsets = &dst_symfile_faker;
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 85dd111..fcebef6 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -1069,7 +1069,7 @@ scan_partial_symbols (info_ptr, objfile, lowpc, highpc)
int nesting_level = 1;
int has_pc_info;
- *lowpc = ((CORE_ADDR) - 1);
+ *lowpc = ((CORE_ADDR) -1);
*highpc = ((CORE_ADDR) 0);
while (nesting_level)
@@ -1149,7 +1149,7 @@ scan_partial_symbols (info_ptr, objfile, lowpc, highpc)
/* If we didn't find a lowpc, set it to highpc to avoid complaints
from `maint check'. */
- if (*lowpc == ((CORE_ADDR) - 1))
+ if (*lowpc == ((CORE_ADDR) -1))
*lowpc = *highpc;
return info_ptr;
}
@@ -1461,7 +1461,7 @@ read_file_scope (die, objfile)
struct objfile *objfile;
{
unsigned int line_offset = 0;
- CORE_ADDR lowpc = ((CORE_ADDR) - 1);
+ CORE_ADDR lowpc = ((CORE_ADDR) -1);
CORE_ADDR highpc = ((CORE_ADDR) 0);
struct attribute *attr;
char *name = "<unknown>";
@@ -1493,7 +1493,7 @@ read_file_scope (die, objfile)
/* If we didn't find a lowpc, set it to highpc to avoid complaints
from finish_block. */
- if (lowpc == ((CORE_ADDR) - 1))
+ if (lowpc == ((CORE_ADDR) -1))
lowpc = highpc;
lowpc += baseaddr;
highpc += baseaddr;
diff --git a/gdb/event-loop.c b/gdb/event-loop.c
index 8668fcc..c3bbf01 100644
--- a/gdb/event-loop.c
+++ b/gdb/event-loop.c
@@ -23,7 +23,6 @@
#include "top.h"
#include "event-loop.h"
#include "event-top.h"
-#include "inferior.h" /* For fetch_inferior_event. */
#ifdef HAVE_POLL
#include <poll.h>
#else
@@ -230,7 +229,7 @@ static struct
/* Pointer to first in timer list. */
struct gdb_timer *first_timer;
- /* Length of timer list. */
+ /* Id of the last timer created. */
int num_timers;
}
timer_list;
@@ -264,7 +263,6 @@ static gdb_event *create_file_event (int fd);
static int process_event (void);
static void handle_timer_event (int dummy);
static void poll_timers (void);
-static int fetch_inferior_event_wrapper (gdb_client_data client_data);
/* Insert an event object into the gdb event queue at
@@ -731,7 +729,7 @@ handle_file_event (int event_file_desc)
/* If there was a match, then call the handler. */
if (mask != 0)
- (*file_ptr->proc) (file_ptr->error, file_ptr->fd, file_ptr->client_data);
+ (*file_ptr->proc) (file_ptr->error, file_ptr->client_data);
break;
}
}
@@ -964,42 +962,6 @@ check_async_ready (void)
return async_handler_ready;
}
-/* FIXME: where does this function belong? */
-/* General function to handle events in the inferior. So far it just
- takes care of detecting errors reported by select() or poll(),
- otherwise it assumes that all is OK, and goes on reading data from
- the fd. This however may not always be what we want to do. */
-void
-inferior_event_handler (int error, gdb_client_data client_data, int fd)
-{
- if (error == 1)
- {
- printf_unfiltered ("error detected on fd %d\n", fd);
- delete_file_handler (fd);
- pop_target ();
- discard_all_continuations ();
- }
- else
- /* Use catch errors for now, until the inner layers of
- fetch_inferior_event (i.e. readchar) can return meaningful
- error status. If an error occurs while getting an event from
- the target, just get rid of the target. */
- if (!catch_errors (fetch_inferior_event_wrapper, client_data, "", RETURN_MASK_ALL))
- {
- delete_file_handler (fd);
- discard_all_continuations ();
- pop_target ();
- display_gdb_prompt (0);
- }
-}
-
-static int
-fetch_inferior_event_wrapper (gdb_client_data client_data)
-{
- fetch_inferior_event (client_data);
- return 1;
-}
-
/* Create a timer that will expire in MILLISECONDS from now. When the
timer is ready, PROC will be executed. At creation, the timer is
aded to the timers queue. This queue is kept sorted in order of
@@ -1145,7 +1107,7 @@ poll_timers (void)
struct timeval time_now, delta;
gdb_event *event_ptr;
- if (timer_list.num_timers)
+ if (timer_list.first_timer != NULL)
{
gettimeofday (&time_now, NULL);
delta.tv_sec = timer_list.first_timer->when.tv_sec - time_now.tv_sec;
diff --git a/gdb/event-loop.h b/gdb/event-loop.h
index e559464..02c3fe3 100644
--- a/gdb/event-loop.h
+++ b/gdb/event-loop.h
@@ -59,7 +59,7 @@
typedef PTR gdb_client_data;
struct async_signal_handler;
-typedef void (handler_func) (int, int, gdb_client_data);
+typedef void (handler_func) (int, gdb_client_data);
typedef void (sig_handler_func) (gdb_client_data);
typedef void (timer_handler_func) (gdb_client_data);
@@ -91,6 +91,5 @@ extern void mark_async_signal_handler (struct async_signal_handler *async_handle
extern struct async_signal_handler *
create_async_signal_handler (sig_handler_func * proc, gdb_client_data client_data);
extern void delete_async_signal_handler (struct async_signal_handler **async_handler_ptr);
-extern void inferior_event_handler (int error, gdb_client_data client_data, int fd);
extern int create_timer (int milliseconds, timer_handler_func * proc, gdb_client_data client_data);
extern void delete_timer (int id);
diff --git a/gdb/event-top.c b/gdb/event-top.c
index b1b625d..7e6cf83 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -34,6 +34,8 @@
#include <readline/readline.h>
#include <readline/history.h>
+#include <signal.h>
+
/* readline defines this. */
#undef savestring
@@ -399,12 +401,12 @@ pop_prompt (void)
instead of calling gdb_readline2, give gdb a chance to detect
errors and do something. */
void
-stdin_event_handler (int error, int fd, gdb_client_data client_data)
+stdin_event_handler (int error, gdb_client_data client_data)
{
if (error)
{
- printf_unfiltered ("error detected on stdin, fd %d\n", fd);
- delete_file_handler (fd);
+ printf_unfiltered ("error detected on stdin\n");
+ delete_file_handler (input_fd);
discard_all_continuations ();
/* If stdin died, we may as well kill gdb. */
exit (1);
@@ -443,7 +445,10 @@ async_disable_stdin (void)
sync/async mode) is refined, the duplicate calls can be
eliminated (Here or in infcmd.c/infrun.c). */
target_terminal_inferior ();
- make_exec_cleanup (async_enable_stdin, NULL);
+ /* Add the reinstate of stdin to the list of cleanups to be done
+ in case the target errors out and dies. These cleanups are also
+ done in case of normal successful termination of the execution
+ command, by complete_execution(). */
make_exec_error_cleanup (async_enable_stdin, NULL);
}
@@ -1037,7 +1042,15 @@ async_stop_sig (gdb_client_data arg)
char *prompt = get_prompt ();
#if STOP_SIGNAL == SIGTSTP
signal (SIGTSTP, SIG_DFL);
+#if HAVE_SIGPROCMASK
+ {
+ sigset_t zero;
+ sigemptyset (&zero);
+ sigprocmask (SIG_SETMASK, &zero, 0);
+ }
+#else
sigsetmask (0);
+#endif
kill (getpid (), SIGTSTP);
signal (SIGTSTP, handle_stop_sig);
#else
diff --git a/gdb/event-top.h b/gdb/event-top.h
index baacd1b..36b2098 100644
--- a/gdb/event-top.h
+++ b/gdb/event-top.h
@@ -86,10 +86,10 @@ extern void handle_stop_sig (int sig);
extern void handle_sigint (int sig);
extern void pop_prompt (void);
extern void push_prompt (char *prefix, char *prompt, char *suffix);
-extern void gdb_readline2 (gdb_client_data client_data);
-extern void mark_async_signal_handler_wrapper (PTR token);
-extern void async_request_quit (gdb_client_data arg);
-extern void stdin_event_handler (int error, int fd, gdb_client_data client_data);
+extern void gdb_readline2 (void *client_data);
+extern void mark_async_signal_handler_wrapper (void *token);
+extern void async_request_quit (void *arg);
+extern void stdin_event_handler (int error, void *client_data);
extern void async_disable_stdin (void);
extern void async_enable_stdin (void *dummy);
@@ -101,6 +101,6 @@ extern int exec_done_display_p;
extern char *async_annotation_suffix;
extern char *new_async_prompt;
extern struct prompts the_prompts;
-extern void (*call_readline) (gdb_client_data);
+extern void (*call_readline) (void *);
extern void (*input_handler) (char *);
extern int input_fd;
diff --git a/gdb/gdb-stabs.h b/gdb/gdb-stabs.h
index 09b3721..92301f1 100644
--- a/gdb/gdb-stabs.h
+++ b/gdb/gdb-stabs.h
@@ -37,7 +37,7 @@
#define SECT_OFF_DATA 1
#define SECT_OFF_BSS 2
#define SECT_OFF_RODATA 3
-#define SECT_OFF_MAX 4 /* Count of possible values */
+#define SECT_OFF_MAX 16 /* Count of possible values */
/* The stab_section_info chain remembers info from the ELF symbol table,
while psymtabs are being built for the other symbol tables in the
diff --git a/gdb/gdbcore.h b/gdb/gdbcore.h
index b083d56..0db61f9 100644
--- a/gdb/gdbcore.h
+++ b/gdb/gdbcore.h
@@ -133,12 +133,28 @@ extern void set_gnutarget PARAMS ((char *));
struct core_fns
{
- /* BFD flavour that we handle. Note that bfd_target_unknown_flavour matches
- anything, and if there is no better match, this function will be called
- as the default. */
+ /* BFD flavour that a core file handler is prepared to read. This
+ can be used by the handler's core tasting function as a first
+ level filter to reject BFD's that don't have the right
+ flavour. */
enum bfd_flavour core_flavour;
+ /* Core file handler function to call to recognize corefile
+ formats that BFD rejects. Some core file format just don't fit
+ into the BFD model, or may require other resources to identify
+ them, that simply aren't available to BFD (such as symbols from
+ another file). Returns nonzero if the handler recognizes the
+ format, zero otherwise. */
+
+ int (*check_format) PARAMS ((bfd *));
+
+ /* Core file handler function to call to ask if it can handle a
+ given core file format or not. Returns zero if it can't,
+ nonzero otherwise. */
+
+ int (*core_sniffer) PARAMS ((struct core_fns *, bfd *));
+
/* Extract the register values out of the core file and store them where
`read_register' will find them.
@@ -167,5 +183,7 @@ struct core_fns
};
extern void add_core_fns PARAMS ((struct core_fns * cf));
+extern int default_core_sniffer PARAMS ((struct core_fns *cf, bfd *abfd));
+extern int default_check_format PARAMS ((bfd *abfd));
#endif /* !defined (GDBCORE_H) */
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 9a5b927..24c0a00 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -2014,7 +2014,7 @@ gnu_create_inferior (exec_file, allargs, env)
inf_restore_exc_ports (inf);
/* Here we go! */
- proceed ((CORE_ADDR) - 1, 0, 0);
+ proceed ((CORE_ADDR) -1, 0, 0);
}
/* Mark our target-struct as eligible for stray "run" and "attach"
diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c
index f16b522..b243124 100644
--- a/gdb/go32-nat.c
+++ b/gdb/go32-nat.c
@@ -717,7 +717,7 @@ go32_create_inferior (char *exec_file, char *args, char **env)
push_target (&go32_ops);
clear_proceed_status ();
insert_breakpoints ();
- proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_0, 0);
+ proceed ((CORE_ADDR) -1, TARGET_SIGNAL_0, 0);
prog_has_started = 1;
}
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 793f89b..8b1d87f 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -1624,7 +1624,7 @@ hppa_pop_frame ()
/* Start up the inferior. */
clear_proceed_status ();
proceed_to_finish = 1;
- proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_DEFAULT, 0);
+ proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
/* Perform our cleanups. */
do_cleanups (old_chain);
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 2029408..e8c1bc9 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -970,6 +970,7 @@ set_disassembly_flavor ()
set_architecture_from_arch_mach (bfd_arch_i386, bfd_mach_i386_i386_intel_syntax);
}
+
void
_initialize_i386_tdep ()
{
diff --git a/gdb/i386aix-nat.c b/gdb/i386aix-nat.c
index a874dd0..d395363 100644
--- a/gdb/i386aix-nat.c
+++ b/gdb/i386aix-nat.c
@@ -358,9 +358,11 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
static struct core_fns i386aix_core_fns =
{
- bfd_target_unknown_flavour,
- fetch_core_registers,
- NULL
+ bfd_target_unknown_flavour, /* core_flavour */
+ default_check_format, /* check_format */
+ default_core_sniffer, /* core_sniffer */
+ fetch_core_registers, /* core_read_registers */
+ NULL /* next */
};
void
diff --git a/gdb/i386mach-nat.c b/gdb/i386mach-nat.c
index e012188..5ecb103 100644
--- a/gdb/i386mach-nat.c
+++ b/gdb/i386mach-nat.c
@@ -150,9 +150,11 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
static struct core_fns i386mach_core_fns =
{
- bfd_target_unknown_flavour,
- fetch_core_registers,
- NULL
+ bfd_target_unknown_flavour, /* core_flavour */
+ default_check_format, /* check_format */
+ default_core_sniffer, /* core_sniffer */
+ fetch_core_registers, /* core_read_registers */
+ NULL /* next */
};
void
diff --git a/gdb/i960-tdep.c b/gdb/i960-tdep.c
index 44ac883..eff4136 100644
--- a/gdb/i960-tdep.c
+++ b/gdb/i960-tdep.c
@@ -27,6 +27,7 @@
#include "floatformat.h"
#include "target.h"
#include "gdbcore.h"
+#include "inferior.h"
static CORE_ADDR next_insn PARAMS ((CORE_ADDR memaddr,
unsigned int *pword1,
@@ -896,6 +897,7 @@ mon960_frame_chain_valid (chain, curframe)
return (chain != read_memory_integer (a, 4));
}
+
void
_initialize_i960_tdep ()
{
diff --git a/gdb/inf-loop.c b/gdb/inf-loop.c
new file mode 100644
index 0000000..8528512
--- /dev/null
+++ b/gdb/inf-loop.c
@@ -0,0 +1,113 @@
+/* Handling of inferior events for the event loop for GDB, the GNU debugger.
+ Copyright 1999 Free Software Foundation, Inc.
+ Written by Elena Zannoni <ezannoni@cygnus.com> of 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 "inferior.h" /* For fetch_inferior_event. */
+#include "target.h" /* For enum inferior_event_type. */
+#include "event-loop.h"
+#include "event-top.h"
+#include "inf-loop.h"
+
+static int fetch_inferior_event_wrapper (gdb_client_data client_data);
+static void complete_execution (void);
+
+/* General function to handle events in the inferior. So far it just
+ takes care of detecting errors reported by select() or poll(),
+ otherwise it assumes that all is OK, and goes on reading data from
+ the fd. This however may not always be what we want to do. */
+void
+inferior_event_handler (enum inferior_event_type event_type,
+ gdb_client_data client_data)
+{
+ switch (event_type)
+ {
+ case INF_ERROR:
+ printf_unfiltered ("error detected from target.\n");
+ target_async (NULL, 0);
+ pop_target ();
+ discard_all_continuations ();
+ do_exec_error_cleanups (ALL_CLEANUPS);
+ break;
+
+ case INF_REG_EVENT:
+ /* Use catch errors for now, until the inner layers of
+ fetch_inferior_event (i.e. readchar) can return meaningful
+ error status. If an error occurs while getting an event from
+ the target, just get rid of the target. */
+ if (!catch_errors (fetch_inferior_event_wrapper,
+ client_data, "", RETURN_MASK_ALL))
+ {
+ target_async (NULL, 0);
+ pop_target ();
+ discard_all_continuations ();
+ do_exec_error_cleanups (ALL_CLEANUPS);
+ display_gdb_prompt (0);
+ }
+ break;
+
+ case INF_EXEC_COMPLETE:
+ /* Is there anything left to do for the command issued to
+ complete? */
+ do_all_continuations ();
+ /* Reset things after target has stopped for the async commands. */
+ complete_execution ();
+ break;
+
+ case INF_QUIT_REQ:
+ case INF_TIMER:
+ default:
+ printf_unfiltered ("Event type not recognized.\n");
+ break;
+ }
+}
+
+static int
+fetch_inferior_event_wrapper (gdb_client_data client_data)
+{
+ fetch_inferior_event (client_data);
+ return 1;
+}
+
+/* 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 (void)
+{
+ target_executing = 0;
+
+ /* Unregister the inferior from the event loop. This is done so that
+ when the inferior is not running we don't get distracted by
+ spurious inferior output. */
+ target_async (NULL, 0);
+
+ if (sync_execution)
+ {
+ do_exec_error_cleanups (ALL_CLEANUPS);
+ display_gdb_prompt (0);
+ }
+ else
+ {
+ if (exec_done_display_p)
+ printf_unfiltered ("completed.\n");
+ }
+}
diff --git a/gdb/inf-loop.h b/gdb/inf-loop.h
new file mode 100644
index 0000000..dde9045
--- /dev/null
+++ b/gdb/inf-loop.h
@@ -0,0 +1,28 @@
+/* Interface to the inferior event handling code for GDB, the GNU debugger.
+ Copyright 1999 Free Software Foundation, Inc.
+ Written by Elena Zannoni <ezannoni@cygnus.com> of 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. */
+
+#ifndef INF_LOOP_H
+#define INF_LOOP_H
+
+extern void inferior_event_handler (enum inferior_event_type event_type,
+ void* client_data);
+
+#endif /* #ifndef INF_LOOP_H */
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 4fbee95..6a55a36 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -34,7 +34,6 @@
#include "language.h"
#include "symfile.h"
#include "objfiles.h"
-#include "event-loop.h"
#include "event-top.h"
#include "parser-defs.h"
@@ -392,7 +391,7 @@ continue_command (proc_count_exp, from_tty)
clear_proceed_status ();
- proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_DEFAULT, 0);
+ proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
}
/* Step until outside of current statement. */
@@ -516,7 +515,7 @@ which has no line number information.\n", name);
step_over_calls = 1;
step_multi = (count > 1);
- proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_DEFAULT, 1);
+ proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 1);
if (!stop_step)
break;
@@ -684,7 +683,7 @@ signal_command (signum_exp, from_tty)
FIXME: Neither should "signal foo" but when I tried passing
(CORE_ADDR)-1 unconditionally I got a testsuite failure which I haven't
tried to track down yet. */
- proceed (oursig == TARGET_SIGNAL_0 ? (CORE_ADDR) - 1 : stop_pc, oursig, 0);
+ proceed (oursig == TARGET_SIGNAL_0 ? (CORE_ADDR) -1 : stop_pc, oursig, 0);
}
/* Call breakpoint_auto_delete on the current contents of the bpstat
@@ -833,7 +832,7 @@ until_next_command (from_tty)
step_multi = 0; /* Only one call to proceed */
- proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_DEFAULT, 1);
+ proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 1);
}
static void
@@ -1032,7 +1031,7 @@ finish_command (arg, from_tty)
}
proceed_to_finish = 1; /* We want stop_registers, please... */
- proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_DEFAULT, 0);
+ proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
/* Do this only if not running asynchronously or if the target
cannot do async execution. Otherwise, complete this command when
diff --git a/gdb/inflow.c b/gdb/inflow.c
index bbd92b9..c2b6d56 100644
--- a/gdb/inflow.c
+++ b/gdb/inflow.c
@@ -489,7 +489,8 @@ child_terminal_info (args, from_tty)
}
#ifdef PROCESS_GROUP_TYPE
- printf_filtered ("Process group = %d\n", inferior_process_group);
+ printf_filtered ("Process group = %d\n",
+ (int) inferior_process_group);
#endif
SERIAL_PRINT_TTY_STATE (stdin_serial, inferior_ttystate, gdb_stdout);
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 48fe874..cc8c1bf 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -34,8 +34,7 @@
#include "symfile.h" /* for overlay functions */
#include "top.h"
#include <signal.h>
-#include "event-loop.h"
-#include "event-top.h"
+#include "inf-loop.h"
/* Prototypes for local functions */
@@ -56,8 +55,6 @@ static void delete_breakpoint_current_contents (void *);
static void set_follow_fork_mode_command (char *arg, int from_tty,
struct cmd_list_element * c);
-static void complete_execution (void);
-
static struct inferior_status *xmalloc_inferior_status (void);
static void free_inferior_status (struct inferior_status *);
@@ -963,7 +960,7 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
if (step < 0)
stop_after_trap = 1;
- if (addr == (CORE_ADDR) - 1)
+ if (addr == (CORE_ADDR) -1)
{
/* If there is a breakpoint at the address we will resume at,
step one instruction before inserting breakpoints
@@ -1281,7 +1278,7 @@ struct execution_control_state *async_ecs;
void
fetch_inferior_event (client_data)
- gdb_client_data client_data;
+ void *client_data;
{
static struct cleanup *old_cleanups;
@@ -1329,11 +1326,7 @@ fetch_inferior_event (client_data)
if there are any. */
do_exec_cleanups (old_cleanups);
normal_stop ();
- /* Is there anything left to do for the command issued to
- complete? */
- do_all_continuations ();
- /* Reset things after target has stopped for the async commands. */
- complete_execution ();
+ inferior_event_handler (INF_EXEC_COMPLETE, NULL);
}
}
@@ -3239,26 +3232,6 @@ stopped_for_internal_shlib_event (bpstat bs)
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 (void)
-{
- target_executing = 0;
-
- if (sync_execution)
- {
- do_exec_error_cleanups (ALL_CLEANUPS);
- display_gdb_prompt (0);
- }
- else
- {
- if (exec_done_display_p)
- printf_unfiltered ("completed.\n");
- }
-}
/* Here to return control to GDB when the inferior stops for real.
Print appropriate messages, remove breakpoints, give terminal our modes.
diff --git a/gdb/inftarg.c b/gdb/inftarg.c
index 0b7167d..fb31ffb 100644
--- a/gdb/inftarg.c
+++ b/gdb/inftarg.c
@@ -515,7 +515,7 @@ child_create_inferior (exec_file, allargs, env)
#endif
/* We are at the first instruction we care about. */
/* Pedal to the metal... */
- proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_0, 0);
+ proceed ((CORE_ADDR) -1, TARGET_SIGNAL_0, 0);
}
#if !defined(CHILD_POST_STARTUP_INFERIOR)
diff --git a/gdb/irix4-nat.c b/gdb/irix4-nat.c
index 7646843..03eadc0 100644
--- a/gdb/irix4-nat.c
+++ b/gdb/irix4-nat.c
@@ -186,9 +186,11 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
static struct core_fns irix4_core_fns =
{
- bfd_target_unknown_flavour,
- fetch_core_registers,
- NULL
+ bfd_target_unknown_flavour, /* core_flavour */
+ default_check_format, /* check_format */
+ default_core_sniffer, /* core_sniffer */
+ fetch_core_registers, /* core_read_registers */
+ NULL /* next */
};
void
diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c
index 50bae76..00c593e 100644
--- a/gdb/irix5-nat.c
+++ b/gdb/irix5-nat.c
@@ -832,7 +832,9 @@ symbol_add_stub (arg)
{
register struct so_list *so = (struct so_list *) arg; /* catch_errs bogon */
CORE_ADDR text_addr = 0;
+ struct section_addr_info section_addrs;
+ memset (&section_addrs, 0, sizeof (section_addrs));
if (so->textsection)
text_addr = so->textsection->addr;
else if (so->abfd != NULL)
@@ -850,9 +852,10 @@ symbol_add_stub (arg)
text_addr = bfd_section_vma (so->abfd, lowest_sect) + LM_OFFSET (so);
}
+ section_addrs.text_addr = text_addr;
so->objfile = symbol_file_add (so->so_name, so->from_tty,
- text_addr,
- 0, 0, 0, 0, 0);
+ &section_addrs,
+ 0, 0, 0, 0);
return (1);
}
@@ -1314,9 +1317,11 @@ must be loaded manually, using `sharedlibrary'.",
static struct core_fns irix5_core_fns =
{
- bfd_target_unknown_flavour,
- fetch_core_registers,
- NULL
+ bfd_target_unknown_flavour, /* core_flavour */
+ default_check_format, /* check_format */
+ default_core_sniffer, /* core_sniffer */
+ fetch_core_registers, /* core_read_registers */
+ NULL /* next */
};
void
diff --git a/gdb/lynx-nat.c b/gdb/lynx-nat.c
index dba5559..2da61ed 100644
--- a/gdb/lynx-nat.c
+++ b/gdb/lynx-nat.c
@@ -826,9 +826,11 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
static struct core_fns lynx_core_fns =
{
- bfd_target_unknown_flavour,
- fetch_core_registers,
- NULL
+ bfd_target_unknown_flavour, /* core_flavour */
+ default_check_format, /* check_format */
+ default_core_sniffer, /* core_sniffer */
+ fetch_core_registers, /* core_read_registers */
+ NULL /* next */
};
void
diff --git a/gdb/m3-nat.c b/gdb/m3-nat.c
index 6e53546..79317bc 100644
--- a/gdb/m3-nat.c
+++ b/gdb/m3-nat.c
@@ -3980,7 +3980,7 @@ m3_create_inferior (exec_file, allargs, env)
fork_inferior (exec_file, allargs, env, m3_trace_me, m3_trace_him, NULL, NULL);
/* We are at the first instruction we care about. */
/* Pedal to the metal... */
- proceed ((CORE_ADDR) - 1, 0, 0);
+ proceed ((CORE_ADDR) -1, 0, 0);
}
/* Mark our target-struct as eligible for stray "run" and "attach"
diff --git a/gdb/m68k-stub.c b/gdb/m68k-stub.c
index 3915fda..84c61a1 100644
--- a/gdb/m68k-stub.c
+++ b/gdb/m68k-stub.c
@@ -791,7 +791,7 @@ void handle_exception(int exceptionVector)
mem2hex((char*) registers, remcomOutBuffer, NUMREGBYTES);
break;
case 'G' : /* set the value of the CPU registers - return OK */
- hex2mem(&ptr, (char*) registers, NUMREGBYTES);
+ hex2mem(ptr, (char*) registers, NUMREGBYTES);
strcpy(remcomOutBuffer,"OK");
break;
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 87bcfeb..475e909 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -635,6 +635,7 @@ m68k_saved_pc_after_call (frame)
return read_memory_integer (read_register (SP_REGNUM), 4);
}
+
void
_initialize_m68k_tdep ()
{
diff --git a/gdb/mac-nat.c b/gdb/mac-nat.c
index 5bbe339..bf57227 100644
--- a/gdb/mac-nat.c
+++ b/gdb/mac-nat.c
@@ -217,7 +217,7 @@ child_create_inferior (exec_file, allargs, env)
init_wait_for_inferior ();
clear_proceed_status ();
-/* proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_0, 0); */
+/* proceed ((CORE_ADDR) -1, TARGET_SIGNAL_0, 0); */
}
static void
diff --git a/gdb/main.c b/gdb/main.c
index feefaa5..20fd73b 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -62,6 +62,10 @@ GDB_FILE *gdb_stderr;
GDB_FILE *gdb_stdlog;
GDB_FILE *gdb_stdtarg;
+/* Used to initialize error() - defined in utils.c */
+
+extern void error_init (void);
+
/* Whether to enable writing into executable and core files */
extern int write_files;
@@ -169,6 +173,9 @@ main (argc, argv)
gdb_stdtarg = gdb_stderr; /* for moment */
#endif
+ /* initialize error() */
+ error_init ();
+
/* Parse arguments and options. */
{
int c;
diff --git a/gdb/mips-nat.c b/gdb/mips-nat.c
index 958aaea..90dbad8 100644
--- a/gdb/mips-nat.c
+++ b/gdb/mips-nat.c
@@ -237,9 +237,11 @@ register_addr (regno, blockend)
static struct core_fns mips_core_fns =
{
- bfd_target_unknown_flavour,
- fetch_core_registers,
- NULL
+ bfd_target_unknown_flavour, /* core_flavour */
+ default_check_format, /* check_format */
+ default_core_sniffer, /* core_sniffer */
+ fetch_core_registers, /* core_read_registers */
+ NULL /* next */
};
void
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index b54b753..a6f689b 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -1146,7 +1146,7 @@ read_next_frame_reg (fi, regno)
if (fi->saved_regs == NULL)
mips_find_saved_regs (fi);
if (fi->saved_regs[regno])
- return read_memory_integer (fi->saved_regs[regno], MIPS_SAVED_REGSIZE);
+ return read_memory_integer (ADDR_BITS_REMOVE (fi->saved_regs[regno]), MIPS_SAVED_REGSIZE);
}
}
return read_register (regno);
@@ -3564,6 +3564,7 @@ mips_call_dummy_address ()
}
+
void
_initialize_mips_tdep ()
{
diff --git a/gdb/ns32knbsd-nat.c b/gdb/ns32knbsd-nat.c
index 01c2a50..de2299c 100644
--- a/gdb/ns32knbsd-nat.c
+++ b/gdb/ns32knbsd-nat.c
@@ -175,9 +175,11 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
static struct core_fns nat_core_fns =
{
- bfd_target_unknown_flavour,
- fetch_core_registers,
- NULL
+ bfd_target_unknown_flavour, /* core_flavour */
+ default_check_format, /* check_format */
+ default_core_sniffer, /* core_sniffer */
+ fetch_core_registers, /* core_read_registers */
+ NULL /* next */
};
void
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index f59feb2..ed0b5c8 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -435,6 +435,10 @@ struct objfile
#define OBJF_SHARED (1 << 3) /* From a shared library */
+/* User requested that this objfile be read in it's entirety. */
+
+#define OBJF_READNOW (1 << 4) /* Immediate full read */
+
/* The object file that the main symbol table was loaded from (e.g. the
argument to the "symbol-file" or "file" command). */
diff --git a/gdb/osfsolib.c b/gdb/osfsolib.c
index 6b05613..b9fba61 100644
--- a/gdb/osfsolib.c
+++ b/gdb/osfsolib.c
@@ -578,7 +578,9 @@ symbol_add_stub (arg)
{
register struct so_list *so = (struct so_list *) arg; /* catch_errs bogon */
CORE_ADDR text_addr = 0;
+ struct section_addr_info section_addrs;
+ memset (&section_addrs, 0, sizeof (section_addrs));
if (so->textsection)
text_addr = so->textsection->addr;
else if (so->abfd != NULL)
@@ -596,9 +598,10 @@ symbol_add_stub (arg)
text_addr = bfd_section_vma (so->abfd, lowest_sect) + LM_OFFSET (so);
}
+ section_addrs.text_addr = text_addr;
so->objfile = symbol_file_add (so->so_name, so->from_tty,
- text_addr,
- 0, 0, 0, 0, 1);
+ &section_addrs,
+ 0, 0, 0, 1);
return (1);
}
diff --git a/gdb/pa64solib.c b/gdb/pa64solib.c
index 414e5b8..b428d8a 100644
--- a/gdb/pa64solib.c
+++ b/gdb/pa64solib.c
@@ -226,7 +226,9 @@ pa64_solib_add_solib_objfile (so, name, from_tty, text_addr)
bfd *tmp_bfd;
asection *sec;
obj_private_data_t *obj_private;
+ struct section_addr_info section_addrs;
+ memset (&section_addrs, 0, sizeof (section_addrs));
/* We need the BFD so that we can look at its sections. We open up the
file temporarily, then close it when we are done. */
tmp_bfd = bfd_openr (name, gnutarget);
@@ -270,7 +272,8 @@ pa64_solib_add_solib_objfile (so, name, from_tty, text_addr)
tmp_bfd = NULL;
/* Now let the generic code load up symbols for this library. */
- so->objfile = symbol_file_add (name, from_tty, text_addr, 0, 0, 0, 0, 1);
+ section_addrs.text_addr = text_addr;
+ so->objfile = symbol_file_add (name, from_tty, &section_addrs, 0, 0, 0, 1);
so->abfd = so->objfile->obfd;
/* Mark this as a shared library and save private data. */
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 252af4a..6324357 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -166,7 +166,7 @@ static void validate_format PARAMS ((struct format_data, char *));
static void do_examine PARAMS ((struct format_data, CORE_ADDR addr, asection * section));
-static void print_formatted PARAMS ((value_ptr, int, int));
+static void print_formatted PARAMS ((value_ptr, int, int, GDB_FILE *));
static struct format_data decode_format PARAMS ((char **, int, int));
@@ -270,17 +270,18 @@ decode_format (string_ptr, oformat, osize)
return val;
}
-/* Print value VAL on gdb_stdout according to FORMAT, a letter or 0.
+/* Print value VAL on stream according to FORMAT, a letter or 0.
Do not end with a newline.
0 means print VAL according to its own type.
SIZE is the letter for the size of datum being printed.
This is used to pad hex numbers so they line up. */
static void
-print_formatted (val, format, size)
+print_formatted (val, format, size, stream)
register value_ptr val;
register int format;
int size;
+ GDB_FILE *stream;
{
struct type *type = check_typedef (VALUE_TYPE (val));
int len = TYPE_LENGTH (type);
@@ -296,7 +297,7 @@ print_formatted (val, format, size)
case 's':
/* FIXME: Need to handle wchar_t's here... */
next_address = VALUE_ADDRESS (val)
- + val_print_string (VALUE_ADDRESS (val), -1, 1, gdb_stdout);
+ + val_print_string (VALUE_ADDRESS (val), -1, 1, stream);
next_section = VALUE_BFD_SECTION (val);
break;
@@ -310,7 +311,7 @@ print_formatted (val, format, size)
/* We often wrap here if there are long symbolic names. */
wrap_here (" ");
next_address = VALUE_ADDRESS (val)
- + print_insn (VALUE_ADDRESS (val), gdb_stdout);
+ + print_insn (VALUE_ADDRESS (val), stream);
next_section = VALUE_BFD_SECTION (val);
break;
@@ -325,13 +326,13 @@ print_formatted (val, format, size)
* we have to use language rules to print it as
* a series of scalars.
*/
- value_print (val, gdb_stdout, format, Val_pretty_default);
+ value_print (val, stream, format, Val_pretty_default);
else
/* User specified format, so don't look to the
* the type to tell us what to do.
*/
print_scalar_formatted (VALUE_CONTENTS (val), type,
- format, size, gdb_stdout);
+ format, size, stream);
}
}
@@ -803,7 +804,7 @@ do_examine (fmt, addr, sect)
if (last_examine_value)
release_value (last_examine_value);
- print_formatted (last_examine_value, format, size);
+ print_formatted (last_examine_value, format, size, gdb_stdout);
}
printf_filtered ("\n");
gdb_flush (gdb_stdout);
@@ -909,7 +910,7 @@ print_command_1 (exp, inspect, voidprint)
if (histindex >= 0)
annotate_value_history_value ();
- print_formatted (val, format, fmt.size);
+ print_formatted (val, format, fmt.size, gdb_stdout);
printf_filtered ("\n");
if (histindex >= 0)
@@ -984,10 +985,13 @@ output_command (exp, from_tty)
annotate_value_begin (VALUE_TYPE (val));
- print_formatted (val, format, fmt.size);
+ print_formatted (val, format, fmt.size, gdb_stdout);
annotate_value_end ();
+ wrap_here ("");
+ gdb_flush (gdb_stdout);
+
do_cleanups (old_chain);
}
@@ -1578,7 +1582,7 @@ do_one_display (d)
annotate_display_expression ();
print_formatted (evaluate_expression (d->exp),
- d->format.format, d->format.size);
+ d->format.format, d->format.size, gdb_stdout);
printf_filtered ("\n");
}
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 4bd8fe9..83e58db 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -5672,7 +5672,7 @@ procfs_create_inferior (exec_file, allargs, env)
/* We are at the first instruction we care about. */
/* Pedal to the metal... */
- proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_0, 0);
+ proceed ((CORE_ADDR) -1, TARGET_SIGNAL_0, 0);
}
/* Clean up after the inferior dies. */
diff --git a/gdb/remote-rdi.c b/gdb/remote-rdi.c
index a9e9d9e..ef99608 100644
--- a/gdb/remote-rdi.c
+++ b/gdb/remote-rdi.c
@@ -248,6 +248,8 @@ device is attached to the remote system (e.g. /dev/ttya).");
else if (rslt)
{
printf_filtered ("RDI_open: %s\n", rdi_error_message (rslt));
+ Adp_CloseDevice ();
+ error("RID_open failed\n");
}
rslt = angel_RDI_info (RDIInfo_Target, &arg1, &arg2);
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index dc24f57..0c9d676 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -462,7 +462,7 @@ gdbsim_create_inferior (exec_file, args, env)
clear_proceed_status ();
/* NB: Entry point already set by sim_create_inferior. */
- proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_DEFAULT, 0);
+ proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
}
/* The open routine takes the rest of the parameters from the command,
diff --git a/gdb/remote-udi.c b/gdb/remote-udi.c
index eef0e1c..74bebda 100644
--- a/gdb/remote-udi.c
+++ b/gdb/remote-udi.c
@@ -1316,7 +1316,7 @@ udi_load (args, from_tty)
/* As a convenience, pick up any symbol info that is in the program
being loaded. Note that we assume that the program is the``mainline'';
if this is not always true, then this code will need to be augmented. */
- symbol_file_add (strtok (args, " \t"), from_tty, 0, 1, 0, 0, 0, 0);
+ symbol_file_add (strtok (args, " \t"), from_tty, NULL, 1, 0, 0, 0);
/* Getting new symbols may change our opinion about what is
frameless. */
diff --git a/gdb/remote-vx.c b/gdb/remote-vx.c
index 4d7c6c9..1ea0396 100644
--- a/gdb/remote-vx.c
+++ b/gdb/remote-vx.c
@@ -701,7 +701,7 @@ vx_add_symbols (name, from_tty, text_addr, data_addr, bss_addr)
/* It might be nice to suppress the breakpoint_re_set which happens here
because we are going to do one again after the objfile_relocate. */
- objfile = symbol_file_add (name, from_tty, 0, 0, 0, 0, 0, 0);
+ objfile = symbol_file_add (name, from_tty, NULL, 0, 0, 0, 0);
/* This is a (slightly cheesy) way of superceding the old symbols. A less
cheesy way would be to find the objfile with the same name and
diff --git a/gdb/remote.c b/gdb/remote.c
index aa36ec7..5f1a3ef 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -48,6 +48,7 @@
#include "event-loop.h"
#include "event-top.h"
+#include "inf-loop.h"
#include <signal.h>
#include "serial.h"
@@ -61,8 +62,6 @@ static void handle_remote_sigint_twice PARAMS ((int));
static void async_remote_interrupt PARAMS ((gdb_client_data));
static void async_remote_interrupt_twice PARAMS ((gdb_client_data));
-static void set_extended_protocol PARAMS ((struct continuation_arg *));
-
static void build_remote_gdbarch_data PARAMS ((void));
static int remote_write_bytes PARAMS ((CORE_ADDR memaddr,
@@ -1904,18 +1903,6 @@ serial device is attached to the remote system (e.g. /dev/ttya).");
putpkt ("!");
getpkt (buf, 0);
}
-
- /* If running in asynchronous mode, register the target with the
- event loop. Set things up so that when there is an event on the
- file descriptor, the event loop will call fetch_inferior_event,
- which will do the proper analysis to determine what happened. */
- /* FIXME: cagney/1999-09-26: We shouldn't just put the target into
- async mode. Instead we should leave the target synchronous and
- then leave it to the client to flip modes. */
- if (event_loop_p && target_can_async_p ())
- target_async (inferior_event_handler, 0);
- if (remote_debug && SERIAL_IS_ASYNC_P (remote_desc))
- fputs_unfiltered ("Serial put into async mode.\n", gdb_stdlog);
}
/* This takes a program previously attached to and detaches it. After
@@ -2059,14 +2046,6 @@ remote_async_resume (pid, step, siggnal)
if (target_resume_hook)
(*target_resume_hook) ();
- /* Tell the world that the target is now executing. */
- /* FIXME: cagney/1999-09-23: Is it the targets responsibility to set
- this? Instead, should the client of target just assume (for
- async targets) that the target is going to start executing? Is
- this information already found in the continuation block? */
- if (SERIAL_IS_ASYNC_P (remote_desc))
- target_executing = 1;
-
if (siggnal != TARGET_SIGNAL_0)
{
buf[0] = step ? 'S' : 'C';
@@ -2077,6 +2056,22 @@ remote_async_resume (pid, step, siggnal)
else
strcpy (buf, step ? "s" : "c");
+ /* We are about to start executing the inferior, let's register it
+ with the event loop. NOTE: this is the one place where all the
+ execution commands end up. We could alternatively do this in each
+ of the execution commands in infcmd.c.*/
+ /* FIXME: ezannoni 1999-09-28: We may need to move this out of here
+ into infcmd.c in order to allow inferior function calls to work
+ NOT asynchronously. */
+ if (event_loop_p && SERIAL_CAN_ASYNC_P (remote_desc))
+ target_async (inferior_event_handler, 0);
+ /* Tell the world that the target is now executing. */
+ /* FIXME: cagney/1999-09-23: Is it the targets responsibility to set
+ this? Instead, should the client of target just assume (for
+ async targets) that the target is going to start executing? Is
+ this information already found in the continuation block? */
+ if (SERIAL_IS_ASYNC_P (remote_desc))
+ target_executing = 1;
putpkt (buf);
}
@@ -3402,17 +3397,22 @@ readchar (timeout)
ch = SERIAL_READCHAR (remote_desc, timeout);
- switch (ch)
+ if (ch >= 0)
+ return (ch & 0x7f);
+
+ switch ((enum serial_rc) ch)
{
case SERIAL_EOF:
+ target_mourn_inferior ();
error ("Remote connection closed");
+ /* no return */
case SERIAL_ERROR:
perror_with_name ("Remote communication error");
+ /* no return */
case SERIAL_TIMEOUT:
- return ch;
- default:
- return ch & 0x7f;
+ break;
}
+ return ch;
}
/* Send the command in BUF to the remote machine, and read the reply
@@ -3723,8 +3723,9 @@ getpkt (buf, forever)
if (c == SERIAL_TIMEOUT)
{
- if (forever) /* Watchdog went off. Kill the target. */
+ if (forever) /* Watchdog went off? Kill the target. */
{
+ QUIT;
target_mourn_inferior ();
error ("Watchdog has expired. Target detached.\n");
}
@@ -3887,8 +3888,8 @@ extended_remote_async_create_inferior (exec_file, args, env)
/* If running asynchronously, register the target file descriptor
with the event loop. */
- if (event_loop_p && SERIAL_CAN_ASYNC_P (remote_desc))
- SERIAL_ASYNC (remote_desc, inferior_event_handler, 0);
+ if (event_loop_p && target_can_async_p ())
+ target_async (inferior_event_handler, 0);
/* Now restart the remote server. */
extended_remote_restart ();
@@ -5082,10 +5083,33 @@ remote_is_async_p (void)
return SERIAL_IS_ASYNC_P (remote_desc);
}
+/* Pass the SERIAL event on and up to the client. One day this code
+ will be able to delay notifying the client of an event until the
+ point where an entire packet has been received. */
+
+static void (*async_client_callback) (enum inferior_event_type event_type, void *context);
+static void *async_client_context;
+static serial_event_ftype remote_async_serial_handler;
+
static void
-remote_async (void (*callback) (int error, void *context, int fd), void *context)
+remote_async_serial_handler (serial_t scb, void *context)
{
- SERIAL_ASYNC (remote_desc, callback, context);
+ /* Don't propogate error information up to the client. Instead let
+ the client find out about the error by querying the target. */
+ async_client_callback (INF_REG_EVENT, async_client_context);
+}
+
+static void
+remote_async (void (*callback) (enum inferior_event_type event_type, void *context), void *context)
+{
+ if (callback != NULL)
+ {
+ SERIAL_ASYNC (remote_desc, remote_async_serial_handler, NULL);
+ async_client_callback = callback;
+ async_client_context = context;
+ }
+ else
+ SERIAL_ASYNC (remote_desc, NULL, NULL);
}
/* Target async and target extended-async.
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index 6554f69..fe44dda 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -365,7 +365,7 @@ objfile_symbol_add (arg)
{
struct objfile *obj = (struct objfile *) arg;
- syms_from_objfile (obj, 0, 0, 0);
+ syms_from_objfile (obj, NULL, 0, 0);
new_symfile_objfile (obj, 0, 0);
return 1;
}
@@ -814,9 +814,11 @@ find_toc_address (pc)
static struct core_fns rs6000_core_fns =
{
- bfd_target_coff_flavour,
- fetch_core_registers,
- NULL
+ bfd_target_coff_flavour, /* core_flavour */
+ default_check_format, /* check_format */
+ default_core_sniffer, /* core_sniffer */
+ fetch_core_registers, /* core_read_registers */
+ NULL /* next */
};
void
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 48db7d5..fa483b2 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -1828,9 +1828,10 @@ show_processor (char *arg, int from_tty)
{
show_current_variant ();
}
-
+
+
/* Initialization code. */
void
diff --git a/gdb/ser-pipe.c b/gdb/ser-pipe.c
index efbc241..6a8a97e 100644
--- a/gdb/ser-pipe.c
+++ b/gdb/ser-pipe.c
@@ -49,7 +49,7 @@ struct pipe_state
static int
pipe_open (serial_t scb, const char *name)
{
-#if !defined(O_NONBLOCK) || !defined(F_GETFL) || !defined(F_SETFL) || !HAVE_SOCKETPAIR
+#if !HAVE_SOCKETPAIR
return -1;
#else
struct pipe_state *state;
@@ -106,17 +106,6 @@ pipe_open (serial_t scb, const char *name)
scb->fd = pdes[0];
scb->state = state;
- /* Make it non-blocking */
- {
- int flags = fcntl (scb->fd, F_GETFL, 0);
- if (fcntl (scb->fd, F_SETFL, flags | O_NONBLOCK) < 0)
- {
- perror ("ser-pipe");
- pipe_close (scb);
- return -1;
- }
- }
-
/* If we don't do this, GDB simply exits when the remote side dies. */
signal (SIGPIPE, SIG_IGN);
return 0;
@@ -153,7 +142,7 @@ _initialize_ser_pipe (void)
ops->readchar = ser_unix_readchar;
ops->write = ser_unix_write;
ops->flush_output = ser_unix_nop_flush_output;
- ops->flush_input = ser_unix_nop_flush_input;
+ ops->flush_input = ser_unix_flush_input;
ops->send_break = ser_unix_nop_send_break;
ops->go_raw = ser_unix_nop_raw;
ops->get_tty_state = ser_unix_nop_get_tty_state;
diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c
index 01e8ca0..86baf34 100644
--- a/gdb/ser-tcp.c
+++ b/gdb/ser-tcp.c
@@ -144,7 +144,7 @@ _initialize_ser_tcp (void)
ops->readchar = ser_unix_readchar;
ops->write = ser_unix_write;
ops->flush_output = ser_unix_nop_flush_output;
- ops->flush_input = ser_unix_nop_flush_input;
+ ops->flush_input = ser_unix_flush_input;
ops->send_break = ser_unix_nop_send_break;
ops->go_raw = ser_unix_nop_raw;
ops->get_tty_state = ser_unix_nop_get_tty_state;
diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c
index 7c268a9..c54d917 100644
--- a/gdb/ser-unix.c
+++ b/gdb/ser-unix.c
@@ -34,7 +34,6 @@
#include "gdb_string.h"
#include "event-loop.h"
-
#ifdef HAVE_TERMIOS
struct hardwire_ttystate
@@ -71,9 +70,10 @@ static int hardwire_open (serial_t scb, const char *name);
static void hardwire_raw (serial_t scb);
static int wait_for (serial_t scb, int timeout);
static int hardwire_readchar (serial_t scb, int timeout);
+static int do_hardwire_readchar (serial_t scb, int timeout);
+static int generic_readchar (serial_t scb, int timeout, int (*do_readchar) (serial_t scb, int timeout));
static int rate_to_code (int rate);
static int hardwire_setbaudrate (serial_t scb, int rate);
-static int hardwire_write (serial_t scb, const char *str, int len);
static void hardwire_close (serial_t scb);
static int get_tty_state (serial_t scb, struct hardwire_ttystate * state);
static int set_tty_state (serial_t scb, struct hardwire_ttystate * state);
@@ -88,6 +88,11 @@ static int hardwire_flush_input (serial_t);
static int hardwire_send_break (serial_t);
static int hardwire_setstopbits (serial_t, int);
+static int do_unix_readchar (serial_t scb, int timeout);
+static timer_handler_func push_event;
+static handler_func fd_event;
+static void reschedule (serial_t scb);
+
void _initialize_ser_hardwire (void);
extern int (*ui_loop_hook) (int);
@@ -230,9 +235,11 @@ hardwire_print_tty_state (serial_t scb,
#ifdef HAVE_TERMIOS
fprintf_filtered (stream, "c_iflag = 0x%x, c_oflag = 0x%x,\n",
- state->termios.c_iflag, state->termios.c_oflag);
+ (int) state->termios.c_iflag,
+ (int) state->termios.c_oflag);
fprintf_filtered (stream, "c_cflag = 0x%x, c_lflag = 0x%x\n",
- state->termios.c_cflag, state->termios.c_lflag);
+ (int) state->termios.c_cflag,
+ (int) state->termios.c_lflag);
#if 0
/* This not in POSIX, and is not really documented by those systems
which have it (at least not Sun). */
@@ -325,8 +332,7 @@ hardwire_flush_output (serial_t scb)
static int
hardwire_flush_input (serial_t scb)
{
- scb->bufcnt = 0;
- scb->bufp = scb->buf;
+ ser_unix_flush_input (scb);
#ifdef HAVE_TERMIOS
return tcflush (scb->fd, TCIFLUSH);
@@ -418,9 +424,14 @@ hardwire_raw (serial_t scb)
timeout occur in the read() in hardwire_read().
*/
-/* FIXME: Don't replace this with the equivalent ser_unix*() until the
- old TERMIOS/SGTTY/... timer code has been flushed. cagney
- 1999-09-16. */
+/* FIXME: cagney/1999-09-16: Don't replace this with the equivalent
+ ser_unix*() until the old TERMIOS/SGTTY/... timer code has been
+ flushed. . */
+
+/* NOTE: cagney/1999-09-30: Much of the code below is dead. The only
+ possible values of the TIMEOUT parameter are ONE and ZERO.
+ Consequently all the code that tries to handle the possability of
+ an overflowed timer is unnecessary. */
static int
wait_for (serial_t scb, int timeout)
@@ -544,14 +555,11 @@ wait_for (serial_t scb, int timeout)
that. */
static int
-hardwire_readchar (serial_t scb, int timeout)
+do_hardwire_readchar (serial_t scb, int timeout)
{
int status, delta;
int detach = 0;
- if (scb->bufcnt-- > 0)
- return *scb->bufp++;
-
if (timeout > 0)
timeout++;
@@ -583,15 +591,11 @@ hardwire_readchar (serial_t scb, int timeout)
if (status < 0)
return status;
- /* NOTE: cagney/1999-09-17: See ser_unix_readchar() for reason
- why ASYNC reads are character by character. */
-
- scb->bufcnt = read (scb->fd, scb->buf,
- (SERIAL_IS_ASYNC_P (scb) ? 1 : BUFSIZ));
+ status = read (scb->fd, scb->buf, BUFSIZ);
- if (scb->bufcnt <= 0)
+ if (status <= 0)
{
- if (scb->bufcnt == 0)
+ if (status == 0)
{
/* Zero characters means timeout (it could also be EOF, but
we don't (yet at least) distinguish). */
@@ -611,12 +615,20 @@ hardwire_readchar (serial_t scb, int timeout)
return SERIAL_ERROR; /* Got an error from read */
}
+ scb->bufcnt = status;
scb->bufcnt--;
scb->bufp = scb->buf;
return *scb->bufp++;
}
}
+static int
+hardwire_readchar (serial_t scb, int timeout)
+{
+ return generic_readchar (scb, timeout, do_hardwire_readchar);
+}
+
+
#ifndef B19200
#define B19200 EXTA
#endif
@@ -812,28 +824,6 @@ hardwire_setstopbits (scb, num)
return set_tty_state (scb, &state);
}
-/* FIXME: Don't replace this with the equivalent ser_unix*() until the
- old TERMIOS/SGTTY/... timer code has been flushed. cagney
- 1999-09-16. */
-
-static int
-hardwire_write (serial_t scb, const char *str, int len)
-{
- int cc;
-
- while (len > 0)
- {
- cc = write (scb->fd, str, len);
-
- if (cc < 0)
- return 1;
- len -= cc;
- str += cc;
- }
- return 0;
-}
-
-
static void
hardwire_close (serial_t scb)
{
@@ -911,15 +901,12 @@ ser_unix_wait_for (serial_t scb, int timeout)
char if successful. Returns -2 if timeout expired, EOF if line dropped
dead, or -3 for any other error (see errno in that case). */
-int
-ser_unix_readchar (serial_t scb, int timeout)
+static int
+do_unix_readchar (serial_t scb, int timeout)
{
int status;
int delta;
- if (scb->bufcnt-- > 0)
- return *scb->bufp++;
-
/* We have to be able to keep the GUI alive here, so we break the original
timeout into steps of 1 second, running the "keep the GUI alive" hook
each time through the loop.
@@ -969,20 +956,14 @@ ser_unix_readchar (serial_t scb, int timeout)
while (1)
{
- /* FIXME: cagney/1999-09-17: ASYNC: The ASYNC serial code needs
- to be modified so that it agressivly tries to drain its local
- input buffer. Until this is done, the read() below can only
- take in single characters. This is to ensure that
- unprocessed data doesn't end up sitting in the input fifo. */
- scb->bufcnt = read (scb->fd, scb->buf,
- (SERIAL_IS_ASYNC_P (scb) ? 1 : BUFSIZ));
- if (scb->bufcnt != -1 || errno != EINTR)
+ status = read (scb->fd, scb->buf, BUFSIZ);
+ if (status != -1 || errno != EINTR)
break;
}
- if (scb->bufcnt <= 0)
+ if (status <= 0)
{
- if (scb->bufcnt == 0)
+ if (status == 0)
return SERIAL_TIMEOUT; /* 0 chars means timeout [may need to
distinguish between EOF & timeouts
someday] */
@@ -990,11 +971,70 @@ ser_unix_readchar (serial_t scb, int timeout)
return SERIAL_ERROR; /* Got an error from read */
}
+ scb->bufcnt = status;
scb->bufcnt--;
scb->bufp = scb->buf;
return *scb->bufp++;
}
+/* Perform operations common to both old and new readchar. */
+
+/* Return the next character from the input FIFO. If the FIFO is
+ empty, call the SERIAL specific routine to try and read in more
+ characters.
+
+ Initially data from the input FIFO is returned (fd_event()
+ pre-reads the input into that FIFO. Once that has been emptied,
+ further data is obtained by polling the input FD using the device
+ specific readchar() function. Note: reschedule() is called after
+ every read. This is because there is no guarentee that the lower
+ level fd_event() poll_event() code (which also calls reschedule())
+ will be called. */
+
+static int
+generic_readchar (serial_t scb, int timeout,
+ int (do_readchar) (serial_t scb, int timeout))
+{
+ int ch;
+ if (scb->bufcnt > 0)
+ {
+ ch = *scb->bufp;
+ scb->bufcnt--;
+ scb->bufp++;
+ }
+ else if (scb->bufcnt < 0)
+ {
+ /* Some errors/eof are are sticky. */
+ ch = scb->bufcnt;
+ }
+ else
+ {
+ ch = do_readchar (scb, timeout);
+ if (ch < 0)
+ {
+ switch ((enum serial_rc) ch)
+ {
+ case SERIAL_EOF:
+ case SERIAL_ERROR:
+ /* Make the error/eof stick. */
+ scb->bufcnt = ch;
+ break;
+ case SERIAL_TIMEOUT:
+ scb->bufcnt = 0;
+ break;
+ }
+ }
+ }
+ reschedule (scb);
+ return ch;
+}
+
+int
+ser_unix_readchar (serial_t scb, int timeout)
+{
+ return generic_readchar (scb, timeout, do_unix_readchar);
+}
+
int
ser_unix_nop_noflush_set_tty_state (serial_t scb,
serial_ttystate new_ttystate,
@@ -1048,9 +1088,16 @@ ser_unix_nop_flush_output (serial_t scb)
}
int
-ser_unix_nop_flush_input (serial_t scb)
+ser_unix_flush_input (serial_t scb)
{
- return 0;
+ if (scb->bufcnt >= 0)
+ {
+ scb->bufcnt = 0;
+ scb->bufp = scb->buf;
+ return 0;
+ }
+ else
+ return SERIAL_ERROR;
}
int
@@ -1065,24 +1112,186 @@ ser_unix_nop_drain_output (serial_t scb)
return 0;
}
+
+
+/* Event handling for ASYNC serial code.
+
+ At any time the SERIAL device either: has an empty FIFO and is
+ waiting on a FD event; or has a non-empty FIFO/error condition and
+ is constantly scheduling timer events.
+
+ ASYNC only stops pestering its client when it is de-async'ed or it
+ is told to go away. */
+
+/* Value of scb->async_state: */
+enum {
+ /* >= 0 (TIMER_SCHEDULED) */
+ /* The ID of the currently scheduled timer event. This state is
+ rarely encountered. Timer events are one-off so as soon as the
+ event is delivered the state is shanged to NOTHING_SCHEDULED. */
+ FD_SCHEDULED = -1,
+ /* The fd_event() handler is scheduled. It is called when ever the
+ file descriptor becomes ready. */
+ NOTHING_SCHEDULED = -2
+ /* Either no task is scheduled (just going into ASYNC mode) or a
+ timer event has just gone off and the current state has been
+ forced into nothing scheduled. */
+};
+
+/* Identify and schedule the next ASYNC task based on scb->async_state
+ and scb->buf* (the input FIFO). A state machine is used to avoid
+ the need to make redundant calls into the event-loop - the next
+ scheduled task is only changed when needed. */
+
static void
-ser_unix_event (int error, int fd, gdb_client_data context)
+reschedule (serial_t scb)
+{
+ if (SERIAL_IS_ASYNC_P (scb))
+ {
+ int next_state;
+ switch (scb->async_state)
+ {
+ case FD_SCHEDULED:
+ if (scb->bufcnt == 0)
+ next_state = FD_SCHEDULED;
+ else
+ {
+ delete_file_handler (scb->fd);
+ next_state = create_timer (0, push_event, scb);
+ }
+ break;
+ case NOTHING_SCHEDULED:
+ if (scb->bufcnt == 0)
+ {
+ add_file_handler (scb->fd, fd_event, scb);
+ next_state = FD_SCHEDULED;
+ }
+ else
+ {
+ next_state = create_timer (0, push_event, scb);
+ }
+ break;
+ default: /* TIMER SCHEDULED */
+ if (scb->bufcnt == 0)
+ {
+ delete_timer (scb->async_state);
+ add_file_handler (scb->fd, fd_event, scb);
+ next_state = FD_SCHEDULED;
+ }
+ else
+ next_state = scb->async_state;
+ break;
+ }
+ if (SERIAL_DEBUG_P (scb))
+ {
+ switch (next_state)
+ {
+ case FD_SCHEDULED:
+ if (scb->async_state != FD_SCHEDULED)
+ fprintf_unfiltered (gdb_stdlog, "[fd%d->fd-scheduled]\n",
+ scb->fd);
+ break;
+ default: /* TIMER SCHEDULED */
+ if (scb->async_state == FD_SCHEDULED)
+ fprintf_unfiltered (gdb_stdlog, "[fd%d->timer-scheduled]\n",
+ scb->fd);
+ break;
+ }
+ }
+ scb->async_state = next_state;
+ }
+}
+
+/* FD_EVENT: This is scheduled when the input FIFO is empty (and there
+ is no pending error). As soon as data arrives, it is read into the
+ input FIFO and the client notified. The client should then drain
+ the FIFO using readchar(). If the FIFO isn't immediatly emptied,
+ push_event() is used to nag the client until it is. */
+
+static void
+fd_event (int error, void *context)
+{
+ serial_t scb = context;
+ if (error != 0)
+ {
+ scb->bufcnt = SERIAL_ERROR;
+ }
+ else if (scb->bufcnt == 0)
+ {
+ /* Prime the input FIFO. The readchar() function is used to
+ pull characters out of the buffer. See also
+ generic_readchar(). */
+ int nr;
+ do
+ {
+ nr = read (scb->fd, scb->buf, BUFSIZ);
+ }
+ while (nr == -1 && errno == EINTR);
+ if (nr == 0)
+ {
+ scb->bufcnt = SERIAL_EOF;
+ }
+ else if (nr > 0)
+ {
+ scb->bufcnt = nr;
+ scb->bufp = scb->buf;
+ }
+ else
+ {
+ scb->bufcnt = SERIAL_ERROR;
+ }
+ }
+ scb->async_handler (scb, scb->async_context);
+ reschedule (scb);
+}
+
+/* PUSH_EVENT: The input FIFO is non-empty (or there is a pending
+ error). Nag the client until all the data has been read. In the
+ case of errors, the client will need to close or de-async the
+ device before naging stops. */
+
+static void
+push_event (void *context)
{
serial_t scb = context;
- scb->async_handler (error, scb->async_context, fd);
+ scb->async_state = NOTHING_SCHEDULED; /* Timers are one-off */
+ scb->async_handler (scb, scb->async_context);
+ /* re-schedule */
+ reschedule (scb);
}
+/* Put the SERIAL device into/out-of ASYNC mode. */
+
void
ser_unix_async (serial_t scb,
int async_p)
{
if (async_p)
{
- add_file_handler (scb->fd, ser_unix_event, scb);
+ /* Force a re-schedule. */
+ scb->async_state = NOTHING_SCHEDULED;
+ if (SERIAL_DEBUG_P (scb))
+ fprintf_unfiltered (gdb_stdlog, "[fd%d->asynchronous]\n",
+ scb->fd);
+ reschedule (scb);
}
else
{
- delete_file_handler (scb->fd);
+ if (SERIAL_DEBUG_P (scb))
+ fprintf_unfiltered (gdb_stdlog, "[fd%d->synchronous]\n",
+ scb->fd);
+ /* De-schedule what ever tasks are currently scheduled. */
+ switch (scb->async_state)
+ {
+ case FD_SCHEDULED:
+ delete_file_handler (scb->fd);
+ break;
+ NOTHING_SCHEDULED:
+ break;
+ default: /* TIMER SCHEDULED */
+ delete_timer (scb->async_state);
+ break;
+ }
}
}
@@ -1099,10 +1308,7 @@ _initialize_ser_hardwire (void)
the old TERMIOS/SGTTY/... timer code has been flushed. cagney
1999-09-16. */
ops->readchar = hardwire_readchar;
- /* FIXME: Don't replace this with the equivalent ser_unix*() until
- the old TERMIOS/SGTTY/... timer code has been flushed. cagney
- 1999-09-16. */
- ops->write = hardwire_write;
+ ops->write = ser_unix_write;
ops->flush_output = hardwire_flush_output;
ops->flush_input = hardwire_flush_input;
ops->send_break = hardwire_send_break;
diff --git a/gdb/ser-unix.h b/gdb/ser-unix.h
index 83656ea..d7e94aa 100644
--- a/gdb/ser-unix.h
+++ b/gdb/ser-unix.h
@@ -27,7 +27,7 @@
/* Generic UNIX/FD functions */
extern int ser_unix_nop_flush_output (serial_t scb);
-extern int ser_unix_nop_flush_input (serial_t scb);
+extern int ser_unix_flush_input (serial_t scb);
extern int ser_unix_nop_send_break (serial_t scb);
extern void ser_unix_nop_raw (serial_t scb);
extern serial_ttystate ser_unix_nop_get_tty_state (serial_t scb);
diff --git a/gdb/serial.c b/gdb/serial.c
index 3853014..99c5a54 100644
--- a/gdb/serial.c
+++ b/gdb/serial.c
@@ -26,6 +26,10 @@
extern void _initialize_serial (void);
+/* Is serial being debugged? */
+
+static int global_serial_debug_p;
+
/* Linked list of serial I/O handlers */
static struct serial_ops *serial_ops_list = NULL;
@@ -45,7 +49,7 @@ static char *serial_logfile = NULL;
static GDB_FILE *serial_logfp = NULL;
static struct serial_ops *serial_interface_lookup (char *);
-static void serial_logchar (int, int, int);
+static void serial_logchar (struct gdb_file *stream, int ch_type, int ch, int timeout);
static char logbase_hex[] = "hex";
static char logbase_octal[] = "octal";
static char logbase_ascii[] = "ascii";
@@ -64,62 +68,62 @@ static int serial_current_type = 0;
#define SERIAL_BREAK 1235
static void
-serial_logchar (int ch_type, int ch, int timeout)
+serial_logchar (struct gdb_file *stream, int ch_type, int ch, int timeout)
{
if (ch_type != serial_current_type)
{
- fprintf_unfiltered (serial_logfp, "\n%c ", ch_type);
+ fprintf_unfiltered (stream, "\n%c ", ch_type);
serial_current_type = ch_type;
}
if (serial_logbase != logbase_ascii)
- fputc_unfiltered (' ', serial_logfp);
+ fputc_unfiltered (' ', stream);
switch (ch)
{
case SERIAL_TIMEOUT:
- fprintf_unfiltered (serial_logfp, "<Timeout: %d seconds>", timeout);
+ fprintf_unfiltered (stream, "<Timeout: %d seconds>", timeout);
return;
case SERIAL_ERROR:
- fprintf_unfiltered (serial_logfp, "<Error: %s>", safe_strerror (errno));
+ fprintf_unfiltered (stream, "<Error: %s>", safe_strerror (errno));
return;
case SERIAL_EOF:
- fputs_unfiltered ("<Eof>", serial_logfp);
+ fputs_unfiltered ("<Eof>", stream);
return;
case SERIAL_BREAK:
- fputs_unfiltered ("<Break>", serial_logfp);
+ fputs_unfiltered ("<Break>", stream);
return;
default:
if (serial_logbase == logbase_hex)
- fprintf_unfiltered (serial_logfp, "%02x", ch & 0xff);
+ fprintf_unfiltered (stream, "%02x", ch & 0xff);
else if (serial_logbase == logbase_octal)
- fprintf_unfiltered (serial_logfp, "%03o", ch & 0xff);
+ fprintf_unfiltered (stream, "%03o", ch & 0xff);
else
switch (ch)
{
case '\\':
- fputs_unfiltered ("\\\\", serial_logfp);
+ fputs_unfiltered ("\\\\", stream);
break;
case '\b':
- fputs_unfiltered ("\\b", serial_logfp);
+ fputs_unfiltered ("\\b", stream);
break;
case '\f':
- fputs_unfiltered ("\\f", serial_logfp);
+ fputs_unfiltered ("\\f", stream);
break;
case '\n':
- fputs_unfiltered ("\\n", serial_logfp);
+ fputs_unfiltered ("\\n", stream);
break;
case '\r':
- fputs_unfiltered ("\\r", serial_logfp);
+ fputs_unfiltered ("\\r", stream);
break;
case '\t':
- fputs_unfiltered ("\\t", serial_logfp);
+ fputs_unfiltered ("\\t", stream);
break;
case '\v':
- fputs_unfiltered ("\\v", serial_logfp);
+ fputs_unfiltered ("\\v", stream);
break;
default:
- fprintf_unfiltered (serial_logfp, isprint (ch) ? "%c" : "\\x%02x", ch & 0xFF);
+ fprintf_unfiltered (stream, isprint (ch) ? "%c" : "\\x%02x", ch & 0xFF);
break;
}
}
@@ -212,6 +216,8 @@ serial_open (const char *name)
scb->name = strsave (name);
scb->next = scb_base;
scb->refcnt = 1;
+ scb->debug_p = 0;
+ scb->async_state = 0;
scb->async_handler = NULL;
scb->async_context = NULL;
scb_base = scb;
@@ -258,6 +264,8 @@ serial_fdopen (const int fd)
scb->name = NULL;
scb->next = scb_base;
scb->refcnt = 1;
+ scb->debug_p = 0;
+ scb->async_state = 0;
scb->async_handler = NULL;
scb->async_context = NULL;
scb_base = scb;
@@ -339,12 +347,19 @@ serial_readchar (serial_t scb, int timeout)
ch = scb->ops->readchar (scb, timeout);
if (serial_logfp != NULL)
{
- serial_logchar ('r', ch, timeout);
+ serial_logchar (serial_logfp, 'r', ch, timeout);
/* Make sure that the log file is as up-to-date as possible,
in case we are getting ready to dump core or something. */
gdb_flush (serial_logfp);
}
+ if (SERIAL_DEBUG_P (scb))
+ {
+ fprintf_unfiltered (gdb_stdlog, "[");
+ serial_logchar (gdb_stdlog, 'r', ch, timeout);
+ fprintf_unfiltered (gdb_stdlog, "]");
+ gdb_flush (gdb_stdlog);
+ }
return (ch);
}
@@ -357,7 +372,7 @@ serial_write (serial_t scb, const char *str, int len)
int count;
for (count = 0; count < len; count++)
- serial_logchar ('w', str[count] & 0xff, 0);
+ serial_logchar (serial_logfp, 'w', str[count] & 0xff, 0);
/* Make sure that the log file is as up-to-date as possible,
in case we are getting ready to dump core or something. */
@@ -403,7 +418,7 @@ int
serial_send_break (serial_t scb)
{
if (serial_logfp != NULL)
- serial_logchar ('w', SERIAL_BREAK, 0);
+ serial_logchar (serial_logfp, 'w', SERIAL_BREAK, 0);
return (scb->ops->send_break (scb));
}
@@ -491,6 +506,19 @@ deprecated_serial_fd (serial_t scb)
return scb->fd; /* sigh */
}
+void
+serial_debug (serial_t scb, int debug_p)
+{
+ scb->debug_p = debug_p;
+}
+
+int
+serial_debug_p (serial_t scb)
+{
+ return scb->debug_p || global_serial_debug_p;
+}
+
+
#if 0
/*
The connect command is #if 0 because I hadn't thought of an elegant
@@ -638,4 +666,12 @@ by gdbserver.",
"Set numerical base for remote session logging",
&setlist),
&showlist);
+
+ add_show_from_set (add_set_cmd ("serialdebug",
+ class_maintenance,
+ var_zinteger,
+ (char *)&global_serial_debug_p,
+ "Set serial debugging.\n\
+When non-zero, serial port debugging is enabled.", &setlist),
+ &showlist);
}
diff --git a/gdb/serial.h b/gdb/serial.h
index e3a1bf2..11554d7 100644
--- a/gdb/serial.h
+++ b/gdb/serial.h
@@ -55,12 +55,17 @@ extern void serial_un_fdopen (serial_t scb);
/* Read one char from the serial device with TIMEOUT seconds to wait
or -1 to wait forever. Use timeout of 0 to effect a poll. Returns
- char if ok, else one of the following codes. Note that all error
- codes are guaranteed to be < 0. */
-
-#define SERIAL_ERROR -1 /* General error, see errno for details */
-#define SERIAL_TIMEOUT -2
-#define SERIAL_EOF -3
+ unsigned char if ok, else one of the following codes. Note that
+ all error return-codes are guaranteed to be < 0. */
+
+enum serial_rc {
+ SERIAL_ERROR = -1, /* General error. */
+ SERIAL_TIMEOUT = -2, /* Timeout during read. ui_loop_hook() can,
+ unfortunatly, force this to be returned. */
+ SERIAL_EOF = -3 /* General end-of-file or remote target
+ connection closed, indication. Includes
+ things like the line dropping dead. */
+};
extern int serial_readchar (serial_t scb, int timeout);
#define SERIAL_READCHAR(SERIAL_T, TIMEOUT) serial_readchar ((SERIAL_T), (TIMEOUT))
@@ -165,7 +170,7 @@ extern int serial_is_async_p (serial_t scb);
asynchronous mode. To disable asynchronous mode, register a NULL
callback. */
-typedef void (serial_event_ftype) (int error, void *context, int fd);
+typedef void (serial_event_ftype) (serial_t scb, void *context);
extern void serial_async (serial_t scb, serial_event_ftype *handler, void *context);
#define SERIAL_ASYNC(SERIAL_T, HANDLER, CONTEXT) serial_async ((SERIAL_T), (HANDLER), (CONTEXT))
@@ -177,6 +182,17 @@ extern void serial_async (serial_t scb, serial_event_ftype *handler, void *conte
extern int deprecated_serial_fd (serial_t scb);
#define DEPRECATED_SERIAL_FD(SERIAL_T) deprecated_serial_fd ((SERIAL_T))
+/* Trace/debug mechanism.
+
+ SERIAL_DEBUG() enables/disables internal debugging.
+ SERIAL_DEBUG_P() indicates the current debug state. */
+
+extern void serial_debug (serial_t scb, int debug_p);
+#define SERIAL_DEBUG(SERIAL_T, DEBUG_P) serial_debug ((SERIAL_T), (DEBUG_P))
+
+extern int serial_debug_p (serial_t scb);
+#define SERIAL_DEBUG_P(SERIAL_T) serial_debug_p ((SERIAL_T))
+
/* Details of an instance of a serial object */
@@ -186,16 +202,20 @@ struct _serial_t
struct serial_ops *ops; /* Function vector */
void *state; /* Local context info for open FD */
serial_ttystate ttystate; /* Not used (yet) */
- int bufcnt; /* Amount of data in receive buffer */
+ int bufcnt; /* Amount of data remaining in receive
+ buffer. -ve for sticky errors. */
unsigned char *bufp; /* Current byte */
unsigned char buf[BUFSIZ]; /* Da buffer itself */
- int current_timeout; /* (termio{s} only), last value of VTIME */
- /* ser-unix.c termio{,s} only, we still need to wait for this many more
- seconds. */
- int timeout_remaining;
+ int current_timeout; /* (ser-unix.c termio{,s} only), last
+ value of VTIME */
+ int timeout_remaining; /* (ser-unix.c termio{,s} only), we
+ still need to wait for this many
+ more seconds. */
char *name; /* The name of the device or host */
struct _serial_t *next; /* Pointer to the next serial_t */
int refcnt; /* Number of pointers to this block */
+ int debug_p; /* Trace this serial devices operation. */
+ int async_state; /* Async internal state. */
void *async_context; /* Async event thread's context */
serial_event_ftype *async_handler;/* Async event handler */
};
diff --git a/gdb/sh-stub.c b/gdb/sh-stub.c
index 4eedbc1..ea897c4 100644
--- a/gdb/sh-stub.c
+++ b/gdb/sh-stub.c
@@ -706,7 +706,7 @@ gdb_handle_exception (int exceptionVector)
mem2hex ((char *) registers, remcomOutBuffer, NUMREGBYTES);
break;
case 'G': /* set the value of the CPU registers - return OK */
- hex2mem (&ptr, (char *) registers, NUMREGBYTES);
+ hex2mem (ptr, (char *) registers, NUMREGBYTES);
strcpy (remcomOutBuffer, "OK");
break;
diff --git a/gdb/solib.c b/gdb/solib.c
index d719837..e46e63c 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -1083,7 +1083,9 @@ symbol_add_stub (arg)
{
register struct so_list *so = (struct so_list *) arg; /* catch_errs bogon */
CORE_ADDR text_addr = 0;
+ struct section_addr_info section_addrs;
+ memset (&section_addrs, 0, sizeof (section_addrs));
if (so->textsection)
text_addr = so->textsection->addr;
else if (so->abfd != NULL)
@@ -1107,10 +1109,11 @@ symbol_add_stub (arg)
if (strcmp (so->objfile->name, so->so_name) == 0)
return 1;
}
+ section_addrs.text_addr = text_addr;
so->objfile =
symbol_file_add (so->so_name, so->from_tty,
- text_addr,
- 0, 0, 0, 0, 1);
+ &section_addrs,
+ 0, 0, 0, 1);
return (1);
}
diff --git a/gdb/somread.c b/gdb/somread.c
index cb1c850..489a330 100644
--- a/gdb/somread.c
+++ b/gdb/somread.c
@@ -53,7 +53,7 @@ som_symtab_read PARAMS ((bfd *, struct objfile *,
struct section_offsets *));
static void
-som_symfile_offsets PARAMS ((struct objfile *, CORE_ADDR));
+som_symfile_offsets PARAMS ((struct objfile *, struct section_addr_info *));
/* FIXME: These should really be in a common header somewhere */
@@ -460,9 +460,9 @@ som_symfile_init (objfile)
Plain and simple for now. */
static void
-som_symfile_offsets (objfile, addr)
+som_symfile_offsets (objfile, addrs)
struct objfile *objfile;
- CORE_ADDR addr;
+ struct section_addr_info *addrs;
{
int i;
@@ -471,11 +471,11 @@ som_symfile_offsets (objfile, addr)
obstack_alloc (&objfile->psymbol_obstack, SIZEOF_SECTION_OFFSETS);
/* First see if we're a shared library. If so, get the section
- offsets from the library, else get them from addr. */
+ offsets from the library, else get them from addrs. */
if (!som_solib_section_offsets (objfile, objfile->section_offsets))
{
for (i = 0; i < SECT_OFF_MAX; i++)
- ANOFFSET (objfile->section_offsets, i) = addr;
+ ANOFFSET (objfile->section_offsets, i) = addrs -> text_addr;
}
}
diff --git a/gdb/somsolib.c b/gdb/somsolib.c
index 65793bd..eb0cf06 100644
--- a/gdb/somsolib.c
+++ b/gdb/somsolib.c
@@ -287,8 +287,11 @@ som_solib_add_solib_objfile (so, name, from_tty, text_addr)
CORE_ADDR text_addr;
{
obj_private_data_t *obj_private;
+ struct section_addr_info section_addrs;
- so->objfile = symbol_file_add (name, from_tty, text_addr, 0, 0, 0, 0, 1);
+ memset (&section_addrs, 0, sizeof (section_addrs));
+ section_addrs.text_addr = text_addr;
+ so->objfile = symbol_file_add (name, from_tty, &section_addrs, 0, 0, 0, 1);
so->abfd = so->objfile->obfd;
/* Mark this as a shared library and save private data.
diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c
index be5308b..fc7f6d4 100644
--- a/gdb/sparc-nat.c
+++ b/gdb/sparc-nat.c
@@ -325,9 +325,11 @@ kernel_u_size ()
static struct core_fns sparc_core_fns =
{
- bfd_target_unknown_flavour,
- fetch_core_registers,
- NULL
+ bfd_target_unknown_flavour, /* core_flavour */
+ default_check_format, /* check_format */
+ default_core_sniffer, /* core_sniffer */
+ fetch_core_registers, /* core_read_registers */
+ NULL /* next */
};
void
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 04e3d4d..ed6245c 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -2143,4 +2143,6 @@ sparc64_extract_return_value (type, regbuf, valbuf, bitoffset)
}
}
}
+
+
#endif
diff --git a/gdb/sun3-nat.c b/gdb/sun3-nat.c
index ed70665..1e878ca 100644
--- a/gdb/sun3-nat.c
+++ b/gdb/sun3-nat.c
@@ -146,9 +146,11 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
static struct core_fns sun3_core_fns =
{
- bfd_target_unknown_flavour,
- fetch_core_registers,
- NULL
+ bfd_target_unknown_flavour, /* core_flavour */
+ default_check_format, /* check_format */
+ default_core_sniffer, /* core_sniffer */
+ fetch_core_registers, /* core_read_registers */
+ NULL /* next */
};
void
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 642501f..40105b4 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -80,6 +80,11 @@ struct complaint empty_symtab_complaint =
"Empty symbol table found for `%s'", 0, 0
};
+struct complaint unknown_option_complaint =
+{
+ "Unknown option `%s' ignored", 0, 0
+};
+
/* External variables and functions referenced. */
extern int info_verbose;
@@ -458,9 +463,9 @@ find_lowest_section (abfd, sect, obj)
for the objectfile OBJFILE and stuffs ADDR into all of the offsets. */
void
-default_symfile_offsets (objfile, addr)
+default_symfile_offsets (objfile, addrs)
struct objfile *objfile;
- CORE_ADDR addr;
+ struct section_addr_info *addrs;
{
int i;
@@ -469,8 +474,34 @@ default_symfile_offsets (objfile, addr)
obstack_alloc (&objfile->psymbol_obstack, SIZEOF_SECTION_OFFSETS);
memset (objfile->section_offsets, 0, SIZEOF_SECTION_OFFSETS);
- for (i = 0; i < SECT_OFF_MAX; i++)
- ANOFFSET (objfile->section_offsets, i) = addr;
+ /* If user explicitly specified values for data and bss, set them here. */
+
+ if (addrs->text_addr)
+ ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT) = addrs->text_addr;
+ if (addrs->data_addr)
+ ANOFFSET (objfile->section_offsets, SECT_OFF_DATA) = addrs->data_addr;
+ if (addrs->bss_addr)
+ ANOFFSET (objfile->section_offsets, SECT_OFF_BSS) = addrs->bss_addr;
+
+ /* Now calculate offsets for other sections. */
+ for (i = 0; i < MAX_SECTIONS && addrs->other[i].name; i++)
+ {
+ struct other_sections *osp ;
+
+ osp = &addrs->other[i] ;
+ if (addrs->other[i].addr == 0)
+ continue;
+#if 0
+ if (strcmp (".text", osp->name) == 0)
+ SECT_OFF_TEXT = osp->sectindex ;
+ else if (strcmp (".data", osp->name) == 0)
+ SECT_OFF_DATA = osp->sectindex ;
+ else if (strcmp (".bss", osp->name) == 0)
+ SECT_OFF_BSS = osp->sectindex ;
+#endif
+ /* Record all sections in offsets */
+ ANOFFSET (objfile->section_offsets, osp->sectindex) = osp->addr;
+ }
}
@@ -489,15 +520,29 @@ default_symfile_offsets (objfile, addr)
the symbol reading (and complaints can be more terse about it). */
void
-syms_from_objfile (objfile, addr, mainline, verbo)
+syms_from_objfile (objfile, addrs, mainline, verbo)
struct objfile *objfile;
- CORE_ADDR addr;
+ struct section_addr_info *addrs;
int mainline;
int verbo;
{
struct section_offsets *section_offsets;
- asection *lowest_sect;
+ asection *lower_sect;
+ asection *sect;
+ CORE_ADDR lower_offset;
+ struct section_addr_info local_addr;
struct cleanup *old_chain;
+ int i;
+
+ /* If ADDRS is NULL, initialize the local section_addr_info struct and
+ point ADDRS to it. We now establish the convention that an addr of
+ zero means no load address was specified. */
+
+ if (addrs == NULL)
+ {
+ memset (&local_addr, 0, sizeof (local_addr));
+ addrs = &local_addr;
+ }
init_entry_point_info (objfile);
find_sym_fns (objfile);
@@ -536,21 +581,107 @@ syms_from_objfile (objfile, addr, mainline, verbo)
happens for the PA64 port. */
if (mainline)
{
- addr = 0; /* No offset from objfile addresses. */
+ /* No offset from objfile addresses. */
+ addrs -> text_addr = 0;
+ addrs -> data_addr = 0;
+ addrs -> bss_addr = 0;
}
else
{
- lowest_sect = bfd_get_section_by_name (objfile->obfd, ".text");
- if (lowest_sect == NULL)
+ /* Find lowest loadable section to be used as starting point for
+ continguous sections. FIXME!! won't work without call to find
+ .text first, but this assumes text is lowest section. */
+ lower_sect = bfd_get_section_by_name (objfile->obfd, ".text");
+ if (lower_sect == NULL)
bfd_map_over_sections (objfile->obfd, find_lowest_section,
- (PTR) &lowest_sect);
-
- if (lowest_sect == NULL)
+ (PTR) &lower_sect);
+ if (lower_sect == NULL)
warning ("no loadable sections found in added symbol-file %s",
objfile->name);
-
- if (lowest_sect)
- addr -= bfd_section_vma (objfile->obfd, lowest_sect);
+ else if ((bfd_get_section_flags (objfile->obfd, lower_sect) & SEC_CODE)
+ == 0)
+ warning ("Lowest section in %s is %s at %s",
+ objfile->name,
+ bfd_section_name (objfile->obfd, lower_sect),
+ paddr (bfd_section_vma (objfile->obfd, lower_sect)));
+ if (lower_sect != NULL)
+ lower_offset = bfd_section_vma (objfile->obfd, lower_sect);
+ else
+ lower_offset = 0;
+
+ /* Calculate offsets for the loadable sections.
+ FIXME! Sections must be in order of increasing loadable section
+ so that contiguous sections can use the lower-offset!!!
+
+ Adjust offsets if the segments are not contiguous.
+ If the section is contiguous, its offset should be set to
+ the offset of the highest loadable section lower than it
+ (the loadable section directly below it in memory).
+ this_offset = lower_offset = lower_addr - lower_orig_addr */
+
+ /* FIXME: These sections will not need special treatment because ALL
+ sections are in the other sections table */
+
+ if (addrs->text_addr != 0)
+ {
+ sect = bfd_get_section_by_name (objfile->obfd, ".text");
+ if (sect)
+ {
+ addrs->text_addr -= bfd_section_vma (objfile->obfd, sect);
+ lower_offset = addrs->text_addr;
+ }
+ }
+ else
+ /* ??? who's below me? */
+ addrs->text_addr = lower_offset;
+
+ if (addrs->data_addr != 0)
+ {
+ sect = bfd_get_section_by_name (objfile->obfd, ".data");
+ if (sect)
+ {
+ addrs->data_addr -= bfd_section_vma (objfile->obfd, sect);
+ lower_offset = addrs->data_addr;
+ }
+ }
+ else
+ addrs->data_addr = lower_offset;
+
+ if (addrs->bss_addr != 0)
+ {
+ sect = bfd_get_section_by_name (objfile->obfd, ".bss");
+ if (sect)
+ {
+ addrs->bss_addr -= bfd_section_vma (objfile->obfd, sect);
+ lower_offset = addrs->bss_addr;
+ }
+ }
+ else
+ addrs->bss_addr = lower_offset;
+
+ /* Now calculate offsets for other sections. */
+ for (i=0 ; i < MAX_SECTIONS && addrs->other[i].name; i++)
+ {
+
+ if (addrs->other[i].addr != 0)
+ {
+ sect=bfd_get_section_by_name(objfile->obfd, addrs->other[i].name);
+ if (sect)
+ {
+ addrs->other[i].addr -= bfd_section_vma (objfile->obfd, sect);
+ lower_offset = addrs->other[i].addr;
+ addrs->other[i].sectindex = sect->index ;
+ }
+ else
+ {
+ warning ("section %s not found in %s", addrs->other[i].name,
+ objfile->name);
+ addrs->other[i].addr = 0;
+ }
+ }
+ else
+ addrs->other[i].addr = lower_offset;
+ }
}
/* Initialize symbol reading routines for this objfile, allow complaints to
@@ -560,7 +691,7 @@ syms_from_objfile (objfile, addr, mainline, verbo)
(*objfile->sf->sym_init) (objfile);
clear_complaints (1, verbo);
- (*objfile->sf->sym_offsets) (objfile, addr);
+ (*objfile->sf->sym_offsets) (objfile, addrs);
#ifndef IBM6000_TARGET
/* This is a SVR4/SunOS specific hack, I think. In any event, it
@@ -581,17 +712,36 @@ syms_from_objfile (objfile, addr, mainline, verbo)
These should probably all be collapsed into some target
independent form of shared library support. FIXME. */
- if (addr)
+ if (addrs)
{
struct obj_section *s;
+ /* Map section offsets in "addr" back to the object's
+ sections by comparing the section names with bfd's
+ section names. Then adjust the section address by
+ the offset. */ /* for gdb/13815 */
+
ALL_OBJFILE_OSECTIONS (objfile, s)
{
+ CORE_ADDR s_addr = 0;
+ int i;
+
+ if (strcmp (s->the_bfd_section->name, ".text") == 0)
+ s_addr = addrs->text_addr;
+ else if (strcmp (s->the_bfd_section->name, ".data") == 0)
+ s_addr = addrs->data_addr;
+ else if (strcmp (s->the_bfd_section->name, ".bss") == 0)
+ s_addr = addrs->bss_addr;
+ else
+ for (i = 0; !s_addr && addrs->other[i].name; i++)
+ if (strcmp (s->the_bfd_section->name, addrs->other[i].name) == 0)
+ s_addr = addrs->other[i].addr; /* end added for gdb/13815 */
+
s->addr -= s->offset;
- s->addr += addr;
+ s->addr += s_addr;
s->endaddr -= s->offset;
- s->endaddr += addr;
- s->offset += addr;
+ s->endaddr += s_addr;
+ s->offset += s_addr;
}
}
#endif /* not IBM6000_TARGET */
@@ -680,13 +830,12 @@ new_symfile_objfile (objfile, mainline, verbo)
Upon failure, jumps back to command level (never returns). */
struct objfile *
-symbol_file_add (name, from_tty, addr, mainline, mapped, readnow, user_loaded, is_solib)
+symbol_file_add (name, from_tty, addrs, mainline, flags, user_loaded, is_solib)
char *name;
int from_tty;
- CORE_ADDR addr;
+ struct section_addr_info *addrs;
int mainline;
- int mapped;
- int readnow;
+ int flags;
int user_loaded;
int is_solib;
{
@@ -705,7 +854,7 @@ symbol_file_add (name, from_tty, addr, mainline, mapped, readnow, user_loaded, i
&& !query ("Load new symbol table from \"%s\"? ", name))
error ("Not confirmed.");
- objfile = allocate_objfile (abfd, mapped, user_loaded, is_solib);
+ objfile = allocate_objfile (abfd, flags & OBJF_MAPPED, user_loaded, is_solib);
/* If the objfile uses a mapped symbol file, and we have a psymtab for
it, then skip reading any symbols at this time. */
@@ -741,7 +890,7 @@ symbol_file_add (name, from_tty, addr, mainline, mapped, readnow, user_loaded, i
gdb_flush (gdb_stdout);
}
}
- syms_from_objfile (objfile, addr, mainline, from_tty);
+ syms_from_objfile (objfile, addrs, mainline, from_tty);
}
/* We now have at least a partial symbol table. Check to see if the
@@ -749,7 +898,7 @@ symbol_file_add (name, from_tty, addr, mainline, mapped, readnow, user_loaded, i
the gdb startup command line or on a per symbol file basis. Expand
all partial symbol tables for this objfile if so. */
- if (readnow || readnow_symbol_files)
+ if ((flags & OBJF_READNOW) || readnow_symbol_files)
{
if (from_tty || info_verbose)
{
@@ -803,8 +952,7 @@ symbol_file_command (args, from_tty)
char *name = NULL;
CORE_ADDR text_relocation = 0; /* text_relocation */
struct cleanup *cleanups;
- int mapped = 0;
- int readnow = 0;
+ int flags = 0;
dont_repeat ();
@@ -845,11 +993,11 @@ symbol_file_command (args, from_tty)
{
if (STREQ (*argv, "-mapped"))
{
- mapped = 1;
+ flags |= OBJF_MAPPED;
}
else if (STREQ (*argv, "-readnow"))
{
- readnow = 1;
+ flags |= OBJF_READNOW;
}
else if (**argv == '-')
{
@@ -875,15 +1023,20 @@ symbol_file_command (args, from_tty)
return;
else if (text_relocation == (CORE_ADDR) -1)
{
- symbol_file_add (name, from_tty, (CORE_ADDR) 0,
- 1, mapped, readnow, 1, 0);
+ symbol_file_add (name, from_tty, NULL,
+ 1, flags, 1, 0);
#ifdef HPUXHPPA
RESET_HP_UX_GLOBALS ();
#endif
}
else
- symbol_file_add (name, from_tty, (CORE_ADDR) text_relocation,
- 0, mapped, readnow, 1, 0);
+ {
+ struct section_addr_info section_addrs;
+ memset (&section_addrs, 0, sizeof (section_addrs));
+ section_addrs.text_addr = (CORE_ADDR) text_relocation;
+ symbol_file_add (name, from_tty, &section_addrs,
+ 0, flags, 1, 0);
+ }
/* Getting new symbols may change our opinion about what is
frameless. */
@@ -1233,9 +1386,20 @@ add_symbol_file_command (args, from_tty)
{
char *name = NULL;
CORE_ADDR text_addr;
+ int flags = 0;
char *arg;
- int readnow = 0;
- int mapped = 0;
+ int expecting_option = 0;
+ int option_index = 0;
+ int argcnt = 0;
+ int sec_num = 0;
+ int i;
+ struct
+ {
+ enum { OPT_SECTION } type;
+ char *name;
+ char *value;
+ } opt[SECT_OFF_MAX];
+ struct section_addr_info section_addrs;
dont_repeat ();
@@ -1249,9 +1413,12 @@ add_symbol_file_command (args, from_tty)
args = strdup (args);
make_cleanup (free, args);
+ /* Ensure section_addrs is initialized */
+ memset (&section_addrs, 0, sizeof (section_addrs));
+
/* Pick off any -option args and the file name. */
- while ((*args != '\000') && (name == NULL))
+ while (*args != '\000')
{
while (isspace (*args))
{
@@ -1268,26 +1435,66 @@ add_symbol_file_command (args, from_tty)
}
if (*arg != '-')
{
- name = arg;
+ if (expecting_option)
+ {
+ opt[option_index++].value = arg;
+ expecting_option = 0;
+ }
+ else
+ {
+ switch (argcnt)
+ {
+ case 0:
+ name = arg;
+ break;
+ case 1:
+ opt[option_index].type = OPT_SECTION;
+ opt[option_index].name = ".text";
+ opt[option_index++].value = arg;
+ break;
+ case 2:
+ opt[option_index].type = OPT_SECTION;
+ opt[option_index].name = ".data";
+ opt[option_index++].value = arg;
+ break;
+ case 3:
+ opt[option_index].type = OPT_SECTION;
+ opt[option_index].name = ".bss";
+ opt[option_index++].value = arg;
+ break;
+ default:
+ warning ("Too many arguments entered; see \"help add-symbol-file\" for command syntax.");
+ }
+ argcnt++;
+ }
}
else if (STREQ (arg, "-mapped"))
{
- mapped = 1;
+ flags |= OBJF_MAPPED;
}
else if (STREQ (arg, "-readnow"))
{
- readnow = 1;
- }
- else
- {
- error ("unknown option `%s'", arg);
+ flags |= OBJF_READNOW;
}
+ else if (STREQN (arg, "-T", 2))
+ {
+ if (option_index >= SECT_OFF_MAX)
+ {
+ warning ("Number of options exceeds maximum allowed.");
+ }
+ else
+ {
+ expecting_option = 1;
+ opt[option_index].type = OPT_SECTION;
+ opt[option_index].name = arg + 2;
+ }
+ }
+ else
+ {
+ error ("Unknown option `%s'", arg);
+ }
}
- /* After picking off any options and the file name, args should be
- left pointing at the remainder of the command line, which should
- be the address expression to evaluate. */
-
if (name == NULL)
{
error ("add-symbol-file takes a file name");
@@ -1295,24 +1502,77 @@ add_symbol_file_command (args, from_tty)
name = tilde_expand (name);
make_cleanup (free, name);
- if (*args != '\000')
+ if (option_index > 0)
{
- text_addr = parse_and_eval_address (args);
+ /* Print the prompt for the query below.
+ We have to split this up into 3 print statements because
+ local_hex_string returns a local static string. */
+
+ printf_filtered ("add symbol table from file \"%s\" at\n", name);
+ for (i = 0; i < option_index; i++)
+ {
+ switch (opt[i].type)
+ {
+ case OPT_SECTION:
+ {
+ CORE_ADDR addr;
+ char *val = opt[i].value;
+ char *sec = opt[i].name;
+
+ val = opt[i].value;
+ if (val[0] == '0' && val[1] == 'x')
+ addr = strtoul (val+2, NULL, 16);
+ else
+ addr = strtoul (val, NULL, 10);
+
+ if (strcmp (sec, ".text") == 0)
+ section_addrs.text_addr = addr;
+ else if (strcmp (sec, ".data") == 0)
+ section_addrs.data_addr = addr;
+ else if (strcmp (sec, ".bss") == 0)
+ section_addrs.bss_addr = addr;
+ /* Add the section to the others even if it is a
+ text data or bss section. This is redundent but
+ eventually, none will be given special treatment */
+ {
+ section_addrs.other[sec_num].name = strdup (sec);
+ make_cleanup (free, section_addrs.other[sec_num].name);
+ section_addrs.other[sec_num++].addr = addr;
+ printf_filtered ("\t%s_addr = %s\n",
+ sec,
+ local_hex_string ((unsigned long)addr));
+ }
+
+ /* The object's sections are initialized when a
+ call is made to build_objfile_section_table (objfile).
+ This happens in reread_symbols.
+ At this point, we don't know what file type this is,
+ so we can't determine what section names are valid. */
+ }
+ break;
+ default:
+ complain (&unknown_option_complaint, opt[i].name);
+ }
+ }
+ /* Eventually, these hard coded names will be obsolete */
+ /* All the addresses will be on the others section */
}
else
{
- target_link (name, &text_addr);
+ CORE_ADDR text_addr;
+ target_link (name, &text_addr);
if (text_addr == (CORE_ADDR) -1)
- error ("Don't know how to get text start location for this file");
- }
-
- /* FIXME-32x64: Assumes text_addr fits in a long. */
- if ((from_tty)
- && (!query ("add symbol table from file \"%s\" at text_addr = %s?\n",
- name, local_hex_string ((unsigned long) text_addr))))
+ error("Don't know how to get text start location for this file");
+ section_addrs.text_addr = text_addr;
+ section_addrs.data_addr = 0;
+ section_addrs.bss_addr = 0;
+ printf_filtered("add symbol table from file \"%s\" at text_addr = %s?\n",
+ name, local_hex_string ((unsigned long)text_addr));
+ }
+ if (from_tty && (!query ("%s", "")))
error ("Not confirmed.");
- symbol_file_add (name, from_tty, text_addr, 0, mapped, readnow,
+ symbol_file_add (name, from_tty, &section_addrs, 0, flags,
1, /* user_loaded */
0); /* We'll guess it's ! is_solib */
@@ -2978,9 +3238,13 @@ to execute.", &cmdlist);
c->completer = filename_completer;
c = add_cmd ("add-symbol-file", class_files, add_symbol_file_command,
- "Usage: add-symbol-file FILE ADDR\n\
+ "Usage: add-symbol-file FILE ADDR [DATA_ADDR [BSS_ADDR]]\n\
+or: add-symbol-file FILE -T<SECT> <SECT_ADDR> -T<SECT> <SECT_ADDR> ...\n\
Load the symbols from FILE, assuming FILE has been dynamically loaded.\n\
-ADDR is the starting address of the file's text.",
+ADDR is the starting address of the file's text.\n\
+The optional arguments, DATA_ADDR and BSS_ADDR, should be specified\n\
+if the data and bss segments are not contiguous with the text.\n\
+For complicated cases, SECT is a section name to be loaded at SECT_ADDR.",
&cmdlist);
c->completer = filename_completer;
diff --git a/gdb/symfile.h b/gdb/symfile.h
index 7287c8f..bcf00eb 100644
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -99,7 +99,7 @@ struct sym_fns
a string, where NULL means the default, and others are parsed in a file
dependent way. */
- void (*sym_offsets) PARAMS ((struct objfile *, CORE_ADDR));
+ void (*sym_offsets) PARAMS ((struct objfile *, struct section_addr_info *));
/* Finds the next struct sym_fns. They are allocated and initialized
in whatever module implements the functions pointed to; an
@@ -113,7 +113,7 @@ struct sym_fns
do anything special. */
extern void
-default_symfile_offsets PARAMS ((struct objfile * objfile, CORE_ADDR addr));
+default_symfile_offsets PARAMS ((struct objfile * objfile, struct section_addr_info *));
extern void
@@ -158,7 +158,7 @@ extern void
init_entry_point_info PARAMS ((struct objfile *));
extern void
-syms_from_objfile PARAMS ((struct objfile *, CORE_ADDR, int, int));
+syms_from_objfile PARAMS ((struct objfile *, struct section_addr_info *, int, int));
extern void
new_symfile_objfile PARAMS ((struct objfile *, int, int));
diff --git a/gdb/symtab.h b/gdb/symtab.h
index d651209..3fb21fc 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -826,6 +826,26 @@ struct section_offsets
(sizeof (struct section_offsets) \
+ sizeof (((struct section_offsets *) 0)->offsets) * (SECT_OFF_MAX-1))
+/* Define an array of addresses to accommodate non-contiguous dynamic
+ loading of modules. This is for use when entering commands, so we
+ can keep track of the section names until we read the file and
+ can map them to bfd sections. */
+
+#define MAX_SECTIONS 12
+struct section_addr_info
+{
+ /* Sections whose names are always known to gdb. */
+ CORE_ADDR text_addr;
+ CORE_ADDR data_addr;
+ CORE_ADDR bss_addr;
+ /* Sections whose names are file format dependant. */
+ struct other_sections
+ {
+ CORE_ADDR addr;
+ char *name;
+ int sectindex;
+ } other[MAX_SECTIONS];
+};
/* Each source file or header is represented by a struct symtab.
These objects are chained through the `next' field. */
@@ -1399,7 +1419,7 @@ extern void
clear_solib PARAMS ((void));
extern struct objfile *
- symbol_file_add PARAMS ((char *, int, CORE_ADDR, int, int, int, int, int));
+ symbol_file_add PARAMS ((char *, int, struct section_addr_info *, int, int, int, int));
/* source.c */
diff --git a/gdb/target.c b/gdb/target.c
index 01e01c2..6d0b796 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -452,7 +452,7 @@ cleanup_target (t)
de_fault (to_core_file_to_sym_file, (char *(*)PARAMS ((char *))) return_zero);
de_fault (to_can_async_p, (int (*) (void)) return_zero);
de_fault (to_is_async_p, (int (*) (void)) return_zero);
- de_fault (to_async, (void (*) (void (*) (int, void*, int), void*)) tcomplain);
+ de_fault (to_async, (void (*) (void (*) (enum inferior_event_type, void*), void*)) tcomplain);
#undef de_fault
}
@@ -1009,7 +1009,7 @@ target_link (modname, t_reloc)
error ("Unable to link to %s and get relocation in rombug", modname);
}
else
- *t_reloc = (CORE_ADDR) - 1;
+ *t_reloc = (CORE_ADDR) -1;
}
/* Look through the list of possible targets for a target that can
diff --git a/gdb/target.h b/gdb/target.h
index 5439fac..276657f 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -264,6 +264,23 @@ struct target_waitstatus
value;
};
+/* Possible types of events that the inferior handler will have to
+ deal with. */
+enum inferior_event_type
+ {
+ /* There is a request to quit the inferior, abandon it. */
+ INF_QUIT_REQ,
+ /* Process a normal inferior event which will result in target_wait
+ being called. */
+ INF_REG_EVENT,
+ /* Deal with an error on the inferior. */
+ INF_ERROR,
+ /* We are called because a timer went off. */
+ INF_TIMER,
+ /* We are called to do stuff after the inferior stops. */
+ INF_EXEC_COMPLETE
+ };
+
/* Return the string for a signal. */
extern char *target_signal_to_string PARAMS ((enum target_signal));
@@ -404,7 +421,7 @@ struct target_ops
/* ASYNC target controls */
int (*to_can_async_p) (void);
int (*to_is_async_p) (void);
- void (*to_async) (void (*cb) (int error, void *context, int fd), void *context);
+ void (*to_async) (void (*cb) (enum inferior_event_type, void *context), void *context);
int to_magic;
/* Need sub-structure for target machine related rather than comm related? */
};
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5d162ae..6c365c7 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,15 @@
+1999-10-01 Kevin Buettner <kevinb@cygnus.com>
+
+ * gdb.base/break.c (main): Added a statement that we can step
+ off of.
+ * gdb.base/break.exp: Added tests for setting a breakpoint
+ at an offset and stepping onto a breakpoint.
+
+1999-10-01 Fred Fish <fnf@cygnus.com>
+
+ * gdb.base/help.exp (help add-symbol-file): Update to match current
+ gdb output.
+
1999-09-18 Jim Blandy <jimb@cris.red-bean.com>
* gdb.base/break.exp: Code locations are in hex, don't forget!
diff --git a/gdb/testsuite/gdb.base/break.c b/gdb/testsuite/gdb.base/break.c
index 7e5fb8e..e7e6af6 100644
--- a/gdb/testsuite/gdb.base/break.c
+++ b/gdb/testsuite/gdb.base/break.c
@@ -82,7 +82,8 @@ char *argv[], **envp;
marker2 (43);
marker3 ("stack", "trace");
marker4 (177601976L);
- return 0;
+ argc = (argc == 12345); /* This is silly, but we can step off of it */
+ return argc;
}
#ifdef PROTOTYPES
diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp
index bfd3c41..d5b2af3 100644
--- a/gdb/testsuite/gdb.base/break.exp
+++ b/gdb/testsuite/gdb.base/break.exp
@@ -128,7 +128,7 @@ if {$hp_aCC_compiler} {
gdb_test "info break" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$main_line.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in factorial$proto at .*$srcfile:95.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in factorial$proto at .*$srcfile:96.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:79.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:79.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:85" \
@@ -180,16 +180,28 @@ gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*,
# Run until the breakpoint set in a function in a file
#
for {set i 6} {$i >= 1} {incr i -1} {
- gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, factorial \\(value=$i\\) at .*$srcfile:95.*95\[\t \]+.*if .value > 1. \{.*" \
+ gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, factorial \\(value=$i\\) at .*$srcfile:96.*96\[\t \]+.*if .value > 1. \{.*" \
"run until file:function($i) breakpoint"
}
#
# run until the file:function breakpoint at a line number in a file
#
-gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:85.*85\[\t \]+return 0;" \
+gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:85.*85\[\t \]+argc = \\(argc == 12345\\);.*" \
"run until file:linenum breakpoint"
+# Test break at offset +1
+
+gdb_test "break +1" \
+ "Breakpoint.*at.* file .*$srcfile, line 86\\." \
+ "breakpoint offset +1"
+
+# Check to see if breakpoint is hit when stepped onto
+
+gdb_test "step" \
+ ".*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:86.*86\[\t \]+return argc;" \
+ "step onto breakpoint"
+
#
# delete all breakpoints so we can start over, course this can be a test too
#
@@ -237,7 +249,7 @@ gdb_test "tbreak $srcfile:81" "Breakpoint.*at.* file .*$srcfile, line 81.*" "Te
#
gdb_test "info break" "Num Type.*Disp Enb Address.*What.*\[\r\n\]
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$main_line.*\[\r\n\]
-\[0-9\]+\[\t \]+breakpoint del.*y.*in factorial$proto at .*$srcfile:95.*\[\r\n\]
+\[0-9\]+\[\t \]+breakpoint del.*y.*in factorial$proto at .*$srcfile:96.*\[\r\n\]
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:79.*\[\r\n\]
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:75.*\[\r\n\]
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:85.*\[\r\n\]
diff --git a/gdb/testsuite/gdb.base/help.exp b/gdb/testsuite/gdb.base/help.exp
index 54bfdb1..dfd65a2 100644
--- a/gdb/testsuite/gdb.base/help.exp
+++ b/gdb/testsuite/gdb.base/help.exp
@@ -34,7 +34,7 @@ gdb_test "set height 400" "" "test set height"
# use a larger expect input buffer for long help outputs.
# test help add-symbol-file
-gdb_test "help add-symbol-file" "Usage: add-symbol-file FILE ADDR.*\[\r\n\]+Load the symbols from FILE, assuming FILE has been dynamically loaded..*\[\r\n\]+ADDR is the starting address of the file\'s text." "help add-symbol-file"
+gdb_test "help add-symbol-file" "Usage: add-symbol-file FILE ADDR .*DATA_ADDR .*BSS_ADDR.*\[\r\n\]+or: add-symbol-file FILE -T<SECT> <SECT_ADDR> -T<SECT> <SECT_ADDR> ....*\[\r\n\]+Load the symbols from FILE, assuming FILE has been dynamically loaded..*\[\r\n\]+ADDR is the starting address of the file's text..*\[\r\n\]+The optional arguments, DATA_ADDR and BSS_ADDR, should be specified.*\[\r\n\]+if the data and bss segments are not contiguous with the text..*\[\r\n\]+For complicated cases, SECT is a section name to be loaded at SECT_ADDR." "help add-symbol-file"
# test help aliases
gdb_test "help aliases" "Aliases of other commands..*\[\r\n\]+List of commands\:.*\[\r\n\]+Type \"help\" followed by command name for full documentation..*\[\r\n\]+Command name abbreviations are allowed if unambiguous." "help aliases"
gdb_test "help attach" "Attach to a process or file outside of GDB..*\[\r\n\]+This command attaches to another target, of the same type as your last.*\[\r\n\]+\"target\" command .\"info files\" will show your target stack.*\[\r\n\]+The command may take as argument a process id or a device file..*\[\r\n\]+For a process id, you must have permission to send the process a signal,.*\[\r\n\]+and it must have the same effective uid as the debugger..*\[\r\n\]+When using \"attach\" with a process id, the debugger finds the.*\[\r\n\]+program running in the process, looking first in the current working.*\[\r\n\]+directory, or .if not found there. using the source file search path.*\[\r\n\]+\\(see the \"directory\" command\\). You can also use the \"file\" command.*\[\r\n\]+to specify the program, and to load its symbol table." "help attach"
diff --git a/gdb/top.c b/gdb/top.c
index 53576d8..47f74a1 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -45,7 +45,7 @@
#include <sys/types.h>
-#include "event-loop.h"
+
#include "event-top.h"
#include "gdb_string.h"
#include "gdb_stat.h"
diff --git a/gdb/ultra3-nat.c b/gdb/ultra3-nat.c
index de8e33b..fea7d6f 100644
--- a/gdb/ultra3-nat.c
+++ b/gdb/ultra3-nat.c
@@ -353,9 +353,11 @@ register_addr (regno, blockend)
static struct core_fns ultra3_core_fns =
{
- bfd_target_unknown_flavour,
- fetch_core_registers,
- NULL
+ bfd_target_unknown_flavour, /* core_flavour */
+ default_check_format, /* check_format */
+ default_core_sniffer, /* core_sniffer */
+ fetch_core_registers, /* core_read_registers */
+ NULL /* next */
};
void
diff --git a/gdb/utils.c b/gdb/utils.c
index 6001501..f486199 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -21,7 +21,6 @@
#include "defs.h"
#include <ctype.h>
#include "gdb_string.h"
-#include "event-loop.h"
#include "event-top.h"
#ifdef HAVE_CURSES_H
@@ -53,6 +52,10 @@
void (*error_begin_hook) PARAMS ((void));
+/* Holds the last error message issued by gdb */
+
+static GDB_FILE *gdb_lasterr;
+
/* Prototypes for local functions */
static void vfprintf_maybe_filtered PARAMS ((GDB_FILE *, const char *,
@@ -516,11 +519,37 @@ error (const char *string,...)
error_begin ();
vfprintf_filtered (gdb_stderr, string, args);
fprintf_filtered (gdb_stderr, "\n");
+ /* Save it as the last error as well (no newline) */
+ gdb_file_rewind (gdb_lasterr);
+ vfprintf_filtered (gdb_lasterr, string, args);
va_end (args);
return_to_top_level (RETURN_ERROR);
}
}
+/* Allows the error message to be passed on a stream buffer */
+
+NORETURN void
+error_stream (GDB_FILE *stream)
+{
+ error (gdb_file_get_strbuf (stream));
+}
+
+/* Get the last error message issued by gdb */
+
+char *
+error_last_message (void)
+{
+ return (gdb_file_get_strbuf (gdb_lasterr));
+}
+
+/* This is to be called by main() at the very beginning */
+
+void
+error_init (void)
+{
+ gdb_lasterr = tui_sfileopen (132);
+}
/* Print a message reporting an internal error. Ask the user if they
want to continue, dump core, or just exit. */
@@ -1770,6 +1799,27 @@ tui_fileopen (stream)
return file;
}
+struct gdb_file *
+tui_sfileopen (n)
+ int n;
+{
+ struct gdb_file *file = tui_file_new ();
+ struct tui_stream *tmpstream = gdb_file_data (file);
+ tmpstream->ts_streamtype = astring;
+ tmpstream->ts_filestream = NULL;
+ if (n > 0)
+ {
+ tmpstream->ts_strbuf = xmalloc ((n + 1) * sizeof (char));
+ tmpstream->ts_strbuf[0] = '\0';
+ }
+ else
+ /* Do not allocate the buffer now. The first time something is printed
+ one will be allocated by gdb_file_adjust_strbuf() */
+ tmpstream->ts_strbuf = NULL;
+ tmpstream->ts_buflen = n;
+ return file;
+}
+
static int
tui_file_isatty (file)
struct gdb_file *file;
@@ -1887,6 +1937,8 @@ tui_file_fputs (linebuffer, file)
}
}
+/* DEPRECATED: Use tui_sfileopen() instead */
+
GDB_FILE *
gdb_file_init_astring (n)
int n;
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index 2ea46c8..11e4fa1 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -325,7 +325,9 @@ handle_load_dll (PTR dummy)
char *p, *dll_name = NULL;
struct objfile *objfile;
MEMORY_BASIC_INFORMATION minfo;
+ struct section_addr_info section_addrs;
+ memset (&section_addrs, 0, sizeof (section_addrs));
dll_buf[0] = dll_buf[sizeof (dll_buf) - 1] = '\0';
/* The following code attempts to find the name of the dll by reading the
@@ -417,7 +419,8 @@ handle_load_dll (PTR dummy)
FIXME: Is this the real reason that we need the 0x1000 ? */
printf_unfiltered ("%x:%s", event->lpBaseOfDll, dll_name);
- symbol_file_add (dll_name, 0, (int) event->lpBaseOfDll + 0x1000, 0, 0, 0, 0, 1);
+ section_addrs.text_addr = (int) event->lpBaseOfDll + 0x1000;
+ symbol_file_add (dll_name, 0, &section_addrs, 0, 0, 0, 1);
printf_unfiltered ("\n");
return 1;
@@ -887,7 +890,7 @@ child_create_inferior (exec_file, allargs, env)
/* Ignore the first trap */
child_wait (inferior_pid, &dummy);
- proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_0, 0);
+ proceed ((CORE_ADDR) -1, TARGET_SIGNAL_0, 0);
}
static void
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index fa03d2f..55f23cb 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -224,7 +224,7 @@ static void
xcoff_symfile_finish PARAMS ((struct objfile *));
static void
- xcoff_symfile_offsets PARAMS ((struct objfile *, CORE_ADDR));
+ xcoff_symfile_offsets PARAMS ((struct objfile *, struct section_addr_info *addrs));
static void
find_linenos PARAMS ((bfd *, sec_ptr, PTR));
@@ -2761,7 +2761,7 @@ xcoff_initial_scan (objfile, mainline)
static void
xcoff_symfile_offsets (objfile, addr)
struct objfile *objfile;
- CORE_ADDR addr;
+ struct section_addr_info *addrs;
{
int i;
diff --git a/gdb/xcoffsolib.c b/gdb/xcoffsolib.c
index e956511..5485c5e 100644
--- a/gdb/xcoffsolib.c
+++ b/gdb/xcoffsolib.c
@@ -114,7 +114,7 @@ solib_add (arg_string, from_tty, target)
continue;
}
- syms_from_objfile (obj, 0, 0, 0);
+ syms_from_objfile (obj, NULL, 0, 0);
new_symfile_objfile (obj, 0, 0);
vmap_symtab (vp, 0, 0);
printf_unfiltered ("Done.\n");
diff --git a/sim/ChangeLog b/sim/ChangeLog
index e0fb2bc..eb1261f 100644
--- a/sim/ChangeLog
+++ b/sim/ChangeLog
@@ -1,3 +1,8 @@
+1999-09-29 Doug Evans <devans@casey.cygnus.com>
+
+ * configure.in: Configure the testsuite directory for thumb.
+ * configure: Regenerate.
+
1999-07-16 Ben Elliston <bje@cygnus.com>
* configure.in: Configure the testsuite directory for arm.
diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog
index 92ee660..ce0c4d9 100644
--- a/sim/arm/ChangeLog
+++ b/sim/arm/ChangeLog
@@ -1,3 +1,8 @@
+1999-09-29 Doug Evans <devans@casey.cygnus.com>
+
+ * armos.c (SWIWrite0): Send output to stdout instead of stderr.
+ (ARMul_OSHandleSWI, case SWI_WriteC,AngelSWI_Reason_WriteC): Ditto.
+
Thu Sep 2 18:15:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
diff --git a/sim/arm/armos.c b/sim/arm/armos.c
index 2906d41..d73d7f2 100644
--- a/sim/arm/armos.c
+++ b/sim/arm/armos.c
@@ -251,7 +251,7 @@ SWIWrite0 (ARMul_State *state, ARMword addr)
struct OSblock* OSptr = (struct OSblock*) state->OSptr;
while ((temp = ARMul_ReadByte (state, addr++)) != 0)
- (void) fputc ((char) temp, stderr);
+ (void) fputc ((char) temp, stdout);
OSptr->ErrorNo = errno;
}
@@ -430,7 +430,7 @@ ARMul_OSHandleSWI (ARMul_State *state, ARMword number)
}
case SWI_WriteC :
- (void)fputc((int)state->Reg[0],stderr) ;
+ (void)fputc((int)state->Reg[0],stdout) ;
OSptr->ErrorNo = errno ;
return(TRUE) ;
@@ -497,7 +497,7 @@ ARMul_OSHandleSWI (ARMul_State *state, ARMword number)
return (TRUE);
case AngelSWI_Reason_WriteC:
- (void) fputc ((int) ARMul_ReadByte (state,addr), stderr);
+ (void) fputc ((int) ARMul_ReadByte (state,addr), stdout);
OSptr->ErrorNo = errno;
return (TRUE);
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 75c8cdb..22be0d9 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,12 @@
+1999-09-29 Doug Evans <devans@casey.cygnus.com>
+
+ * cgen-defs.h (sim_engine_invalid_insn): New arg `vpc'.
+ Change type of result to SEM_PC.
+
+Wed Sep 29 14:43:57 1999 Dave Brolley <brolley@cygnus.com>
+
+ * cgen-defs.h (sim_engine_invalid_insn): Now returns PC.
+
1999-09-25 Doug Evans <devans@casey.cygnus.com>
* cgen-ops.h (SUBWORD*): Delete cpu arg.
diff --git a/sim/common/cgen-defs.h b/sim/common/cgen-defs.h
index 1faa2ee..fbdfb9a 100644
--- a/sim/common/cgen-defs.h
+++ b/sim/common/cgen-defs.h
@@ -115,7 +115,7 @@ typedef enum {
VIRTUAL_INSN_X_CHAIN= -4, VIRTUAL_INSN_X_CTI_CHAIN = -5
} CGEN_INSN_VIRTUAL_TYPE;
-/* Return non-zero if OPCODE is a virtual insn. */
+/* Return non-zero if CGEN_INSN* INSN is a virtual insn. */
#define CGEN_INSN_VIRTUAL_P(insn) \
CGEN_INSN_ATTR_VALUE ((insn), CGEN_INSN_VIRTUAL)
@@ -177,7 +177,7 @@ extern CPU_INSN_NAME_FN cgen_insn_name;
language [or suggest a better way]. */
extern int cgen_cpu_max_extra_bytes (void);
-/* Called to process an invalid instruction. */
-extern void sim_engine_invalid_insn (SIM_CPU *, IADDR);
+/* Target supplied routine to process an invalid instruction. */
+extern SEM_PC sim_engine_invalid_insn (SIM_CPU *, IADDR, SEM_PC);
#endif /* CGEN_DEFS_H */
diff --git a/sim/configure b/sim/configure
index 5326e0d..3b8c1f6 100755
--- a/sim/configure
+++ b/sim/configure
@@ -30,6 +30,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -144,6 +145,7 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
+ --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -314,6 +316,11 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
+ -site-file | --site-file | --site-fil | --site-fi | --site-f)
+ ac_prev=sitefile ;;
+ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+ sitefile="$ac_optarg" ;;
+
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -479,12 +486,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+if test -z "$sitefile"; then
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
fi
+else
+ CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -527,7 +538,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:531: checking for $ac_word" >&5
+echo "configure:542: 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
@@ -557,7 +568,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:561: checking for $ac_word" >&5
+echo "configure:572: 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
@@ -608,7 +619,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:612: checking for $ac_word" >&5
+echo "configure:623: 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
@@ -640,7 +651,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:644: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:655: 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.
@@ -651,12 +662,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 655 "configure"
+#line 666 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:671: \"$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
@@ -682,12 +693,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:686: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:697: 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:691: checking whether we are using GNU C" >&5
+echo "configure:702: 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
@@ -696,7 +707,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:700: \"$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:711: \"$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
@@ -715,7 +726,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:719: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:730: 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
@@ -777,7 +788,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# 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:781: checking for a BSD compatible install" >&5
+echo "configure:792: 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
@@ -836,7 +847,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:840: checking host system type" >&5
+echo "configure:851: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -857,7 +868,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:861: checking build system type" >&5
+echo "configure:872: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -883,7 +894,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:887: checking for $ac_word" >&5
+echo "configure:898: 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
@@ -915,7 +926,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:919: checking for $ac_word" >&5
+echo "configure:930: 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
@@ -947,7 +958,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:951: checking for $ac_word" >&5
+echo "configure:962: 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
@@ -1027,7 +1038,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:1031: checking host system type" >&5
+echo "configure:1042: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -1048,7 +1059,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:1052: checking target system type" >&5
+echo "configure:1063: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -1066,7 +1077,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:1070: checking build system type" >&5
+echo "configure:1081: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -1110,7 +1121,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
# 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:1114: checking for $ac_word" >&5
+echo "configure:1125: 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
@@ -1140,7 +1151,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:1144: checking for $ac_word" >&5
+echo "configure:1155: 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
@@ -1191,7 +1202,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:1195: checking for $ac_word" >&5
+echo "configure:1206: 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
@@ -1223,7 +1234,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1227: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1238: 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.
@@ -1234,12 +1245,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 1238 "configure"
+#line 1249 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1254: \"$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
@@ -1265,12 +1276,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:1269: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1280: 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:1274: checking whether we are using GNU C" >&5
+echo "configure:1285: 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
@@ -1279,7 +1290,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1283: \"$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:1294: \"$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
@@ -1298,7 +1309,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:1302: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1313: 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
@@ -1336,7 +1347,7 @@ AR=${AR-ar}
# 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:1340: checking for $ac_word" >&5
+echo "configure:1351: 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
@@ -1397,12 +1408,11 @@ extra_subdirs=common
# convention, else the table becomes a real mess to understand and maintain.
case "${target}" in
- arm*-*-*)
+ arm*-*-* | thumb*-*-*)
sim_target=arm
extra_subdirs="${extra_subdirs} testsuite"
;;
strongarm*-*-*) sim_target=arm ;;
- thumb*-*-*) sim_target=arm ;;
d10v-*-*) sim_target=d10v ;;
d30v-*-*)
sim_target=d30v
diff --git a/sim/configure.in b/sim/configure.in
index 97318ad..ce47fed 100644
--- a/sim/configure.in
+++ b/sim/configure.in
@@ -47,12 +47,11 @@ extra_subdirs=common
# convention, else the table becomes a real mess to understand and maintain.
case "${target}" in
- arm*-*-*)
+ arm*-*-* | thumb*-*-*)
sim_target=arm
extra_subdirs="${extra_subdirs} testsuite"
;;
strongarm*-*-*) sim_target=arm ;;
- thumb*-*-*) sim_target=arm ;;
d10v-*-*) sim_target=d10v ;;
d30v-*-*)
sim_target=d30v
diff --git a/sim/fr30/ChangeLog b/sim/fr30/ChangeLog
index 105d4f3..f0019cd 100644
--- a/sim/fr30/ChangeLog
+++ b/sim/fr30/ChangeLog
@@ -1,3 +1,13 @@
+1999-10-04 Doug Evans <devans@casey.cygnus.com>
+
+ * sem.c,sem-switch.c: Rebuild.
+ * traps.c (sim_engine_invalid_insn): New arg `vpc'. Change type of
+ result to SEM_PC. Return vpc.
+
+Wed Sep 29 14:45:32 1999 Dave Brolley <brolley@cygnus.com>
+
+ * traps.c (sim_engine_invalid_insn): Return PC.
+
Thu Sep 2 18:15:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
diff --git a/sim/fr30/sem-switch.c b/sim/fr30/sem-switch.c
index f73f11a..f3477e5 100644
--- a/sim/fr30/sem-switch.c
+++ b/sim/fr30/sem-switch.c
@@ -270,13 +270,15 @@ SWITCH (sem, SEM_ARGBUF (vpc) -> semantic.sem_case)
vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
{
-#if WITH_SCACHE
- /* Update the recorded pc in the cpu state struct. */
+ /* Update the recorded pc in the cpu state struct.
+ Only necessary for WITH_SCACHE case, but to avoid the
+ conditional compilation .... */
SET_H_PC (pc);
-#endif
- sim_engine_invalid_insn (current_cpu, pc);
- sim_io_error (CPU_STATE (current_cpu), "invalid insn not handled\n");
- /* NOTREACHED */
+ /* Virtual insns have zero size. Overwrite vpc with address of next insn
+ using the default-insn-bitsize spec. When executing insns in parallel
+ we may want to queue the fault and continue execution. */
+ vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+ vpc = sim_engine_invalid_insn (current_cpu, pc, vpc);
}
#undef FLD
@@ -3390,7 +3392,7 @@ if (EQBI (GET_H_SBIT (), 0)) {
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
}
#undef FLD
@@ -3406,7 +3408,7 @@ do { } while (0); /*nop*/
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
#undef FLD
}
@@ -4509,7 +4511,7 @@ if (NOTBI (ORBI (CPU (h_cbit), CPU (h_zbit)))) {
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
#undef FLD
}
@@ -4524,7 +4526,7 @@ do { } while (0); /*nop*/
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
#undef FLD
}
@@ -4539,7 +4541,7 @@ do { } while (0); /*nop*/
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
#undef FLD
}
@@ -4554,7 +4556,7 @@ do { } while (0); /*nop*/
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
#undef FLD
}
@@ -4569,7 +4571,7 @@ do { } while (0); /*nop*/
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
#undef FLD
}
diff --git a/sim/fr30/sem.c b/sim/fr30/sem.c
index 5889698..0d83f36 100644
--- a/sim/fr30/sem.c
+++ b/sim/fr30/sem.c
@@ -55,13 +55,15 @@ SEM_FN_NAME (fr30bf,x_invalid) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
{
-#if WITH_SCACHE
- /* Update the recorded pc in the cpu state struct. */
+ /* Update the recorded pc in the cpu state struct.
+ Only necessary for WITH_SCACHE case, but to avoid the
+ conditional compilation .... */
SET_H_PC (pc);
-#endif
- sim_engine_invalid_insn (current_cpu, pc);
- sim_io_error (CPU_STATE (current_cpu), "invalid insn not handled\n");
- /* NOTREACHED */
+ /* Virtual insns have zero size. Overwrite vpc with address of next insn
+ using the default-insn-bitsize spec. When executing insns in parallel
+ we may want to queue the fault and continue execution. */
+ vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+ vpc = sim_engine_invalid_insn (current_cpu, pc, vpc);
}
return vpc;
@@ -3385,7 +3387,7 @@ SEM_FN_NAME (fr30bf,bnod) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
}
return vpc;
@@ -3403,7 +3405,7 @@ SEM_FN_NAME (fr30bf,bno) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
return vpc;
#undef FLD
@@ -4596,7 +4598,7 @@ SEM_FN_NAME (fr30bf,copop) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
return vpc;
#undef FLD
@@ -4613,7 +4615,7 @@ SEM_FN_NAME (fr30bf,copld) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
return vpc;
#undef FLD
@@ -4630,7 +4632,7 @@ SEM_FN_NAME (fr30bf,copst) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
return vpc;
#undef FLD
@@ -4647,7 +4649,7 @@ SEM_FN_NAME (fr30bf,copsv) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
return vpc;
#undef FLD
@@ -4664,7 +4666,7 @@ SEM_FN_NAME (fr30bf,nop) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
return vpc;
#undef FLD
@@ -5701,7 +5703,9 @@ SEM_FN_NAME (fr30bf,init_idesc_table) (SIM_CPU *current_cpu)
for (sf = &sem_fns[0]; sf->fn != 0; ++sf)
{
- int valid_p = CGEN_INSN_MACH_HAS_P (idesc_table[sf->index].idata, mach_num);
+ const CGEN_INSN *insn = idesc_table[sf->index].idata;
+ int valid_p = (CGEN_INSN_VIRTUAL_P (insn)
+ || CGEN_INSN_MACH_HAS_P (insn, mach_num));
#if FAST_P
if (valid_p)
idesc_table[sf->index].sem_fast = sf->fn;
diff --git a/sim/fr30/traps.c b/sim/fr30/traps.c
index 11f7a30..25cd7b9 100644
--- a/sim/fr30/traps.c
+++ b/sim/fr30/traps.c
@@ -24,8 +24,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
/* The semantic code invokes this for invalid (unrecognized) instructions. */
-void
-sim_engine_invalid_insn (SIM_CPU *current_cpu, IADDR cia)
+SEM_PC
+sim_engine_invalid_insn (SIM_CPU *current_cpu, IADDR cia, SEM_PC vpc)
{
SIM_DESC sd = CPU_STATE (current_cpu);
@@ -47,6 +47,7 @@ sim_engine_invalid_insn (SIM_CPU *current_cpu, IADDR cia)
else
#endif
sim_engine_halt (sd, current_cpu, NULL, cia, sim_stopped, SIM_SIGILL);
+ return vpc;
}
/* Process an address exception. */
diff --git a/sim/i960/ChangeLog b/sim/i960/ChangeLog
index c5e2809..2986bf7 100644
--- a/sim/i960/ChangeLog
+++ b/sim/i960/ChangeLog
@@ -1,3 +1,13 @@
+1999-10-04 Doug Evans <devans@casey.cygnus.com>
+
+ * sem.c,sem-switch.c: Rebuild.
+ * traps.c (sim_engine_invalid_insn): New arg `vpc'. Change type of
+ result to SEM_PC. Return vpc.
+
+Wed Sep 29 14:46:36 1999 Dave Brolley <brolley@cygnus.com>
+
+ * traps.c (sim_engine_invalid_insn): Return PC.
+
Thu Sep 2 18:15:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
diff --git a/sim/i960/i960-desc.h b/sim/i960/i960-desc.h
index 40ca227..40b6599 100644
--- a/sim/i960/i960-desc.h
+++ b/sim/i960/i960-desc.h
@@ -49,6 +49,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
e.g. In "b,a foo" the ",a" is an operand. If mnemonics have operands
we can't hash on everything up to the space. */
#define CGEN_MNEMONIC_OPERANDS
+
/* Maximum number of operands any insn or macro-insn has. */
#define CGEN_MAX_INSN_OPERANDS 16
diff --git a/sim/i960/sem-switch.c b/sim/i960/sem-switch.c
index c610249..e1fd336 100644
--- a/sim/i960/sem-switch.c
+++ b/sim/i960/sem-switch.c
@@ -396,13 +396,15 @@ SWITCH (sem, SEM_ARGBUF (vpc) -> semantic.sem_case)
vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
{
-#if WITH_SCACHE
- /* Update the recorded pc in the cpu state struct. */
+ /* Update the recorded pc in the cpu state struct.
+ Only necessary for WITH_SCACHE case, but to avoid the
+ conditional compilation .... */
SET_H_PC (pc);
-#endif
- sim_engine_invalid_insn (current_cpu, pc);
- sim_io_error (CPU_STATE (current_cpu), "invalid insn not handled\n");
- /* NOTREACHED */
+ /* Virtual insns have zero size. Overwrite vpc with address of next insn
+ using the default-insn-bitsize spec. When executing insns in parallel
+ we may want to queue the fault and continue execution. */
+ vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
+ vpc = sim_engine_invalid_insn (current_cpu, pc, vpc);
}
#undef FLD
@@ -7326,7 +7328,7 @@ CPU (h_gr[((UINT) 15)]) = GETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
#undef FLD
}
diff --git a/sim/i960/sem.c b/sim/i960/sem.c
index 5498817..262340e 100644
--- a/sim/i960/sem.c
+++ b/sim/i960/sem.c
@@ -55,13 +55,15 @@ SEM_FN_NAME (i960base,x_invalid) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
{
-#if WITH_SCACHE
- /* Update the recorded pc in the cpu state struct. */
+ /* Update the recorded pc in the cpu state struct.
+ Only necessary for WITH_SCACHE case, but to avoid the
+ conditional compilation .... */
SET_H_PC (pc);
-#endif
- sim_engine_invalid_insn (current_cpu, pc);
- sim_io_error (CPU_STATE (current_cpu), "invalid insn not handled\n");
- /* NOTREACHED */
+ /* Virtual insns have zero size. Overwrite vpc with address of next insn
+ using the default-insn-bitsize spec. When executing insns in parallel
+ we may want to queue the fault and continue execution. */
+ vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
+ vpc = sim_engine_invalid_insn (current_cpu, pc, vpc);
}
return vpc;
@@ -7577,7 +7579,7 @@ SEM_FN_NAME (i960base,flushreg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
IADDR UNUSED pc = abuf->addr;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
return vpc;
#undef FLD
@@ -7897,7 +7899,9 @@ SEM_FN_NAME (i960base,init_idesc_table) (SIM_CPU *current_cpu)
for (sf = &sem_fns[0]; sf->fn != 0; ++sf)
{
- int valid_p = CGEN_INSN_MACH_HAS_P (idesc_table[sf->index].idata, mach_num);
+ const CGEN_INSN *insn = idesc_table[sf->index].idata;
+ int valid_p = (CGEN_INSN_VIRTUAL_P (insn)
+ || CGEN_INSN_MACH_HAS_P (insn, mach_num));
#if FAST_P
if (valid_p)
idesc_table[sf->index].sem_fast = sf->fn;
diff --git a/sim/i960/traps.c b/sim/i960/traps.c
index 5b62ca1..570fc95 100644
--- a/sim/i960/traps.c
+++ b/sim/i960/traps.c
@@ -23,8 +23,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
/* The semantic code invokes this for illegal (unrecognized) instructions. */
-void
-sim_engine_invalid_insn (SIM_CPU *current_cpu, IADDR cia)
+SEM_PC
+sim_engine_invalid_insn (SIM_CPU *current_cpu, IADDR cia, SEM_PC vpc)
{
SIM_DESC sd = CPU_STATE (current_cpu);
@@ -46,6 +46,7 @@ sim_engine_invalid_insn (SIM_CPU *current_cpu, IADDR cia)
else
#endif
sim_engine_halt (sd, current_cpu, NULL, cia, sim_stopped, SIM_SIGILL);
+ return vpc;
}
/* Process an address exception. */
diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog
index aeba794..ffbc800 100644
--- a/sim/m32r/ChangeLog
+++ b/sim/m32r/ChangeLog
@@ -1,3 +1,14 @@
+1999-09-29 Doug Evans <devans@casey.cygnus.com>
+
+ * mloop.in: Update call to sim_engine_invalid_insn.
+ * sem.c,sem-switch.c: Rebuild.
+ * traps.c (sim_engine_invalid_insn): New arg `vpc'. Change type of
+ result to SEM_PC. Return vpc.
+
+Wed Sep 29 14:47:20 1999 Dave Brolley <brolley@cygnus.com>
+
+ * traps.c (sim_engine_invalid_insn): Return PC.
+
Thu Sep 2 18:15:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
diff --git a/sim/m32r/mloop.in b/sim/m32r/mloop.in
index b79b756..0be16bb 100644
--- a/sim/m32r/mloop.in
+++ b/sim/m32r/mloop.in
@@ -253,7 +253,7 @@ cat <<EOF
{
/* ??? Defer signalling to execution. */
if ((insn & 0x7fff) != 0x7000) /* parallel nops are ok */
- sim_engine_invalid_insn (current_cpu, pc - 2);
+ sim_engine_invalid_insn (current_cpu, pc - 2, 0);
/* There's no point in processing parallel nops in fast mode.
We might as well do this test since we've already tested
that we have a parallel nop. */
diff --git a/sim/m32r/sem-switch.c b/sim/m32r/sem-switch.c
index cd7e8da..1b0b447 100644
--- a/sim/m32r/sem-switch.c
+++ b/sim/m32r/sem-switch.c
@@ -204,13 +204,15 @@ SWITCH (sem, SEM_ARGBUF (vpc) -> semantic.sem_case)
vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
{
-#if WITH_SCACHE
- /* Update the recorded pc in the cpu state struct. */
+ /* Update the recorded pc in the cpu state struct.
+ Only necessary for WITH_SCACHE case, but to avoid the
+ conditional compilation .... */
SET_H_PC (pc);
-#endif
- sim_engine_invalid_insn (current_cpu, pc);
- sim_io_error (CPU_STATE (current_cpu), "invalid insn not handled\n");
- /* NOTREACHED */
+ /* Virtual insns have zero size. Overwrite vpc with address of next insn
+ using the default-insn-bitsize spec. When executing insns in parallel
+ we may want to queue the fault and continue execution. */
+ vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
+ vpc = sim_engine_invalid_insn (current_cpu, pc, vpc);
}
#undef FLD
diff --git a/sim/m32r/sem.c b/sim/m32r/sem.c
index b4f1569..63a0abf 100644
--- a/sim/m32r/sem.c
+++ b/sim/m32r/sem.c
@@ -55,13 +55,15 @@ SEM_FN_NAME (m32rbf,x_invalid) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
{
-#if WITH_SCACHE
- /* Update the recorded pc in the cpu state struct. */
+ /* Update the recorded pc in the cpu state struct.
+ Only necessary for WITH_SCACHE case, but to avoid the
+ conditional compilation .... */
SET_H_PC (pc);
-#endif
- sim_engine_invalid_insn (current_cpu, pc);
- sim_io_error (CPU_STATE (current_cpu), "invalid insn not handled\n");
- /* NOTREACHED */
+ /* Virtual insns have zero size. Overwrite vpc with address of next insn
+ using the default-insn-bitsize spec. When executing insns in parallel
+ we may want to queue the fault and continue execution. */
+ vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
+ vpc = sim_engine_invalid_insn (current_cpu, pc, vpc);
}
return vpc;
@@ -2675,7 +2677,9 @@ SEM_FN_NAME (m32rbf,init_idesc_table) (SIM_CPU *current_cpu)
for (sf = &sem_fns[0]; sf->fn != 0; ++sf)
{
- int valid_p = CGEN_INSN_MACH_HAS_P (idesc_table[sf->index].idata, mach_num);
+ const CGEN_INSN *insn = idesc_table[sf->index].idata;
+ int valid_p = (CGEN_INSN_VIRTUAL_P (insn)
+ || CGEN_INSN_MACH_HAS_P (insn, mach_num));
#if FAST_P
if (valid_p)
idesc_table[sf->index].sem_fast = sf->fn;
diff --git a/sim/m32r/traps.c b/sim/m32r/traps.c
index f3009f3..2721ad8 100644
--- a/sim/m32r/traps.c
+++ b/sim/m32r/traps.c
@@ -21,10 +21,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "sim-main.h"
#include "targ-vals.h"
-/* The semantic code invokes this for invalid (unrecognized) instructions. */
+/* The semantic code invokes this for invalid (unrecognized) instructions.
+ CIA is the address with the invalid insn.
+ VPC is the virtual pc of the following insn. */
-void
-sim_engine_invalid_insn (SIM_CPU *current_cpu, IADDR cia)
+SEM_PC
+sim_engine_invalid_insn (SIM_CPU *current_cpu, IADDR cia, SEM_PC vpc)
{
SIM_DESC sd = CPU_STATE (current_cpu);
@@ -46,6 +48,7 @@ sim_engine_invalid_insn (SIM_CPU *current_cpu, IADDR cia)
else
#endif
sim_engine_halt (sd, current_cpu, NULL, cia, sim_stopped, SIM_SIGILL);
+ return vpc;
}
/* Process an address exception. */