summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog192
-rw-r--r--gdb/MAINTAINERS3
-rw-r--r--gdb/Makefile.in6
-rw-r--r--gdb/arm-tdep.c7
-rw-r--r--gdb/coffread.c5
-rw-r--r--gdb/config.in3
-rw-r--r--gdb/config/arm/arm.mt2
-rw-r--r--gdb/config/i386/embed.mt3
-rw-r--r--gdb/config/i386/nm-i386sol2.h3
-rw-r--r--gdb/config/mcore/tm-mcore.h1
-rw-r--r--gdb/config/pa/hpux1100w.mh11
-rw-r--r--gdb/config/pa/hpux1100w.mt3
-rw-r--r--gdb/config/pa/tm-hppa.h15
-rw-r--r--gdb/config/pa/tm-hppa64.h19
-rw-r--r--gdb/config/pa/tm-hppah.h10
-rw-r--r--gdb/config/sparc/nm-sun4sol2.h3
-rwxr-xr-xgdb/configure371
-rw-r--r--gdb/configure.host1
-rw-r--r--gdb/configure.in7
-rw-r--r--gdb/configure.tgt10
-rw-r--r--gdb/defs.h1
-rw-r--r--gdb/doc/ChangeLog22
-rw-r--r--gdb/doc/Makefile.in18
-rw-r--r--gdb/doc/gdb.texinfo70
-rw-r--r--gdb/doc/gdbint.texinfo8
-rw-r--r--gdb/doc/remote.texi22
-rw-r--r--gdb/event-loop.c18
-rw-r--r--gdb/event-loop.h11
-rw-r--r--gdb/event-top.c17
-rw-r--r--gdb/gdbarch.c2
-rw-r--r--gdb/gdbinit.in2
-rw-r--r--gdb/gnu-regex.c6
-rw-r--r--gdb/hp-symtab-read.c1
-rw-r--r--gdb/hppa-tdep.c251
-rw-r--r--gdb/hppah-nat.c124
-rw-r--r--gdb/i386-tdep.c3
-rw-r--r--gdb/infrun.c2
-rw-r--r--gdb/infttrace.c49
-rw-r--r--gdb/kod-cisco.c3
-rw-r--r--gdb/maint.c24
-rw-r--r--gdb/objfiles.c20
-rw-r--r--gdb/objfiles.h3
-rw-r--r--gdb/remote.c13
-rw-r--r--gdb/somread.c28
-rw-r--r--gdb/source.c52
-rw-r--r--gdb/stabsread.c14
-rw-r--r--gdb/testsuite/ChangeLog28
-rw-r--r--gdb/testsuite/gdb.base/dbx.exp49
-rw-r--r--gdb/testsuite/gdb.base/maint.exp43
-rw-r--r--gdb/testsuite/gdb.hp/Makefile.in41
-rwxr-xr-xgdb/testsuite/gdb.hp/configure1008
-rw-r--r--gdb/testsuite/gdb.hp/configure.in17
-rw-r--r--gdb/testsuite/gdb.hp/gdb.aCC/Makefile.in27
-rwxr-xr-xgdb/testsuite/gdb.hp/gdb.aCC/configure899
-rw-r--r--gdb/testsuite/gdb.hp/gdb.aCC/configure.in15
-rw-r--r--gdb/testsuite/gdb.hp/gdb.aCC/exception.cc48
-rw-r--r--gdb/testsuite/gdb.hp/gdb.aCC/exception.exp439
-rw-r--r--gdb/testsuite/gdb.hp/gdb.aCC/namespace.cc103
-rw-r--r--gdb/testsuite/gdb.hp/gdb.aCC/namespace.exp193
-rw-r--r--gdb/testsuite/gdb.hp/gdb.aCC/optimize.c76
-rw-r--r--gdb/testsuite/gdb.hp/gdb.aCC/optimize.exp149
-rw-r--r--gdb/testsuite/gdb.hp/gdb.aCC/run.c72
-rw-r--r--gdb/testsuite/gdb.hp/gdb.aCC/watch-cmd.exp157
-rw-r--r--gdb/testsuite/gdb.hp/gdb.base-hp/Makefile.in32
-rwxr-xr-xgdb/testsuite/gdb.hp/gdb.base-hp/configure899
-rw-r--r--gdb/testsuite/gdb.hp/gdb.base-hp/configure.in15
-rw-r--r--gdb/testsuite/gdb.hp/gdb.base-hp/dollar.c10
-rw-r--r--gdb/testsuite/gdb.hp/gdb.base-hp/dollar.exp155
-rw-r--r--gdb/testsuite/gdb.hp/gdb.base-hp/genso-thresh.c229
-rw-r--r--gdb/testsuite/gdb.hp/gdb.base-hp/hwwatchbus.c9
-rw-r--r--gdb/testsuite/gdb.hp/gdb.base-hp/hwwatchbus.exp83
-rw-r--r--gdb/testsuite/gdb.hp/gdb.base-hp/pxdb.c37
-rw-r--r--gdb/testsuite/gdb.hp/gdb.base-hp/pxdb.exp128
-rw-r--r--gdb/testsuite/gdb.hp/gdb.base-hp/reg-pa64.exp189
-rw-r--r--gdb/testsuite/gdb.hp/gdb.base-hp/reg-pa64.s104
-rw-r--r--gdb/testsuite/gdb.hp/gdb.base-hp/reg.exp192
-rw-r--r--gdb/testsuite/gdb.hp/gdb.base-hp/reg.s96
-rw-r--r--gdb/testsuite/gdb.hp/gdb.base-hp/sized-enum.c43
-rw-r--r--gdb/testsuite/gdb.hp/gdb.base-hp/sized-enum.exp165
-rw-r--r--gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.exp346
-rw-r--r--gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.mk73
-rwxr-xr-xgdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.sh34
-rw-r--r--gdb/testsuite/gdb.hp/gdb.compat/Makefile.in27
-rw-r--r--gdb/testsuite/gdb.hp/gdb.compat/average.c46
-rwxr-xr-xgdb/testsuite/gdb.hp/gdb.compat/configure899
-rw-r--r--gdb/testsuite/gdb.hp/gdb.compat/configure.in15
-rw-r--r--gdb/testsuite/gdb.hp/gdb.compat/sum.c15
-rw-r--r--gdb/testsuite/gdb.hp/gdb.compat/xdb.c20
-rw-r--r--gdb/testsuite/gdb.hp/gdb.compat/xdb0.c42
-rw-r--r--gdb/testsuite/gdb.hp/gdb.compat/xdb0.h36
-rw-r--r--gdb/testsuite/gdb.hp/gdb.compat/xdb1.c33
-rw-r--r--gdb/testsuite/gdb.hp/gdb.compat/xdb1.exp78
-rw-r--r--gdb/testsuite/gdb.hp/gdb.compat/xdb2.exp105
-rw-r--r--gdb/testsuite/gdb.hp/gdb.compat/xdb3.exp321
-rw-r--r--gdb/testsuite/gdb.hp/gdb.defects/Makefile.in27
-rw-r--r--gdb/testsuite/gdb.hp/gdb.defects/bs14602.c9
-rw-r--r--gdb/testsuite/gdb.hp/gdb.defects/bs14602.exp110
-rw-r--r--gdb/testsuite/gdb.hp/gdb.defects/bs15503.cc52
-rw-r--r--gdb/testsuite/gdb.hp/gdb.defects/bs15503.exp76
-rwxr-xr-xgdb/testsuite/gdb.hp/gdb.defects/configure899
-rw-r--r--gdb/testsuite/gdb.hp/gdb.defects/configure.in15
-rw-r--r--gdb/testsuite/gdb.hp/gdb.defects/solib-d.c6
-rw-r--r--gdb/testsuite/gdb.hp/gdb.defects/solib-d.exp262
-rw-r--r--gdb/testsuite/gdb.hp/gdb.defects/solib-d1.c12
-rw-r--r--gdb/testsuite/gdb.hp/gdb.defects/solib-d2.c11
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/Makefile.in28
-rwxr-xr-xgdb/testsuite/gdb.hp/gdb.objdbg/configure992
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/configure.in16
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01.exp212
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x1.cc25
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x2.cc14
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x3.cc7
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x3.h22
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02.exp75
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x1.cc16
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x2.cc17
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x3.cc6
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03.exp154
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x1.cc15
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x2.cc7
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x3.cc21
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04.exp55
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x.h30
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x1.cc15
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x2.cc3
-rwxr-xr-xgdb/testsuite/gdb.hp/gdb.objdbg/tools/symaddr8
-rwxr-xr-xgdb/testsuite/gdb.hp/gdb.objdbg/tools/symaddr.pa648
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/tools/test-objdbg.cc4
-rw-r--r--gdb/testsuite/gdb.hp/gdb.threads-hp/Makefile.in27
-rwxr-xr-xgdb/testsuite/gdb.hp/gdb.threads-hp/configure899
-rw-r--r--gdb/testsuite/gdb.hp/gdb.threads-hp/configure.in15
-rw-r--r--gdb/testsuite/gdb.hp/gdb.threads-hp/usrthbasic.c171
-rw-r--r--gdb/testsuite/gdb.hp/gdb.threads-hp/usrthbasic.exp107
-rw-r--r--gdb/testsuite/gdb.hp/gdb.threads-hp/usrthcore.c177
-rw-r--r--gdb/testsuite/gdb.hp/gdb.threads-hp/usrthcore.exp89
-rw-r--r--gdb/testsuite/gdb.hp/gdb.threads-hp/usrthfork.c17
-rw-r--r--gdb/testsuite/gdb.hp/gdb.threads-hp/usrthfork.exp72
-rwxr-xr-xgdb/testsuite/gdb.hp/tools/odump7
-rw-r--r--gdb/top.c3
-rw-r--r--gdb/utils.c67
-rw-r--r--gdb/win32-nat.c25
-rw-r--r--readline/ChangeLog.Cygnus18
-rw-r--r--readline/doc/ChangeLog8
-rw-r--r--readline/doc/inc-hist.texinfo399
144 files changed, 14049 insertions, 580 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bb3f6c634b1..3a63a2bd8f5 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,195 @@
+Mon Aug 16 19:08:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure.in: Try -lsocket when looking for socketpair.
+ * configure, config.h: Re-generate.
+
+1999-08-13 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ From Christopher Faylor <cgf@cygnus.com>:
+
+ * event-loop.c (gdb_wait_for_event): Before going to wait for
+ another event with select or poll, flush the error and the output
+ streams.
+
+ * event-top.c (gdb_readline2): Do not buffer the input, because
+ doing so can interfere with select/poll in bad ways.
+
+Fri Aug 13 17:36:56 1999 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * maint.c (maintenance_dump_me) [__DJGPP__]: Simulate a core dump
+ with SIGABRT.
+ * utils.c (quit) [__MSDOS__]: Don't mention SIGINT, since it's not
+ gonna happen.
+ (notice_quit): No need to define this function for the DJGPP port.
+
+1999-08-13 James Ingham <jingham@leda.cygnus.com>
+
+ * arm-tdep.c (arm_frameless_function_invocation): SKIP_PROLOGUE
+ macro no longer modifies its argument. Update uses to accord.
+
+ * config/arm/arm.mt (TDEPFILES): Add the remote-rdi.o to the
+ TDEPFILES.
+ * configure.tgt: Add rdi-share to configdir for the Arm targets.
+
+Fri Aug 13 11:16:32 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppah-nat.c (store_inferior_registers): Revamp to be PA2.0W
+ aware.
+
+ * infttrace.c (ttrace_write_reg_64): New function.
+
+ * hp-symtab-read.c (is_in_import_list): Delete extern declaration.
+ * somread.c (is_in_import_list): Delete function.
+ * objfiles.c (is_in_import_list): New function.
+ * objfiles.h (is_in_import_list): Declare.
+
+ * config/pa/tm-hppa64.h (GDB_TARGET_IS_HPPA20W): Define before
+ including tm-hppah.h.
+ (PC_IN_CALL_DUMMY): Define.
+ (HPUX_1100): Similarly.
+ * config/pa/tm-hppa.h (somsolib.h, pa64solib.h): Conditionalize
+ includes on GDB_TARGET_IS_HPPA20W.
+
+ * configure.host: Distinguish between wide and narrow modes
+ for hpux11.
+ * config/pa/hpux1100w.mh, config/pa/hpux1100w.mt: New files.
+
+ * config/pa/tm-hppa64.h (STACK_ALIGN): Redefine.
+ (REG_PARM_STACK_SPACE): Likewise.
+
+ * config/pa/tm-hppa.h (CLEAN_UP_REGISTER_VALUE): Handle 64bit
+ PA target correctly.
+ (REG_PARM_STACK_SPACE): Define.
+ (struct unwind_table_entry): region_start and region_end are
+ CORE_ADDRs.
+ (typedef opd_data): New.
+ (obj_private_data_t): Include pointer to opd_data structure.
+
+1999-08-13 Keith Seitz <keiths@cygnus.com>
+
+ * stabsread.c (stabsread_clear_cache): New funciton which clears
+ an optimization cache of the reader.
+
+ * coffread.c (coff_symfile_finish): Give stabs reader a chance to
+ clean up.
+
+ * win32-nat.c (handle_load_dll): Don't suppress re-reading symbols
+ from a DLL if an objfile for it already exists. (Not that this should
+ happen anymore anyway...)
+
+1999-08-13 Keith Seitz <keiths@cygnus.com>
+
+ * config/mcore/tm-mcore.h (SAVE_DUMMY_FRAME_TOS): Define for MCore,
+ which also requires that the stack pointer be saved for call
+ dummies BEFORE arguments get pushed onto it.
+
+1999-08-12 Stan Shebs <shebs@andros.cygnus.com>
+
+ From Eli Zaretskii <eliz@is.elta.co.il>:
+ * source.c (mod_path) [_WIN32 || __DJGPP__]: Don't remove trailing
+ slash from "d:/". Don't overstep the beginning of name.
+ [_WIN32 || __MSDOS__]: Convert "d:" to "d:.", otherwise appending
+ a slash changes its meaning.
+ (openp): Use SLASH_P, not equality with SLASH_CHAR.
+ (print_source_lines_base) [CRLF_SOURCE_FILES]: Skip \r only before
+ a \n.
+ (forward_search_command) [CRLF_SOURCE_FILES]: Remove \r at the end
+ of all lines.
+ (reverse_search_command) [CRLF_SOURCE_FILES]: Likewise.
+
+ * gnu-regex.c (CHAR_CLASS_MAX_LENGTH): Don't use wide characters
+ unless HAVE_BTOWC is defined.
+
+Fri Aug 13 10:20:12 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ From J.T. Conklin <jtc@redback.com>:
+ * gdbinit.in: Change the template .gdbinit to match the recent
+ fatal error handling change.
+
+1999-08-11 Keith Seitz <keiths@cygnus.com>
+
+ * maint.c (maintenance_internal_error): Fix typo in prototype.
+
+Wed Aug 11 15:38:05 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * remote.c (remote_rcmd): Pass an empty command across to the
+ target. Check for and handle an ``Enn'' return status.
+
+Tue Aug 10 13:59:45 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * maint.c (_initialize_maint_cmds): Add ``maintenance
+ internal-error'' command.
+ (maintenance_internal_error): New function.
+
+1999-08-10 James Ingham <jingham@leda.cygnus.com>
+
+ * top.c: Remove the disassembly_flavor_hook, use the new set_hook
+ instead.
+ * defs.h: Ditto.
+ * arm-tdep.c (set_disassembly_flavor_sfunc): Ditto.
+
+1999-08-10 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * config/i386/nm-i386sol2.h (FIND_NEW_THREADS): remove, obsolete.
+ * config/sparc/nm-sun4sol2.h (FIND_NEW_THREADS): remove, obsolete.
+
+1999-08-10 J.T. Conklin <jtc@redback.com>
+
+ * configure.tgt (i[3456]86-*-aout*, i[3456]86-*-coff*,
+ i[3456]86-*-elf*): Use embed.mt.
+ * config/i386/embed.mt: New file.
+
+1999-08-10 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * remote.c (remote_async_open_1): Remove casting in call to
+ add_file_handler.
+ (extended_remote_async_create_inferior): Ditto.
+
+ * event-top.c (change_line_handler): Ditto.
+ (_initialize_event_loop): Ditto.
+
+ * infrun.c (complete_execution): Ditto.
+
+ * event-loop.c (add_file_handler): Change proc parameter to be ptr
+ to func with void parameter, rather than void*. Coerce second
+ paramter in calls to create_file_handler. Replace
+ async_handler_func and file_handler_func with handler_func.
+
+ * event-loop.h: Get rid of typedefs for file_handler_func and
+ async_handler_func, just have one, and call it handler_func.
+ Replace async_handler_func and file_handler_func occurrences with
+ handler_func.
+
+Tue Aug 10 03:13:03 1999 Jeffrey A Law (law@cygnus.com)
+
+ * hppa-tdep.c: Delete random #if 0 code.
+ (is_branch): Handle new branching opcodes from PA2.0
+ (inst_saves_gr, inst_saves_fr): Handle additional instructions
+ used to save general and floating point registers in the stack.
+ (skip_prologue_hard_way): Handle additional instructions to
+ save the return pointer in the stack.
+ (after_prologue): Fix mis-guided and incorrect code to find
+ the end of the prologue using debug symbols.
+ (hppa_skip_prologue): Generally clean up comments, lose code
+ which does not apply to the PA, etc.
+
+Sun Aug 8 17:53:41 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * MAINTAINERS: Make Andrew Cagney the mn10300 maintainer.
+ Transfer responsibility for the PowerPC from Andrew Cagney to
+ Elena Zannoni.
+
+Tue Aug 10 13:59:45 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ Based on code from J.T. Conklin <jtc@redback.com>:
+ * utils.c (internal_error): Make quit? and coredump? separate
+ questions so that the user can dump-core and not quit.
+ (internal_error): Cleanup error message.
+
+1999-08-09 Tom Tromey <tromey@cygnus.com>
+
+ * kod-cisco.c (cisco_kod_open): Removed incorrect `arg' argument.
+
Sun Aug 8 12:06:47 1999 Fred Fish <fnf@cygnus.com>
* coffread.c (process_coff_symbol): Remove section_offsets from
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index 745d111753e..b9e8e0cb49b 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -2,7 +2,7 @@ hp testsuite (gdb.hp) Jimmy Guo adl-debugger-wdb-merge-guru@cup.hp.com
d10v target Andrew Cagney cagney@cygnus.com
d30v target Andrew Cagney cagney@cygnus.com
mips target Andrew Cagney cagney@cygnus.com
-powerpc target Andrew Cagney cagney@cygnus.com
+mn10300 target Andrew Cagney cagney@cygnus.com
generic arch support Andrew Cagney cagney@cygnus.com
target vector Andrew Cagney cagney@cygnus.com
remote.c Andrew Cagney cagney@cygnus.com
@@ -11,6 +11,7 @@ win32 host & native Chris Faylor cgf@cygnus.com
main (main.c, top.c) Elena Zannoni ezannoni@cygnus.com
readline Elena Zannoni ezannoni@cygnus.com
arm target Elena Zannoni ezannoni@cygnus.com
+powerpc target Elena Zannoni ezannoni@cygnus.com
command interpreter Fernando Nasser fnasser@cygnus.com
generic symtabs Jim Blandy jimb@cygnus.com
dwarf readers Jim Blandy jimb@cygnus.com
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 41fa52f324b..e669a18f55e 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -224,7 +224,7 @@ CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
ADD_DEPS = $(REGEX1) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
-VERSION = 19990809
+VERSION = 19990816
DIST=gdb
LINT=/usr/5bin/lint
@@ -531,9 +531,7 @@ NTSOBS = standalone.o
NTSSTART = kdb-start.o
-SUBDIRS = doc \
- testsuite \
- nlm
+SUBDIRS = @SUBDIRS@
# For now, shortcut the "configure GDB for fewer languages" stuff.
YYFILES = c-exp.tab.c \
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 994e48f7c95..7598a8decb8 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -186,8 +186,8 @@ arm_frameless_function_invocation (fi)
int frameless;
func_start = (get_pc_function_start ((fi)->pc) + FUNCTION_START_OFFSET);
- after_prologue = func_start;
- SKIP_PROLOGUE (after_prologue);
+ after_prologue = SKIP_PROLOGUE (func_start);
+
/* There are some frameless functions whose first two instructions
follow the standard APCS form, in which case after_prologue
will be func_start + 8. */
@@ -1201,9 +1201,6 @@ set_disassembly_flavor_sfunc (args, from_tty, c)
struct cmd_list_element *c;
{
set_disassembly_flavor ();
-
- if (disassembly_flavor_hook != NULL)
- disassembly_flavor_hook(args, from_tty);
}
static void
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 29ec6651ff4..3ec0b708cfd 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -176,6 +176,8 @@ struct coff_symbol
unsigned int c_type;
};
+extern void stabsread_clear_cache PARAMS ((void));
+
static struct type *coff_read_struct_type PARAMS ((int, int, int));
static struct type *decode_base_type PARAMS ((struct coff_symbol *,
@@ -735,6 +737,9 @@ coff_symfile_finish (objfile)
{
mfree (objfile->md, objfile->sym_private);
}
+
+ /* Let stabs reader clean up */
+ stabsread_clear_cache ();
}
diff --git a/gdb/config.in b/gdb/config.in
index e691b8a8c4a..d0ae5a23057 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -285,6 +285,9 @@
/* Define if you have the m library (-lm). */
#undef HAVE_LIBM
+/* Define if you have the socket library (-lsocket). */
+#undef HAVE_LIBSOCKET
+
/* Define if you have the w library (-lw). */
#undef HAVE_LIBW
diff --git a/gdb/config/arm/arm.mt b/gdb/config/arm/arm.mt
index 4933c46bcde..0f2cab317bc 100644
--- a/gdb/config/arm/arm.mt
+++ b/gdb/config/arm/arm.mt
@@ -1,5 +1,5 @@
# Target: Acorn RISC machine (ARM) with simulator
-TDEPFILES= arm-tdep.o remote-rdp.o
+TDEPFILES= arm-tdep.o remote-rdp.o remote-rdi.o rdi-share/libangsd.a
TM_FILE= tm-arm.h
SIM_OBS = remote-sim.o
diff --git a/gdb/config/i386/embed.mt b/gdb/config/i386/embed.mt
new file mode 100644
index 00000000000..e717974b11d
--- /dev/null
+++ b/gdb/config/i386/embed.mt
@@ -0,0 +1,3 @@
+# Target: Embedded Intel 386
+TDEPFILES= i386-tdep.o i387-tdep.o
+TM_FILE= tm-i386v.h
diff --git a/gdb/config/i386/nm-i386sol2.h b/gdb/config/i386/nm-i386sol2.h
index 68d61fcbbd7..279c9b09840 100644
--- a/gdb/config/i386/nm-i386sol2.h
+++ b/gdb/config/i386/nm-i386sol2.h
@@ -30,7 +30,4 @@ struct objfile;
void sol_thread_new_objfile PARAMS ((struct objfile * objfile));
-#define FIND_NEW_THREADS sol_find_new_threads
-void sol_find_new_threads PARAMS ((void));
-
#endif
diff --git a/gdb/config/mcore/tm-mcore.h b/gdb/config/mcore/tm-mcore.h
index aab7b7475d1..69329b419f2 100644
--- a/gdb/config/mcore/tm-mcore.h
+++ b/gdb/config/mcore/tm-mcore.h
@@ -122,6 +122,7 @@ extern void mcore_pop_frame (struct frame_info *fi);
#define FIX_CALL_DUMMY(DUMMY, START, FUNADDR, NARGS, ARGS, TYPE, GCCP)
#define CALL_DUMMY_ADDRESS() entry_point_address ()
#define SIZEOF_CALL_DUMMY_WORDS 0
+#define SAVE_DUMMY_FRAME_TOS(SP) generic_save_dummy_frame_tos (SP)
extern CORE_ADDR mcore_push_return_address PARAMS ((CORE_ADDR, CORE_ADDR));
#define PUSH_RETURN_ADDRESS(PC, SP) mcore_push_return_address (PC, SP)
diff --git a/gdb/config/pa/hpux1100w.mh b/gdb/config/pa/hpux1100w.mh
new file mode 100644
index 00000000000..3eed3f5f21d
--- /dev/null
+++ b/gdb/config/pa/hpux1100w.mh
@@ -0,0 +1,11 @@
+# Host: Hewlett-Packard PA-RISC machine, running HPUX 11.00
+
+MH_CFLAGS = -D__HP_CURSES
+
+XM_FILE= xm-hppah.h
+XDEPFILES= ser-tcp.o
+
+NAT_FILE= nm-hppah11.h
+NATDEPFILES= hppah-nat.o corelow.o core-aout.o inftarg.o fork-child.o infttrace.o somread.o hp-psymtab-read.o hp-symtab-read.o somsolib.o pa64solib.o
+
+HOST_IPC=-DBSD_IPC -DPOSIX_WAIT
diff --git a/gdb/config/pa/hpux1100w.mt b/gdb/config/pa/hpux1100w.mt
new file mode 100644
index 00000000000..94770ea2bc4
--- /dev/null
+++ b/gdb/config/pa/hpux1100w.mt
@@ -0,0 +1,3 @@
+# Target: HP PA-RISC running HPUX 11.00
+TDEPFILES= hppa-tdep.o remote-pa.o somsolib.o pa64solib.o
+TM_FILE= tm-hppah.h
diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h
index f284a189004..a35a098b389 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -254,7 +254,7 @@ extern CORE_ADDR saved_pc_after_call PARAMS ((struct frame_info *));
#define CLEAN_UP_REGISTER_VALUE(regno, buf) \
do { \
if ((regno) == PCOQ_HEAD_REGNUM || (regno) == PCOQ_TAIL_REGNUM) \
- (buf)[3] &= ~0x3; \
+ (buf)[sizeof(CORE_ADDR) -1] &= ~0x3; \
} while (0)
/* Define DO_REGISTERS_INFO() to do machine-specific formatting
@@ -564,6 +564,7 @@ extern void hppa_pop_frame PARAMS ((void));
0x00151820, 0xe6c00002, 0x08000240, 0x08000240}
#define CALL_DUMMY_LENGTH (INSTRUCTION_SIZE * 28)
+#define REG_PARM_STACK_SPACE 16
#else /* defined PA_LEVEL_0 */
@@ -648,8 +649,8 @@ extern CORE_ADDR
struct unwind_table_entry
{
- unsigned int region_start;
- unsigned int region_end;
+ CORE_ADDR region_start;
+ CORE_ADDR region_end;
unsigned int Cannot_unwind:1; /* 0 */
unsigned int Millicode:1; /* 1 */
@@ -753,10 +754,18 @@ struct obj_unwind_info
int last; /* Index of last entry */
};
+typedef struct data {
+ CORE_ADDR dummy[2];
+ CORE_ADDR func_addr;
+ CORE_ADDR dp;
+} opd_data;
+
typedef struct obj_private_struct
{
struct obj_unwind_info *unwind_info; /* a pointer */
struct so_list *so_info; /* a pointer */
+ opd_data *opd;
+ int n_opd_entries;
}
obj_private_data_t;
diff --git a/gdb/config/pa/tm-hppa64.h b/gdb/config/pa/tm-hppa64.h
index 3aaeaeedb7f..ea9090feabb 100644
--- a/gdb/config/pa/tm-hppa64.h
+++ b/gdb/config/pa/tm-hppa64.h
@@ -24,15 +24,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* PA 64-bit specific definitions. Override those which are in
tm-hppa.h */
-#include "pa/tm-hppah.h"
-
-#define HPUX_1100 1
-
/* jimb: this must go. I'm just using it to disable code I haven't
gotten working yet. */
#define GDB_TARGET_IS_HPPA_20W
/* The low two bits of the IA are the privilege level of the instruction. */
+#include "pa/tm-hppah.h"
+
+#define HPUX_1100 1
+
#define ADDR_BITS_REMOVE(addr) ((CORE_ADDR)addr & (CORE_ADDR)~3)
/* Say how long (ordinary) registers are. This is used in
@@ -191,11 +191,22 @@ call_dummy
#undef CALL_DUMMY_LENGTH
#define CALL_DUMMY_LENGTH (INSTRUCTION_SIZE * 25)
+/* The PA64 ABI mandates a 16 byte stack alignment. */
+#undef STACK_ALIGN
+#define STACK_ALIGN(arg) ( ((arg)%16) ? (((arg)+15)&-16) : (arg))
+
+/* The PA64 ABI reserves 64 bytes of stack space for outgoing register
+ parameters. */
+#undef REG_PARM_STACK_SPACE
+#define REG_PARM_STACK_SPACE 64
+
#undef FUNC_LDIL_OFFSET
#undef FUNC_LDO_OFFSET
#undef SR4EXPORT_LDIL_OFFSET
#undef SR4EXPORT_LDO_OFFSET
#undef CALL_DUMMY_LOCATION
+
+#define PC_IN_CALL_DUMMY(pc, sp, frame_address) hppa64_pc_in_call_dummy (pc)
/* jimb: need to find out what AT_WDB_CALL_DUMMY is about */
#if 0
#define CALL_DUMMY_LOCATION AFTER_TEXT_END
diff --git a/gdb/config/pa/tm-hppah.h b/gdb/config/pa/tm-hppah.h
index d6906bf0925..8014aa9679b 100644
--- a/gdb/config/pa/tm-hppah.h
+++ b/gdb/config/pa/tm-hppah.h
@@ -24,7 +24,17 @@
#define HPUX_SNAP1
#define HPUX_SNAP2
+/* The solib hooks are not really designed to have a list of hook
+ and handler routines. So until we clean up those interfaces you
+ either get SOM shared libraries or HP's unusual PA64 ELF shared
+ libraries, but not both. */
+#ifdef GDB_TARGET_IS_HPPA_20W
+#include "pa64solib.h"
+#endif
+
+#ifndef GDB_TARGET_IS_HPPA_20W
#include "somsolib.h"
+#endif
/* Actually, for a PA running HPUX the kernel calls the signal handler
without an intermediate trampoline. Luckily the kernel always sets
diff --git a/gdb/config/sparc/nm-sun4sol2.h b/gdb/config/sparc/nm-sun4sol2.h
index a1de6e4e63b..6b930f5a479 100644
--- a/gdb/config/sparc/nm-sun4sol2.h
+++ b/gdb/config/sparc/nm-sun4sol2.h
@@ -40,7 +40,4 @@ struct objfile;
void sol_thread_new_objfile PARAMS ((struct objfile * objfile));
-#define FIND_NEW_THREADS sol_find_new_threads
-void sol_find_new_threads PARAMS ((void));
-
#endif
diff --git a/gdb/configure b/gdb/configure
index b2d683cc0b5..b487dbac163 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -3389,16 +3389,15 @@ EOF
fi
-for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc poll \
- socketpair
+for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc poll
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3397: checking for $ac_func" >&5
+echo "configure:3396: 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 3401 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3421,7 +3420,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3448,19 +3447,19 @@ done
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:3452: checking for working alloca.h" >&5
+echo "configure:3451: 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 3456 "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:3463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -3481,12 +3480,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3485: checking for alloca" >&5
+echo "configure:3484: 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 3489 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -3514,7 +3513,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:3518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -3546,12 +3545,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3550: checking whether alloca needs Cray hooks" >&5
+echo "configure:3549: 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 3554 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -3576,12 +3575,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3580: checking for $ac_func" >&5
+echo "configure:3579: 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 3584 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3604,7 +3603,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3631,7 +3630,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3635: checking stack direction for C alloca" >&5
+echo "configure:3634: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3639,7 +3638,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 3643 "configure"
+#line 3642 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -3658,7 +3657,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:3662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3661: \"$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
@@ -3680,13 +3679,117 @@ EOF
fi
+echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6
+echo "configure:3684: 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
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lsocket $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3692 "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
+ builtin and then its argument prototype would still apply. */
+char socketpair();
+
+int main() {
+socketpair()
+; return 0; }
+EOF
+if { (eval echo configure:3703: \"$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 "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-lsocket $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+for ac_func in socketpair
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3733: 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 3738 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3761: \"$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 "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:3685: checking whether malloc must be declared" >&5
+echo "configure:3788: 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 3690 "configure"
+#line 3793 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3707,7 +3810,7 @@ int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:3711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_malloc=no
else
@@ -3728,12 +3831,12 @@ EOF
fi
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:3732: checking whether realloc must be declared" >&5
+echo "configure:3835: 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 3737 "configure"
+#line 3840 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3754,7 +3857,7 @@ int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:3758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_realloc=no
else
@@ -3775,12 +3878,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:3779: checking whether free must be declared" >&5
+echo "configure:3882: 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 3784 "configure"
+#line 3887 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3801,7 +3904,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:3805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -3822,12 +3925,12 @@ EOF
fi
echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
-echo "configure:3826: checking whether strerror must be declared" >&5
+echo "configure:3929: 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 3831 "configure"
+#line 3934 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3848,7 +3951,7 @@ int main() {
char *(*pfn) = (char *(*)) strerror
; return 0; }
EOF
-if { (eval echo configure:3852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strerror=no
else
@@ -3869,12 +3972,12 @@ EOF
fi
echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
-echo "configure:3873: checking whether strdup must be declared" >&5
+echo "configure:3976: 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 3878 "configure"
+#line 3981 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3895,7 +3998,7 @@ int main() {
char *(*pfn) = (char *(*)) strdup
; return 0; }
EOF
-if { (eval echo configure:3899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strdup=no
else
@@ -3916,12 +4019,12 @@ EOF
fi
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:3920: checking whether strstr must be declared" >&5
+echo "configure:4023: 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 3925 "configure"
+#line 4028 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3942,7 +4045,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:3946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -3969,9 +4072,9 @@ fi
# could be expunged. --jsm 1999-03-22
echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
-echo "configure:3973: checking for HPUX save_state structure" >&5
+echo "configure:4076: checking for HPUX save_state structure" >&5
cat > conftest.$ac_ext <<EOF
-#line 3975 "configure"
+#line 4078 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -3986,7 +4089,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 3990 "configure"
+#line 4093 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -4038,7 +4141,7 @@ EOF
gdb_cv_hostos_is_solaris=yes ;;
esac
echo $ac_n "checking for directory proc entries""... $ac_c" 1>&6
-echo "configure:4042: checking for directory proc entries" >&5
+echo "configure:4145: 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 \
@@ -4060,19 +4163,19 @@ fi
if test "$ac_cv_header_sys_procfs_h" = yes; then
echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4064: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:4167: 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 4069 "configure"
+#line 4172 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main() {
pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:4076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
@@ -4094,19 +4197,19 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4098: checking for prrun_t in sys/procfs.h" >&5
+echo "configure:4201: 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 4103 "configure"
+#line 4206 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main() {
prrun_t avar
; return 0; }
EOF
-if { (eval echo configure:4110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prrun_t=yes
else
@@ -4128,19 +4231,19 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4132: checking for gregset_t in sys/procfs.h" >&5
+echo "configure:4235: 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 4137 "configure"
+#line 4240 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main() {
gregset_t avar
; return 0; }
EOF
-if { (eval echo configure:4144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_gregset_t=yes
else
@@ -4162,19 +4265,19 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4166: checking for fpregset_t in sys/procfs.h" >&5
+echo "configure:4269: 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 4171 "configure"
+#line 4274 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main() {
fpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:4178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_fpregset_t=yes
else
@@ -4198,12 +4301,12 @@ EOF
echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4202: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
+echo "configure:4305: 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 4207 "configure"
+#line 4310 "configure"
#include "confdefs.h"
#include <unistd.h>
#include <sys/types.h>
@@ -4216,7 +4319,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_procfs_piocset=yes
else
@@ -4238,7 +4341,7 @@ EOF
fi
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:4242: checking for main in -lm" >&5
+echo "configure:4345: 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
@@ -4246,14 +4349,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4250 "configure"
+#line 4353 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:4257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4360: \"$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
@@ -4282,7 +4385,7 @@ fi
echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
-echo "configure:4286: checking for wctype in -lc" >&5
+echo "configure:4389: 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
@@ -4290,7 +4393,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4294 "configure"
+#line 4397 "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
@@ -4301,7 +4404,7 @@ int main() {
wctype()
; return 0; }
EOF
-if { (eval echo configure:4305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4408: \"$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
@@ -4320,7 +4423,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
-echo "configure:4324: checking for wctype in -lw" >&5
+echo "configure:4427: 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
@@ -4328,7 +4431,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lw $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4332 "configure"
+#line 4435 "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
@@ -4339,7 +4442,7 @@ int main() {
wctype()
; return 0; }
EOF
-if { (eval echo configure:4343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4446: \"$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
@@ -4371,12 +4474,12 @@ fi
echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
-echo "configure:4375: checking for long long support in compiler" >&5
+echo "configure:4478: 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 4380 "configure"
+#line 4483 "configure"
#include "confdefs.h"
int main() {
@@ -4386,7 +4489,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_c_long_long=yes
else
@@ -4408,7 +4511,7 @@ fi
echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
-echo "configure:4412: checking for long long support in printf" >&5
+echo "configure:4515: 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
@@ -4416,7 +4519,7 @@ else
gdb_cv_printf_has_long_long=no
else
cat > conftest.$ac_ext <<EOF
-#line 4420 "configure"
+#line 4523 "configure"
#include "confdefs.h"
int main () {
@@ -4430,7 +4533,7 @@ int main () {
return (strcmp ("0x0123456789abcdef", buf));
}
EOF
-if { (eval echo configure:4434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4537: \"$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
@@ -4454,19 +4557,19 @@ echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
-echo "configure:4458: checking for long double support in compiler" >&5
+echo "configure:4561: 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 4463 "configure"
+#line 4566 "configure"
#include "confdefs.h"
int main() {
long double foo;
; return 0; }
EOF
-if { (eval echo configure:4470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_long_double=yes
else
@@ -4488,7 +4591,7 @@ fi
echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
-echo "configure:4492: checking for long double support in printf" >&5
+echo "configure:4595: 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
@@ -4496,7 +4599,7 @@ else
gdb_cv_printf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 4500 "configure"
+#line 4603 "configure"
#include "confdefs.h"
int main () {
@@ -4506,7 +4609,7 @@ int main () {
return (strncmp ("3.14159", buf, 7));
}
EOF
-if { (eval echo configure:4510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4613: \"$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
@@ -4530,7 +4633,7 @@ echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
-echo "configure:4534: checking for long double support in scanf" >&5
+echo "configure:4637: 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
@@ -4538,7 +4641,7 @@ else
gdb_cv_scanf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 4542 "configure"
+#line 4645 "configure"
#include "confdefs.h"
int main () {
@@ -4548,7 +4651,7 @@ int main () {
return !(f > 3.14159 && f < 3.14160);
}
EOF
-if { (eval echo configure:4552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4655: \"$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
@@ -4574,17 +4677,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4578: checking for $ac_hdr" >&5
+echo "configure:4681: 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 4583 "configure"
+#line 4686 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4691: \"$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*
@@ -4613,12 +4716,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4617: checking for $ac_func" >&5
+echo "configure:4720: 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 4622 "configure"
+#line 4725 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4641,7 +4744,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4748: \"$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
@@ -4666,7 +4769,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:4670: checking for working mmap" >&5
+echo "configure:4773: 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
@@ -4674,7 +4777,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 4678 "configure"
+#line 4781 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -4814,7 +4917,7 @@ main()
}
EOF
-if { (eval echo configure:4818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4921: \"$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
@@ -4843,7 +4946,7 @@ if test ${build} = ${host} -a ${host} = ${target} ; then
case ${host_os} in
hpux*)
echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
-echo "configure:4847: checking for HPUX/OSF thread support" >&5
+echo "configure:4950: 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
@@ -4862,7 +4965,7 @@ EOF
;;
solaris*)
echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
-echo "configure:4866: checking for Solaris thread debugging library" >&5
+echo "configure:4969: 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
@@ -4872,7 +4975,7 @@ EOF
CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4876: checking for dlopen in -ldl" >&5
+echo "configure:4979: 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
@@ -4880,7 +4983,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4884 "configure"
+#line 4987 "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
@@ -4891,7 +4994,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:4895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4998: \"$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
@@ -4923,17 +5026,17 @@ fi
# all symbols visible in the dynamic symbol table.
hold_ldflags=$LDFLAGS
echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
-echo "configure:4927: checking for the ld -export-dynamic flag" >&5
+echo "configure:5030: checking for the ld -export-dynamic flag" >&5
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
cat > conftest.$ac_ext <<EOF
-#line 4930 "configure"
+#line 5033 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:4937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
found=yes
else
@@ -4952,13 +5055,13 @@ rm -f conftest*
# Sun randomly tweaked the prototypes in <proc_service.h>
# at one point.
echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
-echo "configure:4956: checking if <proc_service.h> is old" >&5
+echo "configure:5059: 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 4962 "configure"
+#line 5065 "configure"
#include "confdefs.h"
#include <proc_service.h>
@@ -4969,7 +5072,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_proc_service_is_old=no
else
@@ -5104,12 +5207,12 @@ fi
# In the Cygwin environment, we need some additional flags.
echo $ac_n "checking for cygwin""... $ac_c" 1>&6
-echo "configure:5231: checking for cygwin" >&5
+echo "configure:5334: 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 5236 "configure"
+#line 5339 "configure"
#include "confdefs.h"
#if defined (__CYGWIN__) || defined (__CYGWIN32__)
@@ -5143,7 +5246,7 @@ if test x$gdb_cv_os_cygwin = xyes; then
else
TERM_LIB=
echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:5270: checking for tgetent in -lncurses" >&5
+echo "configure:5373: 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
@@ -5151,7 +5254,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5278 "configure"
+#line 5381 "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
@@ -5162,7 +5265,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5392: \"$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
@@ -5181,7 +5284,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
-echo "configure:5308: checking for tgetent in -lHcurses" >&5
+echo "configure:5411: 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
@@ -5189,7 +5292,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lHcurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5316 "configure"
+#line 5419 "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
@@ -5200,7 +5303,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5430: \"$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
@@ -5219,7 +5322,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
-echo "configure:5346: checking for tgetent in -ltermlib" >&5
+echo "configure:5449: 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
@@ -5227,7 +5330,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltermlib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5354 "configure"
+#line 5457 "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
@@ -5238,7 +5341,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5468: \"$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
@@ -5257,7 +5360,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:5384: checking for tgetent in -ltermcap" >&5
+echo "configure:5487: 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
@@ -5265,7 +5368,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltermcap $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5392 "configure"
+#line 5495 "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
@@ -5276,7 +5379,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5506: \"$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
@@ -5295,7 +5398,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:5422: checking for tgetent in -lcurses" >&5
+echo "configure:5525: 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
@@ -5303,7 +5406,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5430 "configure"
+#line 5533 "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
@@ -5314,7 +5417,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5544: \"$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
@@ -5333,7 +5436,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
-echo "configure:5460: checking for tgetent in -lterminfo" >&5
+echo "configure:5563: 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
@@ -5341,7 +5444,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lterminfo $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5468 "configure"
+#line 5571 "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
@@ -5352,7 +5455,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:5479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5582: \"$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
@@ -5404,7 +5507,7 @@ fi
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:6615: checking for X" >&5
+echo "configure:6718: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -5466,12 +5569,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 6677 "configure"
+#line 6780 "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:6682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6785: \"$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*
@@ -5540,14 +5643,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6751 "configure"
+#line 6854 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:6758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6861: \"$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.
@@ -5827,12 +5930,12 @@ fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:7109: checking for Cygwin environment" >&5
+echo "configure:7212: 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 7114 "configure"
+#line 7217 "configure"
#include "confdefs.h"
int main() {
@@ -5843,7 +5946,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:7125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -5860,19 +5963,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:7142: checking for mingw32 environment" >&5
+echo "configure:7245: 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 7147 "configure"
+#line 7250 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:7154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -5891,7 +5994,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:7173: checking for executable suffix" >&5
+echo "configure:7276: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5901,10 +6004,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:7183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:7286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *.c | *.o | *.obj) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
diff --git a/gdb/configure.host b/gdb/configure.host
index 47e8603cc04..7ee60efb238 100644
--- a/gdb/configure.host
+++ b/gdb/configure.host
@@ -42,6 +42,7 @@ arm-*-*) gdb_host=arm ;;
hppa*-*-bsd*) gdb_host=hppabsd ;;
hppa*-*-hiux*) gdb_host=hppahpux ;;
hppa*-*-hpux10.20) gdb_host=hpux1020 ;;
+hppa2.0w-*-hpux11*) gdb_host=hpux1100w ;;
hppa*-*-hpux11*) gdb_host=hpux1100 ;;
hppa*-*-hpux*) gdb_host=hppahpux ;;
hppa*-*-osf*) gdb_host=hppaosf ;;
diff --git a/gdb/configure.in b/gdb/configure.in
index ba70e75522e..5707546264a 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -88,10 +88,13 @@ AC_HEADER_STAT
AC_C_CONST
-AC_CHECK_FUNCS(setpgid sbrk sigaction isascii bzero bcopy btowc poll \
- socketpair)
+AC_CHECK_FUNCS(setpgid sbrk sigaction isascii bzero bcopy btowc poll)
AC_FUNC_ALLOCA
+AC_CHECK_LIB(socket, socketpair)
+AC_CHECK_FUNCS(socketpair)
+
+
BFD_NEED_DECLARATION(malloc)
BFD_NEED_DECLARATION(realloc)
BFD_NEED_DECLARATION(free)
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index af1255cfba1..312b05016c0 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -51,7 +51,9 @@ alpha*-*-linux*) gdb_target=alpha-linux ;;
arc-*-*) gdb_target=arc ;;
arm-*-* | thumb-*-* | strongarm-*-*)
- gdb_target=arm ;;
+ gdb_target=arm
+ configdirs="$configdirs rdi-share"
+ ;;
# OBSOLETE c1-*-*) gdb_target=convex ;;
# OBSOLETE c2-*-*) gdb_target=convex ;;
@@ -75,9 +77,9 @@ i[3456]86-sequent-bsd*) gdb_target=symmetry ;;
i[3456]86-sequent-sysv4*) gdb_target=ptx4 ;;
i[3456]86-sequent-sysv*) gdb_target=ptx ;;
i[3456]86-ncr-*) gdb_target=ncr3000 ;;
-i[3456]86-*-aout*) gdb_target=i386aout ;;
-i[3456]86-*-coff*) gdb_target=i386v ;;
-i[3456]86-*-elf*) gdb_target=i386v ;;
+i[3456]86-*-aout*) gdb_target=embed ;;
+i[3456]86-*-coff*) gdb_target=embed ;;
+i[3456]86-*-elf*) gdb_target=embed ;;
i[3456]86-*-aix*) gdb_target=i386aix ;;
i[3456]86-*-bsd*) gdb_target=i386bsd ;;
i[3456]86-*-freebsd*) gdb_target=fbsd ;;
diff --git a/gdb/defs.h b/gdb/defs.h
index c596ed99e5a..13c2bdf23ad 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -1155,7 +1155,6 @@ extern void (*readline_begin_hook) PARAMS ((char *, ...));
extern char * (*readline_hook) PARAMS ((char *));
extern void (*readline_end_hook) PARAMS ((void));
extern void (*register_changed_hook) PARAMS ((int regno));
-extern void (*disassembly_flavor_hook) PARAMS((char *args, int from_tty));
extern void (*memory_changed_hook) PARAMS ((CORE_ADDR addr, int len));
extern void (*context_hook) PARAMS ((int));
extern int (*target_wait_hook) PARAMS ((int pid,
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 2d0b2ee108d..46bb910a91e 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,25 @@
+1999-08-12 Ben Elliston <bje@cygnus.com>
+
+ * gdbint.texinfo (Breakpoint Handling): Add missing words.
+
+1999-08-10 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * gdb.texinfo (Set Watchpoints): Explain some subtleties about
+ watch, awatch, and rwatch. Explain why the latter two cannot be
+ set as software watchpoints. Document that watchpoints for local
+ variables are deleted when the debuggee terminates.
+
+Wed Aug 11 13:18:14 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * remote.texi (Protocol): Further clarification of the "qRcmd"
+ packet. Allow E.. response packet. "qRcmd" packet is no longer
+ reserved.
+
+1999-08-10 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * Makefile.in: Rename inc-hist.texi to inc-hist.texinfo.
+ * gdb.texinfo: Ditto.
+
1999-08-06 Tom Tromey <tromey@cygnus.com>
* gdb.texinfo (KOD): New node.
diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
index f81e58363b9..ad93b5ee046 100644
--- a/gdb/doc/Makefile.in
+++ b/gdb/doc/Makefile.in
@@ -88,7 +88,7 @@ SFILES_INCLUDED = gdb-cfg.texi $(srcdir)/remote.texi
SFILES_LOCAL = $(srcdir)/gdb.texinfo GDBvn.texi $(SFILES_INCLUDED)
SFILES_DOC = $(SFILES_LOCAL) \
- $(READLINE_DIR)/rluser.texinfo $(READLINE_DIR)/inc-hist.texi
+ $(READLINE_DIR)/rluser.texinfo $(READLINE_DIR)/inc-hist.texinfo
#### Host, target, and site specific Makefile fragments come in here.
###
@@ -152,7 +152,7 @@ mostlyclean:
rm -f sedref.dvi sedref.tex tmp.sed
clean: mostlyclean
- rm -f rluser.texinfo inc-hist.texi gdb-cfg.texi
+ rm -f rluser.texinfo inc-hist.texinfo gdb-cfg.texi
distclean: clean
rm -f Makefile config.status
@@ -260,13 +260,13 @@ rluser.texinfo: ${READLINE_DIR}/rluser.texinfo
-e 's/^@end ftable/@end table/g' \
${READLINE_DIR}/rluser.texinfo > ./rluser.texinfo
-inc-hist.texi: ${READLINE_DIR}/inc-hist.texi
- ln -s ${READLINE_DIR}/inc-hist.texi . || \
- ln ${READLINE_DIR}/inc-hist.texi . || \
- cp ${READLINE_DIR}/inc-hist.texi .
+inc-hist.texinfo: ${READLINE_DIR}/inc-hist.texinfo
+ ln -s ${READLINE_DIR}/inc-hist.texinfo . || \
+ ln ${READLINE_DIR}/inc-hist.texinfo . || \
+ cp ${READLINE_DIR}/inc-hist.texinfo .
# gdb manual suitable for [gtn]roff -me
-gdb.me: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texi
+gdb.me: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texinfo
sed -e '/\\input texinfo/d' \
-e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
-e '/^@ifinfo/,/^@end ifinfo/d' \
@@ -281,7 +281,7 @@ gdb.me: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texi
>gdb.me
# gdb manual suitable for [gtn]roff -ms
-gdb.ms: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texi
+gdb.ms: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texinfo
sed -e '/\\input texinfo/d' \
-e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
-e '/^@ifinfo/,/^@end ifinfo/d' \
@@ -298,7 +298,7 @@ gdb.ms: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texi
# gdb manual suitable for [tn]roff -mm
# '@noindent's removed due to texi2roff-2 mm bug; if yours is newer,
# try leaving them in
-gdb.mm: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texi
+gdb.mm: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texinfo
sed -e '/\\input texinfo/d' \
-e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
-e '/^@ifinfo/,/^@end ifinfo/d' \
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 92e4a21b392..d150881f608 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -2667,14 +2667,11 @@ is written into by the program and its value changes.
@kindex rwatch
@item rwatch @var{expr}
Set a watchpoint that will break when watch @var{expr} is read by the program.
-If you use both watchpoints, both must be set with the @code{rwatch}
-command.
@kindex awatch
@item awatch @var{expr}
Set a watchpoint that will break when @var{args} is read and written into
-by the program. If you use both watchpoints, both must be set with the
-@code{awatch} command.
+by the program.
@kindex info watchpoints
@item info watchpoints
@@ -2698,14 +2695,49 @@ Hardware watchpoint @var{num}: @var{expr}
@noindent
if it was able to set a hardware watchpoint.
-The SPARClite DSU will generate traps when a program accesses
-some data or instruction address that is assigned to the debug registers.
-For the data addresses, DSU facilitates the @code{watch} command.
-However the hardware breakpoint registers can only take two data watchpoints,
-and both watchpoints must be the same kind. For example, you can set two
-watchpoints with @code{watch} commands, two with @code{rwatch}
-commands, @strong{or} two with @code{awatch} commands, but you cannot set one
-watchpoint with one command and the other with a different command.
+Currently, the @code{awatch} and @code{rwatch} commands can only set
+hardware watchpoints, because accesses to data that don't change the
+value of the watched expression cannot be detected without examining
+every instruction as it is being executed, and @value{GDBN} does not do
+that currently. If @value{GDBN} finds that it is unable to set a
+hardware breakpoint with the @code{awatch} or @code{rwatch} command, it
+will print a message like this:
+
+@smallexample
+Expression cannot be implemented with read/access watchpoint.
+@end smallexample
+
+Sometimes, @value{GDBN} cannot set a hardware watchpoint because the
+data type of the watched expression is wider than what a hardware
+watchpoint on the target machine can handle. For example, some systems
+can only watch regions that are up to 4 bytes wide; on such systems you
+cannot set hardware watchpoints for an expression that yields a
+double-precision floating-point number (which is typically 8 bytes
+wide). As a work-around, it might be possible to break the large region
+into a series of smaller ones and watch them with separate watchpoints.
+
+If you set too many hardware watchpoints, @value{GDBN} might be unable
+to insert all of them when you resume the execution of your program.
+Since the precise number of active watchpoints is unknown until such
+time as the program is about to be resumed, @value{GDBN} might not be
+able to warn you about this when you set the watchpoints, and the
+warning will be printed only when the program is resumed:
+
+@smallexample
+Hardware watchpoint @var{num}: Could not insert watchpoint
+@end smallexample
+
+@noindent
+If this happens, delete or disable some of the watchpoints.
+
+The SPARClite DSU will generate traps when a program accesses some data
+or instruction address that is assigned to the debug registers. For the
+data addresses, DSU facilitates the @code{watch} command. However the
+hardware breakpoint registers can only take two data watchpoints, and
+both watchpoints must be the same kind. For example, you can set two
+watchpoints with @code{watch} commands, two with @code{rwatch} commands,
+@strong{or} two with @code{awatch} commands, but you cannot set one
+watchpoint with one command and the other with a different command.
@value{GDBN} will reject the command if you try to mix watchpoints.
Delete or disable unused watchpoint commands before setting new ones.
@@ -2713,6 +2745,16 @@ If you call a function interactively using @code{print} or @code{call},
any watchpoints you have set will be inactive until GDB reaches another
kind of breakpoint or the call completes.
+@value{GDBN} automatically deletes watchpoints that watch local
+(automatic) variables, or expressions that involve such variables, when
+they go out of scope, that is, when the execution leaves the block in
+which these variables were defined. In particular, when the program
+being debugged terminates, @emph{all} local variables go out of scope,
+and so only watchpoints that watch global variables remain set. If you
+rerun the program, you will need to set all such watchpoints again. One
+way of doing that would be to set a code breakpoint at the entry to the
+@code{main} function and when it breaks, set all the watchpoints.
+
@quotation
@cindex watchpoints and threads
@cindex threads and watchpoints
@@ -9820,11 +9862,11 @@ things without first using the debugger to find the facts.
@c The readline documentation is distributed with the readline code
@c and consists of the two following files:
@c rluser.texinfo
-@c inc-hist.texi
+@c inc-hist.texinfo
@c Use -I with makeinfo to point to the appropriate directory,
@c environment var TEXINPUTS with TeX.
@include rluser.texinfo
-@include inc-hist.texi
+@include inc-hist.texinfo
@ifclear PRECONFIGURED
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index 1dfd133d6c0..878711253cc 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -262,10 +262,10 @@ limited in number; when the user asks for more, GDB will start trying to
set software breakpoints.
Software breakpoints require GDB to do somewhat more work. The basic
-theory is that GDB will replace a program instruction a trap, illegal
-divide, or some other instruction that will cause an exception, and then
-when it's encountered, GDB will take the exception and stop the program.
-When the user says to continue, GDB will restore the original
+theory is that GDB will replace a program instruction with a trap,
+illegal divide, or some other instruction that will cause an exception,
+and then when it's encountered, GDB will take the exception and stop the
+program. When the user says to continue, GDB will restore the original
instruction, single-step, re-insert the trap, and continue on.
Since it literally overwrites the program being tested, the program area
diff --git a/gdb/doc/remote.texi b/gdb/doc/remote.texi
index d8636dab954..714b2a217b2 100644
--- a/gdb/doc/remote.texi
+++ b/gdb/doc/remote.texi
@@ -763,19 +763,27 @@ encoded 32 bit mode; @var{threadid} is a hex encoded 64 bit thread ID.
@tab
See @code{remote.c:remote_unpack_thread_info_response()}.
-@item remote command @strong{(reserved)}
+@item remote command
@tab @code{q}@code{Rcmd,}@var{COMMAND}
@tab
@var{COMMAND} (hex encoded) is passed to the local interpreter for
-execution. @emph{Implementors should note that providing access to a
+execution. Invalid commands should be reported using the output string.
+Before the final result packet, the target may also respond with a
+number of intermediate @code{O}@var{OUTPUT} console output
+packets. @emph{Implementors should note that providing access to a
stubs's interpreter may have security implications}.
@item
-@tab reply @var{OUTPUT} or @code{OK}
+@tab reply @code{OK}
+@tab
+A command response with no output.
+@item
+@tab reply @var{OUTPUT}
+@tab
+A command response with the hex encoded output string @var{OUTPUT}.
+@item
+@tab reply @code{E}@var{NN}
@tab
-The @var{OUTPUT} is the hex encoded output from the command. @code{OK}
-is returned when the @var{OUTPUT} would have been empty. The target may
-also respond with a number of intermediate @code{O}@var{OUTPUT} console
-output packets.
+Indicate a badly formed request.
@item
@tab reply @samp{}
diff --git a/gdb/event-loop.c b/gdb/event-loop.c
index 4d35ed785da..78ecb63e747 100644
--- a/gdb/event-loop.c
+++ b/gdb/event-loop.c
@@ -120,7 +120,7 @@ sighandler_list;
function. */
static int async_handler_ready = 0;
-static void create_file_handler PARAMS ((int, int, file_handler_func *, gdb_client_data));
+static void create_file_handler PARAMS ((int, int, handler_func *, gdb_client_data));
static void invoke_async_signal_handler PARAMS ((void));
static int gdb_wait_for_event PARAMS ((void));
static int gdb_do_one_event PARAMS ((void));
@@ -318,13 +318,13 @@ start_event_loop ()
void
add_file_handler (fd, proc, client_data)
int fd;
- file_handler_func *proc;
+ void (*proc) (void);
gdb_client_data client_data;
{
#ifdef HAVE_POLL
- create_file_handler (fd, POLLIN, (file_handler_func *) proc, client_data);
+ create_file_handler (fd, POLLIN, (handler_func *) proc, client_data);
#else
- create_file_handler (fd, GDB_READABLE, (file_handler_func *) proc, client_data);
+ create_file_handler (fd, GDB_READABLE, (handler_func *) proc, client_data);
#endif
}
@@ -342,7 +342,7 @@ static void
create_file_handler (fd, mask, proc, client_data)
int fd;
int mask;
- file_handler_func *proc;
+ handler_func *proc;
gdb_client_data client_data;
{
file_handler *file_ptr;
@@ -556,7 +556,7 @@ handle_file_event (event_file_desc)
/* If there was a match, then call the handler. */
if (mask != 0)
- (*file_ptr->proc) (file_ptr->client_data, mask);
+ (*file_ptr->proc) (file_ptr->client_data);
break;
}
}
@@ -581,6 +581,10 @@ gdb_wait_for_event ()
int mask, bit, index;
#endif
+ /* Make sure all output is done before getting another event. */
+ gdb_flush (gdb_stdout);
+ gdb_flush (gdb_stderr);
+
if (gdb_notifier.num_fds == 0)
return -1;
@@ -689,7 +693,7 @@ gdb_wait_for_event ()
whenever the handler is invoked. */
async_signal_handler *
create_async_signal_handler (proc, client_data)
- async_handler_func *proc;
+ handler_func *proc;
gdb_client_data client_data;
{
async_signal_handler *async_handler_ptr;
diff --git a/gdb/event-loop.h b/gdb/event-loop.h
index 393b3e00ba3..bde1784a831 100644
--- a/gdb/event-loop.h
+++ b/gdb/event-loop.h
@@ -60,8 +60,7 @@
typedef PTR gdb_client_data;
typedef struct gdb_event gdb_event;
-typedef void (file_handler_func) PARAMS ((gdb_client_data, int mask));
-typedef void (async_handler_func) PARAMS ((gdb_client_data));
+typedef void (handler_func) PARAMS ((gdb_client_data));
typedef void (event_handler_func) PARAMS ((int));
/* Event for the GDB event system. Events are queued by calling
@@ -91,7 +90,7 @@ typedef struct file_handler
int mask; /* Events we want to monitor: POLLIN, etc. */
int ready_mask; /* Events that have been seen since
the last time. */
- file_handler_func *proc; /* Procedure to call when fd is ready. */
+ handler_func *proc; /* Procedure to call when fd is ready. */
gdb_client_data client_data; /* Argument to pass to proc. */
struct file_handler *next_file; /* Next registered file descriptor. */
}
@@ -111,7 +110,7 @@ typedef struct async_signal_handler
int ready; /* If ready, call this handler from the main event loop,
using invoke_async_handler. */
struct async_signal_handler *next_handler; /* Ptr to next handler */
- async_handler_func *proc; /* Function to call to do the work */
+ handler_func *proc; /* Function to call to do the work */
gdb_client_data client_data; /* Argument to async_handler_func */
}
async_signal_handler;
@@ -227,10 +226,10 @@ struct prompts
extern void start_event_loop PARAMS ((void));
extern void delete_file_handler PARAMS ((int));
-extern void add_file_handler PARAMS ((int, file_handler_func, gdb_client_data));
+extern void add_file_handler PARAMS ((int, void (*) (void), gdb_client_data));
extern void mark_async_signal_handler PARAMS ((async_signal_handler *));
extern async_signal_handler *
- create_async_signal_handler PARAMS ((async_handler_func *, gdb_client_data));
+ create_async_signal_handler PARAMS ((handler_func *, gdb_client_data));
extern void delete_async_signal_handler PARAMS ((async_signal_handler ** async_handler_ptr));
/* Exported functions from event-top.c.
diff --git a/gdb/event-top.c b/gdb/event-top.c
index 639a71bd176..eb4f820635e 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -224,7 +224,7 @@ change_line_handler ()
off. This means that the 'set editing on/off' will have effect
only on the interactive session. */
delete_file_handler (input_fd);
- add_file_handler (input_fd, (file_handler_func *) call_readline, 0);
+ add_file_handler (input_fd, call_readline, 0);
}
/* Displays the prompt. The prompt that is displayed is the current
@@ -774,6 +774,19 @@ gdb_readline2 ()
char *result;
int input_index = 0;
int result_size = 80;
+ static int done_once = 0;
+
+ /* Unbuffer the input stream, so that, later on, the calls to fgetc
+ fetch only one char at the time from the stream. The fgetc's will
+ get up to the first newline, but there may be more chars in the
+ stream after '\n'. If we buffer the input and fgetc drains the
+ stream, getting stuff beyond the newline as well, a select, done
+ afterwards will not trigger. */
+ if (!done_once && !ISATTY (instream))
+ {
+ setbuf (instream, NULL);
+ done_once = 1;
+ }
result = (char *) xmalloc (result_size);
@@ -1100,7 +1113,7 @@ _initialize_event_loop ()
the target program (inferior), but that must be registered
only when it actually exists (I.e. after we say 'run' or
after we connect to a remote target. */
- add_file_handler (input_fd, (file_handler_func *) call_readline, 0);
+ add_file_handler (input_fd, call_readline, 0);
/* Tell gdb that we will be using the readline library. This
could be overwritten by a command in .gdbinit like 'set
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index b102c69f670..aceeed7da0e 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -1262,7 +1262,7 @@ set_gdbarch_pc_regnum (gdbarch, pc_regnum)
char *
gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
{
- if (gdbarch->register_name == 0 || 1)
+ if (gdbarch->register_name == 0)
internal_error ("gdbarch: gdbarch_register_name invalid");
if (gdbarch_debug >= 2)
/* FIXME: gdb_std??? */
diff --git a/gdb/gdbinit.in b/gdb/gdbinit.in
index af97d2cae3d..b6a32dba09f 100644
--- a/gdb/gdbinit.in
+++ b/gdb/gdbinit.in
@@ -2,7 +2,7 @@ echo Setting up the environment for debugging gdb.\n
set complaints 1
-b fatal
+b internal_error
b info_command
commands
diff --git a/gdb/gnu-regex.c b/gdb/gnu-regex.c
index ef798075f83..8051c12d00c 100644
--- a/gdb/gnu-regex.c
+++ b/gdb/gnu-regex.c
@@ -1702,7 +1702,11 @@ typedef struct
} \
}
-#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
+/* Use this only if they have btowc(), since wctype() is used below
+ together with btowc(). btowc() is defined in the 1994 Amendment 1
+ to ISO C and may not be present on systems where we have wchar.h
+ and wctype.h. */
+#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H && defined HAVE_BTOWC)
/* The GNU C library provides support for user-defined character classes
and the functions from ISO C amendement 1. */
# ifdef CHARCLASS_NAME_MAX
diff --git a/gdb/hp-symtab-read.c b/gdb/hp-symtab-read.c
index a4324734126..dc045a4ef4e 100644
--- a/gdb/hp-symtab-read.c
+++ b/gdb/hp-symtab-read.c
@@ -2830,7 +2830,6 @@ hpread_process_one_debug_symbol (dn_bufp, name, section_offsets, objfile,
struct symbol *sym;
struct context_stack *new;
char *class_scope_name;
- extern int is_in_import_list (); /* in somread.c */
/* Allocate one GDB debug symbol and fill in some default values. */
sym = (struct symbol *) obstack_alloc (&objfile->symbol_obstack,
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index ed41361458f..25dbcfba3c2 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -186,35 +186,6 @@ low_sign_extend (val, bits)
/* extract the immediate field from a ld{bhw}s instruction */
-#if 0
-
-unsigned
-get_field (val, from, to)
- unsigned val, from, to;
-{
- val = val >> 31 - to;
- return val & ((1 << 32 - from) - 1);
-}
-
-unsigned
-set_field (val, from, to, new_val)
- unsigned *val, from, to;
-{
- unsigned mask = ~((1 << (to - from + 1)) << (31 - from));
- return *val = *val & mask | (new_val << (31 - from));
-}
-
-/* extract a 3-bit space register number from a be, ble, mtsp or mfsp */
-
-int
-extract_3 (word)
- unsigned word;
-{
- return GET_FIELD (word, 18, 18) << 2 | GET_FIELD (word, 16, 17);
-}
-
-#endif
-
static int
extract_5_load (word)
unsigned word;
@@ -222,19 +193,6 @@ extract_5_load (word)
return low_sign_extend (word >> 16 & MASK_5, 5);
}
-#if 0
-
-/* extract the immediate field from a st{bhw}s instruction */
-
-int
-extract_5_store (word)
- unsigned word;
-{
- return low_sign_extend (word & MASK_5, 5);
-}
-
-#endif /* 0 */
-
/* extract the immediate field from a break instruction */
static unsigned
@@ -253,19 +211,6 @@ extract_5R_store (word)
return (word >> 16 & MASK_5);
}
-/* extract an 11 bit immediate field */
-
-#if 0
-
-int
-extract_11 (word)
- unsigned word;
-{
- return low_sign_extend (word & MASK_11, 11);
-}
-
-#endif
-
/* extract a 14 bit immediate field */
static int
@@ -331,35 +276,6 @@ deposit_21 (opnd, word)
return word | val;
}
-/* extract a 12 bit constant from branch instructions */
-
-#if 0
-
-int
-extract_12 (word)
- unsigned word;
-{
- return sign_extend (GET_FIELD (word, 19, 28) |
- GET_FIELD (word, 29, 29) << 10 |
- (word & 0x1) << 11, 12) << 2;
-}
-
-/* Deposit a 17 bit constant in an instruction (like bl). */
-
-unsigned int
-deposit_17 (opnd, word)
- unsigned opnd, word;
-{
- word |= GET_FIELD (opnd, 15 + 0, 15 + 0); /* w */
- word |= GET_FIELD (opnd, 15 + 1, 15 + 5) << 16; /* w1 */
- word |= GET_FIELD (opnd, 15 + 6, 15 + 6) << 2; /* w2[10] */
- word |= GET_FIELD (opnd, 15 + 7, 15 + 16) << 3; /* w2[0..9] */
-
- return word;
-}
-
-#endif
-
/* extract a 17 bit constant from branch instructions, returning the
19 bit signed value. */
@@ -3209,10 +3125,12 @@ is_branch (inst)
case 0x21:
case 0x22:
case 0x23:
+ case 0x27:
case 0x28:
case 0x29:
case 0x2a:
case 0x2b:
+ case 0x2f:
case 0x30:
case 0x31:
case 0x32:
@@ -3220,6 +3138,7 @@ is_branch (inst)
case 0x38:
case 0x39:
case 0x3a:
+ case 0x3b:
return 1;
default:
@@ -3235,7 +3154,16 @@ inst_saves_gr (inst)
unsigned long inst;
{
/* Does it look like a stw? */
- if ((inst >> 26) == 0x1a)
+ if ((inst >> 26) == 0x1a || (inst >> 26) == 0x1b
+ || (inst >> 26) == 0x1f
+ || ((inst >> 26) == 0x1f
+ && ((inst >> 6) == 0xa)))
+ return extract_5R_store (inst);
+
+ /* Does it look like a std? */
+ if ((inst >> 26) == 0x1c
+ || ((inst >> 26) == 0x03
+ && ((inst >> 6) & 0xf) == 0xb))
return extract_5R_store (inst);
/* Does it look like a stwm? GCC & HPC may use this in prologues. */
@@ -3244,7 +3172,10 @@ inst_saves_gr (inst)
/* Does it look like sth or stb? HPC versions 9.0 and later use these
too. */
- if ((inst >> 26) == 0x19 || (inst >> 26) == 0x18)
+ if ((inst >> 26) == 0x19 || (inst >> 26) == 0x18
+ || ((inst >> 26) == 0x3
+ && (((inst >> 6) & 0xf) == 0x8
+ || (inst >> 6) & 0xf) == 0x9))
return extract_5R_store (inst);
return 0;
@@ -3262,12 +3193,16 @@ static int
inst_saves_fr (inst)
unsigned long inst;
{
- /* is this an FSTDS ? */
+ /* is this an FSTD ? */
if ((inst & 0xfc00dfc0) == 0x2c001200)
return extract_5r_store (inst);
- /* is this an FSTWS ? */
+ if ((inst & 0xfc000002) == 0x70000002)
+ return extract_5R_store (inst);
+ /* is this an FSTW ? */
if ((inst & 0xfc00df80) == 0x24001200)
return extract_5r_store (inst);
+ if ((inst & 0xfc000002) == 0x7c000000)
+ return extract_5R_store (inst);
return 0;
}
@@ -3369,8 +3304,9 @@ restart:
/* Note the interesting effects of this instruction. */
stack_remaining -= prologue_inst_adjust_sp (inst);
- /* There is only one instruction used for saving RP into the stack. */
- if (inst == 0x6bc23fd9)
+ /* There are limited ways to store the return pointer into the
+ stack. */
+ if (inst == 0x6bc23fd9 || inst == 0x0fc212c1)
save_rp = 0;
/* This is the only way we save SP into the stack. At this time
@@ -3497,11 +3433,8 @@ restart:
}
-
-
-
-/* return 0 if we cannot determine the end of the prologue,
- return the new pc value if we know where the prologue ends */
+/* Return the address of the PC after the last prologue instruction if
+ we can determine it from the debug symbols. Else return zero. */
static CORE_ADDR
after_prologue (pc)
@@ -3511,46 +3444,29 @@ after_prologue (pc)
CORE_ADDR func_addr, func_end;
struct symbol *f;
+ /* If we can not find the symbol in the partial symbol table, then
+ there is no hope we can determine the function's start address
+ with this code. */
if (!find_pc_partial_function (pc, NULL, &func_addr, &func_end))
- return 0; /* Unknown */
-
- f = find_pc_function (pc);
- if (!f)
- return 0; /* no debug info, do it the hard way! */
+ return 0;
+ /* Get the line associated with FUNC_ADDR. */
sal = find_pc_line (func_addr, 0);
- if (sal.end < func_end)
- {
- /* this happens when the function has no prologue, because the way
- find_pc_line works: elz. Note: this may not be a very good
- way to decide whether a function has a prologue or not, but
- it is the best I can do with the info available
- Also, this will work for functions like: int f()
- {
- return 2;
- }
- I.e. the bp will be inserted at the first open brace.
- For functions where the body is only one line written like this:
- int f()
- { return 2; }
- this will make the breakpoint to be at the last brace, after the body
- has been executed already. What's the point of stepping through a function
- without any variables anyway?? */
-
- if ((SYMBOL_LINE (f) > 0) && (SYMBOL_LINE (f) < sal.line))
- return pc; /*no adjusment will be made */
- else
- return sal.end; /* this is the end of the prologue */
- }
- /* The line after the prologue is after the end of the function. In this
- case, put the end of the prologue is the beginning of the function. */
- /* This should happen only when the function is prologueless and has no
- code in it. For instance void dumb(){} Note: this kind of function
- is used quite a lot in the test system */
+ /* There are only two cases to consider. First, the end of the source line
+ is within the function bounds. In that case we return the end of the
+ source line. Second is the end of the source line extends beyond the
+ bounds of the current function. We need to use the slow code to
+ examine instructions in that case.
+ Anything else is simply a bug elsewhere. Fixing it here is absolutely
+ the wrong thing to do. In fact, it should be entirely possible for this
+ function to always return zero since the slow instruction scanning code
+ is supposed to *always* work. If it does not, then it is a bug. */
+ if (sal.end < func_end)
+ return sal.end;
else
- return pc; /* no adjustment will be made */
+ return 0;
}
/* To skip prologues, I use this predicate. Returns either PC itself
@@ -3571,85 +3487,22 @@ hppa_skip_prologue (pc)
CORE_ADDR post_prologue_pc;
char buf[4];
-#ifdef GDB_TARGET_HAS_SHARED_LIBS
- /* Silently return the unaltered pc upon memory errors.
- This could happen on OSF/1 if decode_line_1 tries to skip the
- prologue for quickstarted shared library functions when the
- shared library is not yet mapped in.
- Reading target memory is slow over serial lines, so we perform
- this check only if the target has shared libraries. */
- if (target_read_memory (pc, buf, 4))
- return pc;
-#endif
-
/* See if we can determine the end of the prologue via the symbol table.
If so, then return either PC, or the PC after the prologue, whichever
is greater. */
post_prologue_pc = after_prologue (pc);
+ /* If after_prologue returned a useful address, then use it. Else
+ fall back on the instruction skipping code.
+
+ Some folks have claimed this causes problems because the breakpoint
+ may be the first instruction of the prologue. If that happens, then
+ the instruction skipping code has a bug that needs to be fixed. */
if (post_prologue_pc != 0)
return max (pc, post_prologue_pc);
-
-
- /* Can't determine prologue from the symbol table, (this can happen if there
- is no debug information) so we need to fall back on the old code, which
- looks at the instructions */
- /* FIXME (elz) !!!!: this may create a problem if, once the bp is hit, the user says
- where: the backtrace info is not right: this is because the point at which we
- break is at the very first instruction of the function. At this time the stuff that
- needs to be saved on the stack, has not been saved yet, so the backtrace
- cannot know all it needs to know. This will need to be fixed in the
- actual backtrace code. (Note: this is what DDE does) */
-
else
return (skip_prologue_hard_way (pc));
-
-#if 0
-/* elz: I am keeping this code around just in case, but remember, all the
- instructions are for alpha: you should change all to the hppa instructions */
-
- /* Can't determine prologue from the symbol table, need to examine
- instructions. */
-
- /* Skip the typical prologue instructions. These are the stack adjustment
- instruction and the instructions that save registers on the stack
- or in the gcc frame. */
- for (offset = 0; offset < 100; offset += 4)
- {
- int status;
-
- status = read_memory_nobpt (pc + offset, buf, 4);
- if (status)
- memory_error (status, pc + offset);
- inst = extract_unsigned_integer (buf, 4);
-
- /* The alpha has no delay slots. But let's keep the lenient stuff,
- we might need it for something else in the future. */
- if (lenient && 0)
- continue;
-
- if ((inst & 0xffff0000) == 0x27bb0000) /* ldah $gp,n($t12) */
- continue;
- if ((inst & 0xffff0000) == 0x23bd0000) /* lda $gp,n($gp) */
- continue;
- if ((inst & 0xffff0000) == 0x23de0000) /* lda $sp,n($sp) */
- continue;
- else if ((inst & 0xfc1f0000) == 0xb41e0000
- && (inst & 0xffff0000) != 0xb7fe0000)
- continue; /* stq reg,n($sp) */
- /* reg != $zero */
- else if ((inst & 0xfc1f0000) == 0x9c1e0000
- && (inst & 0xffff0000) != 0x9ffe0000)
- continue; /* stt reg,n($sp) */
- /* reg != $zero */
- else if (inst == 0x47de040f) /* bis sp,sp,fp */
- continue;
- else
- break;
- }
- return pc + offset;
-#endif /* 0 */
}
/* Put here the code to store, into a struct frame_saved_regs,
@@ -3750,7 +3603,7 @@ hppa_frame_find_saved_regs (frame_info, frame_saved_regs)
For unoptimized GCC code and for any HP CC code this will never ever
examine any user instructions.
- For optimzied GCC code we're faced with problems. GCC will schedule
+ For optimized GCC code we're faced with problems. GCC will schedule
its prologue and make prologue instructions available for delay slot
filling. The end result is user code gets mixed in with the prologue
and a prologue instruction may be in the delay slot of the first branch
diff --git a/gdb/hppah-nat.c b/gdb/hppah-nat.c
index 585ba71920b..11e9d02c235 100644
--- a/gdb/hppah-nat.c
+++ b/gdb/hppah-nat.c
@@ -46,6 +46,9 @@ fetch_inferior_registers (regno)
fetch_register (regno);
}
+/* Our own version of the offsetof macro, since we can't assume ANSI C. */
+#define HPPAH_OFFSETOF(type, member) ((int) (&((type *) 0)->member))
+
/* Store our register values back into the inferior.
If REGNO is -1, do this for all registers.
Otherwise, REGNO specifies which register (so we can save time). */
@@ -62,42 +65,104 @@ store_inferior_registers (regno)
if (regno >= 0)
{
+ unsigned int addr, len, offset;
+
if (CANNOT_STORE_REGISTER (regno))
return;
- regaddr = register_addr (regno, offset);
- errno = 0;
- if (regno == PCOQ_HEAD_REGNUM || regno == PCOQ_TAIL_REGNUM)
+
+ offset = 0;
+ len = REGISTER_RAW_SIZE (regno);
+
+ /* Requests for register zero actually want the save_state's
+ ss_flags member. As RM says: "Oh, what a hack!" */
+ if (regno == 0)
{
- scratch = *(int *) &registers[REGISTER_BYTE (regno)] | 0x3;
- call_ptrace (PT_WUREGS, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
- scratch);
+ save_state_t ss;
+ addr = HPPAH_OFFSETOF (save_state_t, ss_flags);
+ len = sizeof (ss.ss_flags);
+
+ /* Note that ss_flags is always an int, no matter what
+ REGISTER_RAW_SIZE(0) says. Assuming all HP-UX PA machines
+ are big-endian, put it at the least significant end of the
+ value, and zap the rest of the buffer. */
+ offset = REGISTER_RAW_SIZE (0) - len;
+ }
+
+ /* Floating-point registers come from the ss_fpblock area. */
+ else if (regno >= FP0_REGNUM)
+ addr = (HPPAH_OFFSETOF (save_state_t, ss_fpblock)
+ + (REGISTER_BYTE (regno) - REGISTER_BYTE (FP0_REGNUM)));
+
+ /* Wide registers come from the ss_wide area.
+ I think it's more PC to test (ss_flags & SS_WIDEREGS) to select
+ between ss_wide and ss_narrow than to use the raw register size.
+ But checking ss_flags would require an extra ptrace call for
+ every register reference. Bleah. */
+ else if (len == 8)
+ addr = (HPPAH_OFFSETOF (save_state_t, ss_wide)
+ + REGISTER_BYTE (regno));
+
+ /* Narrow registers come from the ss_narrow area. Note that
+ ss_narrow starts with gr1, not gr0. */
+ else if (len == 4)
+ addr = (HPPAH_OFFSETOF (save_state_t, ss_narrow)
+ + (REGISTER_BYTE (regno) - REGISTER_BYTE (1)));
+ else
+ internal_error ("hppah-nat.c (write_register): unexpected register size");
+
+#ifdef GDB_TARGET_IS_HPPA_20W
+ /* Unbelieveable. The PC head and tail must be written in 64bit hunks
+ or we will get an error. Worse yet, the oddball ptrace/ttrace
+ layering will not allow us to perform a 64bit register store.
+
+ What a crock. */
+ if (regno == PCOQ_HEAD_REGNUM || regno == PCOQ_TAIL_REGNUM && len == 8)
+ {
+ CORE_ADDR temp;
+
+ temp = *(CORE_ADDR *)&registers[REGISTER_BYTE (regno)];
+
+ /* Set the priv level (stored in the low two bits of the PC. */
+ temp |= 0x3;
+
+ ttrace_write_reg_64 (inferior_pid, (CORE_ADDR)addr, (CORE_ADDR)&temp);
+
+ /* If we fail to write the PC, give a true error instead of
+ just a warning. */
if (errno != 0)
{
- /* Error, even if attached. Failing to write these two
- registers is pretty serious. */
- sprintf (buf, "writing register number %d", regno);
- perror_with_name (buf);
+ char *err = safe_strerror (errno);
+ char *msg = alloca (strlen (err) + 128);
+ sprintf (msg, "writing `%s' register: %s",
+ REGISTER_NAME (regno), err);
+ perror_with_name (msg);
}
+ return;
}
- else
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
- {
- errno = 0;
- call_ptrace (PT_WUREGS, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
- *(int *) &registers[REGISTER_BYTE (regno) + i]);
- if (errno != 0)
- {
- /* Warning, not error, in case we are attached; sometimes the
- kernel doesn't let us at the registers. */
- char *err = safe_strerror (errno);
- char *msg = alloca (strlen (err) + 128);
- sprintf (msg, "writing register %s: %s",
- REGISTER_NAME (regno), err);
+#endif
+
+ for (i = 0; i < len; i += sizeof (int))
+ {
+ errno = 0;
+ call_ptrace (PT_WUREGS, inferior_pid, (PTRACE_ARG3_TYPE) addr + i,
+ *(int *) &registers[REGISTER_BYTE (regno) + i]);
+ if (errno != 0)
+ {
+ /* Warning, not error, in case we are attached; sometimes
+ the kernel doesn't let us at the registers. */
+ char *err = safe_strerror (errno);
+ char *msg = alloca (strlen (err) + 128);
+ sprintf (msg, "reading `%s' register: %s",
+ REGISTER_NAME (regno), err);
+ /* If we fail to write the PC, give a true error instead of
+ just a warning. */
+ if (regno == PCOQ_HEAD_REGNUM || regno == PCOQ_TAIL_REGNUM)
+ perror_with_name (msg);
+ else
warning (msg);
- return;
- }
- regaddr += sizeof (int);
- }
+ return;
+ }
+ }
}
else
for (regno = 0; regno < NUM_REGS; regno++)
@@ -105,9 +170,6 @@ store_inferior_registers (regno)
}
-/* Our own version of the offsetof macro, since we can't assume ANSI C. */
-#define HPPAH_OFFSETOF(type, member) ((int) (&((type *) 0)->member))
-
/* Fetch a register's value from the process's U area. */
static void
fetch_register (regno)
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index babae1c6a07..d0363e6dcea 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -931,9 +931,6 @@ set_disassembly_flavor_sfunc (args, from_tty, c)
struct cmd_list_element *c;
{
set_disassembly_flavor ();
-
- if (disassembly_flavor_hook != NULL)
- disassembly_flavor_hook (args, from_tty);
}
static void
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 5d7fd76b72f..0ddb8f2613f 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3088,7 +3088,7 @@ complete_execution (void)
target_executing = 0;
if (sync_execution)
{
- add_file_handler (input_fd, (file_handler_func *) call_readline, 0);
+ add_file_handler (input_fd, call_readline, 0);
pop_prompt ();
sync_execution = 0;
cleanup_sigint_signal_handler ();
diff --git a/gdb/infttrace.c b/gdb/infttrace.c
index c76c5132201..3e94e8100b5 100644
--- a/gdb/infttrace.c
+++ b/gdb/infttrace.c
@@ -5863,6 +5863,55 @@ hppa_resume_execd_vforking_child_to_get_parent_vfork ()
}
+/* Write a register as a 64bit value. This may be necessary if the
+ native OS is too braindamaged to allow some (or all) registers to
+ be written in 32bit hunks such as hpux11 and the PC queue registers.
+
+ This is horribly gross and disgusting. */
+
+int
+ttrace_write_reg_64 (gdb_tid, dest_addr, src_addr)
+ int gdb_tid;
+ CORE_ADDR dest_addr;
+ CORE_ADDR src_addr;
+{
+ pid_t pid;
+ lwpid_t tid;
+ int tt_status;
+
+ tid = map_from_gdb_tid (gdb_tid);
+ pid = get_pid_for (tid);
+
+ errno = 0;
+ tt_status = ttrace (TT_LWP_WUREGS,
+ pid,
+ tid,
+ (TTRACE_ARG_TYPE) dest_addr,
+ 8,
+ (TTRACE_ARG_TYPE) src_addr );
+
+#ifdef THREAD_DEBUG
+ if (errno)
+ {
+ /* Don't bother for a known benign error: if you ask for the
+ first thread state, but there is only one thread and it's
+ not stopped, ttrace complains.
+
+ We have this inside the #ifdef because our caller will do
+ this check for real. */
+ if( request != TT_PROC_GET_FIRST_LWP_STATE
+ || errno != EPROTO )
+ {
+ if( debug_on )
+ printf( "TT fail for %s, with pid %d, tid %d, status %d \n",
+ get_printable_name_of_ttrace_request (TT_LWP_WUREGS),
+ pid, tid, tt_status );
+ }
+ }
+#endif
+
+ return tt_status;
+}
void
_initialize_infttrace ()
diff --git a/gdb/kod-cisco.c b/gdb/kod-cisco.c
index b33b9e58d8d..c5be81ade93 100644
--- a/gdb/kod-cisco.c
+++ b/gdb/kod-cisco.c
@@ -43,8 +43,7 @@ static void (*gdb_kod_query) (char *, char *, int *);
displaying output (presumably to the user) and the other for
querying the target. */
char *
-cisco_kod_open (char *arg,
- void (*display_func) (char *),
+cisco_kod_open (void (*display_func) (char *),
void (*query_func) (char *, char *, int *))
{
char buffer[PBUFSIZ];
diff --git a/gdb/maint.c b/gdb/maint.c
index 4ec051ad991..10cf6bbde5f 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -45,6 +45,8 @@ static void maintenance_command PARAMS ((char *, int));
static void maintenance_dump_me PARAMS ((char *, int));
+static void maintenance_internal_error PARAMS ((char *args, int from_tty));
+
static void maintenance_demangle PARAMS ((char *, int));
static void maintenance_time_display PARAMS ((char *, int));
@@ -99,12 +101,29 @@ maintenance_dump_me (args, from_tty)
{
if (query ("Should GDB dump core? "))
{
+#ifdef __DJGPP__
+ /* SIGQUIT by default is ignored, so use SIGABRT instead. */
+ signal (SIGABRT, SIG_DFL);
+ kill (getpid (), SIGABRT);
+#else
signal (SIGQUIT, SIG_DFL);
kill (getpid (), SIGQUIT);
+#endif
}
}
#endif
+/* Stimulate the internal error mechanism that GDB uses when an
+ internal problem is detected. Allows testing of the mechanism.
+ Also useful when the user wants to drop a core file but not exit
+ GDB. */
+
+static void
+maintenance_internal_error (char *args, int from_tty)
+{
+ internal_error ("internal maintenance");
+}
+
/* Someday we should allow demangling for things other than just
explicit strings. For example, we might want to be able to
specify the address of a string in either GDB's process space
@@ -378,6 +397,11 @@ itself a SIGQUIT signal.",
&maintenancelist);
#endif
+ add_cmd ("internal-error", class_maintenance, maintenance_internal_error,
+ "Give GDB an internal error.\n\
+Cause GDB to behave as if an internal error was detected.",
+ &maintenancelist);
+
add_cmd ("demangle", class_maintenance, maintenance_demangle,
"Demangle a C++ mangled name.\n\
Call internal GDB demangler routine to demangle a C++ link name\n\
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 123c2308f74..a763a66d5d4 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -1003,3 +1003,23 @@ in_plt_section (pc, name)
&& STREQ (s->the_bfd_section->name, ".plt"));
return (retval);
}
+
+/* Return nonzero if NAME is in the import list of OBJFILE. Else
+ return zero. */
+
+int
+is_in_import_list (name, objfile)
+ char *name;
+ struct objfile *objfile;
+{
+ register int i;
+
+ if (!objfile || !name || !*name)
+ return 0;
+
+ for (i = 0; i < objfile->import_list_size; i++)
+ if (objfile->import_list[i] && STREQ (name, objfile->import_list[i]))
+ return 1;
+ return 0;
+}
+
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index f6fe03ca533..f59feb2c7d3 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -515,6 +515,9 @@ extern struct obj_section *
extern int
in_plt_section PARAMS ((CORE_ADDR, char *));
+extern int
+is_in_import_list PARAMS ((char *, struct objfile *));
+
/* Traverse all object files. ALL_OBJFILES_SAFE works even if you delete
the objfile during the traversal. */
diff --git a/gdb/remote.c b/gdb/remote.c
index 5b967052503..263e20b4c51 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -1852,7 +1852,7 @@ serial device is attached to the remote system (e.g. /dev/ttya).");
file descriptor, the event loop will call fetch_inferior_event,
which will do the proper analysis to determine what happened. */
if (async_p)
- add_file_handler (remote_desc->fd, (file_handler_func *) fetch_inferior_event, 0);
+ add_file_handler (remote_desc->fd, fetch_inferior_event, 0);
push_target (target); /* Switch to using remote target now */
@@ -3860,7 +3860,7 @@ extended_remote_async_create_inferior (exec_file, args, env)
/* If running asynchronously, register the target file descriptor
with the event loop. */
if (async_p)
- add_file_handler (remote_desc->fd, (file_handler_func *) fetch_inferior_event, 0);
+ add_file_handler (remote_desc->fd, fetch_inferior_event, 0);
/* Now restart the remote server. */
extended_remote_restart ();
@@ -4354,6 +4354,10 @@ remote_rcmd (char *command,
if (!remote_desc)
error ("remote rcmd is only available after target open");
+ /* Send a NULL command across as an empty command */
+ if (command == NULL)
+ command = "";
+
/* The query prefix */
strcpy (buf, "qRcmd,");
p = strchr (buf, '\0');
@@ -4387,6 +4391,11 @@ remote_rcmd (char *command,
}
if (strcmp (buf, "OK") == 0)
break;
+ if (strlen (buf) == 3 && buf[0] == 'E'
+ && isdigit (buf[1]) && isdigit (buf[2]))
+ {
+ error ("Protocol error with Rcmd");
+ }
for (p = buf; p[0] != '\0' && p[1] != '\0'; p += 2)
{
char c = (fromhex (p[0]) << 4) + fromhex (p[1]);
diff --git a/gdb/somread.c b/gdb/somread.c
index 861f34d7549..55092b8955a 100644
--- a/gdb/somread.c
+++ b/gdb/somread.c
@@ -482,34 +482,6 @@ som_symfile_offsets (objfile, addr)
return section_offsets;
}
-
-
-/* Check if a given symbol NAME is in the import list
- of OBJFILE.
- 1 => true, 0 => false
- This is used in hp_symtab_read.c to deal with static variables
- that are defined in a different shared library than the one
- whose symbols are being processed. */
-
-int
-is_in_import_list (name, objfile)
- char *name;
- struct objfile *objfile;
-{
- register int i;
-
- if (!objfile ||
- !name ||
- !*name)
- return 0;
-
- for (i = 0; i < objfile->import_list_size; i++)
- if (objfile->import_list[i] && STREQ (name, objfile->import_list[i]))
- return 1;
- return 0;
-}
-
-
/* Read in and initialize the SOM import list which is present
for all executables and shared libraries. The import list
consists of the symbols that are referenced in OBJFILE but
diff --git a/gdb/source.c b/gdb/source.c
index 928782cc913..3e36b1df889 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1,6 +1,5 @@
/* List lines of source files for GDB, the GNU debugger.
- Copyright 1986, 87, 88, 89, 91, 92, 93, 94, 95, 96, 97, 1998
- Free Software Foundation, Inc.
+ Copyright 1986-1989, 1991-1999 Free Software Foundation, Inc.
This file is part of GDB.
@@ -339,15 +338,17 @@ mod_path (dirname, which_path)
}
}
-#ifndef _WIN32
- /* On win32 h:\ is different to h: */
- if (SLASH_P (p[-1]))
+ if (!(SLASH_P (*name) && p <= name + 1) /* "/" */
+#if defined(_WIN32) || defined(__MSDOS__)
+ /* On MS-DOS and MS-Windows, h:\ is different from h: */
+ && !(!SLASH_P (*name) && ROOTED_P (name) && p <= name + 3) /* d:/ */
+#endif
+ && SLASH_P (p[-1]))
/* Sigh. "foo/" => "foo" */
--p;
-#endif
*p = '\0';
- while (p[-1] == '.')
+ while (p > name && p[-1] == '.')
{
if (p - name == 1)
{
@@ -355,7 +356,7 @@ mod_path (dirname, which_path)
name = current_directory;
goto append;
}
- else if (SLASH_P (p[-2]))
+ else if (p > name + 1 && SLASH_P (p[-2]))
{
if (p - name == 2)
{
@@ -377,6 +378,10 @@ mod_path (dirname, which_path)
if (name[0] == '~')
name = tilde_expand (name);
+#if defined(_WIN32) || defined(__MSDOS__)
+ else if (ROOTED_P (name) && p == name + 2) /* "d:" => "d:." */
+ name = concat (name, ".", NULL);
+#endif
else if (!ROOTED_P (name) && name[0] != '$')
name = concat (current_directory, SLASH_STRING, name, NULL);
else
@@ -412,6 +417,14 @@ mod_path (dirname, which_path)
p = *which_path;
while (1)
{
+ /* FIXME: strncmp loses in interesting ways on MS-DOS and
+ MS-Windows because of case-insensitivity and two different
+ but functionally identical slash characters. We need a
+ special filesystem-dependent file-name comparison function.
+
+ Actually, even on Unix I would use realpath() or its work-
+ alike before comparing. Then all the code above which
+ removes excess slashes and dots could simply go away. */
if (!strncmp (p, name, len)
&& (p[len] == '\0' || p[len] == DIRNAME_SEPARATOR))
{
@@ -606,8 +619,7 @@ done:
/* Beware the // my son, the Emacs barfs, the botch that catch... */
*filename_opened = concat (current_directory,
- SLASH_CHAR
- == current_directory[strlen (current_directory) - 1]
+ SLASH_P (current_directory[strlen (current_directory) - 1])
? "" : SLASH_STRING,
filename, NULL);
}
@@ -1515,6 +1527,16 @@ forward_search_command (regex, from_tty)
}
while (c != '\n' && (c = getc (stream)) >= 0);
+#ifdef CRLF_SOURCE_FILES
+ /* Remove the \r, if any, at the end of the line, otherwise
+ regular expressions that end with $ or \n won't work. */
+ if (p - buf > 1 && p[-2] == '\r')
+ {
+ p--;
+ p[-1] = '\n';
+ }
+#endif
+
/* we now have a source line in buf, null terminate and match */
*p = 0;
if (re_exec (buf) > 0)
@@ -1615,6 +1637,16 @@ reverse_search_command (regex, from_tty)
}
while (c != '\n' && (c = getc (stream)) >= 0);
+#ifdef CRLF_SOURCE_FILES
+ /* Remove the \r, if any, at the end of the line, otherwise
+ regular expressions that end with $ or \n won't work. */
+ if (p - buf > 1 && p[-2] == '\r')
+ {
+ p--;
+ p[-1] = '\n';
+ }
+#endif
+
/* We now have a source line in buf; null terminate and match. */
*p = 0;
if (re_exec (buf) > 0)
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 52b22f12158..98f377a88f8 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -194,6 +194,8 @@ static CORE_ADDR
static int
resolve_symbol_reference PARAMS ((struct objfile *, struct symbol *, char *));
+void stabsread_clear_cache PARAMS ((void));
+
static const char vptr_name[] =
{'_', 'v', 'p', 't', 'r', CPLUS_MARKER, '\0'};
static const char vb_name[] =
@@ -1192,6 +1194,16 @@ static int ref_count = 0;
/* Number of chunks malloced. */
static int ref_chunk = 0;
+/* This file maintains a cache of stabs aliases found in the symbol
+ table. If the symbol table changes, this cache must be cleared
+ or we are left holding onto data in invalid obstacks. */
+void
+stabsread_clear_cache ()
+{
+ ref_count = 0;
+ ref_chunk = 0;
+}
+
/* Create array of pointers mapping refids to symbols and stab strings.
Add pointers to reference definition symbols and/or their values as we
find them, using their reference numbers as our index.
@@ -4710,7 +4722,7 @@ read_range_type (pp, typenums, objfile)
return init_type (TYPE_CODE_INT, -n3, TYPE_FLAG_UNSIGNED,
NULL, objfile);
- /* Is n3 == 2**(8n))-1 for some integer n? Then it's an
+ /* Is n3 == 2**(8n)-1 for some integer n? Then it's an
unsigned n-byte integer. But do require n to be a power of
two; we don't want 3- and 5-byte integers flying around. */
{
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 7d31fa831ff..4b0a6238a7d 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,31 @@
+1999-08-13 Keith Seitz <keiths@cygnus.com>
+
+ * gdb.base/dbx.exp (dbx_gdb_file_cmd): Rename to gdb_file_cmd.
+ (dbx_gdb_load): Remove. Use gdb_load instead, since that
+ proc knows about targets other than the natives.
+ (test_assign): Use "gdb_run_cmd" to "run" the target.
+ Check that we've actually hit the breakpoint at main.
+ When we attempt to assign a value to a local variable, check
+ that the variable is in the current scope, i.e., don't use
+ a test with an empty result.
+
+Tue Aug 10 15:25:16 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * gdb.base/maint.exp: Add test of ``maintenance internal-error''
+ command.
+
+1999-08-09 Stan Shebs <shebs@andros.cygnus.com>
+
+ From Jimmy Guo <guo@cup.hp.com> and others at HP:
+ gdb.hp: Move tests into subdirectories gdb.aCC, gdb.base-hp,
+ gdb.compat, gdb.threads-hp.
+ gdb.hp/configure, gdb.hp/configure.in: New files.
+ gdb.hp/Makefile.in: Recurse into new subdirs.
+ gdb.hp/gdb.defects: New directory, tests for HP bug reports.
+ gdb.hp/gdb.objdbg: New directory, tests for debugging info
+ in object files.
+ gdb.hp/tools: New directory, aux tools for HP-specific tests.
+
1999-08-05 Stan Shebs <shebs@andros.cygnus.com>
* gdb.base/display.exp: Help expect by putting a newline in the
diff --git a/gdb/testsuite/gdb.base/dbx.exp b/gdb/testsuite/gdb.base/dbx.exp
index 05f3fe492b2..092b31ace71 100644
--- a/gdb/testsuite/gdb.base/dbx.exp
+++ b/gdb/testsuite/gdb.base/dbx.exp
@@ -160,7 +160,15 @@ proc dbx_reinitialize_dir { subdir } {
# of this command returns, causing the test to get out of sync and fail
# seemingly randomly or only on a loaded system.
#
-proc dbx_gdb_file_cmd {arg } {
+# Problem is, though, that the testsuite config files can override the definition of
+# gdb_load (without notice, as was mentioned above). Unfortunately, the gdb_load proc
+# that was copied into this test was a copy of the unix native version.
+#
+# The real problem that we're attempting to solve is how to load an exec and symbol
+# file into gdb for a dbx session. So why not just override gdb_file_cmd with the
+# right sequence of events, allowing gdb_load to do its normal thing? This way
+# remotes and simulators will work, too.
+proc gdb_file_cmd {arg} {
global verbose
global loadpath
global loadfile
@@ -169,6 +177,14 @@ proc dbx_gdb_file_cmd {arg } {
global spawn_id
upvar timeout timeout
+ if [is_remote host] {
+ set arg [remote_download host $arg];
+ if { $arg == "" } {
+ error "download failed"
+ return -1;
+ }
+ }
+
send_gdb "symbol-file $arg\n"
gdb_expect {
-re "Detected 64-bit symbol file.\r\nInvoking.*gdb64.*$gdb_prompt $" {
@@ -245,17 +261,6 @@ proc dbx_gdb_file_cmd {arg } {
}
}
-proc dbx_gdb_load { arg } {
- global verbose
- global loadpath
- global loadfile
- global GDB
- global prompt
- upvar timeout timeout
-
- return [dbx_gdb_file_cmd $arg]
-}
-
#
#test_breakpoints
#
@@ -271,8 +276,22 @@ proc test_breakpoints { } {
#test_assign
#
proc test_assign { } {
- gdb_test "run" ""
- gdb_test "assign first=1" ""
+ global decimal
+ global gdb_prompt
+
+ gdb_run_cmd
+ gdb_expect 30 {
+ -re "Break.* at .*:$decimal.*$gdb_prompt $" { pass "running to main" }
+ -re "Breakpoint \[0-9\]*, \[0-9xa-f\]* in .*$gdb_prompt $" { pass "running to main" }
+ -re "$gdb_prompt $" { fail "running to main" }
+ timeout { fail "running to main (timeout)" }
+ }
+ send_gdb "assign first=1\n"
+ gdb_expect {
+ -re "No symbol \"first\" in current context.*$" { fail "assign first" }
+ "$gdb_prompt $" { pass "assign first" }
+ timeout { fail "assign first (timeout)" }
+ }
gdb_test "print first" ".1 = 1"
}
@@ -304,7 +323,7 @@ set saved_gdbflags $GDBFLAGS
set GDBFLAGS "$GDBFLAGS --dbx"
gdb_start
dbx_reinitialize_dir $srcdir/$subdir
-dbx_gdb_load ${binfile}
+gdb_load ${binfile}
test_breakpoints
test_assign
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
index b1f7c53f28d..4c64b973563 100644
--- a/gdb/testsuite/gdb.base/maint.exp
+++ b/gdb/testsuite/gdb.base/maint.exp
@@ -31,6 +31,7 @@
#maintenance dump-me -- Get fatal error; make debugger dump its core
#maintenance print -- Maintenance command for printing GDB internal state
#maintenance info -- Commands for showing internal info about the program being debugged
+#maintenance internal-error -- Give GDB an internal error.
#
#maintenance print statistics -- Print statistics about internal gdb state
#maintenance print objfiles -- Print dump of current object file definitions
@@ -442,7 +443,7 @@ set timeout $oldtimeout
send_gdb "help maint\n"
gdb_expect {
- -re "Commands for use by GDB maintainers\\..*Includes commands to dump specific internal GDB structures in.*a human readable form, to cause GDB to deliberately dump core,.*to test internal functions such as the C.. demangler, etc\\..*List of maintenance subcommands:.*maintenance check-symtabs.*maintenance demangle.*maintenance dump-me.*maintenance info.*maintenance print.*maintenance space.*maintenance time.*Type.*help maintenance.*followed by maintenance subcommand name for full documentation\\..*Command name abbreviations are allowed if unambiguous\\..*$gdb_prompt $"\
+ -re "Commands for use by GDB maintainers\\..*Includes commands to dump specific internal GDB structures in.*a human readable form, to cause GDB to deliberately dump core,.*to test internal functions such as the C.. demangler, etc\\..*List of maintenance subcommands:.*maintenance check-symtabs.*maintenance demangle.*maintenance dump-me.*maintenance info.*maintenance internal-error.*maintenance print.*maintenance space.*maintenance time.*Type.*help maintenance.*followed by maintenance subcommand name for full documentation\\..*Command name abbreviations are allowed if unambiguous\\..*$gdb_prompt $"\
{ pass "help maint" }
-re ".*$gdb_prompt $" { fail "help maint" }
timeout { fail "(timeout) help maint" }
@@ -489,6 +490,14 @@ gdb_expect {
timeout { fail "(timeout) help maint dump-me" }
}
+send_gdb "help maint internal-error\n"
+gdb_expect {
+ -re "Give GDB an internal error\\.\r\nCause GDB to behave as if an internal error was detected\\..*$gdb_prompt $"\
+ { pass "help maint internal-error" }
+ -re ".*$gdb_prompt $" { fail "help maint internal-error" }
+ timeout { fail "(timeout) help maint internal-error" }
+ }
+
send_gdb "help maint print statistics\n"
gdb_expect {
-re "Print statistics about internal gdb state\\..*$gdb_prompt $"\
@@ -612,6 +621,38 @@ gdb_expect {
timeout { fail "(timeout) maint dump-me" }
}
+send_gdb "maint internal-error\n"
+gdb_expect {
+ -re "Continue this debugging session.*\\(y or n\\) $" {
+ send_gdb "y\n"
+ gdb_expect {
+ -re "Create a core file.*\\(y or n\\) $" {
+ send_gdb "n\n"
+ gdb_expect {
+ -re ".*$gdb_prompt $" {
+ pass "maint internal-error"
+ }
+ timeout {
+ fail "(timeout) maint internal-error"
+ }
+ }
+ }
+ -re ".*$gdb_prompt $" {
+ fail "maint internal-error"
+ }
+ timeout {
+ fail "(timeout) maint internal-error"
+ }
+ }
+ }
+ -re ".*$gdb_prompt $" {
+ fail "maint internal-error"
+ }
+ timeout {
+ fail "(timeout) maint internal-error"
+ }
+}
+
#set timeout $oldtimeout
diff --git a/gdb/testsuite/gdb.hp/Makefile.in b/gdb/testsuite/gdb.hp/Makefile.in
index d65fc75e222..2a1a9df175b 100644
--- a/gdb/testsuite/gdb.hp/Makefile.in
+++ b/gdb/testsuite/gdb.hp/Makefile.in
@@ -1,25 +1,44 @@
VPATH = @srcdir@
srcdir = @srcdir@
-PROGS = ambiguous ctti-add exception gen-so-thresh namespace \
- optimize pxdb so-thresh templ-hp watch-hp xdb
+SUBDIRS = @subdirs@
-MISCELLANEOUS = \
- lib00-so-thresh.c lib00-so-thresh.sl \
- lib01-so-thresh.c lib01-so-thresh.sl \
- lib02-so-thresh.c lib02-so-thresh.sl \
- so-thresh.c so-thresh.linkopts
-
-all:
+all:
@echo "Nothing to be done for all..."
-#### host, target, and site specific Makefile frags come in here.
+info:
+install-info:
+dvi:
+install:
+uninstall: force
+installcheck:
+check:
clean mostlyclean:
- -rm -f *.ci *.o $(OBJS) $(PROGS) $(MISCELLANEOUS) *~ core
+ -rm -f *~ core *.o
+ if [ x"${SUBDIRS}" != x ] ; then \
+ for dir in ${SUBDIRS}; \
+ do \
+ echo "$$dir:"; \
+ if [ -d $$dir ]; then \
+ (cd $$dir; $(MAKE) clean); \
+ fi; \
+ done ; \
+ else true; fi
distclean maintainer-clean realclean: clean
-rm -f Makefile config.status config.log
+ -rm -f *-init.exp
+ -rm -fr *.log summary detail *.plog *.sum *.psum site.*
+ if [ x"${SUBDIRS}" != x ] ; then \
+ for dir in ${SUBDIRS}; \
+ do \
+ echo "$$dir:"; \
+ if [ -d $$dir ]; then \
+ (cd $$dir; $(MAKE) distclean); \
+ fi; \
+ done ; \
+ else true; fi
Makefile: $(srcdir)/Makefile.in $(srcdir)/configure.in
$(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.hp/configure b/gdb/testsuite/gdb.hp/configure
new file mode 100755
index 00000000000..e01b9625989
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/configure
@@ -0,0 +1,1008 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.13"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=gdb.aCC
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+CC=${CC-cc}
+
+ac_aux_dir=
+for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+# configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+# same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+# as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:575: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:596: checking target system type" >&5
+
+target_alias=$target
+case "$target_alias" in
+NONE)
+ case $nonopt in
+ NONE) target_alias=$host_alias ;;
+ *) target_alias=$nonopt ;;
+ esac ;;
+esac
+
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$target" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:614: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+ case $nonopt in
+ NONE) build_alias=$host_alias ;;
+ *) build_alias=$nonopt ;;
+ esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+
+# Directories to use in all configurations.
+configdirs="gdb.aCC \
+ gdb.base-hp \
+ gdb.compat \
+ gdb.defects \
+ gdb.objdbg \
+ gdb.threads-hp"
+
+# configure the subdirectories too
+subdirs="$configdirs"
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@CC@%$CC%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+s%@subdirs@%$subdirs%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
+if test "$no_recursion" != yes; then
+
+ # Remove --cache-file and --srcdir arguments so they do not pile up.
+ ac_sub_configure_args=
+ ac_prev=
+ for ac_arg in $ac_configure_args; do
+ if test -n "$ac_prev"; then
+ ac_prev=
+ continue
+ fi
+ case "$ac_arg" in
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ ;;
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ ;;
+ *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
+ esac
+ done
+
+ for ac_config_dir in $configdirs; do
+
+ # Do not complain, so a configure script can configure whichever
+ # parts of a large source tree are present.
+ if test ! -d $srcdir/$ac_config_dir; then
+ continue
+ fi
+
+ echo configuring in $ac_config_dir
+
+ case "$srcdir" in
+ .) ;;
+ *)
+ if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
+ else
+ { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
+ fi
+ ;;
+ esac
+
+ ac_popdir=`pwd`
+ cd $ac_config_dir
+
+ # A "../" for each directory in /$ac_config_dir.
+ ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
+
+ case "$srcdir" in
+ .) # No --srcdir option. We are building in place.
+ ac_sub_srcdir=$srcdir ;;
+ /*) # Absolute path.
+ ac_sub_srcdir=$srcdir/$ac_config_dir ;;
+ *) # Relative path.
+ ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
+ esac
+
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_sub_srcdir/configure; then
+ ac_sub_configure=$ac_sub_srcdir/configure
+ elif test -f $ac_sub_srcdir/configure.in; then
+ ac_sub_configure=$ac_configure
+ else
+ echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
+ ac_sub_configure=
+ fi
+
+ # The recursion is here.
+ if test -n "$ac_sub_configure"; then
+
+ # Make the cache file name correct relative to the subdirectory.
+ case "$cache_file" in
+ /*) ac_sub_cache_file=$cache_file ;;
+ *) # Relative path.
+ ac_sub_cache_file="$ac_dots$cache_file" ;;
+ esac
+
+ echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
+ # The eval makes quoting arguments work.
+ if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
+ then :
+ else
+ { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
+ fi
+ fi
+
+ cd $ac_popdir
+ done
+fi
+
diff --git a/gdb/testsuite/gdb.hp/configure.in b/gdb/testsuite/gdb.hp/configure.in
new file mode 100644
index 00000000000..dd84c343bab
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/configure.in
@@ -0,0 +1,17 @@
+dnl Process this file file with autoconf to produce a configure script.
+dnl This file is a shell script fragment that supplies the information
+dnl necessary to tailor a template configure script into the configure
+dnl script appropriate for this directory. For more information, check
+dnl any existing configure script.
+
+AC_PREREQ(2.5)
+AC_INIT(gdb.aCC)
+
+CC=${CC-cc}
+AC_SUBST(CC)
+AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
+AC_CANONICAL_SYSTEM
+
+AC_CONFIG_SUBDIRS(gdb.aCC gdb.base-hp gdb.compat gdb.defects gdb.objdbg gdb.threads-hp)
+
+AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.hp/gdb.aCC/Makefile.in b/gdb/testsuite/gdb.hp/gdb.aCC/Makefile.in
new file mode 100644
index 00000000000..1295c1e5585
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.aCC/Makefile.in
@@ -0,0 +1,27 @@
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+EXECUTABLES = exception namespace optimize run
+
+all:
+ @echo "Nothing to be done for all..."
+
+info:
+install-info:
+dvi:
+install:
+uninstall: force
+installcheck:
+check:
+
+clean mostlyclean:
+ -rm -f *~ *.o *.ci
+ -rm -f core $(EXECUTABLES)
+
+distclean maintainer-clean realclean: clean
+ -rm -f Makefile config.status config.log
+ -rm -f *-init.exp
+ -rm -fr *.log summary detail *.plog *.sum *.psum site.*
+
+Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in
+ $(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.hp/gdb.aCC/configure b/gdb/testsuite/gdb.hp/gdb.aCC/configure
new file mode 100755
index 00000000000..f3ffcd514db
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.aCC/configure
@@ -0,0 +1,899 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.12.1
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.12.1"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=exception.exp
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+CC=${CC-cc}
+
+ac_aux_dir=
+for ac_dir in `cd $srcdir;pwd`/../../../.. $srcdir/`cd $srcdir;pwd`/../../../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../../.. $srcdir/`cd $srcdir;pwd`/../../../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+# configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+# same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+# as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:573: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:594: checking target system type" >&5
+
+target_alias=$target
+case "$target_alias" in
+NONE)
+ case $nonopt in
+ NONE) target_alias=$host_alias ;;
+ *) target_alias=$nonopt ;;
+ esac ;;
+esac
+
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$target" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:612: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+ case $nonopt in
+ NONE) build_alias=$host_alias ;;
+ *) build_alias=$nonopt ;;
+ esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set) 2>&1 | grep ac_space` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@CC@%$CC%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/gdb/testsuite/gdb.hp/gdb.aCC/configure.in b/gdb/testsuite/gdb.hp/gdb.aCC/configure.in
new file mode 100644
index 00000000000..c5fb71f0e02
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.aCC/configure.in
@@ -0,0 +1,15 @@
+dnl Process this file file with autoconf to produce a configure script.
+dnl This file is a shell script fragment that supplies the information
+dnl necessary to tailor a template configure script into the configure
+dnl script appropriate for this directory. For more information, check
+dnl any existing configure script.
+
+AC_PREREQ(2.5)
+AC_INIT(exception.exp)
+
+CC=${CC-cc}
+AC_SUBST(CC)
+AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../../..)
+AC_CANONICAL_SYSTEM
+
+AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.hp/gdb.aCC/exception.cc b/gdb/testsuite/gdb.hp/gdb.aCC/exception.cc
new file mode 100644
index 00000000000..27459329a8b
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.aCC/exception.cc
@@ -0,0 +1,48 @@
+// Test file for exception handling support.
+
+#include <iostream.h>
+
+int foo (int i)
+{
+ if (i < 32)
+ throw (int) 13;
+ else
+ return i * 2;
+}
+
+extern "C" int bar (int k, unsigned long eharg, int flag);
+
+int bar (int k, unsigned long eharg, int flag)
+{
+ cout << "k is " << k << " eharg is " << eharg << " flag is " << flag << endl;
+ return 1;
+}
+
+int main()
+{
+ int j;
+
+ try {
+ j = foo (20);
+ }
+ catch (int x) {
+ cout << "Got an except " << x << endl;
+ }
+
+ try {
+ try {
+ j = foo (20);
+ }
+ catch (int x) {
+ cout << "Got an except " << x << endl;
+ throw;
+ }
+ }
+ catch (int y) {
+ cout << "Got an except (rethrown) " << y << endl;
+ }
+
+ // Not caught
+ foo (20);
+
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.aCC/exception.exp b/gdb/testsuite/gdb.hp/gdb.aCC/exception.exp
new file mode 100644
index 00000000000..a0914ae5ba4
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.aCC/exception.exp
@@ -0,0 +1,439 @@
+# Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+#
+# tests for exception-handling support
+# Written by Satish Pai <pai@apollo.hp.com> 1997-07-23
+
+# This file is part of the gdb testsuite
+
+# Note: These tests are geared to the HP aCC compiler,
+# which has an idiosyncratic way of emitting debug info
+# for exceptions -- it uses a callback mechanism, which
+# is different from the way g++ records exception info
+# for debugging
+
+# The tests are in two parts; the first part deals with
+# statically linked (archive-bound) executables, and the
+# second part repeats those tests with dynamically linked
+# (shared bound) executables. (In the latter case we use
+# a different mechanism to get the address of the notification
+# hook in the C++ support library.) The tests themselves are
+# the same in both parts.
+#
+# IMPORTANT:
+# ---------
+# IF YOU CHANGE A TEST IN ONE PART MAKE SURE YOU CHANGE IT
+# --------------------------------------------------------
+# IN THE OTHER PART TOO!
+# ----------------------
+
+
+
+if $tracelevel then {
+ strace $tracelevel
+ }
+
+if { [skip_hp_tests] } then { continue }
+
+#
+# test running programs
+#
+
+# Part I : Archive-bound executables
+# ----------------------------------
+
+set testfile "exception"
+set srcfile ${testfile}.cc
+set binfile ${objdir}/${subdir}/${testfile}
+
+if [get_compiler_info ${binfile} "c++"] {
+ return -1;
+}
+
+
+if { $gcc_compiled } then { continue }
+
+set cmdline "$CXX_FOR_TARGET ${srcdir}/${subdir}/${srcfile} +A -Wl,-a,archive -g -o ${binfile}"
+
+remote_exec build $cmdline
+
+# Start with a fresh gdb
+
+set prms_id 0
+set bug_id 0
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto_main] then {
+ perror "couldn't run to breakpoint"
+ continue
+}
+
+# Set a catch catchpoint
+
+send_gdb "catch catch\n"
+gdb_expect {
+ -re "Catchpoint \[0-9\]* \\(catch\\)\r\n$gdb_prompt $" {
+ pass "catch catch (static executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "catch catch (static executable)" }
+ timeout { fail "(timeout) catch catch (static executable)" }
+}
+
+# Set a throw catchpoint
+
+send_gdb "catch throw\n"
+gdb_expect {
+ -re "Catchpoint \[0-9\]* \\(throw\\)\r\n$gdb_prompt $" {
+ pass "catch throw (static executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "catch throw (static executable)" }
+ timeout { fail "(timeout) catch throw (static executable)" }
+}
+
+# The catchpoints should be listed in the list of breakpoints.
+
+send_gdb "info break\n"
+gdb_expect {
+ -re ".*\[0-9\]*\[ \]*catch catch\[ \]*keep y\[ \]*exception catch\[ \]*\r\n\[0-9\]*\[ \]*catch throw\[ \]*keep y\[ \]*exception throw\[ \]*\r\n$gdb_prompt $" {
+ pass "info break with catchpoints (static executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "info break (static executable)" }
+ timeout { fail "(timeout) info break (static executable)" }
+}
+
+# Info catch currently does not work with HP aCC. No easy way to
+# list the active handlers on the stack.
+
+send_gdb "info catch\n"
+gdb_expect {
+ -re "Info catch not supported with this target/compiler combination.\r\n$gdb_prompt $" {
+ pass "info catch (static executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "info catch (static executable)" }
+ timeout { fail "(timeout) info catch (static executable)" }
+}
+
+# Get the first exception thrown
+
+send_gdb "continue\n"
+gdb_expect {
+ -re "Continuing.*Catchpoint \[0-9\]* \\(exception thrown\\), throw location.*exception\\.cc:8, catch location .*exception\\.cc:28\r\n.*$gdb_prompt $" {
+ pass "caught a throw (static executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "didn't catch a throw (static executable)" }
+ timeout { fail "(timeout) after continue -- didn't catch a throw? (static executable)" }
+}
+
+send_gdb "backtrace\n"
+gdb_expect {
+ -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=__EH_NOTIFY_THROW.*\r\n#2\[ \]*$hex in __eh_notify_throw.*\r\n#3\[ \]*$hex in foo \\(i=20\\) at .*exception\\.cc:8\r\n#4\[ \]*$hex in main.* at .*exception\\.cc:26\r\n$gdb_prompt $" {
+ pass "backtrace after throw (static executable)"
+ }
+ -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=\[0-9\].*\r\n#2\[ \]*$hex in __eh_notify_throw.*\r\n#3\[ \]*$hex in foo \\(i=20\\) at .*exception\\.cc:8\r\n#4\[ \]*$hex in main.* at .*exception\\.cc:26\r\n$gdb_prompt $" {
+ pass "backtrace after throw (static executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "backtrace after throw (static executable)" }
+ timeout { fail "(timeout) backtrace after throw (static executable)" }
+}
+
+# Now intercept it when it is caught.
+
+send_gdb "continue\n"
+gdb_expect {
+ -re "Continuing.*Catchpoint \[0-9\]* \\(exception caught\\), throw location.*exception\\.cc:8, catch location .*exception\\.cc:28\r\n.*$gdb_prompt $" {
+ pass "caught a catch (static executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "didn't catch a catch (static executable)" }
+ timeout { fail "(timeout) after continue -- didn't catch a catch? (static executable)" }
+}
+
+send_gdb "backtrace\n"
+gdb_expect {
+ -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=__EH_NOTIFY_CATCH.*\r\n.*\r\n#3\[ \]*$hex in __throw__.*\r\n#4\[ \]*$hex in foo \\(i=20\\) at .*exception.cc:8\r\n#5\[ \]*$hex in main.* at .*exception.cc:26\r\n$gdb_prompt $" {
+ pass "backtrace after catch (static executable)"
+ }
+ -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=\[0-9\].*\r\n.*\r\n#3\[ \]*$hex in __throw__.*\r\n#4\[ \]*$hex in foo \\(i=20\\) at .*exception.cc:8\r\n#5\[ \]*$hex in main.* at .*exception.cc:26\r\n$gdb_prompt $" {
+ pass "backtrace after catch (static executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "backtrace after catch (static executable)" }
+ timeout { fail "(timeout) backtrace after catch (static executable)" }
+}
+
+send_gdb "continue\n"
+gdb_expect {
+ -re "Continuing\\.\r\nGot.*\r\nCatchpoint \[0-9\]* \\(exception thrown\\), throw location.*exception\\.cc:8, catch location .*exception\\.cc:36\r\n.*$gdb_prompt $" {
+ pass "caught a throw (2) (static executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "didn't catch a throw (2) (static executable)" }
+ timeout { fail "(timeout) after continue -- didn't catch a throw (2)? (static executable)" }
+}
+
+send_gdb "continue\n"
+gdb_expect {
+ -re "Continuing.*Catchpoint \[0-9\]* \\(exception caught\\), throw location.*exception\\.cc:8, catch location .*exception\\.cc:36\r\n.*$gdb_prompt $" {
+ pass "caught a catch (2) (static executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "didn't catch a catch (2) (static executable)" }
+ timeout { fail "(timeout) after continue -- didn't catch a catch (2)? (static executable)" }
+}
+
+# Now the exception will be rethrown.
+
+send_gdb "continue\n"
+gdb_expect {
+ -re "Continuing\\.\r\nGot.*\r\nCatchpoint \[0-9\]* \\(exception thrown\\), throw location.*exception\\.cc:38, catch location .*exception\\.cc:41\r\n.*$gdb_prompt $" {
+ pass "caught a rethrow (static executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "didn't catch a rethrow (static executable)" }
+ timeout { fail "(timeout) after continue -- didn't catch a rethrow? (static executable)" }
+}
+
+send_gdb "continue\n"
+gdb_expect {
+ -re "Continuing.*Catchpoint \[0-9\]* \\(exception caught\\), throw location.*exception\\.cc:3\[68\], catch location .*exception\\.cc:41\r\n.*$gdb_prompt $" {
+ # FIXME: guo: why XFAIL? need comment
+ xfail "caught a catch (3) (static executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "didn't catch a catch (3) (static executable)" }
+ timeout { fail "(timeout) after continue -- didn't catch a catch (3)? (static executable)" }
+}
+
+send_gdb "backtrace\n"
+gdb_expect {
+ -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=__EH_NOTIFY_CATCH.*\r\n.*\r\n#3\[ \]*$hex in __rethrow.*\r\n#4\[ \]*$hex in main.* at .*exception\\.cc:3\[68\]\r\n#5\[ \]*$hex in foo \\(i=20\\) at .*exception.cc:8\r\n#6\[ \]*$hex in main.* at .*exception.cc:34\r\n$gdb_prompt $" {
+ # FIXME: guo: why XFAIL? need comment
+ xfail "backtrace after catch (3) (static executable)"
+ }
+ -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=\[0-9\].*\r\n.*\r\n#3\[ \]*$hex in __rethrow.*\r\n#4\[ \]*$hex in main.* at .*exception\\.cc:3\[68\]\r\n#5\[ \]*$hex in foo \\(i=20\\) at .*exception.cc:8\r\n#6\[ \]*$hex in main.* at .*exception.cc:34\r\n$gdb_prompt $" {
+ # FIXME: guo: why XFAIL? need comment
+ xfail "backtrace after catch (3) (static executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "backtrace after catch (3) (static executable)" }
+ timeout { fail "(timeout) backtrace after catch (3) (static executable)" }
+}
+
+# Now the exception will be thrown, but not catch-able anywhere.
+
+send_gdb "continue\n"
+gdb_expect {
+ -re "Continuing\\.\r\nGot.*\r\nCatchpoint \[0-9\]* \\(exception thrown\\), throw location.*exception\\.cc:8, catch location unknown\r\n.*$gdb_prompt $" {
+ pass "caught an uncatchable throw (static executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "didn't catch an uncatchable throw (static executable)" }
+ timeout { fail "(timeout) after continue -- didn't catch an uncatchable throw? (static executable)" }
+}
+
+# Part II : Shared-bound executables
+# ----------------------------------
+
+# Start with a fresh gdb
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+set prms_id 0
+set bug_id 0
+
+set testfile "exception"
+set srcfile ${testfile}.cc
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will a
+utomatically fail."
+}
+
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+
+if ![runto_main] then {
+ perror "couldn't run to breakpoint"
+ continue
+}
+
+# Set a catch catchpoint
+
+send_gdb "catch catch\n"
+gdb_expect {
+ -re "Catchpoint \[0-9\]* \\(catch\\)\r\n$gdb_prompt $" {
+ pass "catch catch (dynamic executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "catch catch (dynamic executable)" }
+ timeout { fail "(timeout) catch catch (dynamic executable)" }
+}
+
+# Set a throw catchpoint
+
+send_gdb "catch throw\n"
+gdb_expect {
+ -re "Catchpoint \[0-9\]* \\(throw\\)\r\n$gdb_prompt $" {
+ pass "catch throw (dynamic executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "catch throw (dynamic executable)" }
+ timeout { fail "(timeout) catch throw (dynamic executable)" }
+}
+
+# The catchpoints should be listed in the list of breakpoints.
+
+send_gdb "info break\n"
+gdb_expect {
+ -re ".*\[0-9\]*\[ \]*catch catch\[ \]*keep y\[ \]*exception catch\[ \]*\r\n\[0-9\]*\[ \]*catch throw\[ \]*keep y\[ \]*exception throw\[ \]*\r\n$gdb_prompt $" {
+ pass "info break with catchpoints (dynamic executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "info break (dynamic executable)" }
+ timeout { fail "(timeout) info break (dynamic executable)" }
+}
+
+# Info catch currently does not work with HP aCC. No easy way to
+# list the active handlers on the stack.
+
+send_gdb "info catch\n"
+gdb_expect {
+ -re "Info catch not supported with this target/compiler combination.\r\n$gdb_prompt $" {
+ pass "info catch (dynamic executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "info catch (dynamic executable)" }
+ timeout { fail "(timeout) info catch (dynamic executable)" }
+}
+
+# Get the first exception thrown
+
+send_gdb "continue\n"
+gdb_expect {
+ -re "Continuing.*Catchpoint \[0-9\]* \\(exception thrown\\), throw location.*exception\\.cc:8, catch location .*exception\\.cc:28\r\n.*$gdb_prompt $" {
+ pass "caught a throw (dynamic executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "didn't catch a throw (dynamic executable)" }
+ timeout { fail "(timeout) after continue -- didn't catch a throw? (dynamic executable)" }
+}
+
+send_gdb "backtrace\n"
+gdb_expect {
+ -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=__EH_NOTIFY_THROW.*\r\n#2\[ \]*$hex in __eh_notify_throw.*\r\n#3\[ \]*$hex in foo \\(i=20\\) at .*exception\\.cc:8\r\n#4\[ \]*$hex in main.* at .*exception\\.cc:26\r\n$gdb_prompt $" {
+ pass "backtrace after throw (dynamic executable)"
+ }
+ -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=\[0-9\].*\r\n#2\[ \]*$hex in __eh_notify_throw.*\r\n#3\[ \]*$hex in foo \\(i=20\\) at .*exception\\.cc:8\r\n#4\[ \]*$hex in main.* at .*exception\\.cc:26\r\n$gdb_prompt $" {
+ pass "backtrace after throw (dynamic executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "backtrace after throw (dynamic executable)" }
+ timeout { fail "(timeout) backtrace after throw (dynamic executable)" }
+}
+
+# Now intercept it when it is caught.
+
+send_gdb "continue\n"
+gdb_expect {
+ -re "Continuing.*Catchpoint \[0-9\]* \\(exception caught\\), throw location.*exception\\.cc:8, catch location .*exception\\.cc:28\r\n.*$gdb_prompt $" {
+ pass "caught a catch (dynamic executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "didn't catch a catch (dynamic executable)" }
+ timeout { fail "(timeout) after continue -- didn't catch a catch? (dynamic executable)" }
+}
+
+send_gdb "backtrace\n"
+gdb_expect {
+ -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=__EH_NOTIFY_CATCH.*\r\n.*\r\n#3\[ \]*$hex in __throw__.*\r\n#4\[ \]*$hex in foo \\(i=20\\) at .*exception.cc:8\r\n#5\[ \]*$hex in main.* at .*exception.cc:26\r\n$gdb_prompt $" {
+ pass "backtrace after catch (dynamic executable)"
+ }
+ -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=\[0-9\].*\r\n.*\r\n#3\[ \]*$hex in __throw__.*\r\n#4\[ \]*$hex in foo \\(i=20\\) at .*exception.cc:8\r\n#5\[ \]*$hex in main.* at .*exception.cc:26\r\n$gdb_prompt $" {
+ pass "backtrace after catch (dynamic executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "backtrace after catch (dynamic executable)" }
+ timeout { fail "(timeout) backtrace after catch (dynamic executable)" }
+}
+
+send_gdb "continue\n"
+gdb_expect {
+ -re "Continuing\\.\r\nGot.*\r\nCatchpoint \[0-9\]* \\(exception thrown\\), throw location.*exception\\.cc:8, catch location .*exception\\.cc:36\r\n.*$gdb_prompt $" {
+ pass "caught a throw (2) (dynamic executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "didn't catch a throw (2) (dynamic executable)" }
+ timeout { fail "(timeout) after continue -- didn't catch a throw (2)? (dynamic executable)" }
+}
+
+send_gdb "continue\n"
+gdb_expect {
+ -re "Continuing.*Catchpoint \[0-9\]* \\(exception caught\\), throw location.*exception\\.cc:8, catch location .*exception\\.cc:36\r\n.*$gdb_prompt $" {
+ pass "caught a catch (2) (dynamic executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "didn't catch a catch (2) (dynamic executable)" }
+ timeout { fail "(timeout) after continue -- didn't catch a catch (2)? (dynamic executable)" }
+}
+
+# Now the exception will be rethrown.
+
+send_gdb "continue\n"
+gdb_expect {
+ -re "Continuing\\.\r\nGot.*\r\nCatchpoint \[0-9\]* \\(exception thrown\\), throw location.*exception\\.cc:38, catch location .*exception\\.cc:41\r\n.*$gdb_prompt $" {
+ pass "caught a rethrow (dynamic executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "didn't catch a rethrow (dynamic executable)" }
+ timeout { fail "(timeout) after continue -- didn't catch a rethrow? (dynamic executable)" }
+}
+
+#DTS CLLbs14858
+#The throw location should be at line 38 instead of 36.
+setup_xfail hppa*-*-* CLLbs14858
+send_gdb "continue\n"
+gdb_expect {
+ -re "Continuing.*Catchpoint \[0-9\]* \\(exception caught\\), throw location.*exception\\.cc:3\[68\], catch location .*exception\\.cc:41\r\n.*$gdb_prompt $" {
+ # FIXME: guo: according to comment above the RE is wrong!
+ pass "caught a catch (3) (dynamic executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "didn't catch a catch (3) (dynamic executable)" }
+ timeout { fail "(timeout) after continue -- didn't catch a catch (3)? (dynamic executable)" }
+}
+
+#DTS CLLbs14858
+#The line number for main() should be at exception.cc:38 instead of exception.cc:36
+setup_xfail hppa*-*-* CLLbs14858
+send_gdb "backtrace\n"
+gdb_expect {
+ -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=__EH_NOTIFY_CATCH.*\r\n.*\r\n#3\[ \]*$hex in __rethrow.*\r\n#4\[ \]*$hex in main.* at .*exception\\.cc:3\[68\]\r\n#5\[ \]*$hex in foo \\(i=20\\) at .*exception.cc:8\r\n#6\[ \]*$hex in main.* at .*exception.cc:34\r\n$gdb_prompt $" {
+ # FIXME: guo: according to comment above the RE is wrong!
+ pass "backtrace after catch (3) (dynamic executable)"
+ }
+ -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=\[0-9\].*\r\n.*\r\n#3\[ \]*$hex in __rethrow.*\r\n#4\[ \]*$hex in main.* at .*exception\\.cc:3\[68\]\r\n#5\[ \]*$hex in foo \\(i=20\\) at .*exception.cc:8\r\n#6\[ \]*$hex in main.* at .*exception.cc:34\r\n$gdb_prompt $" {
+ # FIXME: guo: according to comment above the RE is wrong!
+ pass "backtrace after catch (3) (dynamic executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "backtrace after catch (3) (dynamic executable)" }
+ timeout { fail "(timeout) backtrace after catch (3) (dynamic executable)" }
+}
+
+# Now the exception will be thrown, but not catch-able anywhere.
+
+send_gdb "continue\n"
+gdb_expect {
+ -re "Continuing\\.\r\nGot.*\r\nCatchpoint \[0-9\]* \\(exception thrown\\), throw location.*exception\\.cc:8, catch location unknown\r\n.*$gdb_prompt $" {
+ pass "caught an uncatchable throw (dynamic executable)"
+ }
+ -re ".*$gdb_prompt $" { fail "didn't catch an uncatchable throw (dynamic executable)" }
+ timeout { fail "(timeout) after continue -- didn't catch an uncatchable throw? (dynamic executable)" }
+}
+
diff --git a/gdb/testsuite/gdb.hp/gdb.aCC/namespace.cc b/gdb/testsuite/gdb.hp/gdb.aCC/namespace.cc
new file mode 100644
index 00000000000..7667266c278
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.aCC/namespace.cc
@@ -0,0 +1,103 @@
+namespace AAA {
+ char c;
+ int i;
+ int A_xyzq (int);
+ char xyzq (char);
+ class inA {
+ public:
+ int xx;
+ int fum (int);
+ };
+};
+
+int AAA::inA::fum (int i)
+{
+ return 10 + i;
+}
+
+namespace BBB {
+ char c;
+ int i;
+ int B_xyzq (int);
+ char xyzq (char);
+
+ namespace CCC {
+ char xyzq (char);
+ };
+
+ class Class {
+ public:
+ char xyzq (char);
+ int dummy;
+ };
+};
+
+int AAA::A_xyzq (int x)
+{
+ return 2 * x;
+}
+
+char AAA::xyzq (char c)
+{
+ return 'a';
+}
+
+
+int BBB::B_xyzq (int x)
+{
+ return 3 * x;
+}
+
+char BBB::xyzq (char c)
+{
+ return 'b';
+}
+
+char BBB::CCC::xyzq (char c)
+{
+ return 'z';
+}
+
+char BBB::Class::xyzq (char c)
+{
+ return 'o';
+}
+
+void marker1(void)
+{
+ return;
+}
+
+
+int main ()
+{
+ using AAA::inA;
+ char c1;
+
+ using namespace BBB;
+
+ c1 = xyzq ('x');
+ c1 = AAA::xyzq ('x');
+ c1 = BBB::CCC::xyzq ('m');
+
+ inA ina;
+
+ ina.xx = 33;
+
+ int y;
+
+ y = AAA::A_xyzq (33);
+ y += B_xyzq (44);
+
+ BBB::Class cl;
+
+ c1 = cl.xyzq('e');
+
+ marker1();
+
+}
+
+
+
+
+
diff --git a/gdb/testsuite/gdb.hp/gdb.aCC/namespace.exp b/gdb/testsuite/gdb.hp/gdb.aCC/namespace.exp
new file mode 100644
index 00000000000..8fc19254d78
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.aCC/namespace.exp
@@ -0,0 +1,193 @@
+# Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# tests for namespaces
+# Written by Satish Pai <pai@apollo.hp.com> 1997-07-23
+
+# This file is part of the gdb testsuite
+
+# Note: These tests are geared to the HP aCC compiler,
+# which has an idiosyncratic way of emitting debug info
+# for namespaces.
+
+
+if $tracelevel then {
+ strace $tracelevel
+ }
+
+set prms_id 0
+set bug_id 0
+
+if { [skip_hp_tests] } then { continue }
+
+set testfile "namespace"
+set srcfile ${testfile}.cc
+set binfile ${objdir}/${subdir}/${testfile}
+
+if [get_compiler_info ${binfile}] {
+ return -1;
+}
+
+if { $gcc_compiled } then { continue }
+if {[skip_hp_tests]} then { continue }
+
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will a
+utomatically fail."
+}
+
+
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+
+#
+# set it up at a breakpoint so we can play with the variable values
+#
+if ![runto_main] then {
+ perror "couldn't run to breakpoint"
+ continue
+}
+
+send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
+ send_gdb "cont\n"
+ gdb_expect {
+ -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
+ send_gdb "up\n"
+ gdb_expect {
+ -re ".*$gdb_prompt $" { pass "up from marker1" }
+ timeout { fail "up from marker1" }
+ }
+ }
+ -re "$gdb_prompt $" { fail "continue to marker1" }
+ timeout { fail "(timeout) continue to marker1" }
+ }
+
+# Access a data item inside a namespace using colons and
+# single quotes :-(
+
+send_gdb "print 'AAA::c'\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = 0 '\\\\000'\r\n$gdb_prompt $" { pass "print 'AAA::c'" }
+ -re ".*$gdb_prompt $" { fail "print 'AAA::c'" }
+ timeout { fail "(timeout) print 'AAA::c'" }
+}
+
+# An object declared using "using".
+
+send_gdb "print ina\n"
+gdb_expect {
+ -re "\\$\[0-9\]+ = {xx = 33}.*$gdb_prompt $" {
+ pass "print ina"
+ }
+ -re ".*$gdb_prompt $" { fail "print ina" }
+ timeout { fail "(timeout) print ina" }
+}
+
+send_gdb "ptype ina\n"
+gdb_expect {
+ -re "type = class AAA::inA \{\r\n\[ \]*public:\r\n\[ \]*int xx;\r\n\[ \]*\r\n\[ \]*int fum\\(int\\);\r\n\}\r\n$gdb_prompt $" {
+ pass "ptype ina"
+ }
+ -re ".*$gdb_prompt $" { fail "ptype ina" }
+ timeout { fail "(timeout) ptype ina" }
+}
+
+# Check all functions are known to GDB
+
+setup_xfail hppa*-*-*11* CLLbs14869
+send_gdb "info func xyzq\n"
+gdb_expect {
+ -re "All functions.*File.*namespace.cc:\r\nint AAA::A_xyzq\\(int\\);\r\nint BBB::B_xyzq\\(int\\);\r\nchar AAA::xyzq\\(char\\);\r\nchar BBB::xyzq\\(char\\);\r\nchar BBB::CCC::xyzq\\(char\\);\r\nchar BBB::Class::xyzq\\(char\\);\r\n$gdb_prompt $" {
+ pass "info func xyzq"
+ }
+ -re ".*$gdb_prompt $" { fail "info func xyzq" }
+ timeout { fail "(timeout) info func xyzq" }
+}
+
+# Call a function in a namespace
+
+send_gdb "print 'AAA::xyzq'('x')\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = 97 'a'\r\n$gdb_prompt $" {
+ pass "print 'AAA::xyzq'('x')"
+ }
+ -re ".*$gdb_prompt $" { fail "print 'AAA::xyzq'('x')" }
+ timeout { fail "(timeout) print 'AAA::xyzq'('x')" }
+}
+
+# Break on a function in a namespace
+
+send_gdb "break AAA::xyzq\n"
+gdb_expect {
+ -re "Breakpoint.*at $hex: file.*namespace.cc, line 42\\.\r\n$gdb_prompt $" {
+ pass "break AAA::xyzq"
+ }
+ -re ".*$gdb_prompt $" { fail "break AAA::xyzq" }
+ timeout { fail "(timeout) break AAA::xyzq" }
+}
+
+# Call a function in a nested namespace
+
+send_gdb "print 'BBB::CCC::xyzq'('x')\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = 122 'z'\r\n$gdb_prompt $" {
+ pass "print 'BBB::CCC::xyzq'('x')"
+ }
+ -re ".*$gdb_prompt $" { fail "print 'BBB::CCC::xyzq'('x')" }
+ timeout { fail "(timeout) print 'BBB::CCC::xyzq'('x')" }
+}
+
+# Break on a function in a nested namespace
+
+send_gdb "break BBB::CCC::xyzq\n"
+gdb_expect {
+ -re "Breakpoint.*at $hex: file.*namespace.cc, line 58\\.\r\n$gdb_prompt $" {
+ pass "break BBB::CCC::xyzq"
+ }
+ -re ".*$gdb_prompt $" { fail "break BBB::CCC::xyzq" }
+ timeout { fail "(timeout) break BBB::CCC::xyzq" }
+}
+
+# Print address of a function in a class in a namespace
+
+send_gdb "print 'BBB::Class'::xyzq\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = \{char \\(BBB::Class \\*, char\\)\} $hex <BBB::Class::xyzq\\(char\\)>\r\n$gdb_prompt $" {
+ pass "print 'BBB::Class'::xyzq"
+ }
+ -re ".*$gdb_prompt $" { fail "print 'BBB::Class'::xyzq" }
+ timeout { fail "(timeout) print 'BBB::Class'::xyzq" }
+}
+
+# Break on a function in a class in a namespace
+
+send_gdb "break BBB::Class::xyzq\n"
+gdb_expect {
+ -re "Breakpoint.*at $hex: file.*namespace.cc, line 63\\.\r\n$gdb_prompt $" {
+ pass "break BBB::Class::xyzq"
+ }
+ -re ".*$gdb_prompt $" { fail "break BBB::Class::xyzq" }
+ timeout { fail "(timeout) break BBB::Class::xyzq" }
+}
+
diff --git a/gdb/testsuite/gdb.hp/gdb.aCC/optimize.c b/gdb/testsuite/gdb.hp/gdb.aCC/optimize.c
new file mode 100644
index 00000000000..2a8daa8c7a0
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.aCC/optimize.c
@@ -0,0 +1,76 @@
+/* Source for debugging optimimzed code test.
+
+ cc -g -O -o optimize optimize.c
+*/
+int callee();
+int test_opt;
+
+int main()
+{
+ int a,b,c,d,e,f,g,h;
+
+ a = 10;;
+
+ /* Value propagate
+ */
+ b = 2 * a + 1;
+ c = 3 * b + 2;
+
+ /* Re-use expressions
+ */
+ d = (2 * a + 1) * (3 * b + 2);
+ e = (2 * a + 1) * (3 * b + 2);
+
+ /* Create dead stores--do lines still exist?
+ */
+ d = (2 * a + 1) * (3 * b + 2);
+ e = (2 * a + 1) * (3 * b + 2);
+ d = (2 * a + 1) * (3 * b + 2);
+ e = (2 * a + 1) * (3 * b + 2);
+
+ /* Alpha and psi motion
+ */
+ if( test_opt ) {
+ f = e - d;
+ f = f--;
+ }
+ else {
+ f = e - d;
+ f = f + d * e;
+ }
+
+ /* Chi and Rho motion
+ */
+ h = 0;
+ do {
+ h++;
+ a = b * c + d * e; /* Chi */
+ f = f + d * e;
+ g = f + d * e; /* Rho */
+ callee( g+1 );
+ test_opt = (test_opt != 1); /* Cycles */
+ } while( g && h < 10);
+
+ /* Opps for tail recursion, unrolling,
+ * folding, evaporating
+ */
+ for( a = 0; a < 100; a++ ) {
+ callee( callee ( callee( a )));
+ callee( callee ( callee( a )));
+ callee( callee ( callee( a )));
+ }
+
+ return callee( test_opt );
+}
+
+/* defined late to keep line numbers the same
+*/
+int callee( x )
+ int x; /* not used! */
+{
+ test_opt++; /* side effect */
+
+ return test_opt;
+}
+
+/* end */ \ No newline at end of file
diff --git a/gdb/testsuite/gdb.hp/gdb.aCC/optimize.exp b/gdb/testsuite/gdb.hp/gdb.aCC/optimize.exp
new file mode 100644
index 00000000000..84b51b6aca9
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.aCC/optimize.exp
@@ -0,0 +1,149 @@
+# Copyright (C) 1998 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# optimize.exp -- Expect script for testing apps compiled with -O
+
+# There is no DOC support for gdb yet, return 0 for now.
+return 0
+
+global timeout
+
+# use this to debug:
+#
+#log_user 1
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+if { [skip_hp_tests] } then { continue }
+
+set testfile optimize
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if [get_compiler_info ${binfile}] {
+ return -1;
+}
+
+
+if { $gcc_compiled } then { continue }
+
+
+# Vanilla -O, which is the same as +O2
+#
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug optimize=+O2}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+send_gdb "file $binfile\n"
+gdb_expect {
+ -re ".*no debugging symbols found.*$gdb_prompt $" {
+ fail "Didn't find debug symbols; CHFts23488"
+ }
+ -re ".*No header section (PXDB data).*$gdb_prompt $" {
+ fail "pointless warning"
+ }
+ -re ".*done.*$gdb_prompt $" {
+ pass "load debug symbols"
+ }
+ timeout { fail "timeout on file" }
+}
+
+# Two lines at the same place after opt.
+#
+gdb_test "b 28" ".*"
+gdb_test "b 26" ".*also set at.*" "same line"
+
+gdb_test "b 47" ".*"
+gdb_test "b 48" ".*also set at.*" "same line"
+
+gdb_test "tb main" ".*"
+
+set old_timeout $timeout
+set timeout [expr "$timeout + 200"]
+send_gdb "r\n"
+gdb_expect {
+ -re ".*No header section (PXDB data).*$gdb_prompt $" {
+ fail "pointless warning"
+ }
+ -re ".*main.*2\[12].*$gdb_prompt $" {
+ # All the lines before line 21 or 22 are
+ # evaporated by the compiler.
+ #
+ pass "hit main"
+ }
+ -re ".*$gdb_prompt $" {
+ fail "didn't hit main"
+ }
+ timeout { fail "timeout on run" }
+}
+set timeout $old_timeout
+
+gdb_test "c" ".*Breakpoint 1.*33.*"
+gdb_test "c" ".*51.*"
+gdb_test "cle" ".*Deleted breakpoints.*" "set 2, so del 2"
+
+gdb_test "b callee" ".*"
+gdb_test "c" ".*callee.*" "hit called rtn"
+
+gdb_exit
+
+# +O4, don't use -g
+#
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {optimize=+O4}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+send_gdb "file $binfile\n"
+gdb_expect {
+ -re ".*no debugging symbols found.*$gdb_prompt $" {
+ pass "Didn't find debug symbols, as expected"
+ }
+ -re ".*No header section (PXDB data).*$gdb_prompt $" {
+ fail "pointless warning"
+ }
+ -re ".*done.*$gdb_prompt $" {
+ fail "Somehow found debug symbols--make this a pass?"
+ }
+ timeout { fail "timeout on file" }
+}
+
+gdb_test "b main" ".*"
+gdb_test "b callee" ".*"
+gdb_test "r" ".*Breakpoint 1.*main.*"
+gdb_test "si 3" ".*main.*" "steps"
+gdb_test "x/4i \$pc" ".*main.*main+4.*main+8.*"
+gdb_test "c" ".*callee.*" "hit bp"
+gdb_test "disas" ".*callee.*callee+4.*callee+12.*"
+gdb_test "si" ".*callee.*"
+gdb_test "fin" ".*Run till exit.*main.*" "finish"
+gdb_test "x/i \$pc" ".*main+.*" "back in main"
+gdb_exit
+
+#remote_exec build "rm -f ${binfile}"
+return 0
diff --git a/gdb/testsuite/gdb.hp/gdb.aCC/run.c b/gdb/testsuite/gdb.hp/gdb.aCC/run.c
new file mode 100644
index 00000000000..6bff81ad7ee
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.aCC/run.c
@@ -0,0 +1,72 @@
+/*
+ * This simple classical example of recursion is useful for
+ * testing stack backtraces and such.
+ */
+
+#ifdef vxworks
+
+# include <stdio.h>
+
+/* VxWorks does not supply atoi. */
+static int
+atoi (char *z)
+ /* char *z;*/
+{
+ int i = 0;
+
+ while (*z >= '0' && *z <= '9')
+ i = i * 10 + (*z++ - '0');
+ return i;
+}
+
+/* I don't know of any way to pass an array to VxWorks. This function
+ can be called directly from gdb. */
+
+void vxmain (char *arg)
+/*char *arg;*/
+{
+ char *argv[2];
+
+ argv[0] = "";
+ argv[1] = arg;
+ main (2, argv, (char **) 0);
+}
+
+#else /* ! vxworks */
+# include <stdio.h>
+# include <stdlib.h>
+#endif /* ! vxworks */
+
+int main (int argc, char *argv[], char **envp)
+/*int argc;
+char *argv[], **envp;*/
+{
+ int factorial (int);
+#ifdef usestubs
+ set_debug_traps();
+ breakpoint();
+#endif
+#ifdef FAKEARGV
+ printf ("%d\n", factorial (1));
+#else
+ if (argc != 2) {
+ printf ("usage: factorial <number>\n");
+ return 1;
+ } else {
+ printf ("%d\n", factorial (atoi (argv[1])));
+ }
+#endif
+ return 0;
+}
+
+int factorial (int value)
+/*int value;*/
+{
+ int local_var;
+
+ if (value > 1) {
+ value *= factorial (value - 1);
+ }
+ local_var = value;
+ return (value);
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.aCC/watch-cmd.exp b/gdb/testsuite/gdb.hp/gdb.aCC/watch-cmd.exp
new file mode 100644
index 00000000000..e447c0b5cf5
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.aCC/watch-cmd.exp
@@ -0,0 +1,157 @@
+# Copyright (C) 1998 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+#
+# test special commands
+#
+set prms_id 0
+set bug_id 0
+
+if { [skip_hp_tests] } then { continue }
+
+set testfile "run"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+
+}
+
+if [get_compiler_info ${binfile}] {
+ return -1;
+}
+if { $gcc_compiled } then { continue }
+
+
+gdb_exit
+gdb_start
+delete_breakpoints
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+
+
+proc watchpoint_command_test {} {
+ global gdb_prompt
+
+ if [target_info exists noargs] {
+ verbose "Skipping watchpoint_command_test because of noargs."
+ return
+ }
+
+ if { ![runto factorial] } then { gdb_suppress_tests }
+ # Don't depend upon argument passing, since most simulators don't currently
+ # support it. Bash value variable to be what we want.
+ gdb_test "p value=6" "" "set value to 6 in watchpoint_command_test"
+ delete_breakpoints
+
+ # Verify that we can create a watchpoint, and give it a commands
+ # list that continues the inferior. We set the watchpoint on a
+ # local variable, too, so that it self-deletes when the watched
+ # data goes out of scope.
+ #
+ # What should happen is: Each time the watchpoint triggers, it
+ # continues the inferior. Eventually, the watchpoint will self-
+ # delete, when the watched variable is out of scope. But by that
+ # time, the inferior should have exited. GDB shouldn't crash or
+ # anything untoward as a result of this.
+ #
+ send_gdb "watch local_var\n"
+ gdb_expect {
+ -re ".*\[Ww\]atchpoint (\[0-9\]*): local_var.*$gdb_prompt $"\
+ { pass "watch local_var"
+ set wp_id $expect_out(1,string)
+ send_gdb "commands $wp_id\n"
+ gdb_expect {
+ -re "Type commands for when breakpoint $wp_id is hit, one per line.*>"\
+ { pass "begin commands on watch"}
+ -re "$gdb_prompt $"\
+ {fail "begin commands on watch"}
+ timeout {fail "(timeout) begin commands on watch"}
+ }
+ }
+ -re "$gdb_prompt $"\
+ {fail "watch local_var"}
+ timeout {fail "(timeout) watch local_var"}
+ }
+# set wp_id $expect_out(1,string)
+# send_gdb "commands $wp_id\n"
+# gdb_expect {
+# -re "Type commands for when breakpoint $wp_id is hit, one per line.*>"\
+# {pass "begin commands on watch"}
+# -re "$gdb_prompt $"\
+# {fail "begin commands on watch"}
+# timeout {fail "(timeout) begin commands on watch"}
+# }
+ send_gdb "print value\n"
+ gdb_expect {
+ -re ">"\
+ {pass "add print command to watch"}
+ -re "$gdb_prompt $"\
+ {fail "add print command to watch"}
+ timeout {fail "(timeout) add print command to watch"}
+ }
+ send_gdb "continue\n"
+ gdb_expect {
+ -re ">"\
+ {pass "add continue command to watch"}
+ -re "$gdb_prompt $"\
+ {fail "add continue command to watch"}
+ timeout {fail "(timeout) add continue command to watch"}
+ }
+ send_gdb "end\n"
+ gdb_expect {
+ -re "$gdb_prompt $"\
+ {pass "begin commands on watch"}
+ timeout {fail "(timeout) begin commands on watch"}
+ }
+ send_gdb "continue\n"
+ gdb_expect {
+ -re "Continuing.*\[Ww\]atchpoint $wp_id deleted because the program has left the block in.*which its expression is valid.*in main.*$gdb_prompt $"\
+ {pass "continue with watch"}
+ -re "$gdb_prompt $"\
+ {fail "continue with watch"}
+ timeout {fail "(timeout) continue with watch"}
+ }
+ send_gdb "continue\n"
+ gdb_expect {
+ -re "Continuing.*$gdb_prompt $"\
+ {pass "continue until exit"}
+ -re "$gdb_prompt $"\
+ {fail "continue until exit"}
+ timeout {fail "(timeout) continue until exit"}
+ }
+}
+
+watchpoint_command_test
+
+
+
+
+
+
+
+
+
+
+
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/Makefile.in b/gdb/testsuite/gdb.hp/gdb.base-hp/Makefile.in
new file mode 100644
index 00000000000..adbde9df27e
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.base-hp/Makefile.in
@@ -0,0 +1,32 @@
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+EXECUTABLES = dollar hwwatchbus.bak pxdb reg reg-pa64 \
+ so-thresh genso-thresh sized-enum
+
+MISCELLANEOUS = so-thresh.c so-thresh.lopt so-thresh.make.out \
+ lib*-so-thresh.*
+
+all:
+ @echo "Nothing to be done for all..."
+
+info:
+install-info:
+dvi:
+install:
+uninstall: force
+installcheck:
+check:
+
+clean mostlyclean:
+ -rm -f *~ *.o *.ci
+ -rm -f core $(EXECUTABLES)
+ -rm -f $(MISCELLANEOUS)
+
+distclean maintainer-clean realclean: clean
+ -rm -f Makefile config.status config.log
+ -rm -f *-init.exp
+ -rm -fr *.log summary detail *.plog *.sum *.psum site.*
+
+Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in
+ $(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/configure b/gdb/testsuite/gdb.hp/gdb.base-hp/configure
new file mode 100755
index 00000000000..958011d03dc
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.base-hp/configure
@@ -0,0 +1,899 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.12.1
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.12.1"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=dollar.exp
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+CC=${CC-cc}
+
+ac_aux_dir=
+for ac_dir in `cd $srcdir;pwd`/../../../.. $srcdir/`cd $srcdir;pwd`/../../../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../../.. $srcdir/`cd $srcdir;pwd`/../../../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+# configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+# same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+# as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:573: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:594: checking target system type" >&5
+
+target_alias=$target
+case "$target_alias" in
+NONE)
+ case $nonopt in
+ NONE) target_alias=$host_alias ;;
+ *) target_alias=$nonopt ;;
+ esac ;;
+esac
+
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$target" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:612: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+ case $nonopt in
+ NONE) build_alias=$host_alias ;;
+ *) build_alias=$nonopt ;;
+ esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set) 2>&1 | grep ac_space` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@CC@%$CC%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/configure.in b/gdb/testsuite/gdb.hp/gdb.base-hp/configure.in
new file mode 100644
index 00000000000..f6f43a7d932
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.base-hp/configure.in
@@ -0,0 +1,15 @@
+dnl Process this file file with autoconf to produce a configure script.
+dnl This file is a shell script fragment that supplies the information
+dnl necessary to tailor a template configure script into the configure
+dnl script appropriate for this directory. For more information, check
+dnl any existing configure script.
+
+AC_PREREQ(2.5)
+AC_INIT(dollar.exp)
+
+CC=${CC-cc}
+AC_SUBST(CC)
+AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../../..)
+AC_CANONICAL_SYSTEM
+
+AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/dollar.c b/gdb/testsuite/gdb.hp/gdb.base-hp/dollar.c
new file mode 100644
index 00000000000..8fd9893c704
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.base-hp/dollar.c
@@ -0,0 +1,10 @@
+#ifdef PROTOTYPES
+int main (int argc, char **argv)
+#else
+main (argc, argv, envp)
+ int argc;
+ char **argv;
+#endif
+{
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/dollar.exp b/gdb/testsuite/gdb.hp/gdb.base-hp/dollar.exp
new file mode 100644
index 00000000000..8f372d86fbd
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.base-hp/dollar.exp
@@ -0,0 +1,155 @@
+# Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# GDB tests for names beginning with '$'
+
+# This is aimed at HP-UX systems where a lot of system
+# routines and names begin with '$' or '$$'. GDB 4.16 was
+# unable to deal with these names as they clashed with
+# convenience variables. Wildebeest should accept such
+# names in preference to convenience variables.
+
+# This file was written by Satish Pai <pai@apollo.hp.com>
+# 1997-09-24
+
+if $tracelevel then {
+ strace $tracelevel
+ }
+
+#
+# test running programs
+#
+set prms_id 0
+set bug_id 0
+
+if { [skip_hp_tests] } { continue }
+
+set testfile "dollar"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+#source ${binfile}.ci
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+#
+# set it up at a breakpoint so we can play with the variable values
+#
+
+if ![runto_main] then {
+ perror "couldn't run to breakpoint"
+ continue
+}
+
+# Test for millicode routines
+# hppa2.0w does not support dyncall
+if ![istarget "hppa2.0w*-*-*"] {
+send_gdb "print \$\$dyncall\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = \\{<text variable, no debug info>\\} $hex <>.*$gdb_prompt $" { pass "print \$\$dyncall" }
+ -re "\\$\[0-9\]* = \\{<text variable, no debug info>\\} $hex <.*dyncall>.*$gdb_prompt $" { pass "print \$\$dyncall" }
+ -re "\\$\[0-9\]* = void" { fail "print \$\$dyncall -- interpreted as convenience var" }
+ -re "$gdb_prompt $" { fail "print \$\$dyncall" }
+ timeout { fail "(timeout) print \$\$dyncall" }
+}
+send_gdb "print \$\$dyncall_external\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = \\{<text variable, no debug info>\\} $hex <>.*$gdb_prompt $" { pass "print \$\$dyncall_external" }
+ -re "\\$\[0-9\]* = \\{<text variable, no debug info>\\} $hex <.*dyncall_external>.*$gdb_prompt $" { pass "print \$\$dyncall_external" }
+ -re "\\$\[0-9\]* = void" { fail "print \$\$dyncall_external -- interpreted as convenience var" }
+ -re "$gdb_prompt $" { fail "print \$\$dyncall_external" }
+ timeout { fail "(timeout) print \$\$dyncall_external" }
+}
+
+# Set a breakpoint on a millicode routine
+send_gdb "break \$\$dyncall\n"
+gdb_expect {
+ -re "Breakpoint \[0-9\]* at $hex.*$gdb_prompt $" { pass "break \$\$dyncall" }
+ -re "Function.*not defined.*$gdb_prompt $" {fail "break \$\$dyncall -- no \$\$dyncall?" }
+ -re "Convenience variables used in line specs must have integer values\\..*$gdb_prompt $" {
+ fail "break \$\$dyncall -- treated as convenince variable"
+ }
+ -re "$gdb_prompt $" { fail "print break \$\$dyncall" }
+ timeout { fail "(timeout) print break \$\$dyncall" }
+}
+
+# Disassemble $$dyncall
+send_gdb "disassemble \$\$dyncall\n"
+gdb_expect {
+ -re "Dump of assembler code for function.*$gdb_prompt $" { pass "disas \$\$dyncall" }
+ -re "$gdb_prompt $" { fail "disas \$\$dyncall" }
+ timeout { fail "(timeout) disas \$\$dyncall" }
+}
+
+# Try to set $$dyncall like a convenience var.
+send_gdb "set \$\$dyncall = 77\n"
+gdb_expect {
+ -re "Invalid cast.*$gdb_prompt $" { pass "set \$\$dyncall = 77" }
+ -re "$gdb_prompt $" { fail "set \$\$dyncall = 77" }
+ timeout { fail "(timeout) set \$\$dyncall = 77" }
+}
+}
+
+# Try out some other $ name, not millicode
+if [istarget "hppa2.0w*-*-*"] {
+ #hppa2.0w uses __argv instead of $ARGV.
+ send_gdb "print \__argv\n"
+ gdb_expect {
+ -re "\\$\[0-9\]* = \[0-9\]*.*$gdb_prompt $" { pass "print \__argv" }
+ -re "\\$\[0-9\]* = void.*$gdb_prompt $" {
+ fail "print \__argv (interpreted as convenience var)"
+ }
+ -re "$gdb_prompt $" { fail "print \__argv" }
+ timeout { fail "(timeout) print \__argv" }
+ }
+
+ send_gdb "ptype \__argv\n"
+ gdb_expect {
+ -re "type = <data variable, no debug info>.*$gdb_prompt $" {
+ pass "ptype \__argv"
+ }
+ -re "type = void.*$gdb_prompt $" {
+ fail "ptype \__argv (interpreted as convenience var)"
+ }
+ -re "$gdb_prompt $" { fail "ptype \__argv" }
+ timeout { fail "(timeout) ptype \__argv" }
+ }
+} else {
+send_gdb "print \$ARGV\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = \[0-9\]*.*$gdb_prompt $" { pass "print \$ARGV" }
+ -re "\\$\[0-9\]* = void.*$gdb_prompt $" { fail "print \$ARGV (interpreted as convenience var)" }
+ -re "$gdb_prompt $" { fail "print \$ARGV" }
+ timeout { fail "(timeout) print \$ARGV" }
+}
+send_gdb "ptype \$ARGV\n"
+gdb_expect {
+ -re "type = <data variable, no debug info>.*$gdb_prompt $" { pass "ptype \$ARGV" }
+ -re "type = void.*$gdb_prompt $" { fail "ptype \$ARGV (interpreted as convenience var)" }
+ -re "$gdb_prompt $" { fail "ptype \$ARGV" }
+ timeout { fail "(timeout) ptype \$ARGV" }
+}
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/genso-thresh.c b/gdb/testsuite/gdb.hp/gdb.base-hp/genso-thresh.c
new file mode 100644
index 00000000000..50756bb975d
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.base-hp/genso-thresh.c
@@ -0,0 +1,229 @@
+/*
+ * Program to generate the so-thresh testcase,
+ * including associated linked-against shared libraries.
+ * Build as:
+ *
+ * cc -g -o genso-thresh genso-thresh.c
+ *
+ * Invoke as:
+ *
+ * genso-thresh
+ *
+ * It will put all the code in the current directory (".").
+ *
+ * A makefile can also be generated if the -makemake option is used.
+ * To use the makefile:
+ *
+ * make -f so-thresh.mk all
+ *
+ * The name of the application is
+ *
+ * so-thresh
+ *
+ * (Revised from a program by John Bishop. --rehrauer)
+ */
+
+#include <stdio.h>
+#include <sys/stat.h>
+#include <sys/fcntl.h>
+
+int main (argc, argv)
+int argc;
+char **argv;
+{
+#define NUMBER_OF_INT_VARS 1500
+#define NUMBER_OF_LIBS 3
+ int lib_num = NUMBER_OF_LIBS;
+ int i;
+ int i2;
+ FILE *main_file;
+ FILE *lib_file;
+ FILE *make_file;
+ FILE *link_file;
+
+ char testcase_name [1000];
+ char linkfile_name [1000];
+ char makefile_name [1000];
+ char mainfile_name [1000];
+
+ char file_name[100];
+ /*
+ * 0123456789 <-- length of field
+ * "./fil0000000002.c"; <-- typical filename
+ * 12345678901234567890 <-- length of string
+ * 10 20
+ * ^where null goes
+ */
+ char file_name_core[100];
+
+ /* Verify input.
+ */
+ if ((argc < 1) || (argc > 2) || (argv == NULL) ||
+ ((argc == 2) && (strcmp (argv[1], "-makemake") != 0)))
+ {
+ printf ("** Syntax: %s [-makemake]\n", argv[0]);
+ return;
+ }
+
+ if (strncmp (argv[0], "gen", 3) != 0)
+ {
+ printf ("** This tool expected to be named \"gen<something>\"\n");
+ return;
+ }
+ strcpy (testcase_name, argv[0]+3);
+
+ strcpy (linkfile_name, testcase_name);
+ strcat (linkfile_name, ".lopt");
+ link_file = fopen (linkfile_name, "w");
+ fprintf (link_file, "# Linker options for %s test\n", testcase_name);
+
+ /* Generate the makefile, if requested.
+ */
+ if (argc == 2)
+ {
+ strcpy (makefile_name, testcase_name);
+ strcat (makefile_name, ".mk.new");
+ make_file = fopen (makefile_name, "w");
+ printf (" Note: New makefile (%s) generated.\n", makefile_name);
+ printf (" May want to update existing makefile, if any.\n");
+ fprintf (make_file, "# Generated automatically by %s\n", argv[0]);
+ fprintf (make_file, "# Make file for %s test\n", testcase_name);
+ fprintf (make_file, "\n");
+ fprintf (make_file, "CFLAGS = +DA1.1 -g\n");
+ fprintf (make_file, "\n");
+ fprintf (make_file, "# This is how to build this generator.\n");
+ fprintf (make_file, "%s.o: %s.c\n", argv[0], argv[0]);
+ fprintf (make_file, "\t$(CC) $(CFLAGS) -o %s.o -c %s.c\n", argv[0], argv[0]);
+ fprintf (make_file, "%s: %s.o\n", argv[0], argv[0]);
+ fprintf (make_file, "\t$(CC) $(CFLAGS) -o %s %s.o\n", argv[0], argv[0]);
+ fprintf (make_file, "\n");
+ fprintf (make_file, "# This is how to run this generator.\n");
+ fprintf (make_file, "# This target should be made before the 'all' target,\n");
+ fprintf (make_file, "# to ensure that the shlib sources are all available.\n");
+ fprintf (make_file, "require_shlibs: %s\n", argv[0]);
+ for (i=0; i < lib_num; i++)
+ {
+ fprintf (make_file, "\tif ! [ -a lib%2.2d_%s.c ] ; then \\\n", i, testcase_name);
+ fprintf (make_file, "\t %s ; \\\n", argv[0]);
+ fprintf (make_file, "\tfi\n");
+ }
+ fprintf (make_file, "\n");
+ fprintf (make_file, "# This is how to build all the shlibs.\n");
+ fprintf (make_file, "# Be sure to first make the require_shlibs target!\n");
+ for (i=0; i < lib_num; i++)
+ {
+ fprintf (make_file, "lib%2.2d_%s.o: lib%2.2d_%s.c\n", i, testcase_name, i, testcase_name);
+ fprintf (make_file, "\t$(CC) $(CFLAGS) +Z -o lib%2.2d_%s.o -c lib%2.2d_%s.c\n", i, testcase_name, i, testcase_name);
+ fprintf (make_file, "lib%2.2d-%s.sl: lib%2.2d-%s.o\n", i, testcase_name, i, testcase_name);
+ fprintf (make_file, "\t$(LD) $(LDFLAGS) -b -o lib%2.2d-%s.sl lib%2.2d-%s.o\n", i, testcase_name, i, testcase_name);
+ }
+ fprintf (make_file, "\n");
+fprintf (make_file, "# For convenience, here's names for all pieces of all shlibs.\n");
+ fprintf (make_file, "SHLIB_SOURCES = \\\n");
+ for (i=0; i < lib_num-1; i++)
+ fprintf (make_file, "\tlib%2.2d-%s.c \\\n", i, testcase_name);
+ fprintf (make_file, "\tlib%2.2d-%s.c\n", lib_num-1, testcase_name);
+ fprintf (make_file, "SHLIB_OBJECTS = $(SHLIB_SOURCES:.c=.o)\n");
+ fprintf (make_file, "SHLIBS = $(SHLIB_SOURCES:.c=.sl)\n");
+ fprintf (make_file, "SHLIB_NAMES = $(SHLIB_SOURCES:.c=)\n");
+ fprintf (make_file, "EXECUTABLES = $(SHLIBS) %s %s\n", argv[0], testcase_name);
+ fprintf (make_file, "OBJECT_FILES = $(SHLIB_OBJECTS) %s.o %s.o\n", argv[0], testcase_name);
+ fprintf (make_file, "\n");
+ fprintf (make_file, "shlib_objects: $(SHLIB_OBJECTS)\n");
+ fprintf (make_file, "shlibs: $(SHLIBS)\n");
+ fprintf (make_file, "\n");
+ fprintf (make_file, "# This is how to build the debuggable testcase that uses the shlibs.\n");
+ fprintf (make_file, "%s.o: %s.c\n", testcase_name, testcase_name);
+ fprintf (make_file, "\t$(CC) $(CFLAGS) -o %s.o -c %s.c\n", testcase_name, testcase_name);
+ fprintf (make_file, "%s: shlibs %s.o\n", testcase_name, testcase_name);
+ fprintf (make_file, "\t$(LD) $(LDFLAGS) -o %s -lc -L. ", testcase_name);
+ fprintf (make_file, "-c %s /opt/langtools/lib/end.o /lib/crt0.o %s.o\n", linkfile_name, testcase_name);
+ fprintf (make_file, "\n");
+ fprintf (make_file, "# Yeah, but you should first make the require_shlibs target!\n");
+ fprintf (make_file, "all: %s %s\n", testcase_name, argv[0]);
+ fprintf (make_file, "\n");
+ fprintf (make_file, "# To remove everything built via this makefile...\n");
+ fprintf (make_file, "clean:\n");
+ /* Do this carefully, to avoid hitting silly HP-UX ARG_MAX limits... */
+ fprintf (make_file, "\trm -f lib0*-%s.*\n", testcase_name);
+ fprintf (make_file, "\trm -f lib1*-%s.*\n", testcase_name);
+ fprintf (make_file, "\trm -f lib2*-%s.*\n", testcase_name);
+ fprintf (make_file, "\trm -f lib3*-%s.*\n", testcase_name);
+ fprintf (make_file, "\trm -f lib4*-%s.*\n", testcase_name);
+ fprintf (make_file, "\trm -f lib5*-%s.*\n", testcase_name);
+ fprintf (make_file, "\trm -f lib6*-%s.*\n", testcase_name);
+ fprintf (make_file, "\trm -f lib7*-%s.*\n", testcase_name);
+ fprintf (make_file, "\trm -f lib8*-%s.*\n", testcase_name);
+ fprintf (make_file, "\trm -f lib9*-%s.*\n", testcase_name);
+ fprintf (make_file, "\trm -f %s %s %s %s.c\n", argv[0], testcase_name, linkfile_name, testcase_name);
+ fprintf (make_file, "\n");
+ fclose (make_file);
+ }
+
+ /* Generate the code for the libraries.
+ */
+ for (i=0; i < lib_num; i++) {
+
+ /* Generate the names for the library.
+ */
+ sprintf (file_name, "lib%2.2d-%s.c", i, testcase_name);
+ sprintf (file_name_core, "lib%2.2d-%s", i, testcase_name);
+
+ /* Generate the source code.
+ */
+ lib_file = fopen (file_name, "w");
+ fprintf (lib_file, "/* Shared library file number %d */\n", i);
+ fprintf (lib_file, "#include <stdio.h>\n\n");
+ fprintf (lib_file, "/* The following variables largely exist to bloat this library's debug info. */\n");
+ fprintf (lib_file, "static char c_static_buf_%d [100];\n", i);
+ for (i2=0; i2<NUMBER_OF_INT_VARS; i2++)
+ fprintf (lib_file, "int i_%d_%d;\n", i, i2);
+ fprintf (lib_file, "\nint r_%d ()\n", i);
+ fprintf (lib_file, "{\n");
+ for (i2=0; i2<NUMBER_OF_INT_VARS; i2++)
+ fprintf (lib_file, " i_%d_%d = %d*%d;\n", i, i2, i2, i2);
+ fprintf (lib_file, " return 1;\n");
+ fprintf (lib_file, "}\n\n");
+ fprintf (lib_file, "/* end of generated file */\n");
+ fclose (lib_file);
+
+ /* Add a linker options line
+ */
+ fprintf (link_file, "-l%2.2d-%s\n", i, testcase_name);
+ }
+
+ /* Generate the "main" file.
+ */
+ strcpy (mainfile_name, testcase_name);
+ strcat (mainfile_name, ".c");
+ main_file = fopen (mainfile_name, "w");
+ fprintf (main_file, "/* Generated test progam with %d shared libraries. */\n\n",
+ lib_num);
+ fprintf (main_file, "#include <stdio.h>\n\n");
+
+ for (i = 0; i < lib_num; i++) {
+ fprintf (main_file, "extern int r_%d();\n", i);
+ }
+
+ fprintf (main_file, "\n");
+ fprintf (main_file, "int main()\n");
+ fprintf (main_file, "{\n");
+ fprintf (main_file, " int accum;\n");
+ fprintf (main_file, " int lib_num = %d;\n", lib_num);
+
+ for (i = 0; i < lib_num; i++) {
+ fprintf (main_file, " accum += r_%d();\n", i);
+ }
+
+ fprintf (main_file, " printf( \"Final value: %%d, should be %%d\\n\", accum, lib_num );\n\n");
+ fprintf (main_file, " return 0;\n");
+ fprintf (main_file, "}\n\n");
+ fprintf (main_file, "/* end of generated file */\n");
+ fclose (main_file);
+
+ /* Finish up the link file and the build file
+ */
+ fclose (link_file);
+}
+
+/* End of file */
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/hwwatchbus.c b/gdb/testsuite/gdb.hp/gdb.base-hp/hwwatchbus.c
new file mode 100644
index 00000000000..833d027fc87
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.base-hp/hwwatchbus.c
@@ -0,0 +1,9 @@
+/* This program raises a SIGBUS signal on HP-UX when the
+ pointer "bogus_p" is dereferenced.
+ */
+int * bogus_p = (int *)3;
+
+int main()
+{
+ *bogus_p = 0xdeadbeef;
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/hwwatchbus.exp b/gdb/testsuite/gdb.hp/gdb.base-hp/hwwatchbus.exp
new file mode 100644
index 00000000000..1affdca18f2
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.base-hp/hwwatchbus.exp
@@ -0,0 +1,83 @@
+# Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+if $tracelevel then {
+ strace $tracelevel
+ }
+
+set prms_id 0
+set bug_id 0
+
+if { [skip_hp_tests] } then { continue }
+
+if { ![istarget "hppa*-*-hpux11.*"] } {
+ verbose "HPUX h/w watch test ignored for non-hppa or pre-HP/UX-10.30 targets."
+ return 0
+}
+
+set testfile "hwwatchbus"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+# build the first test case
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+# Start with a fresh gdb
+
+gdb_exit
+remote_exec build "rm -f ${binfile}.bak"
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+
+# We ought to be able to set a hardware watchpoint, step, and
+# get a SIGBUS signal reported.
+#
+if ![runto_main] then {
+ fail "can't run to main"
+ return 0
+}
+
+send_gdb "watch bogus_p\n"
+gdb_expect {
+ -re "Hardware watchpoint \[0-9\]*: bogus_p.*$gdb_prompt $"\
+ {pass "set h/w watchpoint"}
+ -re "$gdb_prompt $"\
+ {fail "set h/w watchpoint"}
+ timeout {fail "(timeout) set h/w watchpoint"}
+}
+
+send_gdb "step\n"
+gdb_expect {
+ -re "Program received signal SIGBUS, Bus error.* in main .*${srcfile}:8.*$gdb_prompt $"\
+ {pass "see real SIGBUS when h/w watchpoint set"}
+ -re "$gdb_prompt $"\
+ {fail "see real SIGBUS when h/w watchpoint set"}
+ timeout {fail "(timeout) see real SIGBUS when h/w watchpoint set"}
+}
+
+remote_exec build "mv ${binfile} ${binfile}.bak"
+return 0
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/pxdb.c b/gdb/testsuite/gdb.hp/gdb.base-hp/pxdb.c
new file mode 100644
index 00000000000..31046b5454b
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.base-hp/pxdb.c
@@ -0,0 +1,37 @@
+#include <stdio.h>
+
+#ifdef PROTOTYPES
+int callee (int x)
+#else
+int callee( x )
+int x;
+#endif
+{
+ int y = x * x;
+ return (y - 2);
+}
+
+int main()
+{
+ int i;
+ for (i = 1; i < 10; i++)
+ {
+ printf( "%d ", callee( i ));
+
+ }
+ printf( " Goodbye!\n" );
+ return 0;
+}
+/* This routine exists only for aCC. The way we compile this test is
+ that we use aCC for the actual compile into the object file but then
+ use ld directly for the link. When we do this, we get an undefined
+ symbol _main(). Therefore, for aCC, we have this routine in here and
+ ld is happy. */
+
+#ifdef __cplusplus
+extern "C" {
+void _main()
+{
+}
+}
+#endif
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/pxdb.exp b/gdb/testsuite/gdb.hp/gdb.base-hp/pxdb.exp
new file mode 100644
index 00000000000..193b719269d
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.base-hp/pxdb.exp
@@ -0,0 +1,128 @@
+# Copyright (C) 1998 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+
+# This file is part of the gdb testsuite
+
+
+# pxdb.exp Test that gdb calls pxdb on an application
+# built without it.
+#
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+if { [skip_hp_tests] } then { continue }
+
+set testfile pxdb
+set srcfile ${testfile}.c
+set objfile ${objdir}/${subdir}/${testfile}.o
+set binfile ${objdir}/${subdir}/${testfile}
+
+if [get_compiler_info ${binfile} "c++"] {
+ return -1;
+}
+
+if { $gcc_compiled } then { continue }
+
+# To build a non-pxdb-ed file, use
+#
+# <compile to .o file>
+# export LD_PXDB /dev/null
+# ld -o hello_no_pxdb hello.o /opt/langtools/lib/end.o /usr/ccs/lib/crt0.o -lc
+#
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+#
+# use this to debug:
+#log_user 1
+
+
+# Following should get the error message:
+#
+# ld: (Warning) Can't exec pxdb using path: /dev/null
+#
+#execute_anywhere "ksh -c \"export LD_PXDB=/dev/null\""
+
+if [istarget "hppa2.0w-*-*"] {
+set cmdline "ksh -c \"LD_PXDB=/dev/null ld -o ${binfile} ${objfile} /opt/langtools/lib/pa20_64/crt0.o /opt/langtools/lib/pa20_64/end.o -lc\""
+} else {
+set cmdline "ksh -c \"LD_PXDB=/dev/null ld -o ${binfile} ${objfile} /usr/ccs/lib/crt0.o /opt/langtools/lib/end.o -lc\""
+}
+
+remote_exec build "rm ${binfile}"
+remote_exec build $cmdline
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+# We expect to see this:
+#
+# "warning: File not processed by pxdb--about to process now.
+# "
+# ".
+# "Procedures: 7
+# "Files: 2
+# "Reading symbols from ~/c_code.dir/hello_no_pxdb...done.
+# "(gdb)
+#
+send_gdb "file ${binfile}\n"
+gdb_expect {
+
+ -re ".*warning: File not processed by pxdb.*Procedures: \[0-9\]+.*$gdb_prompt $"\
+ { pass "PXDB call" }
+
+ -re "$gdb_prompt $" {
+ if [istarget hppa*-*-hpux*] {
+ pass "Didn't call pxdb"
+ } else {
+ fail "Didn't call pxdb"
+ }
+ }
+
+ -re ".*$gdb_prompt $" { fail "Some other message" }
+
+ timeout { fail "call pxdb (timeout)" }
+}
+
+# Make sure the new data makes sense
+#
+if { ![runto callee] } then { return }
+
+send_gdb "print x\n"
+gdb_expect {
+ -re ".*= 1.*$gdb_prompt $" { pass "Good data after pxdb call" }
+ -re ".*$gdb_prompt $" { fail "No data after pxdb call" }
+ timeout { fail "(timeout)" }
+}
+
+gdb_exit
+return 0
+
+
+
+
+
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/reg-pa64.exp b/gdb/testsuite/gdb.hp/gdb.base-hp/reg-pa64.exp
new file mode 100644
index 00000000000..8ad8a017bbe
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.base-hp/reg-pa64.exp
@@ -0,0 +1,189 @@
+# Tests of wide register displays for GDB on HPPA 2.0 machines
+# Copyright 1994, 1995 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# use this to debug:
+#log_user 1
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+if { [skip_hp_tests] } { continue }
+
+if ![istarget "hppa*-*-*"] {
+ verbose "Wide register test ignored for non-hppa targets."
+ return 0
+}
+
+if ![istarget "hppa2.0w-hp-hpux*"] {
+ verbose "reg-pa64.exp is only for PA2.0W."
+ return 0
+}
+
+set testfile "reg-pa64"
+set srcfile ${testfile}.s
+set binfile ${objdir}/${subdir}/${testfile}
+
+# To build a pa 2.0 executable
+#
+# as +DA2.0W -o reg-pa64 reg-pa64.s
+# or
+# cc +DA2.0W -g -o reg-pa64 reg-pa64.s
+#
+# Don't reject if there are warnings, as we expect this warning:
+#
+# (Warning) At least one PA 2.0 object file (pa2.0_test2.o) was detected.
+# The linked output may not run on a PA 1.x system.
+#
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# test machine--there's no 2.0n architecture, so we have
+# to try to run the app.
+#
+gdb_test "break main" "Breakpoint.*" "initial set-up"
+
+send_gdb "run\n"
+gdb_expect {
+ -re ".*Executable file incompatible with hardware.*$gdb_prompt $" {
+ # Not hppa2.0 machine
+ #
+ return 0
+ }
+ -re "Cannot exec.*$gdb_prompt $" {
+ # Not hppa2.0 machine
+ #
+ return 0
+ }
+ -re ".*Starting program:.*$gdb_prompt $" {
+ pass "Ready to start test"
+ }
+ timeout {
+ fail "initial set-up, part 2 (timeout)"
+ return 0
+ }
+}
+
+# Let the program set known values. This secretly deletes
+# the breakpoint at main and re-runs to mainend.
+#
+runto mainend
+
+# Look for known values
+#
+gdb_test "info reg r1" "r1 1"
+gdb_test "info reg r4" "r4 2"
+gdb_test "info reg r5" "r5 4"
+gdb_test "info reg r6" "r6 8"
+gdb_test "info reg r7" "r7 10"
+gdb_test "info reg r8" "r8 20"
+gdb_test "info reg r9" "r9 40"
+gdb_test "info reg r10" "r10 80"
+gdb_test "info reg r11" "r11 100"
+gdb_test "info reg r12" "r12 200"
+gdb_test "info reg r13" "r13 400"
+gdb_test "info reg r14" "r14 800"
+gdb_test "info reg r15" "r15 1000"
+gdb_test "info reg r16" "r16 2000"
+
+# Two odd variants that GDB supports are:
+# "1" means "r1", and
+# "$1" means "r1"
+#
+gdb_test "info reg 1 4" "r1 1.*r4 2"
+gdb_test "info reg \$1" "r1 1"
+
+# Verify that GDB responds gracefully to a register ID number that
+# is out of range.
+#
+gdb_test "info reg 999" "999: invalid register"
+
+# Make sure the floating point status and error registers
+# don't show up as floating point numbers!
+#
+gdb_test "info reg fpsr" ".*fpsr 0.*" "fpsr"
+gdb_test "info reg fpe1" ".*fpe1 .*" "fpe1"
+gdb_test "info reg fpe2" ".*fpe2 .*" "fpe2"
+gdb_test "info reg fpe3" ".*fpe3 .*" "fpe3"
+#DTS CLLbs16708
+#info reg should recognize fpe4..fpe7.
+setup_xfail hppa2.0w-hp-hpux* CLLbs16708
+gdb_test "info reg fpe4" ".*fpe4 .*" "fpe4"
+setup_xfail hppa2.0w-hp-hpux* CLLbs16708
+gdb_test "info reg fpe5" ".*fpe5 .*" "fpe5"
+setup_xfail hppa2.0w-hp-hpux* CLLbs16708
+gdb_test "info reg fpe6" ".*fpe6 .*" "fpe6"
+setup_xfail hppa2.0w-hp-hpux* CLLbs16708
+gdb_test "info reg fpe7" ".*fpe7 .*" "fpe7"
+
+gdb_test "info reg fr4" ".*fr4.*(double precision).* 1.*"
+gdb_test "info reg fr5" ".*fr5.*(double precision).* 2.*"
+gdb_test "info reg fr6" ".*fr6.*(double precision).* 2.*"
+gdb_test "info reg fr7" ".*fr7.*(double precision).* 4.*"
+gdb_test "info reg fr8" ".*fr8.*(double precision).* 8.*"
+gdb_test "info reg fr9" ".*fr9.*(double precision).* 32.*"
+gdb_test "info reg fr10" ".*fr10.*(double precision).* 256.*"
+
+gdb_test "info reg r19" "r19 deadbeefbadcadee"
+
+# Need to add test of use of $<register-name>
+#
+# Q: How do you say a literal "$" in expect?
+# A: You say "\$". A literal "\" is "\\".
+#
+# Please note that this test will fail as long as we are running
+# in 32-bit mode: it will produce "$1 = 0xbadcadee". To fix it
+# would require building a real 64-bit gdb (expression evaluation,
+# in particular).
+#
+send_gdb "p/x \$r19\n"
+gdb_expect {
+ -re ".*= 0xdeadbeefbadcadee.*$gdb_prompt $" {
+ pass "64-bit works"
+ }
+ -re ".*= 0xbadcadee.*$gdb_prompt $" {
+ pass "32-bit extract when using PRINT; expected but not good"
+ }
+ -re ".*$gdb_prompt $" {
+ fail "didn't print any part of right value"
+ }
+ timeout {
+ fail "timeout on print"
+ }
+}
+
+# Need to add tests of setting wide regs too. E.g.
+#
+# set $r4 = 0x1234567890123456
+# p/x $r4
+#
+
+# done
+#
+gdb_exit
+
+return 0
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/reg-pa64.s b/gdb/testsuite/gdb.hp/gdb.base-hp/reg-pa64.s
new file mode 100644
index 00000000000..4c284d79580
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.base-hp/reg-pa64.s
@@ -0,0 +1,104 @@
+; assemble as "as -o reg-pa64 reg-pa64.s"
+; or
+; cc -g -o +DA2.0W
+;
+; PA-RISC 2.0 register contents test.
+;
+ .level 2.0W
+
+ .code
+ .export main,ENTRY
+ .export mainend,CODE
+ .export lab1,CODE
+ .space $TEXT$
+ .subspa $CODE$
+one
+ .align 8
+ .stringz "?\xF0\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00"
+
+main
+ .proc
+ .callinfo NO_CALLS,FRAME=0
+ .entry
+
+ ;; Test we have right register numbers
+ ;;
+ ADD %r0,%r0,%r1 ; 0
+ LDI 1,%r1 ; 1
+ ;;
+ ;; Don't put anything into r2 or r3--they are special registers.
+ ;;
+ ADD %r1,%r1,%r4 ; 2
+ ADD %r4,%r4,%r5 ; 4
+ ADD %r5,%r5,%r6 ; 8
+ ADD %r6,%r6,%r7 ; 16
+ ADD %r7,%r7,%r8 ; 32
+ ADD %r8,%r8,%r9 ; 64
+ ADD %r9,%r9,%r10 ; 128
+ ADD %r10,%r10,%r11 ; 256
+ ADD %r11,%r11,%r12 ; 512
+ ADD %r12,%r12,%r13 ; 1024
+ ADD %r13,%r13,%r14 ; 2048
+ ADD %r14,%r14,%r15 ; 4096
+ ADD %r15,%r15,%r16 ; 9192
+
+ ;; Test high bits, to be sure we show them.
+ ;;
+ LDI 0xde,%r19 ; "de"
+ DEPD,Z %r19,55,56,%r19 ; "de00"
+ LDI 0xad,%r18 ; "ad"
+ ADD %r18,%r19,%r19 ; "dead"
+ DEPD,Z %r19,55,56,%r19 ; "dead00"
+ LDI 0xbe,%r18 ; "be"
+ ADD %r18,%r19,%r19 ; "deadbe"
+ DEPD,Z %r19,55,56,%r19 ; "deadbe00"
+ LDI 0xef,%r18 ; "ef"
+ ADD %r18,%r19,%r19 ; "deadbeef"
+ ;
+ DEPD,Z %r19,55,56,%r19 ; "deadbeef00"
+ LDI 0xba,%r18 ; "ba"
+ ADD %r18,%r19,%r19 ; "deadbeefba"
+ DEPD,Z %r19,55,56,%r19 ; "deadbeefba00"
+ LDI 0xdc,%r18 ; "dc"
+ ADD %r18,%r19,%r19 ; "deadbeefbadc"
+ DEPD,Z %r19,55,56,%r19 ; "deadbeefbadc00"
+ LDI 0xad,%r18 ; "ad"
+ ADD %r18,%r19,%r19 ; "deadbeefbadcad"
+ DEPD,Z %r19,55,56,%r19 ; "deadbeefbadcad00"
+ LDI 0xee,%r18 ; "ee"
+ ADD %r18,%r19,%r19 ; "deadbeefbadcadee"
+
+lab1 ;; Test floating point registers
+ ;;
+ ;; LDIL LR'one,%r22 ;
+ ;; FLDD RR'one(%r22),%fr4 ; 1.0
+ ;; FLDD RR'one+8(%r22),%fr5 ; 2.0
+ ;; FLDD RR'one+8(%r22),%fr6 ; 2.0
+ B,L here,%r2
+ NOP
+here DEPDI 0x0,63,2,%r2
+ LDO one-here(%r2),%r2
+ FLDD 0(%r2),%fr4
+ FLDD 8(%r2),%fr5
+ FLDD 8(%r2),%fr6
+
+ FMPY,DBL %fr5,%fr6,%fr7 ; 4.0
+ FMPY,DBL %fr6,%fr7,%fr8 ; 8.0
+ FMPY,DBL %fr7,%fr8,%fr9 ; 32.0
+ FMPY,DBL %fr8,%fr9,%fr10 ; 256.0
+
+ ;; The NOP prevents anything from end.o or crt0.o from
+ ;; being appended immediately after "mainend". If that
+ ;; happens, then we may have other labels that have the
+ ;; same address as "mainend", and thus the debugger
+ ;; may symbolize this PC to something other than "mainend".
+mainend
+ NOP
+ .exit
+ .procend
+
+ .space $TEXT$
+ .subspa $CODE$
+ .subspa $LIT$ ;; <don't use> ,QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=16
+ .end
+
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/reg.exp b/gdb/testsuite/gdb.hp/gdb.base-hp/reg.exp
new file mode 100644
index 00000000000..3d57e9f3c09
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.base-hp/reg.exp
@@ -0,0 +1,192 @@
+# Copyright (C) 1998 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# Tests of wide register displays for GDB on HPPA 2.0 machines
+
+# use this to debug:
+#log_user 1
+
+if $tracelevel then {
+ strace $tracelevel
+ }
+
+if { [skip_hp_tests] } then { continue }
+
+set testfile "reg"
+
+if [istarget "hppa2.0w-hp-hpux*"] {
+ verbose "reg.exp is not for PA2.0W."
+ return 0
+}
+set srcfile ${testfile}.s
+set binfile ${objdir}/${subdir}/${testfile}
+
+# To build a pa 2.0 executable
+#
+# as -o reg reg.s
+# or
+# cc -g -o reg reg.s
+#
+# The +DA2.0N flag doesn't seem to be needed.
+#
+# Don't reject if there are warnings, as we expect this warning:
+#
+# (Warning) At least one PA 2.0 object file (pa2.0_test2.o) was detected.
+# The linked output may not run on a PA 1.x system.
+#
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# test machine--there's no 2.0n architecture, so we have
+# to try to run the app.
+#
+send_gdb "break main\n"
+ gdb_expect {
+ -re "Breakpoint.*$gdb_prompt $" {
+ pass "initial set-up"
+ }
+ -re ".*$gdb_prompt $" {
+ fail "initial set-up"
+ }
+ timeout {
+ fail "initial set-up (timeout)"
+ }
+ }
+
+send_gdb "run\n"
+ gdb_expect {
+ -re ".*Executable file incompatible with hardware.*$gdb_prompt $" {
+ # Not hppa2.0 machine
+ #
+ return 0
+ }
+ -re "Cannot exec.*$gdb_prompt $" {
+ # Not hppa2.0 machine
+ #
+ return 0
+ }
+ -re ".*Starting program:.*$gdb_prompt $" {
+ pass "Ready to start test"
+ }
+ timeout {
+ fail "initial set-up, part 2 (timeout)"
+ return 0
+ }
+ }
+
+# Let the program set known values. This secretly deletes
+# the breakpoint at main and re-runs to mainend.
+#
+runto mainend
+
+# Look for known values
+#
+gdb_test "info reg r1" "r1 1"
+gdb_test "info reg r4" "r4 2"
+gdb_test "info reg r5" "r5 4"
+gdb_test "info reg r6" "r6 8"
+gdb_test "info reg r7" "r7 10"
+gdb_test "info reg r8" "r8 20"
+gdb_test "info reg r9" "r9 40"
+gdb_test "info reg r10" "r10 80"
+gdb_test "info reg r11" "r11 100"
+gdb_test "info reg r12" "r12 200"
+gdb_test "info reg r13" "r13 400"
+gdb_test "info reg r14" "r14 800"
+gdb_test "info reg r15" "r15 1000"
+gdb_test "info reg r16" "r16 2000"
+
+# Two odd variants that GDB supports are:
+# "1" means "r1", and
+# "$1" means "r1"
+#
+gdb_test "info reg 1 4" "r1 1.*r4 2"
+gdb_test "info reg \$1" "r1 1"
+
+# Verify that GDB responds gracefully to a register ID number that
+# is out of range.
+#
+gdb_test "info reg 999" "999: invalid register"
+
+# Make sure the floating point status and error registers
+# don't show up as floating point numbers!
+#
+gdb_test "info reg fpsr" ".*fpsr 0.*" "fpsr"
+gdb_test "info reg fpe1" ".*fpe1 0.*" "fpe1"
+gdb_test "info reg fpe2" ".*fpe2 0.*" "fpe2"
+gdb_test "info reg fpe3" ".*fpe3 0.*" "fpe3"
+gdb_test "info reg fpe4" ".*fpe4 0.*" "fpe4"
+gdb_test "info reg fpe5" ".*fpe5 0.*" "fpe5"
+gdb_test "info reg fpe6" ".*fpe6 0.*" "fpe6"
+gdb_test "info reg fpe7" ".*fpe7 0.*" "fpe7"
+
+gdb_test "info reg fr4" ".*fr4.*(double precision).* 1"
+gdb_test "info reg fr5" ".*fr5.*(double precision).* 2"
+gdb_test "info reg fr6" ".*fr6.*(double precision).* 2"
+gdb_test "info reg fr7" ".*fr7.*(double precision).* 4"
+gdb_test "info reg fr8" ".*fr8.*(double precision).* 8"
+gdb_test "info reg fr9" ".*fr9.*(double precision).* 32"
+gdb_test "info reg fr10" ".*fr10.*(double precision).* 256"
+
+gdb_test "info reg r19" "r19 deadbeefbadcadee"
+
+# Need to add test of use of $<register-name>
+#
+# Q: How do you say a literal "$" in expect?
+# A: You say "\$". A literal "\" is "\\".
+#
+# Please note that this test will fail as long as we are running
+# in 32-bit mode: it will produce "$1 = 0xbadcadee". To fix it
+# would require building a real 64-bit gdb (expression evaluation,
+# in particular).
+#
+send_gdb "p/x \$r19\n"
+ gdb_expect {
+ -re ".*= 0xdeadbeefbadcadee.*$gdb_prompt $" {
+ pass "64-bit works"
+ }
+ -re ".*= 0xbadcadee.*$gdb_prompt $" {
+ pass "32-bit extract when using PRINT; expected but not good"
+ }
+ -re ".*$gdb_prompt $" {
+ fail "didn't print any part of right value"
+ }
+ timeout {
+ fail "timeout on print"
+ }
+ }
+
+# Need to add tests of setting wide regs too. E.g.
+#
+# set $r4 = 0x1234567890123456
+# p/x $r4
+#
+
+# done
+#
+gdb_exit
+
+return 0
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/reg.s b/gdb/testsuite/gdb.hp/gdb.base-hp/reg.s
new file mode 100644
index 00000000000..8cc15f8f6e6
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.base-hp/reg.s
@@ -0,0 +1,96 @@
+; assemble as "as -o reg reg.s"
+; or
+; cc -g -o +DA2.0N
+;
+; PA-RISC 2.0 register contents test.
+;
+ .level 2.0
+
+ .code
+ .export main,ENTRY
+ .export mainend,CODE
+ .export lab1,CODE
+ .space $TEXT$
+ .subspa $CODE$
+
+main
+ .proc
+ .callinfo NO_CALLS,FRAME=0
+ .entry
+
+ ;; Test we have right register numbers
+ ;;
+ ADD %r0,%r0,%r1 ; 0
+ LDI 1,%r1 ; 1
+ ;;
+ ;; Don't put anything into r2 or r3--they are special registers.
+ ;;
+ ADD %r1,%r1,%r4 ; 2
+ ADD %r4,%r4,%r5 ; 4
+ ADD %r5,%r5,%r6 ; 8
+ ADD %r6,%r6,%r7 ; 16
+ ADD %r7,%r7,%r8 ; 32
+ ADD %r8,%r8,%r9 ; 64
+ ADD %r9,%r9,%r10 ; 128
+ ADD %r10,%r10,%r11 ; 256
+ ADD %r11,%r11,%r12 ; 512
+ ADD %r12,%r12,%r13 ; 1024
+ ADD %r13,%r13,%r14 ; 2048
+ ADD %r14,%r14,%r15 ; 4096
+ ADD %r15,%r15,%r16 ; 9192
+
+ ;; Test high bits, to be sure we show them.
+ ;;
+ LDI 0xde,%r19 ; "de"
+ DEPD,Z %r19,55,56,%r19 ; "de00"
+ LDI 0xad,%r18 ; "ad"
+ ADD %r18,%r19,%r19 ; "dead"
+ DEPD,Z %r19,55,56,%r19 ; "dead00"
+ LDI 0xbe,%r18 ; "be"
+ ADD %r18,%r19,%r19 ; "deadbe"
+ DEPD,Z %r19,55,56,%r19 ; "deadbe00"
+ LDI 0xef,%r18 ; "ef"
+ ADD %r18,%r19,%r19 ; "deadbeef"
+ ;
+ DEPD,Z %r19,55,56,%r19 ; "deadbeef00"
+ LDI 0xba,%r18 ; "ba"
+ ADD %r18,%r19,%r19 ; "deadbeefba"
+ DEPD,Z %r19,55,56,%r19 ; "deadbeefba00"
+ LDI 0xdc,%r18 ; "dc"
+ ADD %r18,%r19,%r19 ; "deadbeefbadc"
+ DEPD,Z %r19,55,56,%r19 ; "deadbeefbadc00"
+ LDI 0xad,%r18 ; "ad"
+ ADD %r18,%r19,%r19 ; "deadbeefbadcad"
+ DEPD,Z %r19,55,56,%r19 ; "deadbeefbadcad00"
+ LDI 0xee,%r18 ; "ee"
+ ADD %r18,%r19,%r19 ; "deadbeefbadcadee"
+
+lab1 ;; Test floating point registers
+ ;;
+ LDIL LR'one,%r22 ;
+ FLDD RR'one(%r22),%fr4 ; 1.0
+ FLDD RR'one+8(%r22),%fr5 ; 2.0
+ FLDD RR'one+8(%r22),%fr6 ; 2.0
+ FMPY,DBL %fr5,%fr6,%fr7 ; 4.0
+ FMPY,DBL %fr6,%fr7,%fr8 ; 8.0
+ FMPY,DBL %fr7,%fr8,%fr9 ; 32.0
+ FMPY,DBL %fr8,%fr9,%fr10 ; 256.0
+
+ ;; The NOP prevents anything from end.o or crt0.o from
+ ;; being appended immediately after "mainend". If that
+ ;; happens, then we may have other labels that have the
+ ;; same address as "mainend", and thus the debugger
+ ;; may symbolize this PC to something other than "mainend".
+mainend
+ NOP
+ .exit
+ .procend
+
+ .space $TEXT$
+ .subspa $CODE$
+ .subspa $LIT$ ;; <don't use> ,QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=16
+one
+ .align 8
+ .stringz "?\xF0\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00"
+ .end
+
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/sized-enum.c b/gdb/testsuite/gdb.hp/gdb.base-hp/sized-enum.c
new file mode 100644
index 00000000000..a6d57881f48
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.base-hp/sized-enum.c
@@ -0,0 +1,43 @@
+
+enum Normal {
+ red,
+ blue,
+ green
+};
+
+short enum Small {
+ pink,
+ cyan,
+ grey
+};
+
+char enum Tiny {
+ orange,
+ yellow,
+ brown
+};
+
+
+main()
+{
+ enum Normal normal[3];
+ short enum Small small[3];
+ char enum Tiny tiny[3];
+ int i;
+
+ for (i=0; i < 3; i++)
+ {
+ normal[i] = (enum Normal) i;
+ small[i] = (short enum Small) i;
+ tiny[i] = (char enum Tiny) i;
+ }
+ normal[0] = 0; /* place to hang a breakpoint */
+}
+
+
+
+
+
+
+
+
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/sized-enum.exp b/gdb/testsuite/gdb.hp/gdb.base-hp/sized-enum.exp
new file mode 100644
index 00000000000..0b5b6871eff
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.base-hp/sized-enum.exp
@@ -0,0 +1,165 @@
+# Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# GDB tests for sized enumerations
+
+# This is aimed at HP-UX systems. The HP C compiler
+# allows specifying "char" or "short" for an enum, to
+# indicate that it is 1 or 2 bytes long.
+
+# This file was written by Satish Pai <pai@apollo.hp.com>
+# 1997-09-24
+
+if $tracelevel then {
+ strace $tracelevel
+ }
+
+#
+# test running programs
+#
+set prms_id 0
+set bug_id 0
+
+if { [skip_hp_tests] } then { continue }
+
+set testfile "sized-enum"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+if { $gcc_compiled } then { continue }
+if {$hp_aCC_compiler} {continue}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+#
+# set it up at a breakpoint so we can play with the variable values
+#
+
+if ![runto_main] then {
+ perror "couldn't run to breakpoint"
+ continue
+}
+
+# set a breakpoint and go there
+send_gdb "break 34\n"
+gdb_expect {
+ -re "Breakpoint.*line 34.*$gdb_prompt $" { pass "set break 34" }
+ -re "$gdb_prompt $" { fail "set break 34" }
+ timeout { fail "(timeout) set break 34" }
+}
+send_gdb "continue\n"
+gdb_expect {
+ -re "Continuing\\.\r\n\r\nBreakpoint \[0-9\]*, main....at.*sized-enum\\.c:34\r\n34.*\r\n$gdb_prompt $" { pass "continue" }
+ -re "$gdb_prompt $" { fail "continue" }
+ timeout { fail "(timeout) continue" }
+}
+
+# print stuff
+send_gdb "print normal\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = \\{red, blue, green\\}.*$gdb_prompt $" { pass "print normal" }
+ -re "$gdb_prompt $" { fail "print normal" }
+ timeout { fail "(timeout) print normal" }
+}
+send_gdb "print small\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = \\{pink, cyan, grey\\}.*$gdb_prompt $" { pass "print small" }
+ -re "$gdb_prompt $" { fail "print small" }
+ timeout { fail "(timeout) print small" }
+}
+send_gdb "print tiny\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = \\{orange, yellow, brown\\}.*$gdb_prompt $" { pass "print tiny" }
+ -re "$gdb_prompt $" { fail "print tiny" }
+ timeout { fail "(timeout) print tiny" }
+}
+
+# print type sizes
+send_gdb "print sizeof (Normal)\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = 4.*$gdb_prompt $" { pass "print sizeof (Normal)" }
+ -re "$gdb_prompt $" { fail "print sizeof (Normal)" }
+ timeout { fail "(timeout) print sizeof (Normal)" }
+}
+send_gdb "print sizeof (Small)\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = 2.*$gdb_prompt $" { pass "print sizeof (Small)" }
+ -re "$gdb_prompt $" { fail "print sizeof (Small)" }
+ timeout { fail "(timeout) print sizeof (Small)" }
+}
+send_gdb "print sizeof (Tiny)\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = 1.*$gdb_prompt $" { pass "print sizeof (Tiny)" }
+ -re "$gdb_prompt $" { fail "print sizeof (Tiny)" }
+ timeout { fail "(timeout) print sizeof (Tiny)" }
+}
+
+# print types
+send_gdb "ptype normal\n"
+gdb_expect {
+ -re "type = enum Normal \\{red, blue, green\\} \\\[3\\\].*$gdb_prompt $" { pass "ptype normal" }
+ -re "$gdb_prompt $" { fail "ptype normal" }
+ timeout { fail "(timeout) ptype normal" }
+}
+send_gdb "ptype small\n"
+gdb_expect {
+ -re "type = short enum Small \\{pink, cyan, grey\\} \\\[3\\\].*$gdb_prompt $" { pass "ptype small" }
+ -re "$gdb_prompt $" { fail "ptype small" }
+ timeout { fail "(timeout) ptype small" }
+}
+send_gdb "ptype tiny\n"
+gdb_expect {
+ -re "type = char enum Tiny \\{orange, yellow, brown\\} \\\[3\\\].*$gdb_prompt $" { pass "ptype tiny" }
+ -re "$gdb_prompt $" { fail "ptype tiny" }
+ timeout { fail "(timeout) ptype tiny" }
+}
+
+# convert to int
+send_gdb "print (int) blue\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = 1.*$gdb_prompt $" { pass "print (int) blue" }
+ -re "$gdb_prompt $" { fail "print (int) blue" }
+ timeout { fail "(timeout) print (int) blue" }
+}
+send_gdb "print (int) cyan\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = 1.*$gdb_prompt $" { pass "print (int) cyan" }
+ -re "$gdb_prompt $" { fail "print (int) cyan" }
+ timeout { fail "(timeout) print (int) cyan" }
+}
+send_gdb "print (int) yellow\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = 1.*$gdb_prompt $" { pass "print (int) yellow" }
+ -re "$gdb_prompt $" { fail "print (int) yellow" }
+ timeout { fail "(timeout) print (int) yellow" }
+}
+
+
+
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.exp b/gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.exp
new file mode 100644
index 00000000000..ca60282100c
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.exp
@@ -0,0 +1,346 @@
+# Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+if $tracelevel then {
+ strace $tracelevel
+ }
+
+set prms_id 0
+set bug_id 0
+
+if { [skip_hp_tests] } then { continue }
+
+set testfile "so-thresh"
+set binfile ${objdir}/${subdir}/${testfile}
+
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+# This testcase is relatively large, and therefore can take awhile to
+# load. We'd best set the timeout to something suitable, or we may
+# seem to fail...
+#
+set timeout 60
+
+# Build procedure for this testcase:
+# ${srcdir}/${subdir}/so-thresh.sh ${subdir}
+# which calls,
+# make -f ${srcdir}/${subdir}/so-thresh.mk <targets> <macros>
+# which builds,
+# genso-thresh (from genso-thresh.c)
+# which generates,
+# lib00-so-thresh.c
+# lib01-so-thresh.c
+# lib02-so-thresh.c
+# so-thresh.lopt (link options file)
+# lib0*-so-thresh.sl (from .c files above)
+# so-thresh (from so-thresh.c)
+# using lib0*-so-thresh.sl and so-thresh.lopt
+#
+# Since so-thresh.mk requires SRCDIR and OBJDIR macro definitions,
+# and SRCDIR / OBJDIR could be in relative path format, we use
+# so-thresh.sh script to pin down SRCDIR / OBJDIR (using $PWD/ prefix
+# when detected relative path values for srcdir / objdir), before the
+# 'cd $subdir' call (when this can be done in TCL here, we can call
+# make directly instead).
+#
+# remote_exec build "sh -c \\\"cd ${objdir}/${subdir}\\; make -v -f ${srcdir}/${subdir}/${testfile}.mk clean require_shlibs all SRCDIR=${srcdir}/${subdir} OBJDIR=${objdir}/${subdir}\\\""
+
+send_user "Making with '${srcdir}/${subdir}/${testfile}.sh $subdir ...\n"
+remote_exec build "${srcdir}/${subdir}/${testfile}.sh $subdir"
+
+# Only HP-UX (and any other platforms using SOM shared libraries, I
+# guess) interprets the auto-solib-add variable as a threshhold,
+# rather than a boolean that strictly enables or disables automatic
+# loading of shlib symbol tables.
+#
+# On HP-UX, it is the size threshhold (in megabytes) at which to
+# stop auto loading of symbol tables.
+#
+if ![istarget "hppa*-hp-hpux*"] then {
+ setup_xfail "*-*-*"
+}
+
+# Start with a fresh gdb
+#
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# This is a test of gdb's ability on HP-UX to stop automatically
+# loading symbols of shared libraries, when the total size of the
+# debugger's symbol table reaches a specified threshhold.
+#
+
+# On HP-UX, the help text for auto-solib-add mentions that it
+# serves as a threshhold.
+#
+send_gdb "help set auto-solib-add\n"
+gdb_expect {
+ -re "Set autoloading size threshold .in megabytes. of shared library symbols.*
+If nonzero, symbols from all shared object libraries will be loaded.*
+automatically when the inferior begins execution or when the dynamic linker.*
+informs gdb that a new library has been loaded, until the symbol table.*
+of the program and libraries exceeds this threshold.*
+Otherwise, symbols must be loaded manually, using `sharedlibrary'.*$gdb_prompt $"\
+ {pass "help set auto-solib-add"}
+ -re "$gdb_prompt $"\
+ {fail "help set auto-solib-add"}
+ timeout {fail "(timeout) help set auto-solib-add"}
+}
+
+# On HP-UX, the threshhold is by default set to 50, which means
+# 50 megabytes.
+#
+send_gdb "show auto-solib-add\n"
+gdb_expect {
+ -re "Autoloading size threshold .in megabytes. of shared library symbols is $decimal.*$gdb_prompt $"\
+ {pass "show auto-solib-add "}
+ -re "Autoloading size threshold \(in megabytes\) of shared library symbols is $decimal.$gdb_prompt $"\
+ {pass "show auto-solib-add "}
+ -re "$gdb_prompt $"\
+ {fail "show auto-solib-add "}
+ timeout {fail "(timeout) show auto-solib-add "}
+}
+
+send_gdb "set auto-solib-add 1\n"
+gdb_expect {
+ -re ".*$gdb_prompt $"
+ {pass "set auto-solib-add to 1"}
+ -re ".*$gdb_prompt $"
+ {fail "set auto-solib-add to 1"}
+ timeout {fail "(timeout) set auto-solib-add to 1"}
+}
+
+
+# We have manually verified that our testcase exceeds 1 Mbytes
+# of heap space in GDB to hold the symbols for the main program
+# and all associated linked-against libraries. Thus, when we
+# run to the program's main, and therefore notice all the linked-
+# against shlibs, we expect to hit the threshhold.
+#
+# (Note that we're not using the expect [runto main] function here,
+# 'cause we want to match on output from the run command.
+#
+send_gdb "break main\n"
+gdb_expect {
+ -re "Breakpoint \[0-9\]* at.*$gdb_prompt $"\
+ {pass "1 set break at main"}
+ -re "$gdb_prompt $"\
+ {fail "1 set break at main"}
+ timeout {fail "(timeout) 1 set break at main"}
+}
+
+send_gdb "run\n"
+gdb_expect {
+ -re ".*warning. Symbols for some libraries have not been loaded, because.*
+doing so would exceed the size threshold specified by auto-solib-add.*
+To manually load symbols, use the 'sharedlibrary' command.*
+To raise the threshold, set auto-solib-add to a larger value and rerun.*
+the program.*$gdb_prompt $"\
+ {pass "run to main hit auto-solib-add threshold"}
+ -re "$gdb_prompt $"\
+ {fail "run to main hit auto-solib-add threshold"}
+ timeout {fail "(timeout) run to main hit auto-solib-add threshold"}
+}
+
+# Verify that "info share" mentions something about libraries whose
+# symbols weren't loaded.
+#
+# We'll assume that at least the last two shlib's symbols weren't
+# loaded. As a side-effect of matching this pattern, the text start
+# address of the last one is captured in expect_out(1,string).
+# (we'll need it for the 'add-symbol-file' command in a nonce...)
+#
+send_gdb "info sharedlibrary\n"
+gdb_expect {
+ -re ".*lib01_$testfile.sl .*symbols not loaded.*0x\[0-9\]* (0x\[0-9a-fA-F\]*).*$gdb_prompt $"\
+ { send_gdb "add-symbol-file lib02_$testfile.sl $expect_out(1,string)\n"
+ gdb_expect {
+ -re "add symbol table.*y or n.*$"\
+ {send_gdb "y\n"
+ gdb_expect {
+ -re "$gdb_prompt $" {pass "add-symbol-file and info sharedlib"}
+ timeout {fail "(timeout) add-symbol-file and info sharedlib"}
+ }}
+ -re "$gdb_prompt $"\
+ {fail "add-symbol-file and info sharedlib"}
+ timeout {fail "(timeout) add-symbol-file and info sharedlib"}
+ }
+ }
+ -re "$gdb_prompt $" {
+ setup_xfail hppa*-*-* CHFts24108
+ fail "info sharedlibrary shows shlibs with unloaded symbols"
+ }
+ timeout {fail "(timeout) info sharedlibrary shows shlibs with unloaded symbols"}
+}
+
+# Verify that we can manually load the symbol table of a library
+# whose symbols weren't loaded. (We'll pick the last one.)
+#
+
+# I moved this test inside the one above, because the expect_out array is not ok if the
+# previous test has failed, and expect would error out (elz)
+#
+#send_gdb "add-symbol-file lib02_$testfile.sl $expect_out(1,string)\n"
+#gdb_expect {
+# -re "add symbol table.*y or n.*$"\
+# {send_gdb "y\n"
+# gdb_expect {
+# -re "$gdb_prompt $" {pass "add-symbol-file"}
+# timeout {fail "(timeout) add-symbol-file"}
+# }}
+# -re "$gdb_prompt $"\
+# {fail "add-symbol-file"}
+# timeout {fail "(timeout) add-symbol-file"}
+#}
+
+# Verify that we can manually load the symbols for all libraries
+# which weren't already loaded.
+#
+# Warning! On a machine with little free swap space, this may
+# fail!
+#
+send_gdb "sharedlibrary\n"
+gdb_expect {
+ -re "Reading symbols from.*done.*$gdb_prompt $"\
+ {pass "sharedlibrary"}
+ -re "$gdb_prompt $" {
+ setup_xfail hppa*-*-* CHFts24108
+ fail "sharedlibrary"
+ }
+ timeout {fail "(timeout) sharedlibrary"}
+}
+
+# Rerun the program, this time verifying that we can set the
+# threshhold high enough to avoid hitting it.
+#
+# It appears that gdb isn't freeing memory when rerunning, as one
+# would expect. To avoid potentially hitting a virtual memory
+# ceiling, start with a fresh gdb.
+#
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+send_gdb "break main\n"
+gdb_expect {
+ -re "Breakpoint \[0-9\]* at.*$gdb_prompt $"\
+ {pass "2 set break at main"}
+ -re "$gdb_prompt $"\
+ {fail "2 set break at main"}
+ timeout {fail "(timeout) 2 set break at main"}
+}
+
+send_gdb "set auto-solib-add 9999\n"
+gdb_expect {
+ -re "$gdb_prompt $"\
+ {pass "set auto-solib-add threshold to practical infinity"}
+ timeout {fail "(timeout) set auto-solib-add threshold to practical infinity"}
+}
+send_gdb "run\n"
+gdb_expect {
+ -re ".*warning. Symbols for some libraries have not been loaded, because.*
+doing so would exceed the size threshold specified by auto-solib-add.*
+To manually load symbols, use the 'sharedlibrary' command.*
+To raise the threshold, set auto-solib-add to a larger value and rerun.*
+the program.*$gdb_prompt $"\
+ {fail "rerun threshold at practical infinity (still hit threshold)"}
+ -re "$gdb_prompt $"\
+ {pass "rerun with threshold at practical infinity"}
+ timeout {fail "(timeout) rerun with threshold at practical infinity"}
+}
+
+# Rerun the program, this time altogether disabling the auto loading
+# feature. There should be no information at all about shared
+# libraries now.
+#
+# ??rehrauer: Personally, I'd call that a bug, since it doesn't give
+# you the ability to manually load single shlibs (you need the text
+# start address that 'info share' normall gives you). On the other
+# hand, one can easily choose to load them all...
+#
+# It appears that gdb isn't freeing memory when rerunning, as one
+# would expect. To avoid potentially hitting a virtual memory
+# ceiling, start with a fresh gdb.
+#
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+send_gdb "break main\n"
+gdb_expect {
+ -re "Breakpoint \[0-9\]* at.*$gdb_prompt $"\
+ {pass "3 set break at main"}
+ -re "$gdb_prompt $"\
+ {fail "3 set break at main"}
+ timeout {fail "(timeout) 3 set break at main"}
+}
+
+send_gdb "set auto-solib-add 0\n"
+gdb_expect {
+ -re "$gdb_prompt $"\
+ {pass "set auto-solib-add threshold to 0"}
+ timeout {fail "(timeout) set auto-solib-add threshold to 0"}
+}
+send_gdb "run\n"
+gdb_expect {
+ -re ".*warning. Symbols for some libraries have not been loaded, because.*
+doing so would exceed the size threshold specified by auto-solib-add.*
+To manually load symbols, use the 'sharedlibrary' command.*
+To raise the threshold, set auto-solib-add to a larger value and rerun.*
+the program.*$gdb_prompt $"\
+ {fail "rerun threshold at 0 (still hit threshold)"}
+ -re "$gdb_prompt $"\
+ {pass "rerun with threshold at 0"}
+ timeout {fail "(timeout) rerun with threshold at 0"}
+}
+
+# Verify that we can still manually load symbols for all libraries.
+# (We'll assume that if the last shlib's symbols are loaded, that
+# all of them were.)
+#
+# Note that we set the GDB "height" variable to prevent GDB from
+# prompting
+#
+# Warning! On a machine with little free swap space, this may
+# fail!
+#
+send_gdb "set height 9999\n"
+gdb_expect {
+ -re "$gdb_prompt $"\
+ {pass "set screen page height to practical infinity"}
+ timeout {fail "(timeout) set screen page height to practical infinity"}
+}
+send_gdb "sharedlibrary\n"
+gdb_expect {
+ -re ".*Reading symbols from .*/lib02-so-thresh\\.sl\\.\\.\\.done\\..*$gdb_prompt $"\
+ {pass "manually load all symbols"}
+ -re "$gdb_prompt $" {
+ setup_xfail hppa*-*-* CHFts24108
+ fail "manually load all symbols (CHFts24108)"
+ }
+ timeout {fail "(timeout) manually load all symbols"}
+}
+
+return 0
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.mk b/gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.mk
new file mode 100644
index 00000000000..13b9a91f5bd
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.mk
@@ -0,0 +1,73 @@
+# Make file for so-thresh test
+
+OBJDIR=.
+SRCDIR=.
+CFLAGS = +DA1.1 -g
+
+# This is how to build this generator.
+genso-thresh.o: ${SRCDIR}/genso-thresh.c
+ $(CC) $(CFLAGS) -o genso-thresh.o -c ${SRCDIR}/genso-thresh.c
+genso-thresh: genso-thresh.o
+ $(CC) $(CFLAGS) -o genso-thresh genso-thresh.o
+
+# This is how to run this generator.
+# This target should be made before the 'all' target,
+# to ensure that the shlib sources are all available.
+require_shlibs: genso-thresh
+ if ! [ -a lib00-so-thresh.c ] ; then \
+ genso-thresh ; \
+ fi
+ if ! [ -a lib01-so-thresh.c ] ; then \
+ genso-thresh ; \
+ fi
+ if ! [ -a lib02-so-thresh.c ] ; then \
+ genso-thresh ; \
+ fi
+
+# This is how to build all the shlibs.
+# Be sure to first make the require_shlibs target!
+lib00-so-thresh.o: lib00-so-thresh.c
+ $(CC) $(CFLAGS) +Z -o lib00-so-thresh.o -c lib00-so-thresh.c
+lib00-so-thresh.sl: lib00-so-thresh.o
+ $(LD) $(LDFLAGS) -b -o lib00-so-thresh.sl lib00-so-thresh.o
+lib01-so-thresh.o: lib01-so-thresh.c
+ $(CC) $(CFLAGS) +Z -o lib01-so-thresh.o -c lib01-so-thresh.c
+lib01-so-thresh.sl: lib01-so-thresh.o
+ $(LD) $(LDFLAGS) -b -o lib01-so-thresh.sl lib01-so-thresh.o
+lib02-so-thresh.o: lib02-so-thresh.c
+ $(CC) $(CFLAGS) +Z -o lib02-so-thresh.o -c lib02-so-thresh.c
+lib02-so-thresh.sl: lib02-so-thresh.o
+ $(LD) $(LDFLAGS) -b -o lib02-so-thresh.sl lib02-so-thresh.o
+
+
+
+
+# For convenience, here's names for all pieces of all shlibs.
+SHLIB_SOURCES = \
+ lib00-so-thresh.c \
+ lib01-so-thresh.c \
+ lib02-so-thresh.c
+
+SHLIB_OBJECTS = $(SHLIB_SOURCES:.c=.o)
+SHLIBS = $(SHLIB_SOURCES:.c=.sl)
+SHLIB_NAMES = $(SHLIB_SOURCES:.c=)
+EXECUTABLES = $(SHLIBS) genso-thresh so-thresh
+OBJECT_FILES = $(SHLIB_OBJECTS) genso-thresh.o so-thresh.o
+
+shlib_objects: $(SHLIB_OBJECTS)
+shlibs: $(SHLIBS)
+
+# This is how to build the debuggable testcase that uses the shlibs.
+so-thresh.o: so-thresh.c
+ $(CC) $(CFLAGS) -o so-thresh.o -c so-thresh.c
+so-thresh: shlibs so-thresh.o
+ $(LD) $(LDFLAGS) -o so-thresh -lc -L${OBJDIR} -c so-thresh.lopt /opt/langtools/lib/end.o /lib/crt0.o so-thresh.o
+
+# Yeah, but you should first make the require_shlibs target!
+all: so-thresh genso-thresh
+
+# To remove everything built via this makefile...
+clean:
+ rm -f lib0*-so-thresh.*
+ rm -f *.o genso-thresh so-thresh.lopt so-thresh.c
+ rm -f so-thresh
diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.sh b/gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.sh
new file mode 100755
index 00000000000..6b6d6ecc3cd
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.sh
@@ -0,0 +1,34 @@
+#!/bin/ksh
+
+# so-thresh.sh
+#
+# This script is a "wrapper" to use the so-thresh.mk
+# Makefile. See the comments in so-thresh.exp
+# regarding why this script exists.
+
+#set -o xtrace
+#set -o verbose
+
+if [ "$srcdir" = "${srcdir#/}" ]
+then
+ srcdir="$PWD/$srcdir"
+fi
+
+if [ "$objdir" = "${objdir#/}" ]
+then
+ objdir="$PWD/$objdir"
+fi
+
+subdir="$1"
+
+HERE=$PWD
+cd $subdir
+
+MAKEFLAGS=
+make -f ${srcdir}/${subdir}/so-thresh.mk clean require_shlibs all SRCDIR=${srcdir}/${subdir} OBJDIR=${objdir}/${subdir} > ${objdir}/${subdir}/so-thresh.make.out 2>&1
+STATUS=$?
+
+cd $HERE
+echo "return STATUS is $STATUS"
+
+exit $STATUS
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/Makefile.in b/gdb/testsuite/gdb.hp/gdb.compat/Makefile.in
new file mode 100644
index 00000000000..ada0f1a23ef
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.compat/Makefile.in
@@ -0,0 +1,27 @@
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+EXECUTABLES = xdb xdb-test
+
+all:
+ @echo "Nothing to be done for all..."
+
+info:
+install-info:
+dvi:
+install:
+uninstall: force
+installcheck:
+check:
+
+clean mostlyclean:
+ -rm -f *~ *.o *.ci
+ -rm -f core $(EXECUTABLES)
+
+distclean maintainer-clean realclean: clean
+ -rm -f Makefile config.status config.log
+ -rm -f *-init.exp
+ -rm -fr *.log summary detail *.plog *.sum *.psum site.*
+
+Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in
+ $(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/average.c b/gdb/testsuite/gdb.hp/gdb.compat/average.c
new file mode 100644
index 00000000000..25ba2ee6a6c
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.compat/average.c
@@ -0,0 +1,46 @@
+/* This is a sample program for the HP WDB debugger. */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef PROTOTYPES
+extern int sum(int *, int, int);
+#else
+extern int sum();
+#endif
+
+#define num 10
+
+static int my_list[num] = {3,4,2,0,2,1,8,3,6,7};
+
+#ifdef __STDC__
+void print_average(int *list, int low, int high)
+#else
+void print_average(list, low, high)
+int *list, low, high;
+#endif
+ {
+ int total = 0, num_elements = 0, average = 0;
+ total = sum(list, low, high);
+ num_elements = high - low; /* note this is an off-by-one bug */
+
+ average = total / num_elements;
+ printf("%10.d\n", average);
+ }
+
+#ifdef __STDC__
+int main(void)
+#else
+main ()
+#endif
+{
+ char c;
+ int first = 0, last = 0;
+ last = num-1;
+
+ /* Try two test cases. */
+ print_average (my_list, first, last);
+ print_average (my_list, first, last - 3);
+
+ exit(0);
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/configure b/gdb/testsuite/gdb.hp/gdb.compat/configure
new file mode 100755
index 00000000000..2bccc23b215
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.compat/configure
@@ -0,0 +1,899 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.12.1
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.12.1"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=xdb1.exp
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+CC=${CC-cc}
+
+ac_aux_dir=
+for ac_dir in `cd $srcdir;pwd`/../../../.. $srcdir/`cd $srcdir;pwd`/../../../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../../.. $srcdir/`cd $srcdir;pwd`/../../../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+# configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+# same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+# as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:573: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:594: checking target system type" >&5
+
+target_alias=$target
+case "$target_alias" in
+NONE)
+ case $nonopt in
+ NONE) target_alias=$host_alias ;;
+ *) target_alias=$nonopt ;;
+ esac ;;
+esac
+
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$target" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:612: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+ case $nonopt in
+ NONE) build_alias=$host_alias ;;
+ *) build_alias=$nonopt ;;
+ esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set) 2>&1 | grep ac_space` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@CC@%$CC%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/configure.in b/gdb/testsuite/gdb.hp/gdb.compat/configure.in
new file mode 100644
index 00000000000..71ab87dd2c9
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.compat/configure.in
@@ -0,0 +1,15 @@
+dnl Process this file file with autoconf to produce a configure script.
+dnl This file is a shell script fragment that supplies the information
+dnl necessary to tailor a template configure script into the configure
+dnl script appropriate for this directory. For more information, check
+dnl any existing configure script.
+
+AC_PREREQ(2.5)
+AC_INIT(xdb1.exp)
+
+CC=${CC-cc}
+AC_SUBST(CC)
+AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../../..)
+AC_CANONICAL_SYSTEM
+
+AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/sum.c b/gdb/testsuite/gdb.hp/gdb.compat/sum.c
new file mode 100644
index 00000000000..d295f7e2793
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.compat/sum.c
@@ -0,0 +1,15 @@
+/* This is a sample program for the HP/DDE debugger. */
+#include <stdio.h>
+
+#ifdef __STDC__
+int sum(int *list, int low, int high)
+#else
+int sum(list, low, high)
+int *list, low, high;
+#endif
+ {
+ int i = 0, s = 0;
+ for (i = low; i <= high; i++)
+ s += list[i];
+ return(s);
+ }
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/xdb.c b/gdb/testsuite/gdb.hp/gdb.compat/xdb.c
new file mode 100644
index 00000000000..e3e3fc23e9f
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.compat/xdb.c
@@ -0,0 +1,20 @@
+#include <stdio.h>
+
+int callee( x )
+int x;
+{
+ int y = x * x;
+ return (y - 2);
+}
+
+main()
+{
+ int i;
+ for (i = 1; i < 10; i++)
+ {
+ printf( "%d ", callee( i ));
+
+ }
+ printf( " Goodbye!\n" );
+
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/xdb0.c b/gdb/testsuite/gdb.hp/gdb.compat/xdb0.c
new file mode 100644
index 00000000000..fa5c76f7418
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.compat/xdb0.c
@@ -0,0 +1,42 @@
+#include "xdb0.h"
+
+main ()
+{
+ int x;
+#ifdef usestubs
+ set_debug_traps();
+ breakpoint();
+#endif
+ x = 0;
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+ foo (x++);
+}
+
+static void
+unused ()
+{
+ /* Not used for anything */
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/xdb0.h b/gdb/testsuite/gdb.hp/gdb.compat/xdb0.h
new file mode 100644
index 00000000000..c4d337c6770
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.compat/xdb0.h
@@ -0,0 +1,36 @@
+/* An include file that actually causes code to be generated in the
+ including file. This is known to cause problems on some systems. */
+
+static void
+foo (x)
+int x;
+{
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+ bar (x++);
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/xdb1.c b/gdb/testsuite/gdb.hp/gdb.compat/xdb1.c
new file mode 100644
index 00000000000..51632b94d07
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.compat/xdb1.c
@@ -0,0 +1,33 @@
+void
+bar (x)
+int x;
+{
+ printf ("%d\n", x);
+
+ long_line ();
+}
+
+static void
+unused ()
+{
+ /* Not used for anything */
+}
+
+
+/* This routine has a very long line that will break searching in older
+ versions of GDB. */
+
+long_line ()
+{
+ oof (67);
+
+ oof (6789);
+
+ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 5 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 10 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 15 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 20 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 25 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 30 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 35 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 40 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 45 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 50 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 55 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 60 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 65 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (1234); /* 70 */
+}
+
+oof (n)
+ int n;
+{
+ return n + 1;
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/xdb1.exp b/gdb/testsuite/gdb.hp/gdb.compat/xdb1.exp
new file mode 100644
index 00000000000..f371852c78d
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.compat/xdb1.exp
@@ -0,0 +1,78 @@
+# Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This file was written by Fred Fish. (fnf@cygnus.com)
+
+if $tracelevel then {
+ strace $tracelevel
+ }
+
+if { [skip_hp_tests] } then { continue }
+
+global usestubs
+
+#
+# test running programs
+#
+set prms_id 0
+set bug_id 0
+
+set testfile "xdb"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if [get_compiler_info ${binfile}] {
+ return -1;
+}
+if { $gcc_compiled } then { continue }
+
+global GDBFLAGS
+set saved_gdbflags $GDBFLAGS
+
+set GDBFLAGS "$GDBFLAGS --xdb"
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "set pagination off" ""
+gdb_test "show pagination" "State of pagination is off."
+gdb_test "set pagination on" ""
+gdb_test "show pagination" "State of pagination is on."
+
+gdb_test "txbreak callee" "Breakpoint.*at.*"
+gdb_test "info break" "Num.*Type.*Disp.*Enb.*Address.*What\r\n.*breakpoint.*del.*y.*"
+
+gdb_test "xbreak callee" "Breakpoint.*at.*.*"
+gdb_test "info break" "Num.*Type.*Disp.*Enb.*Address.*What\r\n.*breakpoint.*keep.*y.*"
+
+gdb_exit
+set GDBFLAGS $saved_gdbflags
+return 0
+
+
+
+
+
+
+
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/xdb2.exp b/gdb/testsuite/gdb.hp/gdb.compat/xdb2.exp
new file mode 100644
index 00000000000..9bcdf589df8
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.compat/xdb2.exp
@@ -0,0 +1,105 @@
+# Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This file was written by Fred Fish. (fnf@cygnus.com)
+
+if $tracelevel then {
+ strace $tracelevel
+ }
+
+if { [skip_hp_tests] } then { continue }
+
+global message
+
+#
+# test running programs
+#
+set prms_id 0
+set bug_id 0
+
+set testfile "xdb"
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/xdb0.c" "${binfile}0.o" object {debug}] != "" } {
+ perror "Couldn't compile ${testfile}0.c to object"
+ return -1
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/xdb1.c" "${binfile}1.o" object {debug}] != "" } {
+ perror "Couldn't compile ${testfile}1.c to object"
+ return -1
+}
+
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" ${binfile} executable {debug}] != "" } {
+ perror "Couldn't link ${testfile}."
+ return -1
+}
+
+if [get_compiler_info ${binfile}] {
+ return -1;
+}
+
+if { $gcc_compiled } then { continue }
+
+global GDBFLAGS
+set saved_gdbflags $GDBFLAGS
+set GDBFLAGS "$GDBFLAGS --xdb"
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+gdb_test "break main" ""
+gdb_test "run" ""
+gdb_test "go +2" "Breakpoint.*at.*file.*xdb0\.c, line 12\.\r\nContinuing at.*\r\nmain \\(\\) at.*xdb0\.c:12\r\n12\[ \t\]+foo \\(x\\+\\+\\);"
+gdb_test "go -2" "Note: breakpoint.*also set at pc.*\.\r\nBreakpoint.*at.*file.*xdb0\.c, line 10\.\r\nContinuing at.*\.\r\n\r\nBreakpoint.*, main \\(\\) at.*xdb0\.c:10.*"
+gdb_test "go 16" "Breakpoint.*at.*file.*xdb0\.c, line 16\.\r\nContinuing at.*\.\r\nmain \\(\\) at.*xdb0\.c:16\r\n16\[ \t\]+foo \\(x\\+\\+\\);"
+
+send_gdb "go bar\n"
+ gdb_expect {
+ -re ".*Line 5 is not in .main.. Jump anyway.*y or n. $" {
+ send_gdb "y\n"
+ gdb_expect {
+ -re "$gdb_prompt $"\
+ {pass "go bar"}
+ timeout {fail "(timeout) go bar"}
+ }
+ }
+ -re "Continuing at.*\.\r\nbar \\(x=0\\) at.*xdb1\.c:5" {}
+ timeout { perror "(timeout) go bar" ; return }
+ }
+
+# Verify that GDB responds gracefully to a "go" command without
+# an argument.
+#
+gdb_test "go" "Usage: go <location>"
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "break bar" ""
+gdb_test "run" ""
+gdb_test "backtrace full" ".*bar \\(x=0\\) at.*xdb1\.c:5\r\nNo locals\.\r\n.1.* in foo \\(x=1\\) at.*xdb0\.h:8\r\nNo locals\.\r\n.2.* in main \\(\\) at.*xdb0\.c:11\r\n.*x = 1"
+gdb_test "bt 1 full" ".*bar \\(x=0\\) at.*xdb1\.c:5\r\nNo locals\.\r\n\\(More stack frames follow\.\.\.\\)"
+gdb_test "bt full 2" ".*bar \\(x=0\\) at.*xdb1\.c:5\r\nNo locals\.\r\n.1.* in foo \\(x=1\\) at.*xdb0\.h:8\r\nNo locals\.\r\n\\(More stack frames follow\.\.\.\\)"
+
+set GDBFLAGS $saved_gdbflags
+return 0
diff --git a/gdb/testsuite/gdb.hp/gdb.compat/xdb3.exp b/gdb/testsuite/gdb.hp/gdb.compat/xdb3.exp
new file mode 100644
index 00000000000..6d66cfc791b
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.compat/xdb3.exp
@@ -0,0 +1,321 @@
+# Copyright (C) 1998 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+if { [skip_hp_tests] } then { continue }
+
+set testfile1 "average"
+set testfile2 "sum"
+set testfile "xdb-test"
+set binfile1 ${objdir}/${subdir}/${testfile1}
+set binfile2 ${objdir}/${subdir}/${testfile2}
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/average.c" "${binfile1}.o" object {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/sum.c" "${binfile2}.o" object {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${binfile1}.o ${binfile2}.o" ${binfile} executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if [get_compiler_info ${binfile}] {
+ return -1;
+}
+if { $gcc_compiled } then { continue }
+
+
+proc xdb_reinitialize_dir { subdir } {
+ global gdb_prompt
+
+ send_gdb "D\n"
+ gdb_expect {
+ -re "Reinitialize source path to empty.*y or n. " {
+ send_gdb "y\n"
+ gdb_expect {
+ -re "Source directories searched.*$gdb_prompt $" {
+ send_gdb "D $subdir\n"
+ gdb_expect {
+ -re "Source directories searched.*$gdb_prompt $" {
+ verbose "Dir set to $subdir"
+ }
+ -re ".*$gdb_prompt $" {
+ perror "Dir \"$subdir\" failed."
+ }
+ }
+ }
+ -re ".*$gdb_prompt $" {
+ perror "Dir \"$subdir\" failed."
+ }
+ }
+ }
+ -re ".*$gdb_prompt $" {
+ perror "Dir \"$subdir\" failed."
+ }
+ }
+}
+
+#
+#test_search
+#
+proc test_search { } {
+ gdb_test "set listsize 4" ""
+ gdb_test "list average.c:1" "1\[ \t\]+/. This is a sample .*"
+ gdb_test "/ print_average" "17\[ \t\]+void print_average\\(int \\*list.*"
+ gdb_test "/ print_average" "19\[ \t\]+void print_average\\(list, low, high\\)"
+ gdb_test "/ print_average" "42\[ \t\]+print_average \\(my_list, first, last\\);"
+ gdb_test "? print_average" "19\[ \t\]+void print_average\\(list, low, high\\)"
+ gdb_test "? sum" "9\[ \t]+extern int sum\\(\\);"
+}
+
+#
+#test_viewing_loc
+#
+proc test_viewing_loc { } {
+ gdb_test "L" "No stack."
+ gdb_test "break main" ""
+ gdb_test "R" ""
+ gdb_test "L" "#0\[ \t\]+main \\(\\) at.*average.c:38\r\n38\[ \t\]+int first = 0, last = 0;"
+}
+
+#
+#test_dir_list
+#
+proc test_dir_list { } {
+ gdb_test "ld" "Source directories searched: .*"
+}
+
+#
+#test_list_sources
+#
+proc test_list_sources { } {
+ if [istarget "hppa2.0w-*-*"] {
+ gdb_test "lf" "Source files for which symbols have been read in:\r\n\r\n.*average\\.c.*Source files for which symbols will be read in on demand:\r\n\r\nglobals,.*\[se\]\[un\]\[md\]\\.c.*\[se\]\[un\]\[md\]\\.c"
+ } else {
+ gdb_test "lf" "Source files for which symbols have been read in:\r\n\r\n.*average\\.c.*\r\n\r\nSource files for which symbols will be read in on demand:\r\n\r\nglobals, end\\.c,.*sum\\.c"
+ }
+}
+#
+#test_vlist
+#
+proc test_vlist { } {
+ gdb_test "v main" "34\[ \t\]+main \\(\\)\r\n35\[ \t\]+#endif\r\n36\[ \t\]+.\r\n37\[ \t\]+char c;"
+}
+
+#
+#test_va
+#
+proc test_va { } {
+ if [istarget "hppa2.0w-*-*"] {
+ gdb_test "va main" "Dump of assembler code for function main:\r\n.*0x.* <main>:\[ \t\]+std %rp,-0x10\\(%sp\\)\r\n0x.* <main\\+4>:\[ \t\]+std,ma %r3,0xd0\\(%sp\\)\r\n.*0x.* <main\\+8>:\[ \t\]+std %r4,-0xc8\\(%sp\\)\r\n.*0x.* <main\\+12>:\[ \t\]+copy %ret1,%r3\r\n.*"
+ } else {
+ gdb_test "va main" "Dump of assembler code for function main:\r\n.*0x.* <main>:\[ \t\]+stw %rp,-0x14\\(%sr0,%sp\\)\r\n0x.* <main\\+4>:\[ \t\]+ldo 0x\[48\]0\\(%sp\\),%sp\r\n.*0x.* <main\\+8>:\[ \t\]+stw %r0,-0x.*\\(%sr0,%sp\\)\r\n.*0x.* <main\\+12>:\[ \t\]+stw %r0,-0x.*\\(%sr0,%sp\\)\r\n.*"
+ }
+}
+
+#
+#test_list_globals
+#
+proc test_list_globals { } {
+ gdb_test "lg" "All defined variables:\r\n\r\nFile globals:.*"
+# gdb_test "lg" "All defined variables:\r\n\r\nFile globals:\r\nchar __buffer.512.;\r\nint __d_eh_catch_catch;\r\nint __d_eh_catch_throw;.*"
+}
+
+#
+#test_list_registers
+#
+proc test_list_registers { } {
+ if [istarget "hppa2.0w-*-*"] {
+ gdb_test "lr" "\[ \t\]+flags:.*r17:.*pcsqh:.*cr0:.*\r\n\[ \t\]+r1:.*r18:.*pcoqt:.*cr8:.*"
+ } else {
+ gdb_test "lr" "\[ \t\]+flags:.*r18:.*pcsqt:.*ccr:.*\r\n\[ \t\]+r1:.*r19:.*eiem:.*cr12:.*"
+ }
+ gdb_test "lr r1" "r1 .*"
+}
+
+#
+#test_backtrace
+#
+proc test_backtrace { } {
+ gdb_test "t" "#0 main \\(\\) at.*average.c:39"
+ gdb_test "T" "#0 main \\(\\) at.*average.c:39\r\n\[ \t\]+c = *.*\r\n\[ \t\]+first = 0\r\n\[ \t\]+last = 0"
+
+ gdb_test "break sum" ""
+ gdb_test "cont" ""
+ gdb_test "next"
+
+ gdb_test "t" "#0 sum \\(list=0x.*, low=0, high=9\\) at.*sum\.c:12\r\n#1 0x.* in print_average \\(list=0x.*, low=0, high=9\\) at.*average\.c:24\r\n#2 0x.* in main \\(\\) at.*average\.c:42"
+ gdb_test "t 1" "#0 sum \\(list=0x.*, low=0, high=9\\) at.*sum\.c:12\r\n\\(More stack frames follow\.\.\.\\)"
+ gdb_test "T" "#0 sum \\(list=0x.*, low=0, high=9\\) at.*sum\.c:12\r\n\[ \t\]+i = 0\r\n\[ \t\]+s = 0\r\n#1 0x.* in print_average \\(list=0x.*, low=0, high=9\\) at.*average\.c:24\r\n\[ \t\]+total = 0\r\n\[ \t\]+num_elements = 0\r\n\[ \t\]+average = 0\r\n#2 0x.* in main \\(\\) at.*average\.c:42\r\n\[ \t\]+c = *.*\r\n\[ \t\]+first = 0\r\n\[ \t\]+last = 9"
+ gdb_test "T 1" "#0 sum \\(list=0x.*, low=0, high=9\\) at.*sum\.c:12\r\n\[ \t\]+i = 0\r\n\[ \t\]+s = 0\r\n\\(More stack frames follow\.\.\.\\)"
+
+ gdb_test "V" "#0 sum \\(list=0x.*, low=0, high=9\\) at.*sum\.c:12\r\n\\12\[ \t\]+for \\(i = low;.*\\)"
+ gdb_test "V 1" "#1 0x.* in print_average \\(list=0x.*, low=0, high=9\\) at.*average\.c:24\r\n24\[ \t\]+total = sum\\(list, low, high\\);"
+}
+
+#
+# test_go
+#
+proc test_go { } {
+ gdb_test "break main" ""
+ gdb_test "R" ""
+
+ gdb_test "g +1" "Breakpoint.*at 0x.*: file.*average\.c, line 39\.\r\nContinuing at 0x.*\.\r\nmain \\(\\) at.*average\.c:39\r\n39\[ \t\]+last = num-1;"
+ gdb_test "g 42" "Breakpoint.*at 0x.*: file.*average\.c, line 42\.\r\nContinuing at 0x.*\.\r\nmain \\(\\) at.*average\.c:42\r\n42\[ \t\]+print_average \\(my_list, first, last\\);"
+
+}
+
+#
+#test_breakpoints
+#
+proc test_breakpoints { } {
+ global gdb_prompt
+
+ gdb_test "sb" ""
+ gdb_test "lb" "Num.*Type.*Disp.*Enb.*Address.*What\r\n1\[ \r\]+breakpoint\[ \r\]+keep n.*in main at.*average\.c:38.*"
+ gdb_test "ab" ""
+ gdb_test "lb" "Num.*Type.*Disp.*Enb.*Address.*What\r\n1\[ \r\]+breakpoint\[ \r\]+keep y.*in main at.*average\.c:38.*"
+ gdb_test "ba sum" "Breakpoint.*at.*: file.*sum\.c, line 11\."
+ gdb_test "cont" ""
+ gdb_test "bx" "Breakpoint.*at.*: file.*sum.c, line 15\."
+ #gdb_test "bx if (1)" "Breakpoint.*at.*: file.*sum.c, line 15\."
+ gdb_test "bx 1" "Breakpoint.*at.*: file.*average.c, line 29\."
+ gdb_test "bx 1 if (1)" "Breakpoint.*at.*: file.*average.c, line 29\."
+ gdb_test "bc 1 2" "Will ignore next 2 crossings of breakpoint 1\."
+ gdb_test "lb 1" "Num.*Type.*Disp.*Enb.*Address.*What\r\n1\[ \r\]+breakpoint\[ \r\]+keep y.*in main at.*average\.c:38\r\n.*breakpoint already hit 1 time\r\n.*ignore next 2 hits.*"
+
+ send_gdb "db\n"
+ gdb_expect {
+ -re "Delete all breakpoints.*y or n. $" {
+ send_gdb "y\n"
+ exp_continue
+ }
+ -re "y\r\n$gdb_prompt $" {}
+ -re ".*$gdb_prompt $" { # This happens if there were no breakpoints
+ }
+ timeout { perror "Delete all breakpoints (timeout)" ; return }
+ }
+ send_gdb "lb\n"
+ gdb_expect {
+ -re "No breakpoints or watchpoints..*$gdb_prompt $" {}
+ -re ".*$gdb_prompt $" { perror "breakpoints not deleted" ; return }
+ timeout { perror "info breakpoints (timeout)" ; return }
+ }
+gdb_test "xbreak" "Breakpoint.*at.*file.*sum.c, line 15."
+gdb_test "xbreak print_average" "Breakpoint.*at.*file.*average.c, line 29."
+gdb_test "xbreak if (1)" "Note: breakpoint.*also set at pc.*Breakpoint.*at.*file.*sum.c, line 15."
+gdb_test "xbreak print_average if (1)" "Note: breakpoint.*also set at pc.*Breakpoint.*at.*file.*average.c, line 29."
+
+ send_gdb "lb\n"
+ gdb_expect {
+ -re "Num Type Disp Enb Address What.*breakpoint keep y.*sum.c:15.*breakpoint keep y.*average.c:29.*breakpoint keep y.*sum.c:15.*stop only if 1.*breakpoint keep y.*average.c:29.*stop only if 1.*$gdb_prompt $" {pass "lb on xbreaks"}
+ -re ".*$gdb_prompt $" { fail "breakpoints not deleted"}
+ timeout { fail "info breakpoints (timeout)" }
+ }
+
+}
+
+#
+# test_signals
+#
+proc test_signals { } {
+ gdb_test "handle SIGTERM nostop noprint" ""
+ gdb_test "z 15 s" "Signal.*Stop.*Print.*Pass to program.*Description\r\nSIGTERM.*Yes.*Yes.*Yes.*Terminated"
+ gdb_test "z 15 r" "Signal.*Stop.*Print.*Pass to program.*Description\r\nSIGTERM.*No.*No.*Yes.*Terminated"
+ gdb_test "z 15 i" "Signal.*Stop.*Print.*Pass to program.*Description\r\nSIGTERM.*No.*No.*No.*Terminated"
+ gdb_test "z 15 r" "Signal.*Stop.*Print.*Pass to program.*Description\r\nSIGTERM.*No.*Yes.*No.*Terminated"
+ gdb_test "z 15 Q" "Signal.*Stop.*Print.*Pass to program.*Description\r\nSIGTERM.*No.*No.*No.*Terminated"
+ gdb_test "lz" "Signal.*Stop.*Print.*Pass to program.*Description\r\n\r\nSIGHUP.*Yes.*"
+}
+
+
+
+# Start with a fresh gdb.
+global GDBFLAGS
+set saved_gdbflags $GDBFLAGS
+
+set GDBFLAGS "$GDBFLAGS --xdb"
+
+gdb_exit
+gdb_start
+
+xdb_reinitialize_dir $srcdir/$subdir
+
+gdb_load ${binfile}
+send_gdb "set width 0\n"
+gdb_expect -re "$gdb_prompt $"
+test_search
+test_viewing_loc
+test_dir_list
+test_list_sources
+test_vlist
+test_va
+gdb_test "next"
+gdb_test "l" "No arguments.\r\nc = *.*\r\nfirst = 0\r\nlast = 0"
+#test_list_globals
+test_list_registers
+test_backtrace
+
+# Start with a fresh gdb.
+
+gdb_exit
+gdb_start
+xdb_reinitialize_dir $srcdir/$subdir
+
+gdb_load ${binfile}
+send_gdb "set width 0\n"
+gdb_expect -re "$gdb_prompt $"
+test_go
+
+
+gdb_exit
+gdb_start
+xdb_reinitialize_dir $srcdir/$subdir
+
+gdb_load ${binfile}
+send_gdb "set width 0\n"
+gdb_expect -re "$gdb_prompt $"
+gdb_test "break main" ""
+gdb_test "R" ""
+gdb_test "S" "39\[ \t\]+last = num-1;"
+test_breakpoints
+test_signals
+gdb_test "sm" ""
+gdb_test "info set" ".*pagination: State of pagination is off.*"
+gdb_test "am" ""
+gdb_test "info set" ".*pagination: State of pagination is on.*"
+gdb_exit
+
+set GDBFLAGS $saved_gdbflags
+
+return 0
+
+
+
+
+
+
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/Makefile.in b/gdb/testsuite/gdb.hp/gdb.defects/Makefile.in
new file mode 100644
index 00000000000..f0a785837c4
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.defects/Makefile.in
@@ -0,0 +1,27 @@
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+EXECUTABLES = bs14602 bs15503 solib-d solib-d1.sl solib-d2.sl
+
+all:
+ @echo "Nothing to be done for all..."
+
+info:
+install-info:
+dvi:
+install:
+uninstall: force
+installcheck:
+check:
+
+clean mostlyclean:
+ -rm -f *~ *.o *.ci
+ -rm -f core $(EXECUTABLES)
+
+distclean maintainer-clean realclean: clean
+ -rm -f Makefile config.status config.log
+ -rm -f *-init.exp
+ -rm -fr *.log summary detail *.plog *.sum *.psum site.*
+
+Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in
+ $(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/bs14602.c b/gdb/testsuite/gdb.hp/gdb.defects/bs14602.c
new file mode 100644
index 00000000000..232b40842ea
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.defects/bs14602.c
@@ -0,0 +1,9 @@
+/* Test file for bs14602.exp */
+
+double v_double = 0;
+long double v_long_double = 12345.67890;
+
+int main () {
+ v_double = 0;
+ v_long_double = 12345.67890;
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/bs14602.exp b/gdb/testsuite/gdb.hp/gdb.defects/bs14602.exp
new file mode 100644
index 00000000000..24b7537916a
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.defects/bs14602.exp
@@ -0,0 +1,110 @@
+# This file was written by Sue Kimura. (sue_kimura@hp.com)
+#
+# Test for CLLbs14602 -- problem with recognizing long double on 10.20.
+#
+# Source file: bs14602.c
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+if { [skip_hp_tests] } { continue }
+
+#
+# test running programs
+#
+set prms_id 0
+set bug_id 0
+
+
+# set up appropriate compile option to recognize long double
+set ansi_option ""
+if [istarget "hppa*-*-*"] {
+ set ansi_option "-Ae"
+}
+
+set testfile bs14602
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "$binfile" executable "debug {additional_flags=${ansi_option}}"] != "" } {
+ perror "Couldn't compile ${srcfile}"
+ return -1
+}
+
+
+# Start with a fresh gdb.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load $binfile
+
+
+# get to end of main so we can check out some stuff
+if ![runto main] {
+ perror "couldn't run to breakpoint main"
+ continue
+}
+
+gdb_test "txbreak" \
+ "Breakpoint $decimal at $hex: file .*bs14602.c, line 9." \
+ "set breakpoint at end of main"
+
+gdb_test "continue" \
+ "Continuing.\r\n$hex in main* \\(\\) at .*bs14602.c:9\r\n.*" \
+ "continue to end of main"
+
+# test some simple things about long double
+gdb_test "whatis v_long_double" \
+ "type = long double" \
+ "whatis v_long_double"
+
+gdb_test "ptype v_long_double" \
+ "type = long double" \
+ "ptype v_long_double"
+
+gdb_test "print sizeof \(long double\)" \
+ " = 16" \
+ "print sizeof long double"
+
+gdb_test "print sizeof \(v_long_double\)" \
+ " = 16" \
+ "print sizeof v_long_double"
+
+gdb_test "print v_long_double" \
+ " = 12345.67890000000079453457146883011" \
+ "print v_long_double - 1"
+
+gdb_test "set variable v_long_double = 98765.43210" \
+ "" \
+ "set variable v_long_double to constant value"
+
+gdb_test "print v_long_double" \
+ " = 98765.43210000000544823706150054932" \
+ "print v_long_double - 2"
+
+gdb_test "set variable v_double = v_long_double" \
+ "" \
+ " set variable v_double with v_long_double"
+
+gdb_test "print v_double" \
+ " = 98765.432100000005" \
+ " print v_double"
+
+#reset v_long_double
+gdb_test "set variable v_long_double = 0" \
+ "" \
+ "reset v_long_double to 0"
+
+gdb_test "print v_long_double" \
+ " = 0" \
+ "print v_long_double - 3"
+
+gdb_test "set variable v_long_double = v_double" \
+ "" \
+ " set variable v_long_double with v_long_double"
+
+gdb_test "print v_long_double" \
+ " = 98765.43210000000544823706150054932" \
+ "print v_long_double - 4 "
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/bs15503.cc b/gdb/testsuite/gdb.hp/gdb.defects/bs15503.cc
new file mode 100644
index 00000000000..759bc0f8943
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.defects/bs15503.cc
@@ -0,0 +1,52 @@
+#include <string>
+#include <iostream.h>
+
+template <class T>
+class StringTest {
+public:
+ virtual void runTest();
+ void testFunction();
+};
+
+template <class T>
+void StringTest<T>:: runTest() {
+ testFunction ();
+}
+
+template <class T>
+void StringTest <T>::testFunction() {
+ // initialize s with string literal
+ cout << "in StringTest" << endl;
+ string s("I am a shot string");
+ cout << s << endl;
+
+ // insert 'r' to fix "shot"
+ s.insert(s.begin()+10,'r' );
+ cout << s << endl;
+
+ // concatenate another string
+ s += "and now a longer string";
+ cout << s << endl;
+
+ // find position where blank needs to be inserted
+ string::size_type spos = s.find("and");
+ s.insert(spos, " ");
+ cout << s << endl;
+
+ // erase the concatenated part
+ s.erase(spos);
+ cout << s << endl;
+}
+
+int main() {
+ StringTest<wchar_t> ts;
+ ts.runTest();
+}
+
+/* output:
+I am a shot string
+I am a short string
+I am a short stringand now a longer string
+I am a short string and now a longer string
+I am a short string
+*/
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/bs15503.exp b/gdb/testsuite/gdb.hp/gdb.defects/bs15503.exp
new file mode 100644
index 00000000000..4fafbbbde8e
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.defects/bs15503.exp
@@ -0,0 +1,76 @@
+# Copyright (C) 1992 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# Test case for CLLbs15503
+# This file was written by Sue Kimura (sue_kimura@hp.com)
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+if { [skip_hp_tests] } { continue }
+
+set testfile "bs15503"
+set srcfile ${testfile}.cc
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "debug c++"] != "" } {
+ perror "Couldn't compile ${srcfile}"
+ return -1
+}
+
+
+# Start with a fresh gdb.
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+# Load $binfile -- there should be no warnings about "Procedure ... spans
+# file or module boundaries", "No symbols in psymtab for file ..." or
+# "File ... has ending address after starting address of next file..."
+
+if [istarget "hppa2.0w-hp-hpux*" ] {
+ gdb_test "file $binfile" \
+ "Detected 64-bit executable..*Invoking .*gdb64..*Use \"run\" to continue execution." \
+ "loading $binfile"
+} else {
+ gdb_test "file $binfile" \
+ "Reading symbols from $binfile...done." \
+ "loading $binfile"
+}
+# Test setting breakpoint on template function
+#
+gdb_test "break StringTest<wchar_t>::testFunction" \
+ "Breakpoint $decimal at $hex: file .*bs15503.cc, line 19." \
+ "break point on function"
+
+gdb_test "run" \
+ "Starting program:.*Breakpoint $decimal, StringTest<wchar_t>::testFunction \\(this=$hex\\).*cout << \"in StringTest\" << endl;.*" \
+ "run to function breakpoint"
+
+#restart with fresh gdb
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load $binfile
+
+gdb_test "break 32" \
+ "Breakpoint $decimal at $hex: file .*bs15503.cc, line 32." \
+ "break point on line in function"
+
+gdb_test "run" \
+ ".*32.*string::size_type spos = s.find\\(\"and\"\\);.*" \
+ "run to break point on line in function"
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/configure b/gdb/testsuite/gdb.hp/gdb.defects/configure
new file mode 100755
index 00000000000..7d8f044d8f6
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.defects/configure
@@ -0,0 +1,899 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.12.1
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.12.1"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=bs14602.exp
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+CC=${CC-cc}
+
+ac_aux_dir=
+for ac_dir in `cd $srcdir;pwd`/../../../.. $srcdir/`cd $srcdir;pwd`/../../../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../../.. $srcdir/`cd $srcdir;pwd`/../../../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+# configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+# same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+# as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:573: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:594: checking target system type" >&5
+
+target_alias=$target
+case "$target_alias" in
+NONE)
+ case $nonopt in
+ NONE) target_alias=$host_alias ;;
+ *) target_alias=$nonopt ;;
+ esac ;;
+esac
+
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$target" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:612: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+ case $nonopt in
+ NONE) build_alias=$host_alias ;;
+ *) build_alias=$nonopt ;;
+ esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set) 2>&1 | grep ac_space` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@CC@%$CC%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/configure.in b/gdb/testsuite/gdb.hp/gdb.defects/configure.in
new file mode 100644
index 00000000000..fb886862941
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.defects/configure.in
@@ -0,0 +1,15 @@
+dnl Process this file file with autoconf to produce a configure script.
+dnl This file is a shell script fragment that supplies the information
+dnl necessary to tailor a template configure script into the configure
+dnl script appropriate for this directory. For more information, check
+dnl any existing configure script.
+
+AC_PREREQ(2.5)
+AC_INIT(bs14602.exp)
+
+CC=${CC-cc}
+AC_SUBST(CC)
+AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../../..)
+AC_CANONICAL_SYSTEM
+
+AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/solib-d.c b/gdb/testsuite/gdb.hp/gdb.defects/solib-d.c
new file mode 100644
index 00000000000..ec803fe06a5
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.defects/solib-d.c
@@ -0,0 +1,6 @@
+main()
+{
+ function_from_primary();
+ function_from_secondary();
+}
+
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/solib-d.exp b/gdb/testsuite/gdb.hp/gdb.defects/solib-d.exp
new file mode 100644
index 00000000000..81d8bdaf3fa
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.defects/solib-d.exp
@@ -0,0 +1,262 @@
+# Copyright (C) 1997 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# This file was written by srikanth (with huge chunks borrowed from old ones)
+#
+# Regression test for
+#
+# CLLbs14756
+#
+# o catch load command does not stop for implicit loads.
+#
+# CLLbs15382
+#
+# o sharedlibrary command ignores its argument and ends
+# up loading every shared library there is ...
+#
+# CLLbs15582
+#
+# o info line non-existent-function dumps core
+# o clear non-existent function dumps core
+# o xbreak non-existent-function dumps core
+#
+# CLLbs15725
+#
+# o gdb prints static and extern variables in shlibs incorrectly.
+#
+# CLLbs16090
+#
+# o deferred breakpoints should kick in for shlibs loaded explicitly
+# with the sharedlibrary command.
+# o GDB confuses export stubs with actual function.
+#
+#
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+if { [skip_hp_tests] } { continue }
+
+set prms_id 0
+set bug_id 0
+
+# are we on a target board
+if ![isnative] {
+ return
+}
+
+# This test is presently only valid on HP-UX, since it requires
+# that we use HP-UX-specific compiler & linker options to build
+# the testcase.
+#
+setup_xfail "*-*-*"
+clear_xfail "hppa*-*-*hpux*"
+
+set prototypes 0
+set testfile "solib-d"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set testfile1 ${objdir}/${subdir}/${testfile}1.o
+set testfile2 ${objdir}/${subdir}/${testfile}2.o
+set libfile1 ${objdir}/${subdir}/${testfile}1.sl
+set libfile2 ${objdir}/${subdir}/${testfile}2.sl
+
+# Build the shared libraries this test case needs.
+#
+#cd ${subdir}
+
+if { [gdb_compile "${srcdir}/${subdir}/${testfile}1.c" "${testfile1}" object {debug additional_flags=+z}] != "" } {
+ perror "Couldn't compile ${testfile}1.c"
+ return -1
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${testfile}2.c" "${testfile2}" object {debug additional_flags=+z}] != ""} {
+ perror "Couldn't compile ${testfile}2.c"
+ return -1
+}
+
+remote_exec build "ld -b ${testfile1} -o ${libfile1}"
+remote_exec build "ld -b ${testfile2} -o ${libfile2}"
+
+# Build the test case
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${libfile1} ${libfile2}" "${binfile}" executable {debug additional_flags=-Ae -Wl,-aarchive}] != "" } {
+ perror "Couldn't build ${binfile}"
+ return -1
+}
+
+# Start with a fresh gdb
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# Verify that we can set a generic catchpoint on shlib loads. I.e., that
+# we can catch any shlib load, without specifying the name.
+#
+gdb_test "catch load" "Catchpoint \[0-9\]* .load <any library>.*" \
+ "set generic catch load"
+
+# Verify that implicit shlib loads are caught and reported.
+send_gdb "run\n"
+gdb_expect {
+ -re ".*solib-d1.*$gdb_prompt $" {
+ pass "Catch implicit load at startup"
+ }
+ -re "Program exited.*$gdb_prompt $" {
+ fail "CLLbs14756 || CLLbs16090 came back ???"
+ }
+ timeout { fail "(timeout) implicit library load" }
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto_main] { fail "breakpoint at main did not trigger ?" }
+
+# verify that we print globals from shlibs correctly.
+gdb_test "p global_from_primary" " = 5678" \
+ "print global from shlib (CLLbs15725)"
+
+gdb_test "p global_from_secondary" " = 9012" \
+ "print global from shlib (CLLbs15725)"
+
+# verify that we print static variables from shlibs correctly.
+if { ![runto function_from_primary] } { return }
+gdb_test "p file_static" " = 1234" "print file static variable (CLLbs15725)"
+
+if { ![runto function_from_secondary] } { return }
+gdb_test "p local_static" " = 3456" "print local static variable (CLLbs15725)"
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "set auto-solib-add 0" "" "turn off auto shlib debug loading"
+
+if ![runto_main] {
+ perror "C function calling tests suppressed"
+}
+
+# verify that "clear non-existent-symbol" does not crash
+gdb_test "clear junkfunc" "Location not found.*" \
+ "clear non-existent function does not dump core !"
+
+# verify that "info line non-existent-symbol" does not crash
+gdb_test "info line junkfunc" "Location not found.*" \
+ "info line junkfunc does not dump core !"
+
+# verify that "xbreak non-existent-symbol" does not crash
+gdb_test "xbreak junkfunc" "Function \"junkfunc\" not defined.*" \
+ "xbreak junkfunc does not dump core !"
+
+gdb_test "list function_from_primary" \
+ "No line number known for function_from_primary.*" \
+ "turning off auto shlib debug loading"
+
+send_gdb "sharedlibrary solib-d1\n"
+gdb_expect {
+ -re "Reading symbols from.*solib-d1.*$gdb_prompt $" {
+ pass "loading primary library on demand (1)"
+ }
+ -re "--Adding symbols for shared library.*solib-d1.*$gdb_prompt $" {
+ pass "loading primary library on demand (2)"
+ }
+ -re "$gdb_prompt $" { fail "loading primary library on demand (3)" }
+ timeout { fail "(timeout) loading primary library on demand" }
+}
+
+# make sure that load above of primary also did not pull in secondary.
+send_gdb "list function_from_secondary\n"
+gdb_expect {
+ -re "No symbol.*context.*$gdb_prompt $" {
+ pass "loaded only what we needed (1)"
+ }
+ -re "No line number known for function_from_secondary.*$gdb_prompt $" {
+ pass "loaded only what we needed (2)"
+ }
+ -re ".*9012.*$gdb_prompt $" { fail "Oops ! CLLbs15382 came back ?" }
+ timeout { fail "(timeout) printing global" }
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "set auto-solib-add 0" "" "turn off auto shlib debug loading"
+
+gdb_test "set stop-on-solib-event 1" "" "stop-on-solib-event"
+
+# verify that we set breakpoint on the function and not the export stub
+# used to be that we set bp on the export stub of _start and thus miss
+# shlib loads in some cases (where the stub exists)
+send_gdb "run\n"
+gdb_expect {
+ -re "Stopped due to shared library event.*$gdb_prompt $" {
+ pass "stop for shlib event"
+ }
+ -re "Program exited.*$gdb_prompt $" {
+ fail "Bug CLLbs16090 came back ?"
+ }
+ timeout { fail "(timeout) stop for shlib event " }
+}
+
+gdb_test "b main" "Breakpoint 1 at.*" "set breakpoint on main"
+
+gdb_test "set stop-on-solib-event 0" "" "stop-on-solib-event (timeout)"
+
+# verify that we set breakpoint on the function and not the export stub
+gdb_test "cont" "Breakpoint 1.*main.*" "run to main"
+
+# On PA64 we read in the unwind info and linker symbol table which lets
+# us set the breakpoint and not defer it.
+send_gdb "b garbage\n"
+gdb_expect {
+ -re "Breakpoint.*deferred.*garbage.*library containing.*is loaded.*$gdb_prompt $" {
+ pass " set deferred breakpoint (1)"
+ }
+ -re "Breakpoint 2 at 0x.*$gdb_prompt $" {
+ pass " set deferred breakpoint (2)"
+ }
+ -re "$gdb_prompt $" { fail " set deferred breakpoint (3)" }
+ timeout { fail "(timeout) set deferred breakpoint" }
+}
+
+# make sure that the sharedlibrary command enables any deferred breakpoints
+# that it should.
+send_gdb "sharedlibrary lib\n"
+gdb_expect {
+ -re "Reading.*solib-d1.*$gdb_prompt $" {
+ pass "load up all shared libs (1)"
+ }
+ -re "Loading.*dld.sl.*--Adding symbols.*solib-d1.*$gdb_prompt $" {
+ pass "load up all shared libs (2)"
+ }
+ -re "$gdb_prompt $" { fail "load up all libraries" }
+ timeout { fail "(timeout) load all libraries " }
+}
+
+# do we stop at garbage ? If yes ok.
+gdb_test "cont" "Breakpoint.*garbage.*" "deferred breakpoint enabled"
+
+gdb_exit
+return 0
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/solib-d1.c b/gdb/testsuite/gdb.hp/gdb.defects/solib-d1.c
new file mode 100644
index 00000000000..b6da64d21d2
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.defects/solib-d1.c
@@ -0,0 +1,12 @@
+static int file_static = 1234;
+int global_from_primary = 5678;
+
+int function_from_primary()
+{
+ garbage();
+}
+
+force_generation_of_export_stub()
+{
+ _start(); /* force main module to have an export stub for _start() */
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/solib-d2.c b/gdb/testsuite/gdb.hp/gdb.defects/solib-d2.c
new file mode 100644
index 00000000000..024616baf28
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.defects/solib-d2.c
@@ -0,0 +1,11 @@
+int global_from_secondary = 9012;
+int function_from_secondary()
+{
+ static int local_static = 3456;
+ return 0;
+}
+
+garbage()
+{
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/Makefile.in b/gdb/testsuite/gdb.hp/gdb.objdbg/Makefile.in
new file mode 100644
index 00000000000..5411c46fc55
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/Makefile.in
@@ -0,0 +1,28 @@
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+EXECUTABLES = objdbg01/test0 objdbg01/test1 objdbg02/test \
+ objdbg03/test objdbg04/test0 objdbg04/test1
+
+all:
+ @echo "Nothing to be done for all..."
+
+info:
+install-info:
+dvi:
+install:
+uninstall: force
+installcheck:
+check:
+
+clean mostlyclean:
+ -rm -f *~ objdbg*/*.o objdbg*/*.ci
+ -rm -f core $(EXECUTABLES)
+
+distclean maintainer-clean realclean: clean
+ -rm -f Makefile config.status config.log
+ -rm -f *-init.exp
+ -rm -fr *.log summary detail *.plog *.sum *.psum site.*
+
+Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in
+ $(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/configure b/gdb/testsuite/gdb.hp/gdb.objdbg/configure
new file mode 100755
index 00000000000..123ca4e3e73
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/configure
@@ -0,0 +1,992 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.12.1
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.12.1"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=objdbg01.exp
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+CC=${CC-cc}
+
+ac_aux_dir=
+for ac_dir in `cd $srcdir;pwd`/../../../.. $srcdir/`cd $srcdir;pwd`/../../../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../../.. $srcdir/`cd $srcdir;pwd`/../../../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+# configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+# same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+# as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:573: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:594: checking target system type" >&5
+
+target_alias=$target
+case "$target_alias" in
+NONE)
+ case $nonopt in
+ NONE) target_alias=$host_alias ;;
+ *) target_alias=$nonopt ;;
+ esac ;;
+esac
+
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$target" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:612: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+ case $nonopt in
+ NONE) build_alias=$host_alias ;;
+ *) build_alias=$nonopt ;;
+ esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+subdirs="objdbg01 objdbg02 objdbg03 objdbg04"
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set) 2>&1 | grep ac_space` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@CC@%$CC%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
+if test "$no_recursion" != yes; then
+
+ # Remove --cache-file and --srcdir arguments so they do not pile up.
+ ac_sub_configure_args=
+ ac_prev=
+ for ac_arg in $ac_configure_args; do
+ if test -n "$ac_prev"; then
+ ac_prev=
+ continue
+ fi
+ case "$ac_arg" in
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ ;;
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ ;;
+ *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
+ esac
+ done
+
+ for ac_config_dir in objdbg01 objdbg02 objdbg03 objdbg04; do
+
+ # Do not complain, so a configure script can configure whichever
+ # parts of a large source tree are present.
+ if test ! -d $srcdir/$ac_config_dir; then
+ continue
+ fi
+
+ echo configuring in $ac_config_dir
+
+ case "$srcdir" in
+ .) ;;
+ *)
+ if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
+ else
+ { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
+ fi
+ ;;
+ esac
+
+ ac_popdir=`pwd`
+ cd $ac_config_dir
+
+ # A "../" for each directory in /$ac_config_dir.
+ ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
+
+ case "$srcdir" in
+ .) # No --srcdir option. We are building in place.
+ ac_sub_srcdir=$srcdir ;;
+ /*) # Absolute path.
+ ac_sub_srcdir=$srcdir/$ac_config_dir ;;
+ *) # Relative path.
+ ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
+ esac
+
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_sub_srcdir/configure; then
+ ac_sub_configure=$ac_sub_srcdir/configure
+ elif test -f $ac_sub_srcdir/configure.in; then
+ ac_sub_configure=$ac_configure
+ else
+ echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
+ ac_sub_configure=
+ fi
+
+ # The recursion is here.
+ if test -n "$ac_sub_configure"; then
+
+ # Make the cache file name correct relative to the subdirectory.
+ case "$cache_file" in
+ /*) ac_sub_cache_file=$cache_file ;;
+ *) # Relative path.
+ ac_sub_cache_file="$ac_dots$cache_file" ;;
+ esac
+
+ echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
+ # The eval makes quoting arguments work.
+ if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
+ then :
+ else
+ { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
+ fi
+ fi
+
+ cd $ac_popdir
+ done
+fi
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/configure.in b/gdb/testsuite/gdb.hp/gdb.objdbg/configure.in
new file mode 100644
index 00000000000..811f37e0975
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/configure.in
@@ -0,0 +1,16 @@
+dnl Process this file file with autoconf to produce a configure script.
+dnl This file is a shell script fragment that supplies the information
+dnl necessary to tailor a template configure script into the configure
+dnl script appropriate for this directory. For more information, check
+dnl any existing configure script.
+
+AC_PREREQ(2.5)
+AC_INIT(objdbg01.exp)
+
+CC=${CC-cc}
+AC_SUBST(CC)
+AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../../..)
+AC_CANONICAL_SYSTEM
+AC_CONFIG_SUBDIRS(objdbg01 objdbg02 objdbg03 objdbg04)
+
+AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01.exp b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01.exp
new file mode 100644
index 00000000000..64b49f7435f
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01.exp
@@ -0,0 +1,212 @@
+# Test reading debug information from in object files.
+
+if { [skip_hp_tests] } { continue }
+
+if { ![istarget "hppa*-*-hpux*"] } {
+ verbose "HPUX test ignored for non-hppa targets."
+ return 0
+}
+
+set testfile "test"
+set srcsubdir ${srcdir}/${subdir}/objdbg01
+set toolssubdir ${srcdir}/${subdir}/tools
+set objdbgdir ${objdir}/${subdir}/objdbg01
+set binfile ${objdbgdir}/${testfile}
+set symaddrfile ${toolssubdir}/symaddr
+
+if { [gdb_compile "${toolssubdir}/test-objdbg.cc" "${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdir} +objdebug}"] != "" } {
+ gdb_suppress_entire_file "WARNING: +objdebug option is not supported in this compiler version, test ignored."
+}
+
+if { [gdb_compile "${srcsubdir}/x1.cc" "${objdbgdir}/x1.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
+ perror "Couldn't compile x1.cc"
+ return -1
+}
+
+if { [gdb_compile "${srcsubdir}/x2.cc" "${objdbgdir}/x2.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
+ perror "Couldn't compile x2.cc"
+ return -1
+}
+
+if { [gdb_compile "${srcsubdir}/x3.cc" "${objdbgdir}/x3.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
+ perror "Couldn't compile x3.cc"
+ return -1
+}
+
+if { [gdb_compile "${objdbgdir}/x1.o ${objdbgdir}/x2.o ${objdbgdir}/x3.o" "${binfile}0" executable "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
+ perror "Couldn't compile ${binfile}0"
+ return -1
+}
+
+if {[gdb_compile "${objdbgdir}/x3.o ${objdbgdir}/x2.o ${objdbgdir}/x1.o" "${binfile}1" executable "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
+ perror "Couldn't compile ${binfile}1"
+ return -1
+}
+
+# Test two executables. The first has x1.cc linked first, the second
+# has x3.cc linked first. The difference is that in the first one,
+# the Info<PP> instantiation from x1.cc is taken, in the second, its
+# from x3.cc.
+
+for {set filenum 0} {$filenum < 2} {incr filenum 1} {
+
+ # Lets test some commons
+ # Need to restart each to to make sure objects are not loaded
+ # Also cross check the address with what is actually in the
+ # object file (call the executable ${symaddrfile} to retrieve the
+ # information).
+
+ set exec_output [lindex [remote_exec build "${symaddrfile} ${binfile}${filenum} acomm"] 1]
+ regsub -all "\[\r\n\]" ${exec_output} "" exec_output
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir ${srcsubdir}
+ gdb_load ${binfile}${filenum}
+ gdb_test "p &acomm" "..* = \\(int \[*\]\\) 0x${exec_output}.*"
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir ${srcsubdir}
+ gdb_load ${binfile}${filenum}
+ gdb_test "b main" "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file ..*/x1.cc, line 20."
+ gdb_test "run" "Starting program:.*Breakpoint \[0-9\]+, main .*/x1.cc:20.*20.*acomm.*=.*1.*"
+ gdb_test "s 1" "21.*"
+ gdb_test "p acomm" ".* = 1.*"
+ gdb_test "p &acomm" "..* = \\(int \[*\]\\) 0x${exec_output}.*"
+
+ # Step through each line.
+ # Do this three times.
+ # First round: Test that things are okay after printing commons
+ # above.
+ # Second round: Restart gdb and make sure we can walk through
+ # Third round: Do NOT restrart gdb to verify that the debug information
+ # was not messed up by loading additional object files from
+ # the first run through.
+ for {set i 0} {$i < 3} {incr i 1} {
+ if $i==1 then {
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir ${srcsubdir}
+ gdb_load ${binfile}${filenum}
+ }
+ if $i!=2 then {
+ gdb_test "b main" \
+ "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file ..*/x1.cc, line 20."
+ }
+ if $i!=0 then {
+ gdb_test "run" \
+ "Starting program:.*Breakpoint \[0-9\]+, main .*/x1.cc:20.*"
+ gdb_test "s 1" "21.*"
+ }
+ gdb_test "s 1" "Info<PP>::p .*/x3.h:11.*"
+ gdb_test "s 1" "PP::print .*/x2.cc:8.*"
+ gdb_test "s 1" ".*9.*"
+ gdb_test "s 1" "Info<PP>::p .*/x3.h:12.*"
+ gdb_test "s 1" "main .*/x1.cc:22.*"
+ gdb_test "s 1" "foo .*/x3.cc:5.*"
+ gdb_test "s 1" "Info<PP>::p .*/x3.h:11.*"
+ gdb_test "s 1" "PP::print .*/x2.cc:8.*"
+ gdb_test "s 1" ".*9.*"
+ gdb_test "s 1" "Info<PP>::p .*/x3.h:12.*"
+ gdb_test "s 1" "foo .*/x3.cc:6.*"
+ gdb_test "s 1" "Info<QQ>::p .*/x3.h:11.*"
+ gdb_test "s 1" "QQ::print .*/x2.cc:13.*"
+ gdb_test "s 1" ".*14.*"
+ gdb_test "s 1" "Info<QQ>::p .*/x3.h:12.*"
+ gdb_test "s 1" "foo .*/x3.cc:7.*"
+ gdb_test "s 1" "main .*/x1.cc:24.*"
+ gdb_test "s 1" ".*25.*"
+ if [istarget "hppa2.0w-*-*"] {
+ gdb_test "s 1" "0x\[0-9a-f\]+ in .*"
+ gdb_test "c" ".*Program exited normally.*"
+ } else {
+ gdb_test "s 1" "0x\[0-9a-f\]+ in _start .*"
+ gdb_test "s 1" ".*Program exited normally.*"
+ }
+ }
+
+ # Test various ptypes, and combinations of them
+ # Test things multiple times in each set to make sure that the debug
+ # information did not get messed up.
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir ${srcsubdir}
+ gdb_load ${binfile}${filenum}
+ gdb_test "ptype QQ" "type = (class |)QQ {..*void print( |)..*}.*"
+ gdb_test "ptype PP" "type = (class |)PP {..*void print( |)..*}.*"
+ gdb_test "ptype QQ" "type = (class |)QQ {..*void print( |)..*}.*"
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir ${srcsubdir}
+ gdb_load ${binfile}${filenum}
+ gdb_test "ptype PP" "type = (class |)PP {..*void print( |)..*}.*"
+ gdb_test "ptype QQ" "type = (class |)QQ {..*void print( |)..*}.*"
+ gdb_test "ptype PP" "type = (class |)PP {..*void print( |)..*}.*"
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir ${srcsubdir}
+ gdb_load ${binfile}${filenum}
+ gdb_test "ptype Info<QQ>" "type = (class |)Info<QQ> {..*void p( |)..*}.*"
+ gdb_test "ptype Info<PP>" "type = (class |)Info<PP> {..*void p( |)..*}.*"
+ gdb_test "ptype Info<QQ>" "type = (class |)Info<QQ> {..*void p( |)..*}.*"
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir ${srcsubdir}
+ gdb_load ${binfile}${filenum}
+ gdb_test "ptype Info<PP>" "type = (class |)Info<PP> {..*void p( |)..*}.*"
+ gdb_test "ptype Info<QQ>" "type = (class |)Info<QQ> {..*void p( |)..*}.*"
+ gdb_test "ptype Info<PP>" "type = (class |)Info<PP> {..*void p( |)..*}.*"
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir ${srcsubdir}
+ gdb_load ${binfile}${filenum}
+ gdb_test "ptype Info" "type = template <..*> (class |)Info {..*}.*"
+ gdb_test "ptype Info<PP>" "type = (class |)Info<PP> {..*void p( |)..*}.*"
+ gdb_test "ptype Info<QQ>" "type = (class |)Info<QQ> {..*void p( |)..*}.*"
+ gdb_test "ptype Info" "type = template <..*> (class |)Info {..*}.*"
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir ${srcsubdir}
+ gdb_load ${binfile}${filenum}
+ gdb_test "ptype class QQ" "type = (class |)QQ {..*void print( |)..*}.*"
+ gdb_test "ptype class PP" "type = (class |)PP {..*void print( |)..*}.*"
+ gdb_test "ptype class QQ" "type = (class |)QQ {..*void print( |)..*}.*"
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir ${srcsubdir}
+ gdb_load ${binfile}${filenum}
+ gdb_test "ptype class PP" "type = (class |)PP {..*void print( |)..*}.*"
+ gdb_test "ptype class QQ" "type = (class |)QQ {..*void print( |)..*}.*"
+ gdb_test "ptype class PP" "type = (class |)PP {..*void print( |)..*}.*"
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir ${srcsubdir}
+ gdb_load ${binfile}${filenum}
+ gdb_test "ptype class Info<QQ>" \
+ "type = (class |)Info<QQ> {..*void p( |)..*}.*"
+ gdb_test "ptype class Info<PP>" \
+ "type = (class |)Info<PP> {..*void p( |)..*}.*"
+ gdb_test "ptype class Info<QQ>" \
+ "type = (class |)Info<QQ> {..*void p( |)..*}.*"
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir ${srcsubdir}
+ gdb_load ${binfile}${filenum}
+ gdb_test "ptype class Info<PP>" \
+ "type = (class |)Info<PP> {..*void p( |)..*}.*"
+ gdb_test "ptype class Info<QQ>" \
+ "type = (class |)Info<QQ> {..*void p( |)..*}.*"
+ gdb_test "ptype class Info<PP>" \
+ "type = (class |)Info<PP> {..*void p( |)..*}.*"
+}
+
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x1.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x1.cc
new file mode 100644
index 00000000000..0de3153d9cc
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x1.cc
@@ -0,0 +1,25 @@
+#include <stdio.h>
+#include "x3.h"
+
+extern void foo();
+
+extern int acomm;
+
+int main3()
+{
+ return 1;
+}
+
+int main2()
+{
+ return 0;
+}
+
+int main()
+{
+ acomm = 1;
+ (new Info<PP>)->p(new PP);
+ foo();
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x2.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x2.cc
new file mode 100644
index 00000000000..af588fbc00a
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x2.cc
@@ -0,0 +1,14 @@
+#include "x3.h"
+#include <stdio.h>
+
+int acomm;
+
+void PP::print()
+{
+ printf("In PP::print()\n");
+}
+
+void QQ::print()
+{
+ printf("In QQ::print()\n");
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x3.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x3.cc
new file mode 100644
index 00000000000..88fe5453ec6
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x3.cc
@@ -0,0 +1,7 @@
+#include "x3.h"
+
+void foo()
+{
+ (new Info<PP>)->p(new PP);
+ (new Info<QQ>)->p(new QQ);
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x3.h b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x3.h
new file mode 100644
index 00000000000..d03a5503c5e
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x3.h
@@ -0,0 +1,22 @@
+
+template <class T>
+class Info {
+public:
+ void p(T *x);
+};
+
+template <class T>
+void Info<T>::p(T *x)
+{
+ x->print();
+}
+
+class PP {
+public:
+ void print();
+};
+
+class QQ {
+public:
+ void print();
+};
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02.exp b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02.exp
new file mode 100644
index 00000000000..288a9c2733d
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02.exp
@@ -0,0 +1,75 @@
+# Test reading debug information from in object files.
+
+if { [skip_hp_tests] } { continue }
+
+if { ![istarget "hppa*-*-hpux*"] } {
+ verbose "HPUX test ignored for non-hppa targets."
+ return 0
+}
+
+set testfile "test"
+set srcsubdir ${srcdir}/${subdir}/objdbg02
+set objdbgdir ${objdir}/${subdir}/objdbg02
+set binfile ${objdbgdir}/${testfile}
+set toolssubdir ${srcdir}/${subdir}/tools
+
+if { [gdb_compile "${toolssubdir}/test-objdbg.cc" "${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdir} +objdebug}"] != "" } {
+ gdb_suppress_entire_file "WARNING: +objdebug option is not supported in this compiler version, test ignored."
+}
+
+if { [gdb_compile "${srcsubdir}/x1.cc" "${objdbgdir}/x1.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
+ perror "Couldn't compile x1.cc"
+ return -1
+}
+
+if { [gdb_compile "${srcsubdir}/x2.cc" "${objdbgdir}/x2.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
+ perror "Couldn't compile x2.cc"
+ return -1
+}
+
+if { [gdb_compile "${srcsubdir}/x3.cc" "${objdbgdir}/x3.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
+ perror "Couldn't compile x3.cc"
+ return -1
+}
+
+remote_exec build "rm -f ${objdbgdir}/test.a"
+set status [remote_exec build "ar cr ${objdbgdir}/test.a ${objdbgdir}/x2.o ${objdbgdir}/x3.o"]
+if { [lindex $status 0] != 0 } {
+ perror "Couldn't compile test.a"
+ return -1
+}
+remote_exec build "rm -f ${objdbgdir}/x2.o ${objdbgdir}/x3.o"
+
+if { [gdb_compile "${objdbgdir}/x1.o ${objdbgdir}/test.a" "$binfile" executable "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
+ perror "Couldn't compile ${binfile}"
+ return -1
+}
+
+# Test loading debug information from an archive file
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir ${srcsubdir}
+gdb_load ${binfile}
+
+gdb_test "b main" "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file ..*/x1.cc, line 12."
+gdb_test "run" "Starting program:.*Breakpoint \[0-9\]+, main .*/x1.cc:12.*"
+gdb_test "s 1" ".*13.*"
+gdb_test "s 1" "foo1 .*/x2.cc:15.*"
+gdb_test "s 1" ".*16.*"
+gdb_test "s 1" "foo2 .*/x2.cc:10.*"
+gdb_test "s 1" ".*11.*"
+gdb_test "s 1" "foo1 .*/x2.cc:17.*"
+gdb_test "s 1" "main .*/x1.cc:14.*"
+gdb_test "s 1" "foo3 .*/x3.cc:5.*"
+gdb_test "s 1" ".*6.*"
+gdb_test "s 1" "main .*/x1.cc:15.*"
+gdb_test "s 1" ".*16.*"
+if [istarget "hppa2.0w-*-*"] {
+ gdb_test "s 1" "0x\[0-9a-f\]+ in .*START.*"
+ gdb_test "c" ".*Program exited normally.*"
+} else {
+ gdb_test "s 1" "0x\[0-9a-f\]+ in _start .*"
+ gdb_test "s 1" ".*Program exited normally.*"
+}
+
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x1.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x1.cc
new file mode 100644
index 00000000000..7ec0cf18405
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x1.cc
@@ -0,0 +1,16 @@
+#include <stdio.h>
+
+extern void foo1();
+extern void foo3();
+
+struct foo_type;
+
+int main()
+{
+ struct foo_type *x;
+
+ printf("In main.\n");
+ foo1();
+ foo3();
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x2.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x2.cc
new file mode 100644
index 00000000000..627f02d2baf
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x2.cc
@@ -0,0 +1,17 @@
+#include <stdio.h>
+
+struct foo_type {
+ int t1;
+ int t2;
+};
+
+static void foo2()
+{
+ printf("In foo2.\n");
+}
+
+void foo1()
+{
+ printf("In foo1.\n");
+ foo2();
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x3.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x3.cc
new file mode 100644
index 00000000000..d03ea5146a9
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x3.cc
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+void foo3()
+{
+ printf("In foo3.\n");
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03.exp b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03.exp
new file mode 100644
index 00000000000..d0993a5773c
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03.exp
@@ -0,0 +1,154 @@
+# Test reading debug information from in object files.
+
+if { [skip_hp_tests] } { continue }
+
+if { ![istarget "hppa*-*-hpux*"] } {
+ verbose "HPUX test ignored for non-hppa targets."
+ return 0
+}
+
+set testfile "test"
+set srcsubdir ${srcdir}/${subdir}/objdbg03
+set objdbgdir ${objdir}/${subdir}/objdbg03
+set binfile ${objdbgdir}/${testfile}
+set toolssubdir ${srcdir}/${subdir}/tools
+if [istarget "hppa2.0w-*-*"] {
+ set symaddrfile ${toolssubdir}/symaddr.pa64
+} else {
+ set symaddrfile ${toolssubdir}/symaddr
+}
+
+if { [gdb_compile "${toolssubdir}/test-objdbg.cc" "${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdir} +objdebug}"] != "" } {
+ gdb_suppress_entire_file "WARNING: +objdebug option is not supported in this compiler version, test ignored."
+}
+
+if { [gdb_compile "${srcsubdir}/x1.cc" "${objdbgdir}/x1.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
+ perror "Couldn't compile x1.cc"
+ return -1
+}
+
+if { [gdb_compile "${srcsubdir}/x2.cc" "${objdbgdir}/x2.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
+ perror "Couldn't compile x2.cc"
+ return -1
+}
+
+if { [gdb_compile "${srcsubdir}/x3.cc" "${objdbgdir}/x3.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
+ perror "Couldn't compile x3.cc"
+ return -1
+}
+
+if { [gdb_compile "${objdbgdir}/x1.o ${objdbgdir}/x2.o ${objdbgdir}/x3.o" "${binfile}" executable "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
+ perror "Couldn't compile ${binfile}"
+ return -1
+}
+
+#
+# Test some normal commons
+#
+
+# Print the types
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir ${srcsubdir}
+gdb_load ${binfile}
+
+gdb_test "ptype common1" "type = int"
+gdb_test "ptype common2" "type = int"
+gdb_test "ptype common3" "type = int"
+gdb_test "ptype data1" "type = int"
+gdb_test "ptype data2" "type = int"
+gdb_test "ptype data3" "type = int"
+gdb_test "ptype common11" "type = int"
+gdb_test "ptype common10" "type = int"
+gdb_test "ptype data10" "type = int"
+gdb_test "ptype data11" "type = int"
+
+# Print the values
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir ${srcsubdir}
+gdb_load ${binfile}
+
+gdb_test "b main" "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file ..*/x1.cc, line 11."
+gdb_test "run" "Starting program:.*Breakpoint \[0-9\]+, main .*/x1.cc:11.*"
+gdb_test "p data1" "..* = 1"
+gdb_test "p data2" "..* = 2"
+gdb_test "p data3" "..* = 3"
+gdb_test "p data10" "..* = 10"
+gdb_test "p data11" "..* = 11"
+gdb_test "n" ".*12.*"
+gdb_test "p common11" "..* = 11"
+
+gdb_test "s 1" "foo .*/x3.cc:15.*"
+gdb_test "s 4" ".*20.*"
+gdb_test "p data4" "..* = 4"
+gdb_test "p common4" "..* = 4"
+gdb_test "n" ".*21.*"
+
+gdb_test "n" "main .*/x1.cc:14.*"
+gdb_test "p common1" "..* = 1"
+gdb_test "p common2" "..* = 2"
+gdb_test "p common3" "..* = 3"
+
+# Verify that addresses match those in the executable
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir ${srcsubdir}
+gdb_load ${binfile}
+
+set exec_output_data1 [lindex [remote_exec build "${symaddrfile} ${binfile} data1"] 1]
+regsub -all "\[\r\n\]" ${exec_output_data1} "" exec_output_data1
+
+set exec_output_data2 [lindex [remote_exec build "${symaddrfile} ${binfile} data2"] 1]
+regsub -all "\[\r\n\]" ${exec_output_data2} "" exec_output_data2
+
+set exec_output_data3 [lindex [remote_exec build "${symaddrfile} ${binfile} data3"] 1]
+regsub -all "\[\r\n\]" ${exec_output_data3} "" exec_output_data3
+
+set exec_output_data10 [lindex [remote_exec build "${symaddrfile} ${binfile} data10"] 1]
+regsub -all "\[\r\n\]" ${exec_output_data10} "" exec_output_data10
+
+set exec_output_data11 [lindex [remote_exec build "${symaddrfile} ${binfile} data11"] 1]
+regsub -all "\[\r\n\]" ${exec_output_data11} "" exec_output_data11
+
+set exec_output_common1 [lindex [remote_exec build "${symaddrfile} ${binfile} common1"] 1]
+regsub -all "\[\r\n\]" ${exec_output_common1} "" exec_output_common1
+
+set exec_output_common2 [lindex [remote_exec build "${symaddrfile} ${binfile} common2"] 1]
+regsub -all "\[\r\n\]" ${exec_output_common2} "" exec_output_common2
+
+set exec_output_common3 [lindex [remote_exec build "${symaddrfile} ${binfile} common3"] 1]
+regsub -all "\[\r\n\]" ${exec_output_common3} "" exec_output_common3
+
+set exec_output_common10 [lindex [remote_exec build "${symaddrfile} ${binfile} common10"] 1]
+regsub -all "\[\r\n\]" ${exec_output_common10} "" exec_output_common10
+
+set exec_output_common11 [lindex [remote_exec build "${symaddrfile} ${binfile} common11"] 1]
+regsub -all "\[\r\n\]" ${exec_output_common11} "" exec_output_common11
+
+if [istarget "hppa2.0w-*-*"] {
+ gdb_test "p &data1" "..* = \\(int \[*\]\\) ${exec_output_data1}"
+ gdb_test "p &data2" "..* = \\(int \[*\]\\) ${exec_output_data2}"
+ gdb_test "p &data3" "..* = \\(int \[*\]\\) ${exec_output_data3}"
+ gdb_test "p &data10" "..* = \\(int \[*\]\\) ${exec_output_data10}"
+ gdb_test "p &data11" "..* = \\(int \[*\]\\) ${exec_output_data11}"
+ gdb_test "p &common1" "..* = \\(int \[*\]\\) ${exec_output_common1}"
+ gdb_test "p &common2" "..* = \\(int \[*\]\\) ${exec_output_common2}"
+ gdb_test "p &common3" "..* = \\(int \[*\]\\) ${exec_output_common3}"
+ gdb_test "p &common10" "..* = \\(int \[*\]\\) ${exec_output_common10}"
+ gdb_test "p &common11" "..* = \\(int \[*\]\\) ${exec_output_common11}"
+} else {
+ gdb_test "p &data1" "..* = \\(int \[*\]\\) 0x${exec_output_data1}"
+ gdb_test "p &data2" "..* = \\(int \[*\]\\) 0x${exec_output_data2}"
+ gdb_test "p &data3" "..* = \\(int \[*\]\\) 0x${exec_output_data3}"
+ gdb_test "p &data10" "..* = \\(int \[*\]\\) 0x${exec_output_data10}"
+ gdb_test "p &data11" "..* = \\(int \[*\]\\) 0x${exec_output_data11}"
+ gdb_test "p &common1" "..* = \\(int \[*\]\\) 0x${exec_output_common1}"
+ gdb_test "p &common2" "..* = \\(int \[*\]\\) 0x${exec_output_common2}"
+ gdb_test "p &common3" "..* = \\(int \[*\]\\) 0x${exec_output_common3}"
+ gdb_test "p &common10" "..* = \\(int \[*\]\\) 0x${exec_output_common10}"
+ gdb_test "p &common11" "..* = \\(int \[*\]\\) 0x${exec_output_common11}"
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x1.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x1.cc
new file mode 100644
index 00000000000..84231b08bea
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x1.cc
@@ -0,0 +1,15 @@
+#include <stdio.h>
+
+extern int foo();
+extern int common3;
+extern int data3;
+extern int common11;
+extern int data11;
+
+int main()
+{
+ common11 = 11;
+ printf("In main: %d %d %d\n", data3, common3, foo(), common11, data11);
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x2.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x2.cc
new file mode 100644
index 00000000000..165cb85d2e3
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x2.cc
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int common10;
+int common11;
+
+int data10 = 10;
+int data11 = 11;
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x3.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x3.cc
new file mode 100644
index 00000000000..80d38c75e38
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x3.cc
@@ -0,0 +1,21 @@
+#include <stdio.h>
+
+int common1;
+int common2;
+int common3;
+static int common4;
+
+int data1 = 1;
+int data2 = 2;
+int data3 = 3;
+static int data4 = 4;
+
+int foo()
+{
+ common1 = 1;
+ common2 = 2;
+ common3 = 3;
+ common4 = 4;
+
+ return data1 + data2 + data3 + data4 + common1 + common2 + common3 + common4;
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04.exp b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04.exp
new file mode 100644
index 00000000000..f6782745619
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04.exp
@@ -0,0 +1,55 @@
+# Test reading debug information from in object files.
+
+if { [skip_hp_tests] } { continue }
+
+if { ![istarget "hppa*-*-hpux*"] } {
+ verbose "HPUX test ignored for non-hppa targets."
+ return 0
+}
+
+set testfile "test"
+set srcsubdir ${srcdir}/${subdir}/objdbg04
+set objdbgdir ${objdir}/${subdir}/objdbg04
+set binfile ${objdbgdir}/${testfile}
+set toolssubdir ${srcdir}/${subdir}/tools
+set symaddrfile ${toolssubdir}/symaddr
+
+if { [gdb_compile "${toolssubdir}/test-objdbg.cc" "${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdir} +objdebug}"] != "" } {
+ gdb_suppress_entire_file "WARNING: +objdebug option is not supported in this compiler version, test ignored."
+}
+
+if { [gdb_compile "${srcsubdir}/x1.cc" "${objdbgdir}/x1.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
+ perror "Couldn't compile x1.cc"
+ return -1
+}
+
+if { [gdb_compile "${srcsubdir}/x2.cc" "${objdbgdir}/x2.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
+ perror "Couldn't compile x2.cc"
+ return -1
+}
+
+if { [gdb_compile "${objdbgdir}/x1.o ${objdbgdir}/x2.o" "${binfile}0" executable "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
+ perror "Couldn't compile x1.cc"
+ return -1
+}
+
+if { [gdb_compile "${objdbgdir}/x2.o ${objdbgdir}/x1.o" "${binfile}1" executable "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
+ perror "Couldn't compile x1.cc"
+ return -1
+}
+
+# Test two executables. The first has x1.cc linked first, the second
+# has x2.cc linked first. The difference is which COMDAT section was
+# picked.
+
+for {set filenum 0} {$filenum < 2} {incr filenum 1} {
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir ${srcsubdir}
+ gdb_load ${binfile}${filenum}
+
+ gdb_test "ptype Adder" "type = template <class T> (class |)Adder {..*T val.*;.*}(.*template instantiations:.*Adder<int>|)"
+ gdb_test "ptype Adder<int>" "type = (class |)Adder<int> {.*private:.*int val;.*public:.*void set( |)\\(int\\);.*int get( |)\\(void\\);.*int add( |)\\(int\\);.*}"
+ gdb_test "ptype Adder" "type = template <class T> (class |)Adder {..*T val.*;.*}(.*template instantiations:.*Adder<int>|)"
+
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x.h b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x.h
new file mode 100644
index 00000000000..9df8ef98556
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x.h
@@ -0,0 +1,30 @@
+template <class T>
+class Adder {
+public:
+ void set(T);
+ T get();
+ T add(T);
+
+private:
+ T val;
+};
+
+template <class T>
+void Adder<T>::set(T new_val)
+{
+ val = new_val;
+}
+
+template <class T>
+T Adder<T>::get()
+{
+ return val;
+}
+
+template <class T>
+T Adder<T>::add(T new_val)
+{
+ val += new_val;
+ return val;
+}
+
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x1.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x1.cc
new file mode 100644
index 00000000000..1f284b2ab0e
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x1.cc
@@ -0,0 +1,15 @@
+#include <stdio.h>
+#include "x.h"
+
+template class Adder<int>;
+
+int main()
+{
+ Adder<int> add;
+
+ add.set(3);
+ add.add(3);
+ printf("In main: %d\n", add.get());
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x2.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x2.cc
new file mode 100644
index 00000000000..29eea75d233
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x2.cc
@@ -0,0 +1,3 @@
+#include "x.h"
+
+template class Adder<int>;
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/tools/symaddr b/gdb/testsuite/gdb.hp/gdb.objdbg/tools/symaddr
new file mode 100755
index 00000000000..032bb9fdd7e
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/tools/symaddr
@@ -0,0 +1,8 @@
+#!/bin/ksh
+
+# Get the address of a symbol in Hex.
+# $1 = object/executable file name
+# $2 = symbol name
+${srcdir}/gdb.hp/tools/odump -sym "$1" | grep "$2"$ | awk '{print $1}'
+
+exit 0
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/tools/symaddr.pa64 b/gdb/testsuite/gdb.hp/gdb.objdbg/tools/symaddr.pa64
new file mode 100755
index 00000000000..43fd793c5d9
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/tools/symaddr.pa64
@@ -0,0 +1,8 @@
+#!/bin/ksh
+
+# Get the address of a symbol in Hex.
+# $1 = object/executable file name
+# $2 = symbol name
+/usr/ccs/bin/elfdump -t +s .symtab "$1" | grep "$2"$ | awk '{print $6}'
+
+exit 0
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/tools/test-objdbg.cc b/gdb/testsuite/gdb.hp/gdb.objdbg/tools/test-objdbg.cc
new file mode 100644
index 00000000000..f8b643afbf2
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/tools/test-objdbg.cc
@@ -0,0 +1,4 @@
+int main()
+{
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.threads-hp/Makefile.in b/gdb/testsuite/gdb.hp/gdb.threads-hp/Makefile.in
new file mode 100644
index 00000000000..240b627a2d2
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.threads-hp/Makefile.in
@@ -0,0 +1,27 @@
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+EXECUTABLES = usrthbasic usrthcore usrthfork
+
+all:
+ @echo "Nothing to be done for all..."
+
+info:
+install-info:
+dvi:
+install:
+uninstall: force
+installcheck:
+check:
+
+clean mostlyclean:
+ -rm -f *~ *.o *.ci
+ -rm -f core $(EXECUTABLES)
+
+distclean maintainer-clean realclean: clean
+ -rm -f Makefile config.status config.log
+ -rm -f *-init.exp
+ -rm -fr *.log summary detail *.plog *.sum *.psum site.*
+
+Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in
+ $(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.hp/gdb.threads-hp/configure b/gdb/testsuite/gdb.hp/gdb.threads-hp/configure
new file mode 100755
index 00000000000..90fa7554234
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.threads-hp/configure
@@ -0,0 +1,899 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.12.1
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.12.1"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=usrthbasic.exp
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+CC=${CC-cc}
+
+ac_aux_dir=
+for ac_dir in `cd $srcdir;pwd`/../../../.. $srcdir/`cd $srcdir;pwd`/../../../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../../.. $srcdir/`cd $srcdir;pwd`/../../../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+# configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+# same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+# as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:573: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:594: checking target system type" >&5
+
+target_alias=$target
+case "$target_alias" in
+NONE)
+ case $nonopt in
+ NONE) target_alias=$host_alias ;;
+ *) target_alias=$nonopt ;;
+ esac ;;
+esac
+
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$target" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:612: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+ case $nonopt in
+ NONE) build_alias=$host_alias ;;
+ *) build_alias=$nonopt ;;
+ esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set) 2>&1 | grep ac_space` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@CC@%$CC%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/gdb/testsuite/gdb.hp/gdb.threads-hp/configure.in b/gdb/testsuite/gdb.hp/gdb.threads-hp/configure.in
new file mode 100644
index 00000000000..87fd81b51c8
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.threads-hp/configure.in
@@ -0,0 +1,15 @@
+dnl Process this file file with autoconf to produce a configure script.
+dnl This file is a shell script fragment that supplies the information
+dnl necessary to tailor a template configure script into the configure
+dnl script appropriate for this directory. For more information, check
+dnl any existing configure script.
+
+AC_PREREQ(2.5)
+AC_INIT(usrthbasic.exp)
+
+CC=${CC-cc}
+AC_SUBST(CC)
+AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../../..)
+AC_CANONICAL_SYSTEM
+
+AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.hp/gdb.threads-hp/usrthbasic.c b/gdb/testsuite/gdb.hp/gdb.threads-hp/usrthbasic.c
new file mode 100644
index 00000000000..6fed355ef9d
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.threads-hp/usrthbasic.c
@@ -0,0 +1,171 @@
+#include <stdio.h>
+
+/* #include "config.h" */
+#define HAVE_PTHREAD_H
+#define __hpux__
+#define __osf__
+
+#ifndef HAVE_PTHREAD_H
+
+/* Don't even try to compile. In fact, cause a syntax error that we can
+ look for as a compiler error message and know that we have no pthread
+ support. In that case we can just suppress the test completely. */
+
+#error "no posix threads support"
+
+#else
+
+/* OK. We have the right header. If we try to compile this and fail, then
+ there is something wrong and the user should know about it so the testsuite
+ should issue an ERROR result.. */
+
+#ifdef __linux__
+#define _MIT_POSIX_THREADS 1 /* Linux (or at least RedHat 4.0) needs this */
+#endif
+
+#include <pthread.h>
+
+/* Under OSF 2.0 & 3.0 and HPUX 10, the second arg of pthread_create
+ is prototyped to be just a "pthread_attr_t", while under Solaris it
+ is a "pthread_attr_t *". Arg! */
+
+#if defined (__osf__) || defined (__hpux__)
+#define PTHREAD_CREATE_ARG2(arg) arg
+#define PTHREAD_CREATE_NULL_ARG2 null_attr
+static pthread_attr_t null_attr;
+#else
+#define PTHREAD_CREATE_ARG2(arg) &arg
+#define PTHREAD_CREATE_NULL_ARG2 NULL
+#endif
+
+static int verbose = 0;
+
+static void
+common_routine (arg)
+ int arg;
+{
+ static int from_thread1;
+ static int from_thread2;
+ static int from_main;
+ static int hits;
+ static int full_coverage;
+
+ if (verbose) printf("common_routine (%d)\n", arg);
+ hits++;
+ switch (arg)
+ {
+ case 0:
+ from_main++;
+ break;
+ case 1:
+ from_thread1++;
+ break;
+ case 2:
+ from_thread2++;
+ break;
+ }
+ if (from_main && from_thread1 && from_thread2)
+ full_coverage = 1;
+}
+
+static void *
+thread1 (void *arg)
+{
+ int i;
+ int z = 0;
+
+ if (verbose) printf ("thread1 (%0x) ; pid = %d\n", arg, getpid ());
+ for (i=1; i <= 10000000; i++)
+ {
+ if (verbose) printf("thread1 %d\n", pthread_self ());
+ z += i;
+ common_routine (1);
+ sleep(1);
+ }
+}
+
+static void *
+thread2 (void * arg)
+{
+ int i;
+ int k = 0;
+
+ if (verbose) printf ("thread2 (%0x) ; pid = %d\n", arg, getpid ());
+ for (i=1; i <= 10000000; i++)
+ {
+ if (verbose) printf("thread2 %d\n", pthread_self ());
+ k += i;
+ common_routine (2);
+ sleep(1);
+ }
+ sleep(100);
+}
+
+int
+foo (a, b, c)
+ int a, b, c;
+{
+ int d, e, f;
+
+ if (verbose) printf("a=%d\n", a);
+}
+
+main(argc, argv)
+ int argc;
+ char **argv;
+{
+ pthread_t tid1, tid2;
+ int j;
+ int t = 0;
+ void (*xxx) ();
+ pthread_attr_t attr;
+
+ if (verbose) printf ("pid = %d\n", getpid());
+
+ foo (1, 2, 3);
+
+#ifndef __osf__
+ if (pthread_attr_init (&attr))
+ {
+ perror ("pthread_attr_init 1");
+ exit (1);
+ }
+#endif
+
+#ifdef PTHREAD_SCOPE_SYSTEM
+ if (pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM))
+ {
+ perror ("pthread_attr_setscope 1");
+ exit (1);
+ }
+#endif
+
+ if (pthread_create (&tid1, pthread_attr_default, thread1, (void *) 0xfeedface))
+ {
+ perror ("pthread_create 1");
+ exit (1);
+ }
+ if (verbose) printf ("Made thread %d\n", tid1);
+ sleep (1);
+
+ if (pthread_create (&tid2, null_attr, thread2, (void *) 0xdeadbeef))
+ {
+ perror ("pthread_create 2");
+ exit (1);
+ }
+ if (verbose) printf("Made thread %d\n", tid2);
+
+ sleep (1);
+
+ for (j = 1; j <= 10000000; j++)
+ {
+ if (verbose) printf("top %d\n", pthread_self ());
+ common_routine (0);
+ sleep(1);
+ t += j;
+ }
+
+ exit(0);
+}
+
+#endif /* ifndef HAVE_PTHREAD_H */
diff --git a/gdb/testsuite/gdb.hp/gdb.threads-hp/usrthbasic.exp b/gdb/testsuite/gdb.hp/gdb.threads-hp/usrthbasic.exp
new file mode 100644
index 00000000000..c77f1f17aec
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.threads-hp/usrthbasic.exp
@@ -0,0 +1,107 @@
+# usrthbasic.exp -- Expect script to test gdb with user threads
+# Copyright (C) 1992 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# use this to debug:
+#
+#log_user 1
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+if { [skip_hp_tests] } { continue }
+
+if { ![istarget "hppa*-*-hpux*"] || [istarget "hppa2.0w-*-*"] } {
+ verbose "HPUX thread test ignored for non-hppa or PA64 targets."
+ return 0
+}
+
+set testfile usrthbasic
+set srcfile ${srcdir}/${subdir}/${testfile}.c
+set binfile ${srcdir}/${subdir}/${testfile}
+
+# To build the executable we need to link against the thread library.
+#
+# /opt/ansic/bin/cc -Ae +DAportable -g -o usrthbasic -lcma usrthbasic.c
+#
+## we have trouble building it on 11.0, so we use the prebuilt
+## executable instead.
+##
+##if { [gdb_compile "${srcdir}/${subdir}/${testfile}.c" "${binfile}" executable {debug additional_flags=-Ae ldflags=-lcma}] != "" } {
+## gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+##}
+
+# We don't really seem to need longer waits.
+#
+##set oldtimeout $timeout
+##set timeout [expr "$timeout + 0"]
+##set oldverbose $verbose
+##set verbose 40
+
+#=========================
+#
+# Test looking at threads.
+#
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "b main" ".*Breakpoint 1.*" "b main"
+gdb_test "run" "Breakpoint 1, main.*:119.*" "run to main"
+gdb_test "b thread1" ".*Breakpoint 2.*" "b thread1"
+gdb_test "info threads" "\\* 1 system thread.*:119\[^(\]*" \
+ "info threads at main"
+gdb_test "c" "Breakpoint 2, thread1.*" "continue to thread1"
+gdb_test "info threads" \
+ "\\* 3 system thread.*thread1.*libcma.1.*libcma.1\[^(\]*" \
+ "info threads at main"
+gdb_test "b 165" "Breakpoint 3.*165.*" "break at main counter"
+gdb_test "c" "Breakpoint 3, main.*" "continue to main counter"
+gdb_test "info threads" " 4 system thread.*\\* 1 system thread.*main.*" \
+ "info threads at main counter"
+gdb_test "b 97" "Breakpoint 4.*97.*" "break at thread2 counter"
+gdb_test "b 81" "Breakpoint 5.*81.*" "break at thread1 counter"
+gdb_test "bt" "#0 main.* at \[^(\]*" "backtrace at main counter"
+
+# After switching to thread 4, the cma scheduler should schedule it next
+# and we should hit its breakpoint in thread2.
+gdb_test "thread 4" ".Switching to thread 4.*cma__dispatch.*" \
+ "switch to thread 4"
+gdb_test "bt" "#0 .*thread2.*" "backtrace at thread 4"
+sleep 1
+gdb_test "c" ".*Breakpoint 4, thread2.*" "continue and get to thread 4"
+
+# After switching to thread 1, the cma scheduler should schedule it next
+# and we should hit its breakpoint (in main).
+gdb_test "thread 1" ".*Switching to thread 1.*cma__dispatch.*" \
+ "switch to thread 1"
+sleep 1
+gdb_test "c" ".*Breakpoint 3, main.*usrthbasic.c:165.*" \
+ "continue and get to thread 1"
+
+# Done!
+#
+gdb_exit
+
+##set timeout $oldtimeout
+##set verbose $oldverbose
+
+return 0
diff --git a/gdb/testsuite/gdb.hp/gdb.threads-hp/usrthcore.c b/gdb/testsuite/gdb.hp/gdb.threads-hp/usrthcore.c
new file mode 100644
index 00000000000..3a50cd6add6
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.threads-hp/usrthcore.c
@@ -0,0 +1,177 @@
+#include <stdio.h>
+
+/* #include "config.h" */
+#define HAVE_PTHREAD_H
+#define __hpux__
+#define __osf__
+
+#ifndef HAVE_PTHREAD_H
+
+/* Don't even try to compile. In fact, cause a syntax error that we can
+ look for as a compiler error message and know that we have no pthread
+ support. In that case we can just suppress the test completely. */
+
+#error "no posix threads support"
+
+#else
+
+/* OK. We have the right header. If we try to compile this and fail, then
+ there is something wrong and the user should know about it so the testsuite
+ should issue an ERROR result.. */
+
+#ifdef __linux__
+#define _MIT_POSIX_THREADS 1 /* Linux (or at least RedHat 4.0) needs this */
+#endif
+
+#include <pthread.h>
+
+/* Under OSF 2.0 & 3.0 and HPUX 10, the second arg of pthread_create
+ is prototyped to be just a "pthread_attr_t", while under Solaris it
+ is a "pthread_attr_t *". Arg! */
+
+#if defined (__osf__) || defined (__hpux__)
+#define PTHREAD_CREATE_ARG2(arg) arg
+#define PTHREAD_CREATE_NULL_ARG2 null_attr
+static pthread_attr_t null_attr;
+#else
+#define PTHREAD_CREATE_ARG2(arg) &arg
+#define PTHREAD_CREATE_NULL_ARG2 NULL
+#endif
+
+static int verbose = 0;
+
+static void
+common_routine (arg)
+ int arg;
+{
+ static int from_thread1;
+ static int from_thread2;
+ static int from_main;
+ static int hits;
+ static int full_coverage;
+
+ if (verbose) printf("common_routine (%d)\n", arg);
+ hits++;
+ switch (arg)
+ {
+ case 0:
+ from_main++;
+ break;
+ case 1:
+ from_thread1++;
+ break;
+ case 2:
+ from_thread2++;
+ break;
+ }
+ if (from_main && from_thread1 && from_thread2)
+ full_coverage = 1;
+}
+
+static void *
+thread1 (void *arg)
+{
+ int i;
+ int z = 0;
+
+ if (verbose) printf ("thread1 (%0x) ; pid = %d\n", arg, getpid ());
+ for (i=1; i <= 10000000; i++)
+ {
+ if (verbose) printf("thread1 %d\n", pthread_self ());
+ z += i;
+ common_routine (1);
+ sleep(1);
+ }
+}
+
+static void *
+thread2 (void * arg)
+{
+ int i;
+ int k = 0;
+
+ if (verbose) printf ("thread2 (%0x) ; pid = %d\n", arg, getpid ());
+ for (i=1; i <= 10000000; i++)
+ {
+ if (verbose) printf("thread2 %d\n", pthread_self ());
+ k += i;
+ common_routine (2);
+ sleep(1);
+ }
+ sleep(100);
+}
+
+int
+foo (a, b, c)
+ int a, b, c;
+{
+ int d, e, f;
+
+ if (verbose) printf("a=%d\n", a);
+}
+
+main(argc, argv)
+ int argc;
+ char **argv;
+{
+ pthread_t tid1, tid2;
+ int j;
+ int t = 0;
+ void (*xxx) ();
+ pthread_attr_t attr;
+
+ if (verbose) printf ("pid = %d\n", getpid());
+
+ foo (1, 2, 3);
+
+#ifndef __osf__
+ if (pthread_attr_init (&attr))
+ {
+ perror ("pthread_attr_init 1");
+ exit (1);
+ }
+#endif
+
+#ifdef PTHREAD_SCOPE_SYSTEM
+ if (pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM))
+ {
+ perror ("pthread_attr_setscope 1");
+ exit (1);
+ }
+#endif
+
+ if (pthread_create (&tid1, pthread_attr_default, thread1, (void *) 0xfeedface))
+ {
+ perror ("pthread_create 1");
+ exit (1);
+ }
+ if (verbose) printf ("Made thread %d\n", tid1);
+ sleep (1);
+
+ if (pthread_create (&tid2, null_attr, thread2, (void *) 0xdeadbeef))
+ {
+ perror ("pthread_create 2");
+ exit (1);
+ }
+ if (verbose) printf("Made thread %d\n", tid2);
+
+ sleep (1);
+
+ for (j = 1; j <= 10000000; j++)
+ {
+ if (verbose) printf("top %d\n", pthread_self ());
+ common_routine (0);
+ sleep(1);
+ t += j;
+ if (j > 3)
+ {
+ int* int_p;
+ int_p = 0;
+ *int_p = 1;
+ }
+ }
+
+ exit(0);
+}
+
+#endif /* ifndef HAVE_PTHREAD_H */
diff --git a/gdb/testsuite/gdb.hp/gdb.threads-hp/usrthcore.exp b/gdb/testsuite/gdb.hp/gdb.threads-hp/usrthcore.exp
new file mode 100644
index 00000000000..55df0431f68
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.threads-hp/usrthcore.exp
@@ -0,0 +1,89 @@
+# usrthcore.exp -- Expect script to test gdb with user threads
+# Copyright (C) 1992 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# use this to debug:
+#
+#log_user 1
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+if { [skip_hp_tests] } { continue }
+
+if { ![istarget "hppa*-*-hpux*"] || [istarget "hppa2.0w-*-*"] } {
+ verbose "HPUX thread test ignored for non-hppa or PA64 targets."
+ return 0
+}
+
+set testfile usrthcore
+set srcfile ${srcdir}/${subdir}/${testfile}.c
+set binfile ${srcdir}/${subdir}/${testfile}
+
+# To build the executable we need to link against the thread library.
+#
+# /opt/ansic/bin/cc -Ae +DAportable -g -o usrthcore -lcma usrthcore.c
+#
+## we have trouble building it on 11.0, so we use the prebuilt
+## executable instead.
+##
+##if { [gdb_compile "${srcdir}/${subdir}/${testfile}.c -lcma" "${binfile}" executable {debug additional_flags=-Ae ldflags=-lcma}] != "" } {
+## gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+##}
+
+#=========================
+#
+# Test looking at threads in a core file
+#
+
+remote_exec build "rm -f core"
+remote_exec build "${binfile}"
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+gdb_test "core-file core" \
+ ".*Core was generated by `usrthcore'.*in main.*usrthcore.c:170.*" \
+ "load corefile"
+
+gdb_test "info thread" \
+ " 4 .*cma__dispatch.*\\* 1 .*in main.*usrthcore.c:170.*" \
+ "info thread on core file"
+gdb_test "bt" "#0.*in main.*usrthcore.c:170" "backtrace on active thread"
+gdb_test "thread 4" ".*Switching to thread 4.*cma__dispatch.*" \
+ "switch to thread 4 (thread2 procedure)"
+gdb_test "bt" "#0.*cma__dispatch.*thread2.*usrthcore.c:99.*" \
+ "Backtrace on inactive thread (thread2 procedure)"
+gdb_test "b thread1" "Breakpoint 1.*usrthcore.c, line 75.*" \
+ "break on thread1"
+gdb_test "run" "Starting program.*Breakpoint 1, thread1.*usrthcore.c:75.*" \
+ "run program, get to thread1 procedure"
+gdb_test "info threads" "\\* \[23\] .*thread1.* 1 .*cma__dispatch.*" \
+ "info threads after running core"
+
+
+# Done!
+#
+gdb_exit
+
+remote_exec build "rm -f core"
+
+return 0
diff --git a/gdb/testsuite/gdb.hp/gdb.threads-hp/usrthfork.c b/gdb/testsuite/gdb.hp/gdb.threads-hp/usrthfork.c
new file mode 100644
index 00000000000..9ddb8f3faf2
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.threads-hp/usrthfork.c
@@ -0,0 +1,17 @@
+#include <stdio.h>
+#include <pthread.h>
+#include <sys/types.h>
+
+int main(void){
+pid_t pid;
+
+switch (pid = fork()){
+ case 0:
+ printf("child\n");
+ break;
+ default:
+ printf("parent\n");
+ break;
+ }
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.hp/gdb.threads-hp/usrthfork.exp b/gdb/testsuite/gdb.hp/gdb.threads-hp/usrthfork.exp
new file mode 100644
index 00000000000..1303fba6c36
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/gdb.threads-hp/usrthfork.exp
@@ -0,0 +1,72 @@
+# user_th_basic.exp -- Expect script to test gdb with user threads
+# Copyright (C) 1992 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+if { ![istarget "hppa*-*-hpux*"] || [istarget "hppa2.0w-*-*"] } {
+ verbose "HPUX thread test ignored for non-hppa or PA64 targets."
+ return 0
+}
+
+set testfile usrthfork
+set srcfile ${srcdir}/${subdir}/${testfile}.c
+set binfile ${srcdir}/${subdir}/${testfile}
+
+# To build the executable we need to link against the thread library.
+#
+# /opt/ansic/bin/cc -Ae -g -o usrthfork -lcma usrthfork.c
+#
+## we have trouble building it on 11.0, so we use the prebuilt
+## executable instead.
+##
+##if { [gdb_compile "${srcdir}/${subdir}/${testfile}.c" "${binfile}" executable {debug additional_flags=-Ae ldflags=-lcma}] != "" } {
+## gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+##}
+
+#=========================
+#
+# Test looking at threads.
+#
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "set follow-fork-mode parent" ".*" "set follow-fork-mode parent"
+gdb_test "b main" "Breakpoint 1.*" "b main"
+gdb_test "run" "Breakpoint 1, main.*:8.*" "run to main"
+##gdb_test "next" \
+## ".*New process.*Detaching after fork from process.*13.*parent.*" \
+## "next on CMA fork"
+send_gdb "next\n"
+gdb_expect {
+ -re ".*Detaching after fork from.*$gdb_prompt $" {
+ pass "next on CMA fork"
+ }
+ -re ".*$gdb_prompt $" { fail "next on CMA fork" }
+ timeout { fail "(timeout) next on CMA fork" }
+}
+exec sleep 1
+
+gdb_exit
+
+return 0
diff --git a/gdb/testsuite/gdb.hp/tools/odump b/gdb/testsuite/gdb.hp/tools/odump
new file mode 100755
index 00000000000..c96abed64db
--- /dev/null
+++ b/gdb/testsuite/gdb.hp/tools/odump
@@ -0,0 +1,7 @@
+#!/bin/ksh
+
+# First source /app/appserver
+. /app/appserver
+
+# Exec the executable.
+exec $APPROOT/usr/contrib/bin/$(basename $0) "$@"
diff --git a/gdb/top.c b/gdb/top.c
index 40955abe63d..2c5edceb543 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -445,9 +445,6 @@ void (*registers_changed_hook) PARAMS ((void));
that several registers have changed (see value_assign). */
void (*register_changed_hook) PARAMS ((int regno));
-/* Tell the GUI that the disassembly flavor has changed */
-void (*disassembly_flavor_hook) PARAMS((char *args, int from_tty));
-
/* Tell the GUI someone changed LEN bytes of memory at ADDR */
void (*memory_changed_hook) PARAMS ((CORE_ADDR addr, int len));
diff --git a/gdb/utils.c b/gdb/utils.c
index 58cefdf2675..314a8310b45 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -498,6 +498,8 @@ internal_error (char *string, ...)
static char msg[] = "Internal GDB error: recursive internal error.\n";
static int dejavu = 0;
va_list args;
+ int continue_p;
+ int dump_core_p;
/* don't allow infinite error recursion. */
switch (dejavu)
@@ -516,16 +518,38 @@ internal_error (char *string, ...)
}
/* Try to get the message out */
- fputs_unfiltered ("\nGDB-INTERNAL-ERROR: ", gdb_stderr);
+ fputs_unfiltered ("gdb-internal-error: ", gdb_stderr);
va_start (args, string);
vfprintf_unfiltered (gdb_stderr, string, args);
va_end (args);
fputs_unfiltered ("\n", gdb_stderr);
- if (query ("\
-An internal GDB error has been detected.\n\
-Do you want to quit GDB (dumping core)? "))
- abort ();
+ /* Default (no case) is to quit GDB. When in batch mode this
+ lessens the likelhood of GDB going into an infinate loop. */
+ continue_p = query ("\
+An internal GDB error was detected. This may make make further\n\
+debugging unreliable. Continue this debugging session? ");
+
+ /* Default (no case) is to not dump core. Lessen the chance of GDB
+ leaving random core files around. */
+ dump_core_p = query ("\
+Create a core file containing the current state of GDB? ");
+
+ if (continue_p)
+ {
+ if (dump_core_p)
+ {
+ if (fork () == 0)
+ abort ();
+ }
+ }
+ else
+ {
+ if (dump_core_p)
+ abort ();
+ else
+ exit (1);
+ }
dejavu = 0;
return_to_top_level (RETURN_ERROR);
@@ -650,6 +674,11 @@ quit ()
if (quit_pre_print)
fprintf_unfiltered (gdb_stderr, quit_pre_print);
+#ifdef __MSDOS__
+ /* No steenking SIGINT will ever be coming our way when the
+ program is resumed. Don't lie. */
+ fprintf_unfiltered (gdb_stderr, "Quit\n");
+#else
if (job_control
/* If there is no terminal switching for this target, then we can't
possibly get screwed by the lack of job control. */
@@ -658,36 +687,12 @@ quit ()
else
fprintf_unfiltered (gdb_stderr,
"Quit (expect signal SIGINT when the program is resumed)\n");
+#endif
return_to_top_level (RETURN_QUIT);
}
-#if defined(__GO32__)
-
-/* In the absence of signals, poll keyboard for a quit.
- Called from #define QUIT pollquit() in xm-go32.h. */
-
-void
-notice_quit ()
-{
- if (kbhit ())
- switch (getkey ())
- {
- case 1:
- quit_flag = 1;
- break;
- case 2:
- immediate_quit = 2;
- break;
- default:
- /* We just ignore it */
- /* FIXME!! Don't think this actually works! */
- fprintf_unfiltered (gdb_stderr, "CTRL-A to quit, CTRL-B to quit harder\n");
- break;
- }
-}
-
-#elif defined(_MSC_VER) /* should test for wingdb instead? */
+#if defined(_MSC_VER) /* should test for wingdb instead? */
/*
* Windows translates all keyboard and mouse events
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index 71d8efd5809..eaac180454a 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -323,7 +323,7 @@ handle_load_dll (PTR dummy)
DWORD dll_name_ptr;
DWORD done;
char dll_buf[MAX_PATH + 1];
- char *p, *dll_name = NULL, *dll_basename;
+ char *p, *dll_name = NULL;
struct objfile *objfile;
MEMORY_BASIC_INFORMATION minfo;
@@ -411,28 +411,6 @@ handle_load_dll (PTR dummy)
while ((p = strchr (dll_name, '\\')))
*p = '/';
- /* FIXME!! It would be nice to define one symbol which pointed to the
- front of the dll if we can't find any symbols. */
-
- if (!(dll_basename = strrchr (dll_name, '/')))
- dll_basename = dll_name;
- else
- dll_basename++;
-
- ALL_OBJFILES (objfile)
- {
- char *objfile_basename;
- objfile_basename = strrchr (objfile->name, '/');
-
- if (objfile_basename &&
- strcmp (dll_basename, objfile_basename + 1) == 0)
- {
- printf_unfiltered ("%x:%s (symbols previously loaded)\n",
- event->lpBaseOfDll, dll_name);
- goto out;
- }
- }
-
/* The symbols in a dll are offset by 0x1000, which is the
the offset from 0 of the first byte in an image - because
of the file header and the section alignment.
@@ -443,7 +421,6 @@ handle_load_dll (PTR dummy)
symbol_file_add (dll_name, 0, (int) event->lpBaseOfDll + 0x1000, 0, 0, 0, 0, 1);
printf_unfiltered ("\n");
-out:
return 1;
}
diff --git a/readline/ChangeLog.Cygnus b/readline/ChangeLog.Cygnus
index d4bb265d675..4fe80aac35f 100644
--- a/readline/ChangeLog.Cygnus
+++ b/readline/ChangeLog.Cygnus
@@ -1,3 +1,21 @@
+1999-08-13 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ From Philippe De Muyter <phdm@macqel.be>
+ * shell.c (stdio.h): File included, for definition of NULL.
+ * readline/rltty.c (get_tty_settings): Conditionalize
+ call to set_winsize on TIOGWINSZ.
+
+1999-07-30 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * Imported Readline 4.0. Integrated all the Cygnus
+ local changes since last import.
+
+ New files: rlstdc.h, savestring.c, shlib directory,
+ doc/manvers.texinfo, examples/rlversion.c,
+ support/install-shlib, support/shobj-conf.
+
+ Removed files: MANIFEST.doc, doc/inc-hist.texi.
+
1999-07-13 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* acconfig.h: Fix typo: it's GWINSZ_IN_SYS_IOCTL, not
diff --git a/readline/doc/ChangeLog b/readline/doc/ChangeLog
index 8049c5e6c19..482a3c6ac59 100644
--- a/readline/doc/ChangeLog
+++ b/readline/doc/ChangeLog
@@ -1,3 +1,11 @@
+1999-08-10 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * hsuser.texinfo (Bash History Builtins): Comment out btindex
+ commands.
+
+ * inc-hist.texinfo: New file. Same as hsuser.texinfo, but w/o
+ cross reference to GNU History Manual.
+
Tue Dec 22 10:07:58 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* hsuser.texinfo (Bash History Builtins): comment out btindex
diff --git a/readline/doc/inc-hist.texinfo b/readline/doc/inc-hist.texinfo
new file mode 100644
index 00000000000..06774b74916
--- /dev/null
+++ b/readline/doc/inc-hist.texinfo
@@ -0,0 +1,399 @@
+@ignore
+This file documents the user interface to the GNU History library.
+
+Copyright (C) 1988, 1991, 1996 Free Software Foundation, Inc.
+Authored by Brian Fox and Chet Ramey.
+
+Permission is granted to make and distribute verbatim copies of this manual
+provided the copyright notice and this permission notice are preserved on
+all copies.
+
+Permission is granted to process this file through Tex and print the
+results, provided the printed document carries copying permission notice
+identical to this one except for the removal of this paragraph (this
+paragraph not being relevant to the printed manual).
+
+Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, provided also that the
+GNU Copyright statement is available to the distributee, and provided that
+the entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+
+Permission is granted to copy and distribute translations of this manual
+into another language, under the above conditions for modified versions.
+@end ignore
+
+@node Using History Interactively
+@chapter Using History Interactively
+
+@ifset BashFeatures
+This chapter describes how to use the GNU History Library interactively,
+from a user's standpoint. It should be considered a user's guide. For
+information on using the GNU History Library in other programs,
+see the GNU Readline Library Manual.
+@end ifset
+@ifclear BashFeatures
+This chapter describes how to use the GNU History Library interactively,
+from a user's standpoint. It should be considered a user's guide.
+@c For
+@c information on using the GNU History Library in your own programs,
+@c @pxref{Programming with GNU History}.
+@end ifclear
+
+@ifset BashFeatures
+@menu
+* Bash History Facilities:: How Bash lets you manipulate your command
+ history.
+* Bash History Builtins:: The Bash builtin commands that manipulate
+ the command history.
+* History Interaction:: What it feels like using History as a user.
+@end menu
+@end ifset
+@ifclear BashFeatures
+@menu
+* History Interaction:: What it feels like using History as a user.
+@end menu
+@end ifclear
+
+@ifset BashFeatures
+@node Bash History Facilities
+@section Bash History Facilities
+@cindex command history
+@cindex history list
+
+When the @samp{-o history} option to the @code{set} builtin
+is enabled (@pxref{The Set Builtin}),
+the shell provides access to the @var{command history},
+the list of commands previously typed. The text of the last
+@code{HISTSIZE}
+commands (default 500) is saved in a history list. The shell
+stores each command in the history list prior to parameter and
+variable expansion
+but after history expansion is performed, subject to the
+values of the shell variables
+@code{HISTIGNORE} and @code{HISTCONTROL}.
+When the shell starts up, the history is initialized from the
+file named by the @code{HISTFILE} variable (default @file{~/.bash_history}).
+@code{HISTFILE} is truncated, if necessary, to contain no more than
+the number of lines specified by the value of the @code{HISTFILESIZE}
+variable. When an interactive shell exits, the last
+@code{HISTSIZE} lines are copied from the history list to @code{HISTFILE}.
+If the @code{histappend} shell option is set (@pxref{Bash Builtins}),
+the lines are appended to the history file,
+otherwise the history file is overwritten.
+If @code{HISTFILE}
+is unset, or if the history file is unwritable, the history is
+not saved. After saving the history, the history file is truncated
+to contain no more than @code{$HISTFILESIZE}
+lines. If @code{HISTFILESIZE} is not set, no truncation is performed.
+
+The builtin command @code{fc} may be used to list or edit and re-execute
+a portion of the history list.
+The @code{history} builtin can be used to display or modify the history
+list and manipulate the history file.
+When using the command-line editing, search commands
+are available in each editing mode that provide access to the
+history list.
+
+The shell allows control over which commands are saved on the history
+list. The @code{HISTCONTROL} and @code{HISTIGNORE}
+variables may be set to cause the shell to save only a subset of the
+commands entered.
+The @code{cmdhist}
+shell option, if enabled, causes the shell to attempt to save each
+line of a multi-line command in the same history entry, adding
+semicolons where necessary to preserve syntactic correctness.
+The @code{lithist}
+shell option causes the shell to save the command with embedded newlines
+instead of semicolons.
+@xref{Bash Builtins}, for a description of @code{shopt}.
+
+@node Bash History Builtins
+@section Bash History Builtins
+@cindex history builtins
+
+Bash provides two builtin commands that allow you to manipulate the
+history list and history file.
+
+@table @code
+
+@item fc
+@c btindex fc
+@example
+@code{fc [-e @var{ename}] [-nlr] [@var{first}] [@var{last}]}
+@code{fc -s [@var{pat}=@var{rep}] [@var{command}]}
+@end example
+
+Fix Command. In the first form, a range of commands from @var{first} to
+@var{last} is selected from the history list. Both @var{first} and
+@var{last} may be specified as a string (to locate the most recent
+command beginning with that string) or as a number (an index into the
+history list, where a negative number is used as an offset from the
+current command number). If @var{last} is not specified it is set to
+@var{first}. If @var{first} is not specified it is set to the previous
+command for editing and @minus{}16 for listing. If the @samp{-l} flag is
+given, the commands are listed on standard output. The @samp{-n} flag
+suppresses the command numbers when listing. The @samp{-r} flag
+reverses the order of the listing. Otherwise, the editor given by
+@var{ename} is invoked on a file containing those commands. If
+@var{ename} is not given, the value of the following variable expansion
+is used: @code{$@{FCEDIT:-$@{EDITOR:-vi@}@}}. This says to use the
+value of the @code{FCEDIT} variable if set, or the value of the
+@code{EDITOR} variable if that is set, or @code{vi} if neither is set.
+When editing is complete, the edited commands are echoed and executed.
+
+In the second form, @var{command} is re-executed after each instance
+of @var{pat} in the selected command is replaced by @var{rep}.
+
+A useful alias to use with the @code{fc} command is @code{r='fc -s'}, so
+that typing @samp{r cc} runs the last command beginning with @code{cc}
+and typing @samp{r} re-executes the last command (@pxref{Aliases}).
+
+@item history
+@c btindex history
+@example
+history [-c] [@var{n}]
+history [-anrw] [@var{filename}]
+history -ps @var{arg}
+@end example
+
+Display the history list with line numbers. Lines prefixed with
+with a @samp{*} have been modified. An argument of @var{n} says
+to list only the last @var{n} lines. Options, if supplied, have
+the following meanings:
+
+@table @code
+@item -w
+Write out the current history to the history file.
+
+@item -r
+Read the current history file and append its contents to
+the history list.
+
+@item -a
+Append the new
+history lines (history lines entered since the beginning of the
+current Bash session) to the history file.
+
+@item -n
+Append the history lines not already read from the history file
+to the current history list. These are lines appended to the history
+file since the beginning of the current Bash session.
+
+@item -c
+Clear the history list. This may be combined
+with the other options to replace the history list completely.
+
+@item -s
+The @var{arg}s are added to the end of
+the history list as a single entry.
+
+@item -p
+Perform history substitution on the @var{arg}s and display the result
+on the standard output, without storing the results in the history list.
+@end table
+
+When the @samp{-w}, @samp{-r}, @samp{-a}, or @samp{-n} option is
+used, if @var{filename}
+is given, then it is used as the history file. If not, then
+the value of the @code{HISTFILE} variable is used.
+
+@end table
+@end ifset
+
+@node History Interaction
+@section History Expansion
+@cindex history expansion
+
+The History library provides a history expansion feature that is similar
+to the history expansion provided by @code{csh}. This section
+describes the syntax used to manipulate the history information.
+
+History expansions introduce words from the history list into
+the input stream, making it easy to repeat commands, insert the
+arguments to a previous command into the current input line, or
+fix errors in previous commands quickly.
+
+History expansion takes place in two parts. The first is to determine
+which line from the history list should be used during substitution.
+The second is to select portions of that line for inclusion into the
+current one. The line selected from the history is called the
+@dfn{event}, and the portions of that line that are acted upon are
+called @dfn{words}. Various @dfn{modifiers} are available to manipulate
+the selected words. The line is broken into words in the same fashion
+that Bash does, so that several words
+surrounded by quotes are considered one word.
+History expansions are introduced by the appearance of the
+history expansion character, which is @samp{!} by default.
+@ifset BashFeatures
+Only @samp{\} and @samp{'} may be used to escape the history expansion
+character.
+@end ifset
+
+@ifset BashFeatures
+Several shell options settable with the @code{shopt}
+builtin (@pxref{Bash Builtins}) may be used to tailor
+the behavior of history expansion. If the
+@code{histverify} shell option is enabled, and Readline
+is being used, history substitutions are not immediately passed to
+the shell parser.
+Instead, the expanded line is reloaded into the Readline
+editing buffer for further modification.
+If Readline is being used, and the @code{histreedit}
+shell option is enabled, a failed history expansion will be
+reloaded into the Readline editing buffer for correction.
+The @samp{-p} option to the @code{history} builtin command
+may be used to see what a history expansion will do before using it.
+The @samp{-s} option to the @code{history} builtin may be used to
+add commands to the end of the history list without actually executing
+them, so that they are available for subsequent recall.
+This is most useful in conjunction with Readline.
+
+The shell allows control of the various characters used by the
+history expansion mechanism with the @code{histchars} variable.
+@end ifset
+
+@menu
+* Event Designators:: How to specify which history line to use.
+* Word Designators:: Specifying which words are of interest.
+* Modifiers:: Modifying the results of substitution.
+@end menu
+
+@node Event Designators
+@subsection Event Designators
+@cindex event designators
+
+An event designator is a reference to a command line entry in the
+history list.
+@cindex history events
+
+@table @asis
+
+@item @code{!}
+Start a history substitution, except when followed by a space, tab,
+the end of the line, @samp{=} or @samp{(}.
+
+@item @code{!@var{n}}
+Refer to command line @var{n}.
+
+@item @code{!-@var{n}}
+Refer to the command @var{n} lines back.
+
+@item @code{!!}
+Refer to the previous command. This is a synonym for @samp{!-1}.
+
+@item @code{!@var{string}}
+Refer to the most recent command starting with @var{string}.
+
+@item @code{!?@var{string}[?]}
+Refer to the most recent command containing @var{string}. The trailing
+@samp{?} may be omitted if the @var{string} is followed immediately by
+a newline.
+
+@item @code{^@var{string1}^@var{string2}^}
+Quick Substitution. Repeat the last command, replacing @var{string1}
+with @var{string2}. Equivalent to
+@code{!!:s/@var{string1}/@var{string2}/}.
+
+@item @code{!#}
+The entire command line typed so far.
+
+@end table
+
+@node Word Designators
+@subsection Word Designators
+
+Word designators are used to select desired words from the event.
+A @samp{:} separates the event specification from the word designator. It
+may be omitted if the word designator begins with a @samp{^}, @samp{$},
+@samp{*}, @samp{-}, or @samp{%}. Words are numbered from the beginning
+of the line, with the first word being denoted by 0 (zero). Words are
+inserted into the current line separated by single spaces.
+
+@table @code
+
+@item 0 (zero)
+The @code{0}th word. For many applications, this is the command word.
+
+@item @var{n}
+The @var{n}th word.
+
+@item ^
+The first argument; that is, word 1.
+
+@item $
+The last argument.
+
+@item %
+The word matched by the most recent @samp{?@var{string}?} search.
+
+@item @var{x}-@var{y}
+A range of words; @samp{-@var{y}} abbreviates @samp{0-@var{y}}.
+
+@item *
+All of the words, except the @code{0}th. This is a synonym for @samp{1-$}.
+It is not an error to use @samp{*} if there is just one word in the event;
+the empty string is returned in that case.
+
+@item @var{x}*
+Abbreviates @samp{@var{x}-$}
+
+@item @var{x}-
+Abbreviates @samp{@var{x}-$} like @samp{@var{x}*}, but omits the last word.
+
+@end table
+
+If a word designator is supplied without an event specification, the
+previous command is used as the event.
+
+@node Modifiers
+@subsection Modifiers
+
+After the optional word designator, you can add a sequence of one or more
+of the following modifiers, each preceded by a @samp{:}.
+
+@table @code
+
+@item h
+Remove a trailing pathname component, leaving only the head.
+
+@item t
+Remove all leading pathname components, leaving the tail.
+
+@item r
+Remove a trailing suffix of the form @samp{.@var{suffix}}, leaving
+the basename.
+
+@item e
+Remove all but the trailing suffix.
+
+@item p
+Print the new command but do not execute it.
+
+@ifset BashFeatures
+@item q
+Quote the substituted words, escaping further substitutions.
+
+@item x
+Quote the substituted words as with @samp{q},
+but break into words at spaces, tabs, and newlines.
+@end ifset
+
+@item s/@var{old}/@var{new}/
+Substitute @var{new} for the first occurrence of @var{old} in the
+event line. Any delimiter may be used in place of @samp{/}.
+The delimiter may be quoted in @var{old} and @var{new}
+with a single backslash. If @samp{&} appears in @var{new},
+it is replaced by @var{old}. A single backslash will quote
+the @samp{&}. The final delimiter is optional if it is the last
+character on the input line.
+
+@item &
+Repeat the previous substitution.
+
+@item g
+Cause changes to be applied over the entire event line. Used in
+conjunction with @samp{s}, as in @code{gs/@var{old}/@var{new}/},
+or with @samp{&}.
+
+@end table