+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
* 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.
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
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 \
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
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 \
$(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
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
{
/* 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
/* 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));
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));
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[] =
{
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 ();
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 */
#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"
/* 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
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
--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
-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=*)
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
# 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
# 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
# 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
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.
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
{ 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
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
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
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=
# 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
:
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
:
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
:
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
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
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
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>
; 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
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
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
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
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
# 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
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>
#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*
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
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
:
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')
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
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() {
; 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
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
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
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
# 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
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__
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
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
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. */
; 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
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
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1651 "configure"
+#line 1662 "configure"
#include "confdefs.h"
find_stack_direction ()
{
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
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*
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. */
; 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
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
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.
}
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
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*
__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. */
; 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
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. */
; 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
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
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"
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"
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*
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
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
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
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
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
# 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
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. */
; 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
# 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
# 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
fi
cat > conftest.$ac_ext <<EOF
-#line 2481 "configure"
+#line 2492 "configure"
#include "confdefs.h"
int main() {
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
# 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
# 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
# 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
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
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*
# 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
# 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
# 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
# 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
# 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
# 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
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>
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
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>
#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*
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
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
:
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')
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
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*
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>
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() {
; 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
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. */
; 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
# 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
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__
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
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
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. */
; 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
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
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 3643 "configure"
+#line 3654 "configure"
#include "confdefs.h"
find_stack_direction ()
{
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
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
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
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
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. */
; 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
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>
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
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>
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
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>
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
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>
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
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>
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
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>
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
# 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
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 4094 "configure"
+#line 4105 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
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 \
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
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
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
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
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>
; 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
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
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
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
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
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
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
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
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
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() {
; 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
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
gdb_cv_printf_has_long_long=no
else
cat > conftest.$ac_ext <<EOF
-#line 4524 "configure"
+#line 4535 "configure"
#include "confdefs.h"
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
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
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
gdb_cv_printf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 4604 "configure"
+#line 4615 "configure"
#include "confdefs.h"
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
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
gdb_cv_scanf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 4646 "configure"
+#line 4657 "configure"
#include "confdefs.h"
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
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*
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. */
; 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
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
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.
}
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
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
;;
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
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
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
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
# 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
# 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>
; 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
# 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__)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
# 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
# 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*
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.
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() {
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
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
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
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
/^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 ;;
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)
mv -f Makefile.tmp Makefile
changequote([,])dnl
+
case x$CONFIG_HEADERS in
xconfig.h:config.in)
echo > stamp-h ;;
z8k-*-coff*) gdb_target=z8k ;;
esac
+
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
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
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
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. */
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));
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. */
core_ops.to_sections_end = NULL;
}
}
+ core_vec = NULL;
}
#ifdef SOLIB_ADD
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,
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 */
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");
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
{
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
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 *)
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 (§ion_addrs, 0, sizeof (section_addrs));
+ section_addrs.text_addr = lms.l_addr;
+ symbol_file_add (path_name, 1, §ion_addrs, 0, 0, 0, 0);
free (path_name);
}
}
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 */
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. */
+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".
@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
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;
int nesting_level = 1;
int has_pc_info;
- *lowpc = ((CORE_ADDR) - 1);
+ *lowpc = ((CORE_ADDR) -1);
*highpc = ((CORE_ADDR) 0);
while (nesting_level)
/* 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;
}
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>";
/* 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;
#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
/* 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;
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);
\f
/* Insert an event object into the gdb event queue at
/* 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;
}
}
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
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;
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);
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);
#include <readline/readline.h>
#include <readline/history.h>
+#include <signal.h>
+
/* readline defines this. */
#undef savestring
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);
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);
}
\f
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
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);
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;
#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
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.
};
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) */
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"
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;
}
/* 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);
set_architecture_from_arch_mach (bfd_arch_i386, bfd_mach_i386_i386_intel_syntax);
}
+
void
_initialize_i386_tdep ()
{
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
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
#include "floatformat.h"
#include "target.h"
#include "gdbcore.h"
+#include "inferior.h"
static CORE_ADDR next_insn PARAMS ((CORE_ADDR memaddr,
unsigned int *pword1,
return (chain != read_memory_integer (a, 4));
}
+
void
_initialize_i960_tdep ()
{
--- /dev/null
+/* 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");
+ }
+}
--- /dev/null
+/* 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 */
#include "language.h"
#include "symfile.h"
#include "objfiles.h"
-#include "event-loop.h"
#include "event-top.h"
#include "parser-defs.h"
clear_proceed_status ();
- proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_DEFAULT, 0);
+ proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
}
\f
/* Step until outside of current statement. */
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;
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
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
}
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
}
#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);
#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 */
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 *);
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
void
fetch_inferior_event (client_data)
- gdb_client_data client_data;
+ void *client_data;
{
static struct cleanup *old_cleanups;
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);
}
}
return 0;
}
\f
-/* 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.
#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)
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
{
register struct so_list *so = (struct so_list *) arg; /* catch_errs bogon */
CORE_ADDR text_addr = 0;
+ struct section_addr_info section_addrs;
+ memset (§ion_addrs, 0, sizeof (section_addrs));
if (so->textsection)
text_addr = so->textsection->addr;
else if (so->abfd != NULL)
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);
+ §ion_addrs,
+ 0, 0, 0, 0);
return (1);
}
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
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
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"
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;
return read_memory_integer (read_register (SP_REGNUM), 4);
}
+
void
_initialize_m68k_tdep ()
{
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
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;
gdb_stdtarg = gdb_stderr; /* for moment */
#endif
+ /* initialize error() */
+ error_init ();
+
/* Parse arguments and options. */
{
int c;
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
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);
}
+
void
_initialize_mips_tdep ()
{
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
#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). */
{
register struct so_list *so = (struct so_list *) arg; /* catch_errs bogon */
CORE_ADDR text_addr = 0;
+ struct section_addr_info section_addrs;
+ memset (§ion_addrs, 0, sizeof (section_addrs));
if (so->textsection)
text_addr = so->textsection->addr;
else if (so->abfd != NULL)
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);
+ §ion_addrs,
+ 0, 0, 0, 1);
return (1);
}
bfd *tmp_bfd;
asection *sec;
obj_private_data_t *obj_private;
+ struct section_addr_info section_addrs;
+ memset (§ion_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);
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, §ion_addrs, 0, 0, 0, 1);
so->abfd = so->objfile->obfd;
/* Mark this as a shared library and save private data. */
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));
return val;
}
\f
-/* 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);
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;
/* 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;
* 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);
}
}
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);
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)
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);
}
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");
}
/* 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. */
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);
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,
/* 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. */
/* 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
#include "event-loop.h"
#include "event-top.h"
+#include "inf-loop.h"
#include <signal.h>
#include "serial.h"
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,
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
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';
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);
}
\f
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
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");
}
/* 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 ();
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.
{
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;
}
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
{
show_current_variant ();
}
-\f
+\f
+
/* Initialization code. */
void
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;
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;
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;
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;
#include "gdb_string.h"
#include "event-loop.h"
-
#ifdef HAVE_TERMIOS
struct hardwire_ttystate
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);
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);
#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). */
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);
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)
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++;
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). */
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
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)
{
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.
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] */
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,
}
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
return 0;
}
+
+\f
+/* 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;
+ }
}
}
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;
/* 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);
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;
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";
#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;
}
}
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;
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;
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);
}
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. */
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));
}
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
"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);
}
/* 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))
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))
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 */
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 */
};
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;
{
register struct so_list *so = (struct so_list *) arg; /* catch_errs bogon */
CORE_ADDR text_addr = 0;
+ struct section_addr_info section_addrs;
+ memset (§ion_addrs, 0, sizeof (section_addrs));
if (so->textsection)
text_addr = so->textsection->addr;
else if (so->abfd != NULL)
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);
+ §ion_addrs,
+ 0, 0, 0, 1);
return (1);
}
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 */
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;
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;
}
}
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 (§ion_addrs, 0, sizeof (section_addrs));
+ section_addrs.text_addr = text_addr;
+ so->objfile = symbol_file_add (name, from_tty, §ion_addrs, 0, 0, 0, 1);
so->abfd = so->objfile->obfd;
/* Mark this as a shared library and save private data.
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
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
"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;
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;
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;
+ }
}
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);
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
(*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
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 */
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;
{
&& !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. */
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
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)
{
char *name = NULL;
CORE_ADDR text_relocation = 0; /* text_relocation */
struct cleanup *cleanups;
- int mapped = 0;
- int readnow = 0;
+ int flags = 0;
dont_repeat ();
{
if (STREQ (*argv, "-mapped"))
{
- mapped = 1;
+ flags |= OBJF_MAPPED;
}
else if (STREQ (*argv, "-readnow"))
{
- readnow = 1;
+ flags |= OBJF_READNOW;
}
else if (**argv == '-')
{
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 (§ion_addrs, 0, sizeof (section_addrs));
+ section_addrs.text_addr = (CORE_ADDR) text_relocation;
+ symbol_file_add (name, from_tty, §ion_addrs,
+ 0, flags, 1, 0);
+ }
/* Getting new symbols may change our opinion about what is
frameless. */
{
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 ();
args = strdup (args);
make_cleanup (free, args);
+ /* Ensure section_addrs is initialized */
+ memset (§ion_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))
{
}
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");
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, §ion_addrs, 0, flags,
1, /* user_loaded */
0); /* We'll guess it's ! is_solib */
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;
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
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
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));
(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. */
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 */
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
}
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
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));
/* 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? */
};
+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!
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
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" \
# 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
#
#
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\]
# 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"
#include <sys/types.h>
-#include "event-loop.h"
+
#include "event-top.h"
#include "gdb_string.h"
#include "gdb_stat.h"
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
#include "defs.h"
#include <ctype.h>
#include "gdb_string.h"
-#include "event-loop.h"
#include "event-top.h"
#ifdef HAVE_CURSES_H
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 *,
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. */
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;
}
}
+/* DEPRECATED: Use tui_sfileopen() instead */
+
GDB_FILE *
gdb_file_init_astring (n)
int n;
char *p, *dll_name = NULL;
struct objfile *objfile;
MEMORY_BASIC_INFORMATION minfo;
+ struct section_addr_info section_addrs;
+ memset (§ion_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
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, §ion_addrs, 0, 0, 0, 1);
printf_unfiltered ("\n");
return 1;
/* 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
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));
static void
xcoff_symfile_offsets (objfile, addr)
struct objfile *objfile;
- CORE_ADDR addr;
+ struct section_addr_info *addrs;
{
int i;
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");
+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.
+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.
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;
}
}
case SWI_WriteC :
- (void)fputc((int)state->Reg[0],stderr) ;
+ (void)fputc((int)state->Reg[0],stdout) ;
OSptr->ErrorNo = errno ;
return(TRUE) ;
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);
+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.
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)
\f
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 */
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
--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
-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=*)
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
# 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
# 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
# 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
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.
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
{ 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
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
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
# 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
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
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
# 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
# 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
# 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
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
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
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
# 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
# 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
# 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
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.
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
{ 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
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
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
# 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
# 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
# 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
+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.
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
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
}
#undef FLD
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
#undef FLD
}
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
#undef FLD
}
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
#undef FLD
}
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
#undef FLD
}
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
#undef FLD
}
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
#undef FLD
}
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;
SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
{
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
}
return vpc;
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
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
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
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
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
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
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;
/* 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);
else
#endif
sim_engine_halt (sd, current_cpu, NULL, cia, sim_stopped, SIM_SIGILL);
+ return vpc;
}
/* Process an address exception. */
+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.
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
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
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-do { } while (0); /*nop*/
+((void) 0); /*nop*/
#undef FLD
}
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;
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
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;
/* 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);
else
#endif
sim_engine_halt (sd, current_cpu, NULL, cia, sim_stopped, SIM_SIGILL);
+ return vpc;
}
/* Process an address exception. */
+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.
{
/* ??? 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. */
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
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;
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;
#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);
else
#endif
sim_engine_halt (sd, current_cpu, NULL, cia, sim_stopped, SIM_SIGILL);
+ return vpc;
}
/* Process an address exception. */