]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
import gdb-19990504 snapshot
authorStan Shebs <shebs@codesourcery.com>
Wed, 5 May 1999 14:45:51 +0000 (14:45 +0000)
committerStan Shebs <shebs@codesourcery.com>
Wed, 5 May 1999 14:45:51 +0000 (14:45 +0000)
82 files changed:
gdb/ChangeLog
gdb/Makefile.in
gdb/TODO
gdb/a29k-tdep.c
gdb/acconfig.h
gdb/alpha-tdep.c
gdb/arc-tdep.c
gdb/blockframe.c
gdb/coffread.c
gdb/config.in
gdb/config/a29k/tm-a29k.h
gdb/config/alpha/tm-alpha.h
gdb/config/arc/tm-arc.h
gdb/config/arm/tm-arm.h
gdb/config/convex/tm-convex.h
gdb/config/d10v/tm-d10v.h
gdb/config/d30v/tm-d30v.h
gdb/config/fr30/tm-fr30.h
gdb/config/h8300/tm-h8300.h
gdb/config/h8500/tm-h8500.h
gdb/config/i386/tm-i386.h
gdb/config/i960/tm-i960.h
gdb/config/m32r/tm-m32r.h
gdb/config/m68k/tm-altos.h
gdb/config/m68k/tm-isi.h
gdb/config/m68k/tm-m68k.h
gdb/config/m88k/tm-m88k.h
gdb/config/mips/tm-mips.h
gdb/config/mn10200/tm-mn10200.h
gdb/config/mn10300/tm-mn10300.h
gdb/config/ns32k/tm-merlin.h
gdb/config/ns32k/tm-umax.h
gdb/config/pa/tm-hppa.h
gdb/config/pyr/tm-pyr.h
gdb/config/rs6000/tm-rs6000.h
gdb/config/sh/tm-sh.h
gdb/config/sparc/tm-sparc.h
gdb/config/tahoe/tm-tahoe.h
gdb/config/tic80/tm-tic80.h
gdb/config/v850/tm-v850.h
gdb/config/vax/tm-vax.h
gdb/config/z8k/tm-z8k.h
gdb/configure
gdb/configure.in
gdb/convex-tdep.c
gdb/doc/ChangeLog
gdb/doc/gdbint.texinfo
gdb/gdb_string.h
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gnu-nat.c
gdb/go32-nat.c
gdb/hppa-tdep.c
gdb/hppah-nat.c
gdb/hpux-thread.c
gdb/i960-tdep.c
gdb/infcmd.c
gdb/infrun.c
gdb/m68k-tdep.c
gdb/m88k-tdep.c
gdb/main.c
gdb/ns32k-tdep.c
gdb/procfs.c
gdb/remote.c
gdb/rs6000-tdep.c
gdb/ser-go32.c
gdb/sol-thread.c
gdb/source.c
gdb/sparc-tdep.c
gdb/symtab.c
gdb/tahoe-tdep.c
gdb/target.c
gdb/target.h
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/call-ar-st.exp
gdb/thread.c
gdb/vax-tdep.c
sim/common/ChangeLog
sim/common/gennltvals.sh
sim/i960/i960-desc.c
sim/mcore/ChangeLog
sim/mcore/interp.c

index 500a28aed19942623202bab7abd8e8b0d0147fef..5aa6fbdef8ed08ac9e784882bceb0aee64d134a3 100644 (file)
@@ -1,3 +1,133 @@
+1999-05-04  DJ Delorie  <dj@cygnus.com>
+
+       DJGPP changes from Robert Hoehne  <robert.hoehne@gmx.net>
+
+       * ser-go32.c: correct includes
+       * source.c (openp): use ROOTED_P instead of SLASH_P
+       * go32-nat.c: enhance exception and NPX handling
+       (go32_kill_inferior): fix small bug killing inferior
+       * configure.in: don't look for termcap with djgpp
+       * configure: rebuild
+
+1999-05-04  Elena Zannoni  <ezannoni@kwikemart.cygnus.com>
+
+       * main.c (main): Comment out unused and undocumented command line
+       option '-'.
+
+1999-04-30  Jim Blandy  <jimb@zwingli.cygnus.com>
+
+       Cleanup from Philippe De Muyter:
+       * configure.in (BFD_NEED_DECLARATION): Check also for strstr.
+       * acconfig.h (NEED_DECLARATION_MALLOC, NEED_DECLARATION_REALLOC,
+       NEED_DECLARATION_FREE, NEED_DECLARATION_STRERROR): Define slots
+       removed; they are now generated automatically.
+       * gdb_string.h (strstr): Provide function prototype if
+       NEED_DECLARATION_STRSTR.
+       * configure, config.in: Regenerated.
+
+Fri Apr 30 11:16:09 1999  Michael Snyder  <msnyder@cleaver.cygnus.com>
+
+       * target.h (to_find_new_threads): new target ops vector.
+       (target_find_new_threads): define.
+       * target.c (update_current_target): inherit new target ops vector.
+       * remote.c: Setup to_find_new_threads vector.
+       * sol-thread.c: ditto.
+       * thread.c (target_find_new_threads): rename: local_find_new_threads.
+       (info_threads_command): call target_find_new_threads by new method,
+       as a target ops vector, rather than previous macro definition method.
+       * infcmd.c (go_command): define only if in xdb mode.
+       * procfs.c: fix typo in comment.
+       
+Fri Apr 30 01:02:05 1999  Jeffrey A Law  (law@cygnus.com)
+
+       * hppah-nat.c: Fix various coding convention violations introduced
+       by HP.
+       (child_acknowledge_created_inferior): Do nothing if PT_SET_EVENT_MASK
+       is not defined.
+
+1999-04-28  Stan Shebs  <shebs@andros.cygnus.com>
+
+       * TODO: Add some items inspired by review of the manual.
+
+Tue Apr 27 17:38:19 1999  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * config/z8k/tm-z8k.h, config/v850/tm-v850.h,
+       config/tic80/tm-tic80.h, config/sparc/tm-sparc.h,
+       config/sh/tm-sh.h, config/pyr/tm-pyr.h, config/pa/tm-hppa.h,
+       config/mn10300/tm-mn10300.h, config/mn10200/tm-mn10200.h,
+       config/mips/tm-mips.h, config/m88k/tm-m88k.h,
+       config/m68k/tm-m68k.h, config/m32r/tm-m32r.h,
+       config/i960/tm-i960.h, config/i386/tm-i386.h,
+       config/h8500/tm-h8500.h, config/h8300/tm-h8300.h,
+       config/fr30/tm-fr30.h, config/d30v/tm-d30v.h,
+       config/d10v/tm-d10v.h, config/alpha/tm-alpha.h,
+       config/arm/tm-arm.h, config/a29k/tm-a29k.h, config/arc/tm-arc.h:
+       Change SKIP_PROLOGUE and SKIP_PROLOGUE_FRAMELESS_P macros so that
+       they return the new address.
+
+       * sparc-tdep.c (sparc_skip_prologue), hppa-tdep.c
+       (hppa_skip_prologue), m88k-tdep.c
+       (m88k_skip_prologue), i960-tdep.c
+       (i960_skip_prologue), arc-tdep.c
+       (arc_skip_prologue), a29k-tdep.c (a29k_skip_prologue): Rename
+       skip_prologue function.
+
+       * config/m68k/tm-isi.h: Convert macro SKIP_PROLOGUE into a new
+       function.
+       * m68k-tdep.c (isi_skip_prologue): That new function.
+       * vax-tdep.c (vax_skip_prologue), config/vax/tm-vax.h: Ditto.
+       * tahoe-tdep.c (tahoe_skip_prologue), config/tahoe/tm-tahoe.h: Ditto.
+       * rs6000-tdep.c (rs6000_skip_prologue), config/rs6000/tm-rs6000.h:
+       Ditto.
+       * ns32k-tdep.c (umax_skip_prologue), config/ns32k/tm-umax.h: Ditto.
+       * config/ns32k/tm-merlin.h, ns32k-tdep.c (merlin_skip_prologue):
+       Ditto.
+       * config/m68k/tm-altos.h, m68k-tdep.c (altos_skip_prologue): Ditto.
+       * config/convex/tm-convex.h, convex-tdep.c (convex_skip_prologue):
+       Ditto.
+
+       * symtab.c (in_prologue, find_function_start_sal, decode_line_1),
+       infrun.c (wait_for_inferior), blockframe.c
+       (frameless_look_for_prologue): Update.
+       * config/fr30/tm-fr30.h (FRAMELESS_FUNCTION_INVOCATION): Update.
+
+1999-04-27  Stan Shebs  <shebs@andros.cygnus.com>
+
+       * TODO: Remove item about DEBUG_EXPRESSIONS, no longer meaningful.
+
+       * infrun.c (enum wfi_state): New enum.
+       (wait_for_inferior): Merge all but one of the target_wait calls
+       into a single call, add a wfi_state variable to encode which of
+       the calls is being made.
+
+1999-04-26  Jim Blandy  <jimb@zwingli.cygnus.com>
+
+       Fix from Dave Holcomb.
+       * hpux-thread.c (init_hpux_thread_ops): Use the right function
+       name when initializing hpux_thread_ops.to_thread_alive.
+
+       * coffread.c (coff_symfile_read): If we have a `.stab' section,
+       but no `.stabstr' section, then print an error message; don't
+       crash.
+
+1999-04-26  Jim Blandy  <jimb@zwingli.cygnus.com>
+
+       1999-04-25  Mark Kettenis  <kettenis@gnu.org>
+
+       * gnu-nat.c (gnu_attach): Call target_terminal_init before calling
+       inf_set_traced, since that function calls code that might try to
+       restore the terminal settings.
+
+Mon Apr 26 08:55:46 1999  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * gdbarch.h, gdbarch.c: More format cleanups.
+
+Fri Apr 23 15:00:25 1999  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * gdbarch.c (arch_ok): New function. Fix logic test for a valid
+       architecture.
+       (set_arch): Use.
+
 1999-04-22  Jason Molenda  (jsm@bugshack.cygnus.com)
 
         * README: Note that readline is not installed as a part of
index 7799e098dd29ebaae7b491d687a2b795d06a8714..308bbb8059e7140f8fa2eeab7dfc7e4ff387c3a0 100644 (file)
@@ -217,7 +217,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 = 19990422
+VERSION = 19990504
 DIST=gdb
 
 LINT=/usr/5bin/lint
index fcbcd16bea68d19bf503522c25f4fd0028972901..463d1cc34633d9c54f4309efdcbd1cb05a0ffbf3 100644 (file)
--- a/gdb/TODO
+++ b/gdb/TODO
@@ -9,6 +9,20 @@ General To Do List
 This list is probably not up to date, and opinions vary about the
 importance or even desirability of some of the items.
 
+Document trace machinery.
+
+Document overlay machinery.
+
+Extend .gdbinit mechanism to specify name on command line, allow for
+lists of files to load, include function of --tclcommand.
+
+@c This does not work (yet if ever).  FIXME.
+@c @item --parse=@var{lang} @dots{}
+@c Configure the @value{GDBN} expression parser to parse the listed languages.
+@c @samp{all} configures @value{GDBN} for all supported languages.  To get a
+@c list of all supported languages, omit the argument.  Without this
+@c option, @value{GDBN} is configured to parse all supported languages.
+
 Add an "info bfd" command that displays supported object formats,
 similarly to objdump -i.
 
@@ -382,9 +396,6 @@ Why do we allow a target to omit standard register names (NO_STD_REGS
 in tm-z8k.h)?  I thought the standard register names were supposed to
 be just that, standard.
 
-Make DEBUG_EXPRESSIONS a maintenance command, dependent on
-MAINTENANCE_COMMANDS.
-
 Allow core file without exec file on RS/6000.
 
 Make sure "shell" with no arguments works right on DOS.
@@ -466,6 +477,9 @@ Add a command for searching memory, a la adb.  It specifies size,
 mask, value, start address.  ADB searches until it finds it or hits
 an error (or is interrupted).
 
+Remove the range and type checking code and documentation, if not
+going to implement.
+
 # Local Variables:
 # mode: text
 # End:
index 114922c97399501f1221fc064191ac14303a3962..2aab6a45ecaf4a47fd12da0bea0a5385d8f90837 100644 (file)
@@ -337,7 +337,7 @@ examine_prologue (pc, rsize, msize, mfp_used)
    to reach some "real" code.  */
 
 CORE_ADDR
-skip_prologue (pc)
+a29k_skip_prologue (pc)
      CORE_ADDR pc;
 {
   return examine_prologue (pc, NULL, NULL, NULL);
index 8128e4e91df9245dcfbd53a595bce1cd8def2a15..bf52c4f375bd022ea55b44c834cb0e24e4e96257 100644 (file)
@@ -1,17 +1,3 @@
-
-/* Whether malloc must be declared even if <stdlib.h> is included.  */
-#undef NEED_DECLARATION_MALLOC
-
-/* Whether realloc must be declared even if <stdlib.h> is included.  */
-#undef NEED_DECLARATION_REALLOC
-
-/* Whether free must be declared even if <stdlib.h> is included.  */
-#undef NEED_DECLARATION_FREE
-
-/* Whether strerror must be declared even if <string.h> is included.  */
-#undef NEED_DECLARATION_STRERROR
-@TOP@
-
 /* Define if pstatus_t type is available */
 #undef HAVE_PSTATUS_T
 
index 35430a4c502370434eeb06c2210306293c483846..9b4716a59afd771620cb2a96579617dbcdb056c8 100644 (file)
@@ -108,8 +108,11 @@ static unsigned int heuristic_fence_post = 0;
 */
 
 #define PROC_LOW_ADDR(proc) ((proc)->pdr.adr) /* least address */
+/* These next two fields are kind of being hijacked.  I wonder if
+   iline is too small for the values it needs to hold, if GDB is
+   running on a 32-bit host.  */
 #define PROC_HIGH_ADDR(proc) ((proc)->pdr.iline) /* upper address bound */
-#define PROC_DUMMY_FRAME(proc) ((proc)->pdr.iopt) /* frame for CALL_DUMMY */
+#define PROC_DUMMY_FRAME(proc) ((proc)->pdr.cbLineOffset) /*CALL_DUMMY frame */
 #define PROC_FRAME_OFFSET(proc) ((proc)->pdr.frameoffset)
 #define PROC_FRAME_REG(proc) ((proc)->pdr.framereg)
 #define PROC_REG_MASK(proc) ((proc)->pdr.regmask)
index c5dd8478a15f60f046553157f13c6c0644c74d38..16e259b87ca076a29d6f9b5ee637539ff5dc712e 100644 (file)
@@ -264,7 +264,7 @@ arc_get_frame_setup (pc)
    This allows a quicker answer.  */
 
 CORE_ADDR
-skip_prologue (pc, frameless_p)
+arc_skip_prologue (pc, frameless_p)
      CORE_ADDR pc;
      int frameless_p;
 {
index c3b377eda4ac6162fef5bc3bc04e715fc0d87c0f..71d19e3cdfebc47f0a84de14a871b7b43223e035 100644 (file)
@@ -307,9 +307,9 @@ frameless_look_for_prologue (frame)
 #ifdef SKIP_PROLOGUE_FRAMELESS_P
       /* This is faster, since only care whether there *is* a prologue,
         not how long it is.  */
-      SKIP_PROLOGUE_FRAMELESS_P (after_prologue);
+      after_prologue = SKIP_PROLOGUE_FRAMELESS_P (after_prologue);
 #else
-      SKIP_PROLOGUE (after_prologue);
+      after_prologue = SKIP_PROLOGUE (after_prologue);
 #endif
       return after_prologue == func_start;
     }
index 9c8f47540574194abd786b0c7d21a898e9a89733..56c1438b239e54fe07cc9b933d610f7fa152e4b0 100644 (file)
@@ -686,6 +686,17 @@ coff_symfile_read (objfile, section_offsets, mainline)
 
   if (info->stabsects)
     {
+      if (! info->stabstrsect)
+       {
+         error_begin ();
+         fprintf_filtered
+           (gdb_stderr,
+            ("The debugging information in `%s' is corrupted.\n"
+             "The file has a `.stabs' section, but no `.stabstr' section.\n"),
+            name);
+         return_to_top_level (RETURN_ERROR);
+       }
+
       /* FIXME: dubious.  Why can't we use something normal like
         bfd_get_section_contents?  */
       bfd_seek (abfd, abfd->where, 0);
index 4d206a48a66045c8b31023bd40bef0d5f3163005..6bef6b4024919b4215bf63cabf85cf909c2c4af8 100644 (file)
@@ -1,17 +1,5 @@
 /* config.in.  Generated automatically from configure.in by autoheader.  */
 
-/* Whether malloc must be declared even if <stdlib.h> is included.  */
-#undef NEED_DECLARATION_MALLOC
-
-/* Whether realloc must be declared even if <stdlib.h> is included.  */
-#undef NEED_DECLARATION_REALLOC
-
-/* Whether free must be declared even if <stdlib.h> is included.  */
-#undef NEED_DECLARATION_FREE
-
-/* Whether strerror must be declared even if <string.h> is included.  */
-#undef NEED_DECLARATION_STRERROR
-
 /* Define if on AIX 3.
    System headers sometimes define this.
    We just want to avoid a redefinition error message.  */
 /* Define if strdup is not declared in system header files. */
 #undef NEED_DECLARATION_STRDUP
 
+/* Define if strstr is not declared in system header files. */
+#undef NEED_DECLARATION_STRSTR
+
 /* Define if <sys/procfs.h> has pstatus_t. */
 #undef HAVE_PSTATUS_T
 
index 0936e837bea32558538b7e52306b708cb60e622a..cef9345f94b35cf290a1170684f563c943c64125 100644 (file)
@@ -43,9 +43,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
 
-#define SKIP_PROLOGUE(pc) \
-  { pc = skip_prologue (pc); }
-CORE_ADDR skip_prologue ();
+#define SKIP_PROLOGUE(pc) (a29k_skip_prologue (pc))
+CORE_ADDR a29k_skip_prologue ();
 
 /* Immediately after a function call, return the saved pc.
    Can't go through the frames for this because on some machines
index c07980981716582cb1d4c25168d7dc3317b63ac1..51c8dcec9c0f4bb59369aa3398222e379ef4f48b 100644 (file)
@@ -59,7 +59,7 @@ struct symbol;
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
 
-#define SKIP_PROLOGUE(pc)      pc = alpha_skip_prologue(pc, 0)
+#define SKIP_PROLOGUE(pc)      (alpha_skip_prologue(pc, 0))
 extern CORE_ADDR alpha_skip_prologue PARAMS ((CORE_ADDR addr, int lenient));
 
 /* Immediately after a function call, return the saved pc.
index e964bef1645c87220ccd156703accbcaacd085e9..e170d2d10ad740e616cc769a694d756b6e2e4060 100644 (file)
@@ -37,11 +37,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    knows that the function has a frame.  Its result is equal
    to its input PC if the function is frameless, unequal otherwise.  */
 
-#define SKIP_PROLOGUE(pc) \
-  { pc = skip_prologue (pc, 0); }
-#define SKIP_PROLOGUE_FRAMELESS_P(pc) \
-  { pc = skip_prologue (pc, 1); }
-extern CORE_ADDR skip_prologue PARAMS ((CORE_ADDR, int));
+#define SKIP_PROLOGUE(pc) (arc_skip_prologue (pc, 0))
+#define SKIP_PROLOGUE_FRAMELESS_P(pc) (arc_skip_prologue (pc, 1))
+extern CORE_ADDR arc_skip_prologue PARAMS ((CORE_ADDR, int));
 
 /* Sequence of bytes for breakpoint instruction.
    ??? The current value is "sr -1,[-1]" and is for the simulator only.
index 26bdf37fbe8abcbce430733d33ca0aba3aca20f3..54e0954b249561aacf56f4424e60c47b7ba1aadc 100644 (file)
@@ -56,7 +56,7 @@ CORE_ADDR arm_addr_bits_remove PARAMS ((CORE_ADDR));
 
 extern CORE_ADDR arm_skip_prologue PARAMS ((CORE_ADDR pc));
 
-#define SKIP_PROLOGUE(pc) { pc = arm_skip_prologue (pc); }
+#define SKIP_PROLOGUE(pc) (arm_skip_prologue (pc))
 
 /* Immediately after a function call, return the saved pc.
    Can't always go through the frames for this because on some machines
index 5eb9f6ed89eb2980dfd0dc948201fa0d67010cb3..6558859a53de7b553a2be782c5be9bd28ad9b7d5 100644 (file)
@@ -52,26 +52,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
        [ld.- -(ap),-]          pcc/gcc register arg loads
 */
 
-#define SKIP_PROLOGUE(pc)  \
-{ int op, ix;                                                          \
-  op = read_memory_integer (pc, 2);                                    \
-  if ((op & 0xffc7) == 0x5ac0) pc += 2;                                        \
-  else if (op == 0x1580) pc += 4;                                      \
-  else if (op == 0x15c0) pc += 6;                                      \
-  if ((read_memory_integer (pc, 2) & 0xfff8) == 0x7c40                 \
-      && (read_memory_integer (pc + 2, 2) & 0xfff8) == 0x1240          \
-      && (read_memory_integer (pc + 8, 2) & 0xfff8) == 0x7c48)         \
-    pc += 10;                                                          \
-  if (read_memory_integer (pc, 2) == 0x1240) pc += 6;                  \
-  for (;;) {                                                           \
-    op = read_memory_integer (pc, 2);                                  \
-    ix = (op >> 3) & 7;                                                        \
-    if (ix != 6) break;                                                        \
-    if ((op & 0xfcc0) == 0x3000) pc += 4;                              \
-    else if ((op & 0xfcc0) == 0x3040) pc += 6;                         \
-    else if ((op & 0xfcc0) == 0x2800) pc += 4;                         \
-    else if ((op & 0xfcc0) == 0x2840) pc += 6;                         \
-    else break;}}
+extern CORE_ADDR convex_skip_prologue PARAMS ((CORE_ADDR pc));
+#define SKIP_PROLOGUE(pc) (convex_skip_prologue (pc))
 
 /* Immediately after a function call, return the saved pc.
    (ignore frame and return *$sp so we can handle both calls and callq) */
index edfa62fe7f540433c9912c21e76e76ae532c0111..d0c1a506e2ccde5e650dea5d2e591b061e20b7c3 100644 (file)
@@ -48,8 +48,7 @@ struct value;
    to reach some "real" code.  */
 
 extern CORE_ADDR d10v_skip_prologue ();
-#define SKIP_PROLOGUE(ip) \
-    {(ip) = d10v_skip_prologue(ip);}
+#define SKIP_PROLOGUE(ip) (d10v_skip_prologue (ip))
 
 
 /* Stack grows downward.  */
index 7a69ca36d90c549dad0f2cbf2312f5e1796c121e..1ce9ccce3a42a29fdaecc5422e02068193f87ac1 100644 (file)
@@ -46,9 +46,8 @@ struct value;
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
 
-extern CORE_ADDR d30v_skip_prologue ();
-#define SKIP_PROLOGUE(ip) \
-    {(ip) = d30v_skip_prologue(ip);}
+extern CORE_ADDR d30v_skip_prologue PARAMS ((CORE_ADDR));
+#define SKIP_PROLOGUE(ip) (d30v_skip_prologue (ip))
 
 
 /* Stack grows downward.  */
index 5478b93b1812600e56611ce81d32b7acdfb04bf5..d03f8453ba6a7281cc1e64b8caedae8b3b1de78d 100644 (file)
@@ -159,7 +159,7 @@ extern CORE_ADDR fr30_frame_saved_pc   PARAMS ((struct frame_info *));
 #define SAVED_PC_AFTER_CALL(fi) read_register (RP_REGNUM)
 
 extern CORE_ADDR fr30_skip_prologue PARAMS ((CORE_ADDR pc));
-#define SKIP_PROLOGUE(pc) pc = fr30_skip_prologue (pc)
+#define SKIP_PROLOGUE(pc) (fr30_skip_prologue (pc))
 
 /* Write into appropriate registers a function return value of type
    TYPE, given in virtual format.  VALBUF is in the target byte order;
@@ -199,7 +199,7 @@ extern void fr30_store_return_value PARAMS ((struct type *type, char *valbuf));
   func_start = (get_pc_function_start ((FI)->pc) +     \
                FUNCTION_START_OFFSET);                 \
   after_prologue = func_start;                         \
-  SKIP_PROLOGUE (after_prologue);                      \
+  after_prologue = SKIP_PROLOGUE (after_prologue);     \
   (FRAMELESS) = (after_prologue == func_start);                \
 }
 
index 929d6ff74d98e060b6e71676a3dffe6565df444c..f8f1f6436752998e5ae787faec79317f24d4d036 100644 (file)
@@ -69,7 +69,7 @@ extern void h8300_init_extra_frame_info ();
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
 
-#define SKIP_PROLOGUE(ip)   {(ip) = h8300_skip_prologue(ip);}
+#define SKIP_PROLOGUE(ip)   (h8300_skip_prologue(ip))
 extern CORE_ADDR h8300_skip_prologue ();
 
 /* Immediately after a function call, return the saved pc.
index 8f7d9664efdad92ab41835bcfcb58b6a71981b3c..2dded7cf3809f2af677678d8d6a2f5dc50f51cdd 100644 (file)
@@ -43,7 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
 
-#define SKIP_PROLOGUE(ip)   { (ip) = h8500_skip_prologue(ip); }
+#define SKIP_PROLOGUE(ip)   (h8500_skip_prologue (ip))
 extern CORE_ADDR h8500_skip_prologue PARAMS ((CORE_ADDR));
 
 /* Immediately after a function call, return the saved pc.
index aeff2e1f2636ff333e6f4df35dfe58f9751f56bd..06d9f855290acd7e7cb895c1fb067be8ccc8223d 100644 (file)
@@ -47,7 +47,7 @@ struct type;
 /* Advance PC across any function entry prologue instructions to reach some
    "real" code.  */
 
-#define SKIP_PROLOGUE(frompc)   {(frompc) = i386_skip_prologue((frompc));}
+#define SKIP_PROLOGUE(frompc)   (i386_skip_prologue (frompc))
 
 extern int i386_skip_prologue PARAMS ((int));
 
index a6d93b00a24d968b0a7a1df0022e87b60011e2f1..dcd24e5ee202a32ea6430beca67a7fd67b27cdaa 100644 (file)
@@ -49,8 +49,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 /* Advance ip across any function entry prologue instructions
    to reach some "real" code.  */
 
-#define SKIP_PROLOGUE(ip)      { ip = skip_prologue (ip); }
-extern CORE_ADDR skip_prologue ();
+#define SKIP_PROLOGUE(ip)      (i960_skip_prologue (ip))
+extern CORE_ADDR i960_skip_prologue ();
 
 /* Immediately after a function call, return the saved ip.
    Can't always go through the frames for this because on some machines
index e03558a75bf9ae831062a28f969706b16e7fbbe2..3a6f231a43ef4864d6cc09de705325054b555dba 100644 (file)
@@ -155,7 +155,7 @@ extern CORE_ADDR m32r_frame_saved_pc PARAMS((struct frame_info *));
 
 extern CORE_ADDR m32r_skip_prologue PARAMS ((CORE_ADDR pc));
 /* mvs_check  SKIP_PROLOGUE */
-#define SKIP_PROLOGUE(pc) pc = m32r_skip_prologue (pc)
+#define SKIP_PROLOGUE(pc) (m32r_skip_prologue (pc))
 
 /* mvs_no_check  FRAME_ARGS_SKIP */
 #define FRAME_ARGS_SKIP 0
index 2d77fea6563ee366262395f3d219eb2562821470..23c565306ddb5540a91709f4fef0f51fb11810e4 100644 (file)
@@ -38,20 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 /* The only reason this is here is the tm-altos.h reference below.  It
    was moved back here from tm-m68k.h.  FIXME? */
 
-#define SKIP_PROLOGUE(pc)   \
-{ register int op = read_memory_integer (pc, 2);       \
-  if (op == 0047126)                                   \
-    pc += 4;   /* Skip link #word */                   \
-  else if (op == 0044016)                              \
-    pc += 6;   /* Skip link #long */                   \
-  /* Not sure why branches are here.  */               \
-  /* From tm-isi.h, tm-altos.h */                      \
-  else if (op == 0060000)                              \
-    pc += 4;   /* Skip bra #word */                    \
-  else if (op == 00600377)                             \
-    pc += 6;   /* skip bra #long */                    \
-  else if ((op & 0177400) == 0060000)                  \
-    pc += 2;   /* skip bra #char */                    \
-}
+extern CORE_ADDR altos_skip_prologue PARAMS ((CORE_ADDR));
+#define SKIP_PROLOGUE(pc) (altos_skip_prologue (pc))
 
 #include "m68k/tm-m68k.h"
index f994524dd696ea749a9526757523610d0be54117..ae8ccbf05fe3f36dddc1f7bae3c6fcb81db46870 100644 (file)
@@ -131,20 +131,7 @@ retry:                                                                     \
 /* The only reason this is here is the tm-isi.h reference below.  It
    was moved back here from tm-m68k.h.  FIXME? */
 
-#define SKIP_PROLOGUE(pc)   \
-{ register int op = read_memory_integer (pc, 2);       \
-  if (op == 0047126)                                   \
-    pc += 4;   /* Skip link #word */                   \
-  else if (op == 0044016)                              \
-    pc += 6;   /* Skip link #long */                   \
-  /* Not sure why branches are here.  */               \
-  /* From tm-isi.h, tm-altos.h */                      \
-  else if (op == 0060000)                              \
-    pc += 4;   /* Skip bra #word */                    \
-  else if (op == 00600377)                             \
-    pc += 6;   /* skip bra #long */                    \
-  else if ((op & 0177400) == 0060000)                  \
-    pc += 2;   /* skip bra #char */                    \
-}
+extern CORE_ADDR isi_skip_prologue PARAMS ((CORE_ADDR));
+#define SKIP_PROLOGUE(pc) (isi_skip_prologue (pc))
 
 #include "m68k/tm-m68k.h"
index 098500c4fcb4ebd8989de25e64e8842ad6d5c529..9cbb41f0801633a1a7d44950ddec90361abfd559 100644 (file)
@@ -33,9 +33,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    to reach some "real" code.  */
 
 #if !defined(SKIP_PROLOGUE)
-#define SKIP_PROLOGUE(ip)   {(ip) = m68k_skip_prologue(ip);}
-extern CORE_ADDR m68k_skip_prologue PARAMS ((CORE_ADDR ip));
+#define SKIP_PROLOGUE(ip) (m68k_skip_prologue (ip))
 #endif
+extern CORE_ADDR m68k_skip_prologue PARAMS ((CORE_ADDR ip));
 
 /* Immediately after a function call, return the saved pc.
    Can't always go through the frames for this because on some machines
index 390cdef96eafc649e3a74f5b7ab517b9c48c30e0..be9ffba2c162ed3dbf90e0131774b290c7fcf467 100644 (file)
@@ -52,9 +52,8 @@ extern void init_extra_frame_info ();
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
 
-#define SKIP_PROLOGUE(frompc)   \
-       { (frompc) = skip_prologue (frompc); }
-extern CORE_ADDR skip_prologue ();
+extern CORE_ADDR m88k_skip_prologue PARAMS ((CORE_ADDR));
+#define SKIP_PROLOGUE(frompc) (m88k_skip_prologue (frompc))
 
 /* The m88k kernel aligns all instructions on 4-byte boundaries.  The
    kernel also uses the least significant two bits for its own hocus
index 6a7091a5282d2052017b5a1b54e9dac94e96a5b6..601d8754f55acfce8bfff93ba5686d276c7ba41c 100644 (file)
@@ -83,7 +83,7 @@ CORE_ADDR mips_addr_bits_remove PARAMS ((CORE_ADDR addr));
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
 
-#define SKIP_PROLOGUE(pc)      pc = mips_skip_prologue (pc, 0)
+#define SKIP_PROLOGUE(pc) (mips_skip_prologue (pc, 0))
 extern CORE_ADDR mips_skip_prologue PARAMS ((CORE_ADDR addr, int lenient));
 
 /* Return non-zero if PC points to an instruction which will cause a step
index e15cdae2b9169dbbd3e761c49a75e9ca64159a4a..99b8f6113eae26adcf9f0d78a5f6a95da79a1682 100644 (file)
@@ -166,7 +166,7 @@ extern CORE_ADDR mn10200_frame_saved_pc   PARAMS ((struct frame_info *));
   (SP) = mn10200_store_struct_return (STRUCT_ADDR, SP)
 
 extern CORE_ADDR mn10200_skip_prologue PARAMS ((CORE_ADDR));
-#define SKIP_PROLOGUE(pc) pc = mn10200_skip_prologue (pc)
+#define SKIP_PROLOGUE(pc) (mn10200_skip_prologue (pc))
 
 #define FRAME_ARGS_SKIP 0
 
index f0736427fcae3de01a92dee54c696c40f2ce9c79..42b73415d2859c415653a04e489df77831a4a448 100644 (file)
@@ -113,7 +113,7 @@ extern CORE_ADDR mn10300_frame_saved_pc   PARAMS ((struct frame_info *));
   (SP) = mn10300_store_struct_return (STRUCT_ADDR, SP)
 
 extern CORE_ADDR mn10300_skip_prologue PARAMS ((CORE_ADDR));
-#define SKIP_PROLOGUE(pc) pc = mn10300_skip_prologue (pc)
+#define SKIP_PROLOGUE(pc) (mn10300_skip_prologue (pc))
 
 #define FRAME_ARGS_SKIP 0
 
index f90c5e797787ca9eaea60d4511a2d8ba285eac39..d5864307162b132b9059f3fe33ea7c52be73e531 100644 (file)
@@ -27,14 +27,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
 
-#define SKIP_PROLOGUE(pc)                              \
-{ register int op = read_memory_integer (pc, 1);       \
-  if (op == 0x82)                                      \
-    { op = read_memory_integer (pc+2,1);               \
-      if ((op & 0x80) == 0) pc += 3;                   \
-      else if ((op & 0xc0) == 0x80) pc += 4;           \
-      else pc += 6;                                    \
-    }}
+extern CORE_ADDR merlin_skip_prologue PARAMS ((CORE_ADDR));
+#define SKIP_PROLOGUE(pc) (merlin_skip_prologue (pc))
 
 /* Immediately after a function call, return the saved pc.
    Can't always go through the frames for this because on some machines
index 1fdfb2fccd0459425413792611853291b859abc7..925a3e97b24ea8bb59152b1f82d5d8dc8b6f9f32 100644 (file)
@@ -33,14 +33,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
 
-#define SKIP_PROLOGUE(pc)                              \
-{ register unsigned char op = read_memory_integer (pc, 1);     \
-  if (op == 0x82) { op = read_memory_integer (pc+2,1);  \
-                   if ((op & 0x80) == 0) pc += 3;      \
-                   else if ((op & 0xc0) == 0x80) pc += 4;      \
-                   else pc += 6;                       \
-                  }                                    \
-}
+extern CORE_ADDR umax_skip_prologue PARAMS ((CORE_ADDR));
+#define SKIP_PROLOGUE(pc) (umax_skip_prologue (pc))
 
 /* Immediately after a function call, return the saved pc.
    Can't always go through the frames for this because on some machines
index e5b5acd90652818d1dd21160b96ea7eae3844318..2fcae42e2b71da7d8f02b12a73f2e8d5e7fe37b9 100644 (file)
@@ -72,8 +72,8 @@ struct inferior_status;
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
 
-#define SKIP_PROLOGUE(pc) pc = skip_prologue (pc)
-extern CORE_ADDR skip_prologue PARAMS ((CORE_ADDR));
+extern CORE_ADDR hppa_skip_prologue PARAMS ((CORE_ADDR));
+#define SKIP_PROLOGUE(pc) (hppa_skip_prologue (pc))
 
 /* If PC is in some function-call trampoline code, return the PC
    where the function itself actually starts.  If not, return NULL.  */
index b97ebe73b888063d286621767636fc64c1cf67cb..fbfe87c3748310641497882382ca55d44dfdbe25 100644 (file)
@@ -56,7 +56,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    If so, what do they look like?
    This is becoming harder, since tege@sics.SE wants to change
    gcc to not output a prologue when no frame is needed.   */
-#define SKIP_PROLOGUE(pc)  do {} while (0)
+#define SKIP_PROLOGUE(pc)  (pc)
 
 
 /* Immediately after a function call, return the saved pc.
index 52beec1adc66a347d4e1621ba2d120339d5e8be3..159ebc63ffef4ec8292d0b0a5450ed6c04f09a6a 100644 (file)
@@ -97,11 +97,8 @@ struct rs6000_framedata {
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
 
-#define SKIP_PROLOGUE(pc)                                              \
-do {                                                                   \
-  struct rs6000_framedata _frame;                                      \
-  pc = skip_prologue (pc, &_frame);                                    \
-} while (0)
+extern CORE_ADDR rs6000_skip_prologue PARAMS ((CORE_ADDR));
+#define SKIP_PROLOGUE(pc) (rs6000_skip_prologue (pc))
 
 extern CORE_ADDR skip_prologue PARAMS((CORE_ADDR, struct rs6000_framedata *));
 
index 291677b71c05812a2f039cef0e741fceaf0e852e..2d5f8bd2b3bc2464945b54007a17d498d7c89406 100644 (file)
@@ -43,9 +43,8 @@ struct type;
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
 
-extern CORE_ADDR sh_skip_prologue ();
-#define SKIP_PROLOGUE(ip) \
-    {(ip) = sh_skip_prologue(ip);}
+extern CORE_ADDR sh_skip_prologue PARAMS ((CORE_ADDR));
+#define SKIP_PROLOGUE(ip) (sh_skip_prologue (ip))
 
 
 /* Immediately after a function call, return the saved pc.
index 6d565081063d2fd355fb3826727f84bc206e5782..b2bc3c0431257bc0349dd36678c63a55f6f779b4 100644 (file)
@@ -88,11 +88,9 @@ struct value;
    knows that the function has a frame.  Its result is equal
    to its input PC if the function is frameless, unequal otherwise.  */
 
-#define SKIP_PROLOGUE(pc) \
-  { pc = skip_prologue (pc, 0); }
-#define SKIP_PROLOGUE_FRAMELESS_P(pc) \
-  { pc = skip_prologue (pc, 1); }
-extern CORE_ADDR skip_prologue PARAMS ((CORE_ADDR, int));
+#define SKIP_PROLOGUE(pc) (sparc_skip_prologue (pc, 0))
+#define SKIP_PROLOGUE_FRAMELESS_P(pc) (sparc_skip_prologue (pc, 1))
+extern CORE_ADDR sparc_skip_prologue PARAMS ((CORE_ADDR, int));
 
 /* Immediately after a function call, return the saved pc.
    Can't go through the frames for this because on some machines
index a9df37411ddf0ca0ab7d0c408008d556da9e1977..8c8321f371cb39082b7dacf944d3b3f49a9e853c 100644 (file)
@@ -33,26 +33,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
 
-#define SKIP_PROLOGUE(pc)      \
-{ register int op = (unsigned char) read_memory_integer (pc, 1);  \
-  if (op == 0x11) pc += 2;  /* skip brb */                       \
-  if (op == 0x13) pc += 3;  /* skip brw */                       \
-  if (op == 0x2c &&                                              \
-      ((unsigned char) read_memory_integer (pc+2, 1)) == 0x5e)   \
-    pc += 3;  /* skip subl2 */                                   \
-  if (op == 0xe9 &&                                              \
-      ((unsigned char) read_memory_integer (pc+1, 1)) == 0xae &&  \
-      ((unsigned char) read_memory_integer(pc+3, 1)) == 0x5e)    \
-     pc += 4;  /* skip movab */                                          \
-  if (op == 0xe9 &&                                              \
-      ((unsigned char) read_memory_integer (pc+1, 1)) == 0xce &&  \
-      ((unsigned char) read_memory_integer(pc+4, 1)) == 0x5e)    \
-    pc += 5;  /* skip movab */                                   \
-  if (op == 0xe9 &&                                              \
-      ((unsigned char) read_memory_integer (pc+1, 1)) == 0xee &&  \
-      ((unsigned char) read_memory_integer(pc+6, 1)) == 0x5e)    \
-    pc += 7;  /* skip movab */                                   \
-}
+extern CORE_ADDR tahoe_skip_prologue PARAMS ((CORE_ADDR));
+#define SKIP_PROLOGUE(pc) (tahoe_skip_prologue (pc))
 
 /* Immediately after a function call, return the saved pc.
    Can't always go through the frames for this because on some machines
index e17ca95b838f6f8196be47e6015a8f4083aff2ea..8b33381ae191caf36e81573bbd32d50428787dd0 100644 (file)
@@ -171,7 +171,7 @@ extern void tic80_frame_find_saved_regs PARAMS ((struct frame_info *, struct fra
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
 
-#define SKIP_PROLOGUE(pc)      { (pc) = tic80_skip_prologue (pc); }
+#define SKIP_PROLOGUE(pc) (tic80_skip_prologue (pc))
 extern CORE_ADDR tic80_skip_prologue PARAMS ((CORE_ADDR pc));
 
 /* Immediately after a function call, return the saved pc.
index 287ff86880769d9b4a3dafbcd533e02accba01c4..5a11451b1edf699c68e053286bb7385a16d7b048 100644 (file)
@@ -126,7 +126,7 @@ extern CORE_ADDR v850_frame_saved_pc   PARAMS ((struct frame_info *));
   write_register_bytes(REGISTER_BYTE (V0_REGNUM), VALBUF, TYPE_LENGTH (TYPE));
 
 extern CORE_ADDR v850_skip_prologue PARAMS ((CORE_ADDR pc));
-#define SKIP_PROLOGUE(pc) pc = v850_skip_prologue (pc)
+#define SKIP_PROLOGUE(pc) (v850_skip_prologue (pc))
 
 #define FRAME_ARGS_SKIP 0
 
index ad10fb7de3fdbd595213535871e71c00512f275b..62729b370ce323b19045c50266efab28011ea82d 100644 (file)
@@ -28,26 +28,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
 
-#define SKIP_PROLOGUE(pc)      \
-{ register int op = (unsigned char) read_memory_integer (pc, 1);  \
-  if (op == 0x11) pc += 2;  /* skip brb */                       \
-  if (op == 0x31) pc += 3;  /* skip brw */                       \
-  if (op == 0xC2 &&                                              \
-      ((unsigned char) read_memory_integer (pc+2, 1)) == 0x5E)   \
-    pc += 3;  /* skip subl2 */                                   \
-  if (op == 0x9E &&                                              \
-      ((unsigned char) read_memory_integer (pc+1, 1)) == 0xAE &&  \
-      ((unsigned char) read_memory_integer(pc+3, 1)) == 0x5E)    \
-     pc += 4;  /* skip movab */                                          \
-  if (op == 0x9E &&                                              \
-      ((unsigned char) read_memory_integer (pc+1, 1)) == 0xCE &&  \
-      ((unsigned char) read_memory_integer(pc+4, 1)) == 0x5E)    \
-    pc += 5;  /* skip movab */                                   \
-  if (op == 0x9E &&                                              \
-      ((unsigned char) read_memory_integer (pc+1, 1)) == 0xEE &&  \
-      ((unsigned char) read_memory_integer(pc+6, 1)) == 0x5E)    \
-    pc += 7;  /* skip movab */                                   \
-}
+extern CORE_ADDR vax_skip_prologue PARAMS ((CORE_ADDR));
+#define SKIP_PROLOGUE(pc) (vax_skip_prologue (pc))
 
 /* Immediately after a function call, return the saved pc.
    Can't always go through the frames for this because on some machines
index babde906c989797c49054be780952ce940577f58..1a34b0fcab641b0a982bf944e00cd0410218d77f 100644 (file)
@@ -40,7 +40,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
 
-#define SKIP_PROLOGUE(ip)   {(ip) = z8k_skip_prologue(ip);}
+#define SKIP_PROLOGUE(ip)   (z8k_skip_prologue (ip))
 extern CORE_ADDR mz8k_skip_prologue PARAMS ((CORE_ADDR ip));
 
 
index 8d392703ecc21c3ed2d4cbba2e2fe6a76e217497..a3ad0955c0cdae9c319b83983091a03383f89458 100755 (executable)
@@ -3896,6 +3896,53 @@ EOF
 
 fi
 
+echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
+echo "configure:3901: 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 3906 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+int main() {
+char *(*pfn) = (char *(*)) strstr
+; return 0; }
+EOF
+if { (eval echo configure:3927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  bfd_cv_decl_needed_strstr=no
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  bfd_cv_decl_needed_strstr=yes
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
+if test $bfd_cv_decl_needed_strstr = yes; then
+  cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_STRSTR 1
+EOF
+
+fi
+
 
 
 # The following save_state_t checkery is only necessary for HPUX 
@@ -3903,9 +3950,9 @@ fi
 # could be expunged. --jsm 1999-03-22
 
 echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
-echo "configure:3907: checking for HPUX save_state structure" >&5
+echo "configure:3954: checking for HPUX save_state structure" >&5
 cat > conftest.$ac_ext <<EOF
-#line 3909 "configure"
+#line 3956 "configure"
 #include "confdefs.h"
 #include <machine/save_state.h>
 EOF
@@ -3920,7 +3967,7 @@ fi
 rm -f conftest*
 
 cat > conftest.$ac_ext <<EOF
-#line 3924 "configure"
+#line 3971 "configure"
 #include "confdefs.h"
 #include <machine/save_state.h>
 EOF
@@ -3972,7 +4019,7 @@ EOF
        gdb_cv_hostos_is_solaris=yes ;;
   esac
   echo $ac_n "checking for directory proc entries""... $ac_c" 1>&6
-echo "configure:3976: checking for directory proc entries" >&5
+echo "configure:4023: 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 \
@@ -3994,19 +4041,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:3998: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:4045: 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 4003 "configure"
+#line 4050 "configure"
 #include "confdefs.h"
 #include <sys/procfs.h>
 int main() {
 pstatus_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:4010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pstatus_t=yes
 else
@@ -4028,19 +4075,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:4032: checking for prrun_t in sys/procfs.h" >&5
+echo "configure:4079: 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 4037 "configure"
+#line 4084 "configure"
 #include "confdefs.h"
 #include <sys/procfs.h>
 int main() {
 prrun_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:4044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prrun_t=yes
 else
@@ -4062,19 +4109,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:4066: checking for gregset_t in sys/procfs.h" >&5
+echo "configure:4113: 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 4071 "configure"
+#line 4118 "configure"
 #include "confdefs.h"
 #include <sys/procfs.h>
 int main() {
 gregset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:4078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_gregset_t=yes
 else
@@ -4096,19 +4143,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:4100: checking for fpregset_t in sys/procfs.h" >&5
+echo "configure:4147: 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 4105 "configure"
+#line 4152 "configure"
 #include "confdefs.h"
 #include <sys/procfs.h>
 int main() {
 fpregset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:4112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_fpregset_t=yes
 else
@@ -4132,12 +4179,12 @@ EOF
 
   
   echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4136: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
+echo "configure:4183: 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 4141 "configure"
+#line 4188 "configure"
 #include "confdefs.h"
 #include <unistd.h>
 #include <sys/types.h>
@@ -4150,7 +4197,7 @@ int main() {
   
 ; return 0; }
 EOF
-if { (eval echo configure:4154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_procfs_piocset=yes
 else
@@ -4172,7 +4219,7 @@ EOF
 fi
 
 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:4176: checking for main in -lm" >&5
+echo "configure:4223: 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
@@ -4180,14 +4227,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4184 "configure"
+#line 4231 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:4191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4238: \"$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
@@ -4216,7 +4263,7 @@ fi
 
 
 echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
-echo "configure:4220: checking for wctype in -lc" >&5
+echo "configure:4267: 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
@@ -4224,7 +4271,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4228 "configure"
+#line 4275 "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
@@ -4235,7 +4282,7 @@ int main() {
 wctype()
 ; return 0; }
 EOF
-if { (eval echo configure:4239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4286: \"$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
@@ -4254,7 +4301,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:4258: checking for wctype in -lw" >&5
+echo "configure:4305: 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
@@ -4262,7 +4309,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lw  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4266 "configure"
+#line 4313 "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
@@ -4273,7 +4320,7 @@ int main() {
 wctype()
 ; return 0; }
 EOF
-if { (eval echo configure:4277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4324: \"$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
@@ -4305,12 +4352,12 @@ fi
 
 
 echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
-echo "configure:4309: checking for long long support in compiler" >&5
+echo "configure:4356: 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 4314 "configure"
+#line 4361 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -4320,7 +4367,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_c_long_long=yes
 else
@@ -4342,7 +4389,7 @@ fi
 
 
 echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
-echo "configure:4346: checking for long long support in printf" >&5
+echo "configure:4393: 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
@@ -4350,7 +4397,7 @@ else
   gdb_cv_printf_has_long_long=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 4354 "configure"
+#line 4401 "configure"
 #include "confdefs.h"
 
 int main () {
@@ -4364,7 +4411,7 @@ int main () {
   return (strcmp ("0x0123456789abcdef", buf));
 }
 EOF
-if { (eval echo configure:4368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4415: \"$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
@@ -4388,19 +4435,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:4392: checking for long double support in compiler" >&5
+echo "configure:4439: 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 4397 "configure"
+#line 4444 "configure"
 #include "confdefs.h"
 
 int main() {
 long double foo;
 ; return 0; }
 EOF
-if { (eval echo configure:4404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_long_double=yes
 else
@@ -4422,7 +4469,7 @@ fi
 
 
 echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
-echo "configure:4426: checking for long double support in printf" >&5
+echo "configure:4473: 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
@@ -4430,7 +4477,7 @@ else
   gdb_cv_printf_has_long_double=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 4434 "configure"
+#line 4481 "configure"
 #include "confdefs.h"
 
 int main () {
@@ -4440,7 +4487,7 @@ int main () {
   return (strncmp ("3.14159", buf, 7));
 }
 EOF
-if { (eval echo configure:4444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4491: \"$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
@@ -4464,7 +4511,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:4468: checking for long double support in scanf" >&5
+echo "configure:4515: 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
@@ -4472,7 +4519,7 @@ else
   gdb_cv_scanf_has_long_double=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 4476 "configure"
+#line 4523 "configure"
 #include "confdefs.h"
 
 int main () {
@@ -4482,7 +4529,7 @@ int main () {
   return !(f > 3.14159 && f < 3.14160);
 }
 EOF
-if { (eval echo configure:4486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4533: \"$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
@@ -4508,17 +4555,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:4512: checking for $ac_hdr" >&5
+echo "configure:4559: 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 4517 "configure"
+#line 4564 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4569: \"$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*
@@ -4547,12 +4594,12 @@ done
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4551: checking for $ac_func" >&5
+echo "configure:4598: 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 4556 "configure"
+#line 4603 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4575,7 +4622,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:4579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4626: \"$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
@@ -4600,7 +4647,7 @@ fi
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:4604: checking for working mmap" >&5
+echo "configure:4651: 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
@@ -4608,7 +4655,7 @@ else
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 4612 "configure"
+#line 4659 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -4748,7 +4795,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:4752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4799: \"$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
@@ -4777,7 +4824,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:4781: checking for HPUX/OSF thread support" >&5
+echo "configure:4828: 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
@@ -4796,7 +4843,7 @@ EOF
       ;;
    solaris*)
       echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
-echo "configure:4800: checking for Solaris thread debugging library" >&5
+echo "configure:4847: 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
@@ -4806,7 +4853,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:4810: checking for dlopen in -ldl" >&5
+echo "configure:4857: 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
@@ -4814,7 +4861,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4818 "configure"
+#line 4865 "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
@@ -4825,7 +4872,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:4829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4876: \"$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
@@ -4857,17 +4904,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:4861: checking for the ld -export-dynamic flag" >&5
+echo "configure:4908: checking for the ld -export-dynamic flag" >&5
             LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
             cat > conftest.$ac_ext <<EOF
-#line 4864 "configure"
+#line 4911 "configure"
 #include "confdefs.h"
 
 int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:4871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   found=yes
 else
@@ -4886,13 +4933,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:4890: checking if <proc_service.h> is old" >&5
+echo "configure:4937: 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 4896 "configure"
+#line 4943 "configure"
 #include "confdefs.h"
 
                #include <proc_service.h>
@@ -4903,7 +4950,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_proc_service_is_old=no
 else
@@ -5038,12 +5085,12 @@ fi
 
 # In the Cygwin environment, we need some additional flags.
 echo $ac_n "checking for cygwin""... $ac_c" 1>&6
-echo "configure:5165: checking for cygwin" >&5
+echo "configure:5212: 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 5170 "configure"
+#line 5217 "configure"
 #include "confdefs.h"
 
 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
@@ -5069,12 +5116,15 @@ WINDRES=${WINDRES-windres}
 
 
 
+if test x$gdb_host = xgo32; then
+  TERM_LIB=
+else
 if test x$gdb_cv_os_cygwin = xyes; then
   TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`'
 else
   TERM_LIB=
   echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:5201: checking for tgetent in -lncurses" >&5
+echo "configure:5251: 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
@@ -5082,7 +5132,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lncurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5209 "configure"
+#line 5259 "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
@@ -5093,7 +5143,7 @@ int main() {
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:5220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5270: \"$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
@@ -5112,7 +5162,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:5239: checking for tgetent in -lHcurses" >&5
+echo "configure:5289: 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
@@ -5120,7 +5170,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lHcurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5247 "configure"
+#line 5297 "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
@@ -5131,7 +5181,7 @@ int main() {
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:5258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5308: \"$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
@@ -5150,7 +5200,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:5277: checking for tgetent in -ltermlib" >&5
+echo "configure:5327: 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
@@ -5158,7 +5208,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ltermlib  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5285 "configure"
+#line 5335 "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
@@ -5169,7 +5219,7 @@ int main() {
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:5296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5346: \"$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
@@ -5188,7 +5238,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:5315: checking for tgetent in -ltermcap" >&5
+echo "configure:5365: 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
@@ -5196,7 +5246,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ltermcap  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5323 "configure"
+#line 5373 "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
@@ -5207,7 +5257,7 @@ int main() {
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:5334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5384: \"$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
@@ -5226,7 +5276,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:5353: checking for tgetent in -lcurses" >&5
+echo "configure:5403: 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
@@ -5234,7 +5284,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5361 "configure"
+#line 5411 "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
@@ -5245,7 +5295,7 @@ int main() {
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:5372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5422: \"$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
@@ -5264,7 +5314,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:5391: checking for tgetent in -lterminfo" >&5
+echo "configure:5441: 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
@@ -5272,7 +5322,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lterminfo  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5399 "configure"
+#line 5449 "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
@@ -5283,7 +5333,7 @@ int main() {
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:5410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5460: \"$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
@@ -5319,6 +5369,7 @@ fi
     { echo "configure: error: Could not find a term library" 1>&2; exit 1; }
   fi
 fi
+fi
 
 
 
@@ -5329,7 +5380,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:6542: checking for X" >&5
+echo "configure:6593: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -5391,12 +5442,12 @@ if test "$ac_x_includes" = NO; then
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 6604 "configure"
+#line 6655 "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:6609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6660: \"$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*
@@ -5465,14 +5516,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 6678 "configure"
+#line 6729 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:6685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6736: \"$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.
@@ -5745,12 +5796,12 @@ fi
 
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:7029: checking for Cygwin environment" >&5
+echo "configure:7080: 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 7034 "configure"
+#line 7085 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -5761,7 +5812,7 @@ int main() {
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:7045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -5778,19 +5829,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:7062: checking for mingw32 environment" >&5
+echo "configure:7113: 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 7067 "configure"
+#line 7118 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:7074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -5809,7 +5860,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:7093: checking for executable suffix" >&5
+echo "configure:7144: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5819,7 +5870,7 @@ else
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:7103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:7154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
index 363438a033c8a7f8abd81b4e5174f3aae73b91ff..216f6d6f74971920102a3ae4aeb74c69e87d0be4 100644 (file)
@@ -83,6 +83,7 @@ BFD_NEED_DECLARATION(realloc)
 BFD_NEED_DECLARATION(free)
 BFD_NEED_DECLARATION(strerror)
 BFD_NEED_DECLARATION(strdup)
+BFD_NEED_DECLARATION(strstr)
 
 
 # The following save_state_t checkery is only necessary for HPUX 
@@ -424,6 +425,9 @@ AC_SUBST(DLLTOOL)
 AC_SUBST(WINDRES)
 
 dnl Figure out which term library to use.
+if test x$gdb_host = xgo32; then
+  TERM_LIB=
+else
 if test x$gdb_cv_os_cygwin = xyes; then
   TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`'
 else
@@ -440,6 +444,7 @@ else
     AC_MSG_ERROR(Could not find a term library, e.g. termcap or termlib!)
   fi
 fi
+fi
 AC_SUBST(TERM_LIB)
 
 
index 8eeb2b348a0e2ec5fa5fa375cc3524a1864354c1..fd490b107ed3540b2063a7ceabbfb1b461e26922 100644 (file)
@@ -42,6 +42,45 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "gdbcmd.h"
 
+CORE_ADDR
+convex_skip_prologue (pc)
+     CORE_ADDR pc;
+{
+  int op, ix;
+  op = read_memory_integer (pc, 2);
+  if ((op & 0xffc7) == 0x5ac0)
+    pc += 2;
+  else if (op == 0x1580)
+    pc += 4;
+  else if (op == 0x15c0)
+    pc += 6;
+  if ((read_memory_integer (pc, 2) & 0xfff8) == 0x7c40
+      && (read_memory_integer (pc + 2, 2) & 0xfff8) == 0x1240
+      && (read_memory_integer (pc + 8, 2) & 0xfff8) == 0x7c48)
+    pc += 10;
+  if (read_memory_integer (pc, 2) == 0x1240)
+    pc += 6;
+  for (;;)
+    {
+      op = read_memory_integer (pc, 2);
+      ix = (op >> 3) & 7;
+      if (ix != 6)
+       break;
+      if ((op & 0xfcc0) == 0x3000)
+       pc += 4;
+      else if ((op & 0xfcc0) == 0x3040)
+       pc += 6;
+      else if ((op & 0xfcc0) == 0x2800)
+       pc += 4;
+      else if ((op & 0xfcc0) == 0x2840)
+       pc += 6;
+      else
+       break;
+    }
+  return pc;
+}
+
+
 exec_file_command (filename, from_tty)
      char *filename;
      int from_tty;
index 19f11db10cd68768a3254c60694e8947e040f55e..ab547e8656c753a32fcfa7615f10c57f2018e603 100644 (file)
@@ -1,3 +1,8 @@
+Tue Apr 27 19:14:20 1999  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * gdbint.texinfo (SKIP_PROLOGUE, SKIP_PROLOGUE_FRAMELESS_P):
+       Update.
+
 Thu Apr 22 13:07:37 1999  Andrew Cagney  <cagney@b1.cygnus.com>
 
        * gdbint.texinfo (USE_GENERIC_DUMMY_FRAMES): Document.
index 3ebeae58f0ecb3ff513a5ea5e8021f971521a49a..6dffb98cd9101f21bd9cc9b3a13b7610120d2029 100644 (file)
@@ -1557,12 +1557,12 @@ defined, no conversion will be done.
 (Only used for m88k targets.)
 
 @item SKIP_PROLOGUE (pc)
-A C statement that advances the @var{pc} across any function entry
-prologue instructions so as to reach ``real'' code.
+A C expression that returns the address of the ``real'' code beyond the
+function entry prologue found at @var{pc}.
 
 @item SKIP_PROLOGUE_FRAMELESS_P
-A C statement that should behave similarly, but that can stop as soon as
-the function is known to have a frame.  If not defined,
+A C expression that should behave similarly, but that can stop as soon
+as the function is known to have a frame.  If not defined,
 @code{SKIP_PROLOGUE} will be used instead.
 
 @item SKIP_TRAMPOLINE_CODE (pc)
index 944eec14ad9c67b648c148f45c4142523d69fdee..d578c8d951f90f4146733f19915a9119c6d83ad2 100644 (file)
@@ -37,10 +37,6 @@ extern char *strchr PARAMS ((const char *, int));    /* X3.159-1989  4.11.5.2 */
 extern char *strrchr PARAMS ((const char *, int));     /* X3.159-1989  4.11.5.5 */
 #endif
 
-#ifndef strstr
-extern char *strstr PARAMS ((const char *, const char *));     /* X3.159-1989  4.11.5.7 */
-#endif
-
 #ifndef strtok
 extern char *strtok PARAMS ((char *, const char *));   /* X3.159-1989  4.11.5.8 */
 #endif
@@ -65,4 +61,10 @@ extern char *strerror PARAMS ((int));        /* X3.159-1989  4.11.6.2 */
 extern char *strdup (); /* full prototype collides w/ some OSes (AIX 3.2.5) */
 #endif
 
+#ifdef NEED_DECLARATION_STRSTR
+#ifndef strstr
+extern char *strstr PARAMS ((const char *, const char *));     /* X3.159-1989  4.11.5.7 */
+#endif
+#endif
+
 #endif /* !defined(GDB_STRING_H) */
index b9ee31037862b3b9f9bafa1f95e82d7f666664d7..87d19069e4e7991dd00c951c1355878e52aca510 100644 (file)
@@ -1,5 +1,5 @@
 /* Semi-dynamic architecture support for GDB, the GNU debugger.
-   Copyright 1998, Free Software Foundation, Inc.
+   Copyright 1998-1999, Free Software Foundation, Inc.
 
 This file is part of GDB.
 
@@ -196,27 +196,36 @@ const struct bfd_arch_info *target_architecture = &bfd_default_arch_struct;
 int (*target_architecture_hook) PARAMS ((const struct bfd_arch_info *ap));
 
 /* Do the real work of changing the current architecture */
+
+static int arch_valid PARAMS ((const struct bfd_arch_info *arch));
+static int
+arch_ok (arch)
+     const struct bfd_arch_info *arch;
+{
+  /* Should be performing the more basic check that the binary is
+     compatible with GDB. */
+  /* Check with the target that the architecture is valid. */
+  return (target_architecture_hook == NULL
+         || target_architecture_hook (arch));
+}
+
 enum set_arch { set_arch_auto, set_arch_manual };
+
 static void
 set_arch (arch, type)
      const struct bfd_arch_info *arch;
      enum set_arch type;
 {
-  /* FIXME: Should be performing the more basic check that the binary
-     is compatible with GDB. */
-  /* Check with the target that the architecture is valid. */
-  int arch_valid = (target_architecture_hook != NULL
-                   && !target_architecture_hook (arch));
   switch (type)
     {
     case set_arch_auto:
-      if (!arch_valid)
+      if (!arch_ok (arch))
        warning ("Target may not support %s architecture",
                 arch->printable_name);
       target_architecture = arch;
       break;
     case set_arch_manual:
-      if (!arch_valid)
+      if (!arch_ok (arch))
        {
          printf_unfiltered ("Target does not support `%s' architecture.\n",
                             arch->printable_name);
index beb206b1ba80fa39fd989ed97502ea17ab3d4879..f2380db6f59167cfe037f18bb1465419017f9d44 100644 (file)
@@ -1,5 +1,5 @@
 /* Architecture commands for GDB, the GNU debugger.
-   Copyright 1998, Free Software Foundation, Inc.
+   Copyright 1998-1999, Free Software Foundation, Inc.
 
 This file is part of GDB.
 
@@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 /* The target-system-dependant byte order is dynamic */
 
 /* TARGET_BYTE_ORDER_SELECTABLE_P determines if the target endianness
-   is selectable at runtime.  The user can use the `set endian'
+   is selectable at runtime.  The user can use the ``set endian''
    command to change it.  TARGET_BYTE_ORDER_AUTO is nonzero when
    target_byte_order should be auto-detected (from the program image
    say). */
index 795f8a855106098faad7d919d7b92dabd5ca881c..85dc669cba3315c9461487d5fa9a94a2013aec53 100644 (file)
@@ -2004,6 +2004,10 @@ gnu_attach (args, from_tty)
   attach_flag = 1;
   push_target (&gnu_ops);
 
+  /* We have to initialize the terminal settings now, since the code
+     below might try to restore them.  */
+  target_terminal_init ();
   inf_update_signal_thread (inf);
   inf_set_traced (inf, inf->want_signals);
 
index 782d240805b468205a54a035b04063aba85f6fc7..2572a11906964882e061acc3679d9e820078255e 100644 (file)
@@ -29,12 +29,72 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "command.h"
 #include "floatformat.h"
 
+#include <stdio.h>     /* required for __DJGPP_MINOR__ */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 #include <debug/v2load.h>
 #include <debug/dbgcom.h>
 
+#if __DJGPP_MINOR__ < 3
+/* This code will be provided from DJGPP 2.03 on. Until then I code it
+   here */
+typedef struct {
+  unsigned short sig0;
+  unsigned short sig1;
+  unsigned short sig2;
+  unsigned short sig3;
+  unsigned short exponent:15;
+  unsigned short sign:1;
+} NPXREG;
+
+typedef struct {
+  unsigned int control;
+  unsigned int status;
+  unsigned int tag;
+  unsigned int eip;
+  unsigned int cs;
+  unsigned int dataptr;
+  unsigned int datasel;
+  NPXREG reg[8];
+} NPX;
+
+static NPX npx;
+
+static void save_npx (void); /* Save the FPU of the debugged program */
+static void load_npx (void); /* Restore the FPU of the debugged program */
+
+/* ------------------------------------------------------------------------- */
+/* Store the contents of the NPX in the global variable `npx'.  */
+
+static void
+save_npx (void)
+{
+  asm ("inb    $0xa0, %%al
+       testb   $0x20, %%al
+       jz      1f
+       xorb    %%al, %%al
+       outb    %%al, $0xf0
+       movb    $0x20, %%al
+       outb    %%al, $0xa0
+       outb    %%al, $0x20
+1:
+       fnsave  %0
+       fwait"
+       : "=m" (npx)
+       : /* No input */
+       : "%eax");
+}
+/* ------------------------------------------------------------------------- */
+/* Reload the contents of the NPX from the global variable `npx'.  */
+
+static void
+load_npx (void)
+{
+  asm ("frstor %0" : "=m" (npx));
+}
+#endif /* __DJGPP_MINOR < 3 */
+
 extern void _initialize_go32_nat (void);
 
 struct env387
@@ -58,9 +118,54 @@ extern char **environ;
 
 #define SOME_PID 42
 
-/* FIXME add decls of all static functions here */
-
 static int prog_has_started = 0;
+static void
+print_387_status (unsigned short status, struct env387 *ep);
+static void
+go32_open (char *name, int from_tty);
+static void
+go32_close (int quitting);
+static void
+go32_attach (char *args, int from_tty);
+static void
+go32_detach (char *args, int from_tty);
+static void
+go32_resume (int pid, int step, enum target_signal siggnal);
+static int
+go32_wait (int pid, struct target_waitstatus *status);
+static void
+go32_fetch_registers (int regno);
+static void
+store_register (int regno);
+static void
+go32_store_registers (int regno);
+static void
+go32_prepare_to_store (void);
+static int
+go32_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
+                 struct target_ops *target);
+static void
+go32_files_info (struct target_ops *target);
+static void
+go32_stop (void);
+static void
+go32_kill_inferior (void);
+static void
+go32_create_inferior (char *exec_file, char *args, char **env);
+static void
+go32_mourn_inferior (void);
+static int
+go32_can_run (void);
+static void
+ignore (void);
+static void
+ignore2 (char *a, int b);
+static int go32_insert_aligned_watchpoint (int pid, CORE_ADDR waddr,
+                                          CORE_ADDR addr, int len, int rw);
+static int go32_insert_nonaligned_watchpoint (int pid, CORE_ADDR waddr,
+                                             CORE_ADDR addr, int len, int rw);
+
+static struct target_ops go32_ops;
 
 static void
 print_387_status (unsigned short status, struct env387 *ep)
@@ -245,7 +350,13 @@ go32_wait (int pid, struct target_waitstatus *status)
   else
     a_tss.tss_eflags &= 0xfeff;
 
+#if __DJGPP_MINOR__ < 3
+  save_npx ();
+#endif
   run_child ();
+#if __DJGPP_MINOR__ < 3
+  load_npx ();
+#endif
 
   if (a_tss.tss_irqn == 0x21)
     {
@@ -388,7 +499,6 @@ go32_stop (void)
 static void
 go32_kill_inferior (void)
 {
-  go32_stop ();
   unpush_target (&go32_ops);
 }
 
@@ -401,6 +511,7 @@ go32_create_inferior (char *exec_file, char *args, char **env)
 
   if (prog_has_started)
     {
+      go32_stop ();
       go32_kill_inferior ();
     }
 
@@ -426,6 +537,7 @@ go32_create_inferior (char *exec_file, char *args, char **env)
   clear_proceed_status ();
   insert_breakpoints ();
   proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_0, 0);
+  prog_has_started = 1;
 }
 
 static void
@@ -522,12 +634,6 @@ do { \
 #define SHOW_DR(text) do {} while (0)
 #endif
 
-static int go32_insert_aligned_watchpoint (int pid, CORE_ADDR waddr,
-                                          CORE_ADDR addr, int len, int rw);
-
-static int go32_insert_nonaligned_watchpoint (int pid, CORE_ADDR waddr,
-                                             CORE_ADDR addr, int len, int rw);
-
 /* Insert a watchpoint.  */
 
 int
@@ -706,8 +812,6 @@ go32_insert_hw_breakpoint (CORE_ADDR addr, CORE_ADDR shadow)
   return 0;
 }
 
-static struct target_ops go32_ops;
-
 static void
 init_go32_ops (void)
 {
index 69188c7367741a57a29d219048c4f7a225596de5..ce5f1f82191dccab3450ff3f1ab3bfc1574cc5de 100644 (file)
@@ -3513,7 +3513,7 @@ after_prologue (pc)
    stuff some day.  */
 
 CORE_ADDR
-skip_prologue (pc)
+hppa_skip_prologue (pc)
      CORE_ADDR pc;
 {
     unsigned long inst;
index dbf41c425ceb2c8206e1ca1331067c75fa9e7bb6..d1e632c1eabf716875262f3bb259f593ce000405 100644 (file)
@@ -1,5 +1,5 @@
 /* Native support code for HPUX PA-RISC.
-   Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1998
+   Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1998, 1999
    Free Software Foundation, Inc.
 
    Contributed by the Center for Software Science at the
@@ -66,24 +66,24 @@ store_inferior_registers (regno)
       regaddr = register_addr (regno, offset);
       errno = 0;
       if (regno == PCOQ_HEAD_REGNUM || regno == PCOQ_TAIL_REGNUM)
-        {
-          scratch = *(int *) &registers[REGISTER_BYTE (regno)] | 0x3;
-          call_ptrace (PT_WUREGS, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
-                  scratch);
-          if (errno != 0)
-            {
+       {
+         scratch = *(int *) &registers[REGISTER_BYTE (regno)] | 0x3;
+         call_ptrace (PT_WUREGS, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
+                      scratch);
+         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);
-            }
-        }
+             sprintf (buf, "writing register number %d", regno);
+             perror_with_name (buf);
+           }
+       }
       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]);
+                        *(int *) &registers[REGISTER_BYTE (regno) + i]);
            if (errno != 0)
              {
                /* Warning, not error, in case we are attached; sometimes the
@@ -123,13 +123,12 @@ fetch_register (regno)
     {
       errno = 0;
       *(int *) &buf[i] = call_ptrace (PT_RUREGS, inferior_pid,
-                                (PTRACE_ARG3_TYPE) regaddr, 0);
+                                     (PTRACE_ARG3_TYPE) regaddr, 0);
       regaddr += sizeof (int);
       if (errno != 0)
        {
          /* Warning, not error, in case we are attached; sometimes the
-          * kernel doesn't let us at the registers.
-          */
+            kernel doesn't let us at the registers.  */
          char *err = safe_strerror (errno);
          char *msg = alloca (strlen (err) + 128);
          sprintf (msg, "reading register %s: %s", REGISTER_NAME (regno), err);
@@ -167,77 +166,75 @@ child_xfer_memory (memaddr, myaddr, len, write, target)
   register int count
     = (((memaddr + len) - addr) + sizeof (int) - 1) / sizeof (int);
 
-  /* Allocate buffer of that many longwords.  */
-  /* Note (RT) - This code formerly used alloca, which I have
-   * replaced with xmalloc and a matching free() at the end.
-   * The problem with alloca() is that there is no guarantee of
-   * when it'll be freed, and we were seeing cases of memory
-   * leaks on:
-   * (gdb) watch x
-   * (gdb) cont
-   * where the piled-up alloca's for the child_xfer_memory buffers
-   * were not getting freed.
-   */
+  /* Allocate buffer of that many longwords.
+     Note -- do not use alloca to allocate this buffer since there is no
+     guarantee of when the buffer will actually be deallocated.
+
+     This routine can be called over and over with the same call chain;
+     this (in effect) would pile up all those alloca requests until a call
+     to alloca was made from a point higher than this routine in the
+     call chain.  */
   register int *buffer = (int *) xmalloc (count * sizeof (int));
 
   if (write)
     {
       /* Fill start and end extra bytes of buffer with existing memory data.  */
-
-      if (addr != memaddr || len < (int)sizeof (int)) {
-       /* Need part of initial word -- fetch it.  */
-        buffer[0] = call_ptrace (addr < text_end ? PT_RIUSER : PT_RDUSER, 
-                           inferior_pid, (PTRACE_ARG3_TYPE) addr, 0);
-      }
+      if (addr != memaddr || len < (int)sizeof (int))
+       {
+         /* Need part of initial word -- fetch it.  */
+         buffer[0] = call_ptrace (addr < text_end ? PT_RIUSER : PT_RDUSER, 
+                                  inferior_pid, (PTRACE_ARG3_TYPE) addr, 0);
+       }
 
       if (count > 1)           /* FIXME, avoid if even boundary */
        {
          buffer[count - 1]
-           = call_ptrace (addr < text_end ? PT_RIUSER : PT_RDUSER, inferior_pid,
-                     (PTRACE_ARG3_TYPE) (addr + (count - 1) * sizeof (int)),
-                     0);
+           = call_ptrace (addr < text_end ? PT_RIUSER : PT_RDUSER,
+                          inferior_pid,
+                          (PTRACE_ARG3_TYPE) (addr
+                                              + (count - 1) * sizeof (int)),
+                          0);
        }
 
       /* Copy data to be written over corresponding part of buffer */
-
       memcpy ((char *) buffer + (memaddr & (sizeof (int) - 1)), myaddr, len);
 
       /* Write the entire buffer.  */
-
       for (i = 0; i < count; i++, addr += sizeof (int))
        {
-          int  pt_status;
-          int  pt_request;
-         /* The HP-UX kernel crashes if you use PT_WDUSER to write into the text
-            segment.  FIXME -- does it work to write into the data segment using
-            WIUSER, or do these idiots really expect us to figure out which segment
-            the address is in, so we can use a separate system call for it??!  */
+         int pt_status;
+         int pt_request;
+         /* The HP-UX kernel crashes if you use PT_WDUSER to write into the
+            text segment.  FIXME -- does it work to write into the data
+            segment using WIUSER, or do these idiots really expect us to
+            figure out which segment the address is in, so we can use a
+            separate system call for it??!  */
          errno = 0;
-          pt_request = (addr < text_end) ? PT_WIUSER : PT_WDUSER;
+         pt_request = (addr < text_end) ? PT_WIUSER : PT_WDUSER;
          pt_status = call_ptrace (pt_request,
-                                   inferior_pid, 
-                                   (PTRACE_ARG3_TYPE) addr,
-                                   buffer[i]);
-
-          /* Did we fail?  Might we've guessed wrong about which
-             segment this address resides in?  Try the other request,
-             and see if that works...
-             */
-         if ((pt_status == -1) && errno) {
-            errno = 0;
-            pt_request = (pt_request == PT_WIUSER) ? PT_WDUSER : PT_WIUSER;
-            pt_status = call_ptrace (pt_request,
-                                     inferior_pid, 
-                                     (PTRACE_ARG3_TYPE) addr,
-                                     buffer[i]);
-
-            /* No, we still fail.  Okay, time to punt. */
-            if ((pt_status == -1) && errno)
-              {
-                free(buffer);
-                return 0;
-              }
-         }
+                                  inferior_pid, 
+                                  (PTRACE_ARG3_TYPE) addr,
+                                  buffer[i]);
+
+         /* Did we fail?  Might we've guessed wrong about which
+            segment this address resides in?  Try the other request,
+            and see if that works...  */
+         if ((pt_status == -1) && errno)
+           {
+             errno = 0;
+             pt_request = (pt_request == PT_WIUSER) ? PT_WDUSER : PT_WIUSER;
+             pt_status = call_ptrace (pt_request,
+                                      inferior_pid, 
+                                      (PTRACE_ARG3_TYPE) addr,
+                                      buffer[i]);
+
+             /* No, we still fail.  Okay, time to punt. */
+             if ((pt_status == -1) && errno)
+               {
+                 free(buffer);
+                 return 0;
+               }
+           }
        }
     }
   else
@@ -247,11 +244,12 @@ child_xfer_memory (memaddr, myaddr, len, write, target)
        {
          errno = 0;
          buffer[i] = call_ptrace (addr < text_end ? PT_RIUSER : PT_RDUSER, 
-                             inferior_pid, (PTRACE_ARG3_TYPE) addr, 0);
-         if (errno) {
-           free(buffer);
-           return 0;
-         }
+                                  inferior_pid, (PTRACE_ARG3_TYPE) addr, 0);
+         if (errno)
+           {
+             free(buffer);
+             return 0;
+           }
          QUIT;
        }
 
@@ -266,7 +264,7 @@ child_xfer_memory (memaddr, myaddr, len, write, target)
 void
 child_post_follow_inferior_by_clone ()
 {
-  int  status;
+  int status;
 
   /* This function is used when following both the parent and child
      of a fork.  In this case, the debugger clones itself.  The original
@@ -283,12 +281,11 @@ child_post_follow_inferior_by_clone ()
 
 void
 child_post_follow_vfork (parent_pid, followed_parent, child_pid, followed_child)
-     int  parent_pid;
-     int  followed_parent;
-     int  child_pid;
-     int  followed_child;
+     int parent_pid;
+     int followed_parent;
+     int child_pid;
+     int followed_child;
 {
-
   /* Are we a debugger that followed the parent of a vfork?  If so,
      then recall that the child's vfork event was delivered to us
      first.  And, that the parent was suspended by the OS until the
@@ -312,48 +309,46 @@ child_post_follow_vfork (parent_pid, followed_parent, child_pid, followed_child)
 
   /* Are we a debugger that followed the child of a vfork?  If so,
      then recall that we don't actually acquire control of the child
-     until after it has exec'd or exited.
-     */
+     until after it has exec'd or exited.  */
   if (followed_child)
     {
       /* If the child has exited, then there's nothing for us to do.
-         In the case of an exec event, we'll let that be handled by
-         the normal mechanism that notices and handles exec events, in
-         resume(). */
-
+        In the case of an exec event, we'll let that be handled by
+        the normal mechanism that notices and handles exec events, in
+        resume(). */
     }
 }
 
-/* Format a process id, given a pid.  Be sure to terminate
- * this with a null--it's going to be printed via a "%s".
- */
+/* Format a process id, given PID.  Be sure to terminate
+   this with a null--it's going to be printed via a "%s".  */
 char *
-hppa_pid_to_str( pid )
+hppa_pid_to_str (pid)
     pid_t pid;
 {
-    static char buf[30]; /* Static because address returned */
+    /* Static because address returned */
+    static char buf[30];
 
-    sprintf( buf, "process %d\0\0\0\0", pid );
-             /* Extra NULLs for paranoia's sake */
-             
+    /* Extra NULLs for paranoia's sake */
+    sprintf (buf, "process %d\0\0\0\0", pid);
+            
     return buf;
 }
 
-/* Format a thread id, given a tid.  Be sure to terminate
- * this with a null--it's going to be printed via a "%s".
- *
- * Note: This is a core-gdb tid, not the actual system tid.
- *       See infttrace.c for details.
- */
+/* Format a thread id, given TID.  Be sure to terminate
+   this with a null--it's going to be printed via a "%s".
+
+   Note: This is a core-gdb tid, not the actual system tid.
+         See infttrace.c for details.  */
 char *
-hppa_tid_to_str( tid )
+hppa_tid_to_str (tid)
     pid_t tid;
 {
-    static char buf[30]; /* Static because address returned */
+    /* Static because address returned */
+    static char buf[30];
 
-    sprintf( buf, "system thread %d\0\0\0\0", tid );
-             /* Extra NULLs for paranoia's sake */
-             
+    /* Extra NULLs for paranoia's sake */
+    sprintf (buf, "system thread %d\0\0\0\0", tid);
+            
     return buf;
 }
 
@@ -420,13 +415,13 @@ parent_attach_all (pid, addr, data)
 
   /* Notify the parent that we're potentially ready to exec(). */
   write (startup_semaphore.child_channel[SEM_TALK],
-         &tc_magic_child,
-         sizeof (tc_magic_child));
+        &tc_magic_child,
+        sizeof (tc_magic_child));
 
   /* Wait for acknowledgement from the parent. */
   read (startup_semaphore.parent_channel[SEM_LISTEN],
-        &tc_magic_parent,
-        sizeof (tc_magic_parent));
+       &tc_magic_parent,
+       sizeof (tc_magic_parent));
   if (tc_magic_child != tc_magic_parent)
       warning ("mismatched semaphore magic");
 
@@ -446,8 +441,8 @@ hppa_require_attach (pid)
      int pid;
 {
   int pt_status;
-  CORE_ADDR  pc;
-  CORE_ADDR  pc_addr;
+  CORE_ADDR pc;
+  CORE_ADDR pc_addr;
   unsigned int regs_offset;
 
   /* Are we already attached?  There appears to be no explicit way to
@@ -466,7 +461,7 @@ hppa_require_attach (pid)
       pt_status = call_ptrace (PT_ATTACH, pid, (PTRACE_ARG3_TYPE) 0, 0);
 
       if (errno)
-        return -1;
+       return -1;
 
       /* Now we really are attached. */
       errno = 0;
@@ -580,7 +575,7 @@ hppa_resume_execd_vforking_child_to_get_parent_vfork ()
 
 void
 require_notification_of_events (pid)
-  int pid;
+     int pid;
 {
 #if defined(PT_SET_EVENT_MASK)
   int pt_status;
@@ -589,15 +584,13 @@ require_notification_of_events (pid)
   /* Instruct the kernel as to the set of events we wish to be
      informed of.  (This support does not exist before HPUX 10.0.
      We'll assume if PT_SET_EVENT_MASK has not been defined by
-     <sys/ptrace.h>, then we're being built on pre-10.0.)
-     */
+     <sys/ptrace.h>, then we're being built on pre-10.0.)  */
   memset (&ptrace_events, 0, sizeof (ptrace_events));
 
   /* Note: By default, all signals are visible to us.  If we wish
      the kernel to keep certain signals hidden from us, we do it
      by calling sigdelset (ptrace_events.pe_signals, signal) for
-     each such signal here, before doing PT_SET_EVENT_MASK.
-     */
+     each such signal here, before doing PT_SET_EVENT_MASK.  */
   sigemptyset (&ptrace_events.pe_signals);
 
   ptrace_events.pe_set_event = 0;
@@ -612,9 +605,9 @@ require_notification_of_events (pid)
 
   errno = 0;
   pt_status = call_ptrace (PT_SET_EVENT_MASK,
-                      pid,
-                      (PTRACE_ARG3_TYPE) &ptrace_events,
-                      sizeof (ptrace_events));
+                     pid,
+                     (PTRACE_ARG3_TYPE) &ptrace_events,
+                     sizeof (ptrace_events));
   if (errno)
     perror_with_name ("ptrace");
   if (pt_status < 0)
@@ -624,7 +617,7 @@ require_notification_of_events (pid)
 
 void
 require_notification_of_exec_events (pid)
-  int pid;
+     int pid;
 {
 #if defined(PT_SET_EVENT_MASK)
   int pt_status;
@@ -633,15 +626,13 @@ require_notification_of_exec_events (pid)
   /* Instruct the kernel as to the set of events we wish to be
      informed of.  (This support does not exist before HPUX 10.0.
      We'll assume if PT_SET_EVENT_MASK has not been defined by
-     <sys/ptrace.h>, then we're being built on pre-10.0.)
-     */
+     <sys/ptrace.h>, then we're being built on pre-10.0.)  */
   memset (&ptrace_events, 0, sizeof (ptrace_events));
 
   /* Note: By default, all signals are visible to us.  If we wish
      the kernel to keep certain signals hidden from us, we do it
      by calling sigdelset (ptrace_events.pe_signals, signal) for
-     each such signal here, before doing PT_SET_EVENT_MASK.
-     */
+     each such signal here, before doing PT_SET_EVENT_MASK.  */
   sigemptyset (&ptrace_events.pe_signals);
 
   ptrace_events.pe_set_event = 0;
@@ -653,9 +644,9 @@ require_notification_of_exec_events (pid)
 
   errno = 0;
   pt_status = call_ptrace (PT_SET_EVENT_MASK,
-                      pid,
-                      (PTRACE_ARG3_TYPE) &ptrace_events,
-                      sizeof (ptrace_events));
+                     pid,
+                     (PTRACE_ARG3_TYPE) &ptrace_events,
+                     sizeof (ptrace_events));
   if (errno)
     perror_with_name ("ptrace");
   if (pt_status < 0)
@@ -668,26 +659,29 @@ require_notification_of_exec_events (pid)
 
 void
 child_acknowledge_created_inferior (pid)
-    int pid;
+     int pid;
 {
   /* We need a memory home for a constant.  */
   int tc_magic_parent = PT_VERSION;
   int tc_magic_child = 0;
 
+  /* The remainder of this function is only useful for HPUX 10.0 and
+     later, as it depends upon the ability to request notification
+     of specific kinds of events by the kernel.  */
+#if defined(PT_SET_EVENT_MASK)
   /* Wait for the child to tell us that it has forked. */
   read (startup_semaphore.child_channel[SEM_LISTEN],
-        &tc_magic_child,
-        sizeof(tc_magic_child));
+       &tc_magic_child,
+       sizeof(tc_magic_child));
 
   /* Notify the child that it can exec.
 
      In the infttrace.c variant of this function, we set the child's
      event mask after the fork but before the exec.  In the ptrace
      world, it seems we can't set the event mask until after the exec.  */
-
   write (startup_semaphore.parent_channel[SEM_TALK],
-         &tc_magic_parent,
-         sizeof (tc_magic_parent));
+        &tc_magic_parent,
+        sizeof (tc_magic_parent));
 
   /* We'd better pause a bit before trying to set the event mask,
      though, to ensure that the exec has happened.  We don't want to
@@ -697,12 +691,10 @@ child_acknowledge_created_inferior (pid)
      After an exec, the child is no longer executing gdb code.  Hence,
      we can't have yet another synchronization via the pipes.  We'll
      just sleep for a second, and hope that's enough delay...  */
-
   sleep (1);
 
   /* Instruct the kernel as to the set of events we wish to be
      informed of.  */
-
   require_notification_of_exec_events (pid);
 
   /* Discard our copy of the semaphore. */
@@ -710,26 +702,26 @@ child_acknowledge_created_inferior (pid)
   (void) close (startup_semaphore.parent_channel[SEM_TALK]);
   (void) close (startup_semaphore.child_channel[SEM_LISTEN]);
   (void) close (startup_semaphore.child_channel[SEM_TALK]);
+#endif
 }
 
 void
 child_post_startup_inferior (pid)
-  int pid;
-
+     int pid;
 {
   require_notification_of_events (pid);
 }
 
 void
 child_post_attach (pid)
-  int pid;
+     int pid;
 {
   require_notification_of_events (pid);
 }
 
 int
 child_insert_fork_catchpoint (pid)
-  int pid;
+     int pid;
 {
   /* This request is only available on HPUX 10.0 and later.  */
 #if !defined(PT_SET_EVENT_MASK)
@@ -737,15 +729,14 @@ child_insert_fork_catchpoint (pid)
 #else
   /* Enable reporting of fork events from the kernel. */
   /* ??rehrauer: For the moment, we're always enabling these events,
-     and just ignoring them if there's no catchpoint to catch them.
-     */
+     and just ignoring them if there's no catchpoint to catch them.  */
   return 0;
 #endif
 }
 
 int
 child_remove_fork_catchpoint (pid)
-  int pid;
+     int pid;
 {
   /* This request is only available on HPUX 10.0 and later.  */
 #if !defined(PT_SET_EVENT_MASK)
@@ -760,7 +751,7 @@ child_remove_fork_catchpoint (pid)
 
 int
 child_insert_vfork_catchpoint (pid)
-  int pid;
+     int pid;
 {
   /* This request is only available on HPUX 10.0 and later.  */
 #if !defined(PT_SET_EVENT_MASK)
@@ -775,7 +766,7 @@ child_insert_vfork_catchpoint (pid)
 
 int
 child_remove_vfork_catchpoint (pid)
-  int pid;
+     int pid;
 {
   /* This request is only available on HPUX 10.0 and later.  */
 #if !defined(PT_SET_EVENT_MASK)
@@ -790,8 +781,8 @@ child_remove_vfork_catchpoint (pid)
 
 int
 child_has_forked (pid, childpid)
-  int pid;
-  int *  childpid;
+     int pid;
+     int *childpid;
 {
   /* This request is only available on HPUX 10.0 and later.  */
 #if !defined(PT_GET_PROCESS_STATE)
@@ -803,9 +794,9 @@ child_has_forked (pid, childpid)
 
   errno = 0;
   pt_status = call_ptrace (PT_GET_PROCESS_STATE,
-                      pid,
-                      (PTRACE_ARG3_TYPE) &ptrace_state,
-                      sizeof (ptrace_state));
+                          pid,
+                          (PTRACE_ARG3_TYPE) &ptrace_state,
+                          sizeof (ptrace_state));
   if (errno)
     perror_with_name ("ptrace");
   if (pt_status < 0)
@@ -823,8 +814,8 @@ child_has_forked (pid, childpid)
 
 int
 child_has_vforked (pid, childpid)
-  int pid;
-  int * childpid;
+     int pid;
+     int *childpid;
 {
   /* This request is only available on HPUX 10.0 and later.  */
 #if !defined(PT_GET_PROCESS_STATE)
@@ -837,9 +828,9 @@ child_has_vforked (pid, childpid)
 
   errno = 0;
   pt_status = call_ptrace (PT_GET_PROCESS_STATE,
-                      pid,
-                      (PTRACE_ARG3_TYPE) &ptrace_state,
-                      sizeof (ptrace_state));
+                          pid,
+                          (PTRACE_ARG3_TYPE) &ptrace_state,
+                          sizeof (ptrace_state));
   if (errno)
     perror_with_name ("ptrace");
   if (pt_status < 0)
@@ -864,48 +855,42 @@ child_can_follow_vfork_prior_to_exec ()
 
 int
 child_insert_exec_catchpoint (pid)
-  int pid;
+     int pid;
 {
-  /* This request is only available on HPUX 10.0 and later.
-     */
+  /* This request is only available on HPUX 10.0 and later.   */
 #if !defined(PT_SET_EVENT_MASK)
   error ("Unable to catch execs prior to HPUX 10.0");
 
 #else
-  /* Enable reporting of exec events from the kernel. */
+  /* Enable reporting of exec events from the kernel.  */
   /* ??rehrauer: For the moment, we're always enabling these events,
-     and just ignoring them if there's no catchpoint to catch them.
-     */
+     and just ignoring them if there's no catchpoint to catch them.  */
   return 0;
 #endif
 }
 
 int
 child_remove_exec_catchpoint (pid)
-  int pid;
+     int pid;
 {
-  /* This request is only available on HPUX 10.0 and later.
-     */
+  /* This request is only available on HPUX 10.0 and later.  */
 #if !defined(PT_SET_EVENT_MASK)
   error ("Unable to catch execs prior to HPUX 10.0");
 
 #else
   /* Disable reporting of exec events from the kernel. */
   /* ??rehrauer: For the moment, we're always enabling these events,
-     and just ignoring them if there's no catchpoint to catch them.
-     */
+     and just ignoring them if there's no catchpoint to catch them.  */
   return 0;
 #endif
 }
 
 int
 child_has_execd (pid, execd_pathname)
-  int pid;
-  char **  execd_pathname;
+     int pid;
+     char **execd_pathname;
 {
-
-  /* This request is only available on HPUX 10.0 and later.
-     */
+  /* This request is only available on HPUX 10.0 and later.  */
 #if !defined(PT_GET_PROCESS_STATE)
   *execd_pathname = NULL;
   return 0;
@@ -916,9 +901,9 @@ child_has_execd (pid, execd_pathname)
 
   errno = 0;
   pt_status = call_ptrace (PT_GET_PROCESS_STATE,
-                      pid,
-                      (PTRACE_ARG3_TYPE) &ptrace_state,
-                      sizeof (ptrace_state));
+                          pid,
+                          (PTRACE_ARG3_TYPE) &ptrace_state,
+                          sizeof (ptrace_state));
   if (errno)
     perror_with_name ("ptrace");
   if (pt_status < 0)
@@ -957,23 +942,23 @@ child_has_syscall_event (pid, kind, syscall_id)
 
 char *
 child_pid_to_exec_file (pid)
-    int pid;
+     int pid;
 {
-  static char  exec_file_buffer[1024];
+  static char exec_file_buffer[1024];
   int pt_status;
-  CORE_ADDR  top_of_stack;
-  char  four_chars[4];
+  CORE_ADDR top_of_stack;
+  char four_chars[4];
   int name_index;
   int i;
   int saved_inferior_pid;
-  boolean  done;
+  boolean done;
   
 #ifdef PT_GET_PROCESS_PATHNAME
   /* As of 10.x HP-UX, there's an explicit request to get the pathname. */
   pt_status = call_ptrace (PT_GET_PROCESS_PATHNAME,
-                           pid,
-                           (PTRACE_ARG3_TYPE) exec_file_buffer,
-                           sizeof (exec_file_buffer) - 1);
+                          pid,
+                          (PTRACE_ARG3_TYPE) exec_file_buffer,
+                          sizeof (exec_file_buffer) - 1);
   if (pt_status == 0)
     return exec_file_buffer;
 #endif
index 36421f390ab1289a3343e61fb8ea0088e5b2d3e9..64b932ee7af0f5e2a97ef47f41cfda3790a35577 100644 (file)
@@ -620,7 +620,7 @@ init_hpux_thread_ops ()
   hpux_thread_ops.to_mourn_inferior = hpux_thread_mourn_inferior;
   hpux_thread_ops.to_can_run = hpux_thread_can_run;
   hpux_thread_ops.to_notice_signals = hpux_thread_notice_signals;
-  hpux_thread_ops.to_thread_alive = hpux_thread_thread_alive;
+  hpux_thread_ops.to_thread_alive = hpux_thread_alive;
   hpux_thread_ops.to_stop = hpux_thread_stop;
   hpux_thread_ops.to_stratum = process_stratum;
   hpux_thread_ops.to_has_all_memory = 1;
index bb2087a73eb7276ff7495d43a3c7df92cb868df4..4e16de1518873b831bcdff853bc9880406c249af 100644 (file)
@@ -312,7 +312,7 @@ examine_prologue (ip, limit, frame_addr, fsr)
    prologue.  */
 
 CORE_ADDR
-skip_prologue (ip)
+i960_skip_prologue (ip)
      CORE_ADDR (ip);
 {
   struct frame_saved_regs saved_regs_dummy;
index b6df2e9afe1a532c759b22ea0064f043ea8696ff..16ec0b7c35566677bb26717291ca2818024c2a5b 100644 (file)
@@ -503,16 +503,16 @@ jump_command (arg, from_tty)
 \f
 /* Go to line or address in current procedure */
 static void
-go_command(line_no, from_tty)
+go_command (line_no, from_tty)
      char *line_no;
      int from_tty;
 {
   if (line_no == (char *)NULL || !*line_no)
-    printf_filtered(GO_USAGE);
+    printf_filtered (GO_USAGE);
   else
     {
-      tbreak_command(line_no, from_tty);
-      jump_command(line_no, from_tty);
+      tbreak_command (line_no, from_tty);
+      jump_command (line_no, from_tty);
     }
 }
 
@@ -1496,15 +1496,17 @@ Execution will also stop upon exit from the current stack frame.");
 Give as argument either LINENUM or *ADDR, where ADDR is an expression\n\
 for an address to start at.");
 
-  add_com ("go", class_run, go_command,
-          "Usage: go <location>\n\
+  if (xdb_commands)
+    add_com ("go", class_run, go_command,
+            "Usage: go <location>\n\
 Continue program being debugged, stopping at specified line or \n\
 address.\n\
 Give as argument either LINENUM or *ADDR, where ADDR is an \n\
 expression for an address to start at.\n\
 This command is a combination of tbreak and jump.");
+
   if (xdb_commands)
-    add_com_alias("g", "g", class_run, 1);
+    add_com_alias("g", "go", class_run, 1);
 
   add_com ("continue", class_run, continue_command,
           "Continue program being debugged, after signal or breakpoint.\n\
index 12f1cd390d3ee58906a2bcbcd2ca810dee8f9f59..d1a2d9b338eaea645760e3b09346a6f9cba3d29a 100644 (file)
@@ -1056,6 +1056,17 @@ delete_breakpoint_current_contents (arg)
    When this function actually returns it means the inferior
    should be left stopped and GDB should read more commands.  */
 
+/* This enum encodes possible reasons for doing a target_wait, so that
+   wfi can call target_wait in one place.  (Ultimately the call will be
+   moved out of the infinite loop entirely.) */
+
+enum wfi_states {
+  wfi_normal_state,
+  wfi_thread_hop_state,
+  wfi_nullified_state,
+  wfi_nonstep_watch_state
+};
+
 void
 wait_for_inferior ()
 {
@@ -1081,6 +1092,10 @@ wait_for_inferior ()
   int stepping_through_sigtramp = 0;
   int new_thread_event;
   int stepped_after_stopped_by_watchpoint;
+  struct target_waitstatus tmpstatus;
+  enum wfi_states wfi_state;
+  int waiton_pid;
+  struct target_waitstatus *wp;
 
   old_cleanups = make_cleanup (delete_breakpoint_current_contents,
                               &step_resume_breakpoint);
@@ -1105,43 +1120,75 @@ wait_for_inferior ()
   if (may_switch_from_inferior_pid)
     switched_from_inferior_pid = inferior_pid;
 
+  wfi_state = wfi_normal_state;
+
   while (1)
     {
-      overlay_cache_invalid = 1;
+      if (wfi_state == wfi_normal_state)
+       {
+         overlay_cache_invalid = 1;
 
-      /* We have to invalidate the registers BEFORE calling target_wait because
-        they can be loaded from the target while in target_wait.  This makes
-        remote debugging a bit more efficient for those targets that provide
-        critical registers as part of their normal status mechanism. */
+         /* We have to invalidate the registers BEFORE calling
+            target_wait because they can be loaded from the target
+            while in target_wait.  This makes remote debugging a bit
+            more efficient for those targets that provide critical
+            registers as part of their normal status mechanism. */
 
-      registers_changed ();
+         registers_changed ();
+         waiton_pid = -1;
+         wp = &w;
+       }
 
       if (target_wait_hook)
-       pid = target_wait_hook (-1, &w);
+       pid = target_wait_hook (waiton_pid, wp);
       else
-       pid = target_wait (-1, &w);
-
-      /* Since we've done a wait, we have a new event.  Don't carry
-         over any expectations about needing to step over a
-         breakpoint. */
-      thread_step_needed = 0;
+       pid = target_wait (waiton_pid, wp);
 
-      /* See comments where a TARGET_WAITKIND_SYSCALL_RETURN event is
-         serviced in this loop, below. */
-      if (enable_hw_watchpoints_after_wait)
+      switch (wfi_state)
        {
-         TARGET_ENABLE_HW_WATCHPOINTS (inferior_pid);
-         enable_hw_watchpoints_after_wait = 0;
-       }
+       case wfi_normal_state:
+         /* Since we've done a wait, we have a new event.  Don't
+            carry over any expectations about needing to step over a
+            breakpoint. */
+         thread_step_needed = 0;
 
-      stepped_after_stopped_by_watchpoint = 0;
+         /* See comments where a TARGET_WAITKIND_SYSCALL_RETURN event
+            is serviced in this loop, below. */
+         if (enable_hw_watchpoints_after_wait)
+           {
+             TARGET_ENABLE_HW_WATCHPOINTS (inferior_pid);
+             enable_hw_watchpoints_after_wait = 0;
+           }
+         stepped_after_stopped_by_watchpoint = 0;
+         break;
+
+       case wfi_thread_hop_state:
+         insert_breakpoints ();
 
-      /* Gross.
+         /* We need to restart all the threads now,
+          * unles we're running in scheduler-locked mode. 
+          * FIXME: shouldn't we look at CURRENTLY_STEPPING ()?
+          */
+         if (scheduler_mode == schedlock_on)
+           target_resume (pid, 0, TARGET_SIGNAL_0);
+         else
+           target_resume (-1, 0, TARGET_SIGNAL_0);
+         wfi_state = wfi_normal_state;
+         continue;
 
-       We goto this label from elsewhere in wait_for_inferior when we want
-       to continue the main loop without calling "wait" and trashing the
-       waitstatus contained in W.  */
-    have_waited:
+       case wfi_nullified_state:
+         break;
+
+       case wfi_nonstep_watch_state:
+         insert_breakpoints ();
+
+         /* FIXME-maybe: is this cleaner than setting a flag?  Does it
+            handle things like signals arriving and other things happening
+            in combination correctly?  */
+         stepped_after_stopped_by_watchpoint = 1;
+         break;
+       }
+      wfi_state = wfi_normal_state;
 
       flush_cached_frames ();
 
@@ -1536,11 +1583,10 @@ wait_for_inferior ()
                      /* FIXME: What if a signal arrives instead of the
                           single-step happening?  */
 
-                     if (target_wait_hook)
-                       target_wait_hook (pid, &w);
-                     else
-                       target_wait (pid, &w);
-                     insert_breakpoints ();
+                     waiton_pid = pid;
+                     wp = &w;
+                     wfi_state = wfi_thread_hop_state;
+                     continue;
                    }
 
                    /* We need to restart all the threads now,
@@ -1551,7 +1597,7 @@ wait_for_inferior ()
                      target_resume (pid, 0, TARGET_SIGNAL_0);
                    else
                      target_resume (-1, 0, TARGET_SIGNAL_0);
-                 continue;
+                   continue;
                }
              else
                {
@@ -1673,21 +1719,17 @@ wait_for_inferior ()
       /*      if (INSTRUCTION_NULLIFIED && CURRENTLY_STEPPING ()) */
       if (INSTRUCTION_NULLIFIED)
        {
-         struct target_waitstatus tmpstatus;
-
          registers_changed ();
          target_resume (pid, 1, TARGET_SIGNAL_0);
 
          /* We may have received a signal that we want to pass to
             the inferior; therefore, we must not clobber the waitstatus
-            in W.  So we call wait ourselves, then continue the loop
-            at the "have_waited" label.  */
-         if (target_wait_hook)
-           target_wait_hook (pid, &tmpstatus);
-         else
-           target_wait (pid, &tmpstatus);
+            in W. */
 
-         goto have_waited;
+         wfi_state = wfi_nullified_state;
+         waiton_pid = pid;
+         wp = &tmpstatus;
+         continue;
        }
 
       /* It may not be necessary to disable the watchpoint to stop over
@@ -1727,17 +1769,10 @@ wait_for_inferior ()
          registers_changed ();
          target_resume (pid, 1, TARGET_SIGNAL_0);      /* Single step */
 
-         if (target_wait_hook)
-           target_wait_hook (pid, &w);
-         else
-           target_wait (pid, &w);
-         insert_breakpoints ();
-
-         /* FIXME-maybe: is this cleaner than setting a flag?  Does it
-            handle things like signals arriving and other things happening
-            in combination correctly?  */
-         stepped_after_stopped_by_watchpoint = 1;
-         goto have_waited;
+         waiton_pid = pid;
+         wp = &w;
+         wfi_state = wfi_nonstep_watch_state;
+         continue;
        }
 
       /* It may be possible to simply continue after a watchpoint.  */
@@ -2477,7 +2512,7 @@ wait_for_inferior ()
 
            s = find_pc_symtab (stop_pc);
            if (s && s->language != language_asm)
-             SKIP_PROLOGUE (stop_func_start);
+             stop_func_start = SKIP_PROLOGUE (stop_func_start);
          }
          sal = find_pc_line (stop_func_start, 0);
          /* Use the step_resume_break to step until
index c751604aefdc2e5438072803d1550ac230561d53..56e55526f6bab2f1ddcc021182c0a804f2235ba1 100644 (file)
@@ -26,6 +26,53 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "inferior.h"
 
 \f
+/* The only reason this is here is the tm-altos.h reference below.  It
+   was moved back here from tm-m68k.h.  FIXME? */
+
+extern CORE_ADDR
+altos_skip_prologue (pc)
+     CORE_ADDR pc;
+{
+  register int op = read_memory_integer (pc, 2);
+  if (op == 0047126)
+    pc += 4;   /* Skip link #word */
+  else if (op == 0044016)
+    pc += 6;   /* Skip link #long */
+  /* Not sure why branches are here.  */
+  /* From tm-isi.h, tm-altos.h */
+  else if (op == 0060000)
+    pc += 4;   /* Skip bra #word */
+  else if (op == 00600377)
+    pc += 6;   /* skip bra #long */
+  else if ((op & 0177400) == 0060000)
+    pc += 2;   /* skip bra #char */
+  return pc;
+}
+
+/* The only reason this is here is the tm-isi.h reference below.  It
+   was moved back here from tm-m68k.h.  FIXME? */
+
+extern CORE_ADDR
+isi_skip_prologue (pc)
+     CORE_ADDR pc;
+{
+  register int op = read_memory_integer (pc, 2);
+  if (op == 0047126)
+    pc += 4;   /* Skip link #word */
+  else if (op == 0044016)
+    pc += 6;   /* Skip link #long */
+  /* Not sure why branches are here.  */
+  /* From tm-isi.h, tm-altos.h */
+  else if (op == 0060000)
+    pc += 4;   /* Skip bra #word */
+  else if (op == 00600377)
+    pc += 6;   /* skip bra #long */
+  else if ((op & 0177400) == 0060000)
+    pc += 2;   /* skip bra #char */
+  return pc;
+}
+
+
 /* Push an empty stack frame, to record the current PC, etc.  */
 
 void
index f82cb764d0696c4364af7b4b5bb1c619304e38e6..2ac433526c7dd3880f15dbe0e3e85e2b9a912942 100644 (file)
@@ -401,7 +401,7 @@ end_of_prologue_found:
    prologue.  */
 
 CORE_ADDR
-skip_prologue (ip)
+m88k_skip_prologue (ip)
      CORE_ADDR (ip);
 {
   struct frame_saved_regs saved_regs_dummy;
index 1fef7bcfa67aea82ea73ecab5302c1f39c52a574..809ef863af5b083a6ff73ab7f12d4bf681d7a3ba 100644 (file)
@@ -571,9 +571,14 @@ main (argc, argv)
     {
       if (!SET_TOP_LEVEL ())
        {
+         /* NOTE: I am commenting this out, because it is not clear
+            where this feature is used. It is very old and
+            undocumented. ezannoni: 5/4/99*/
+#if 0
          if (cmdarg[i][0] == '-' && cmdarg[i][1] == '\0')
            read_command_file (stdin);
          else
+#endif
            source_command (cmdarg[i], !batch);
          do_cleanups (ALL_CLEANUPS);
        }
index 3edb7f5d5d99eeb9d711ee5c669ecd4bb8334b81..775e8afd53a6002fe1a02478eecae1f75e1f2e5e 100644 (file)
@@ -26,6 +26,46 @@ _initialize_ns32k_tdep ()
   tm_print_insn = print_insn_ns32k;
 }
 
+/* Advance PC across any function entry prologue instructions
+   to reach some "real" code.  */
+
+CORE_ADDR
+merlin_skip_prologue (pc)
+     CORE_ADDR pc;
+{
+  register int op = read_memory_integer (pc, 1);
+  if (op == 0x82)
+    {
+      op = read_memory_integer (pc+2,1);
+      if ((op & 0x80) == 0)
+       pc += 3;
+      else if ((op & 0xc0) == 0x80)
+       pc += 4;
+      else pc += 6;
+    }
+  return pc;
+}
+
+CORE_ADDR
+umax_skip_prologue (pc)
+     CORE_ADDR pc;
+{
+  register unsigned char op = read_memory_integer (pc, 1);
+  if (op == 0x82)
+    {
+      op = read_memory_integer (pc+2,1);
+      if ((op & 0x80) == 0)
+       pc += 3;
+      else if ((op & 0xc0) == 0x80)
+       pc += 4;
+      else
+       pc += 6;
+    } 
+  return pc;
+}
+
+
+
 sign_extend (value, bits)
 {
   value = value & ((1 << bits) - 1);
index 6822f422a63e1f119ea441260968aae884daee22..8a68a8964976f485d487ca2231cb845310989872 100644 (file)
@@ -1831,7 +1831,7 @@ init_syscall_table ()
 
 LOCAL FUNCTION
 
-       procfs_kill_inferior - kill any currently inferior
+       procfs_kill_inferior - kill any current inferior
 
 SYNOPSIS
 
@@ -3631,7 +3631,7 @@ DESCRIPTION
 
        If we are not delivering the same signal that the prstatus siginfo
        struct contains information about, then synthesize a siginfo struct
-       to match the signal we are doing to deliver, make it of the type
+       to match the signal we are going to deliver, make it of the type
        "generated by a user process", and send this synthesized copy.  When
        used to set the inferior's signal state, this will be required if we
        are not currently stopped because of a traced signal, or if we decide
index 9f84f5df82b6bddec2d9825a0a33097aab7adfa1..6ec108c9a3240e00c8eb327662b8886a7b5c6c3d 100644 (file)
@@ -3384,6 +3384,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
   remote_ops.to_load = generic_load;           
   remote_ops.to_mourn_inferior = remote_mourn;
   remote_ops.to_thread_alive = remote_thread_alive;
+  remote_ops.to_find_new_threads = remote_find_new_threads;
   remote_ops.to_stop = remote_stop;
   remote_ops.to_query = remote_query;
   remote_ops.to_stratum = process_stratum;
@@ -3472,8 +3473,9 @@ in a memory packet.\n",
                  &setlist),
      &showlist);  
 
-  add_show_from_set (add_set_cmd ("remotebinarydownload", no_class,
-                                 var_boolean, (char *) &remote_binary_download,
-                                 "Set binary downloads.\n", &setlist),
-                    &showlist);
+  add_show_from_set 
+    (add_set_cmd ("remotebinarydownload", no_class,
+                 var_boolean, (char *) &remote_binary_download,
+                 "Set binary downloads.\n", &setlist),
+     &showlist);
 }
index b45f62eec1f149e227e9fb248b85b4e6b329f689..a0e744491e83b68938eb2c0f3aefcb86ad557446 100644 (file)
@@ -58,6 +58,16 @@ static void pop_dummy_frame PARAMS ((void));
 
 static CORE_ADDR frame_initial_stack_address PARAMS ((struct frame_info *));
 
+CORE_ADDR
+rs6000_skip_prologue (pc)
+     CORE_ADDR pc;
+{
+  struct rs6000_framedata frame;
+  pc = skip_prologue (pc, &frame);
+  return pc;
+}
+
+
 /* Fill in fi->saved_regs */
 
 struct frame_extra_info
index f776161964aac50c4d630107ad0885db7ee9ed99..17684884437512e2f8508f851501891be09e66ef 100644 (file)
 #define        MSR_DDSR        0x02
 #define        MSR_DCTS        0x01
 
-#include <sys/dos.h>
-#include <sys/go32.h>
-#include <sys/dpmi.h>
+#include <dos.h>
+#include <go32.h>
+#include <dpmi.h>
+typedef unsigned long u_long;
 
 /* DPMI Communication */
 static union REGS dpmi_regs;
index e76f831d7e7130d615f8a8ac7ccded494ad26973..afc8d0c2eed990d216caa5500e5a4ff9d3bec315 100644 (file)
@@ -1389,7 +1389,7 @@ sol_find_new_threads_callback(th, ignored)
 }
 
 void
-sol_find_new_threads()
+sol_find_new_threads ()
 {
   /* don't do anything if init failed to resolve the libthread_db library */
   if (!procfs_suppress_run)
@@ -1542,6 +1542,7 @@ init_sol_thread_ops ()
   sol_thread_ops.to_can_run = sol_thread_can_run;
   sol_thread_ops.to_notice_signals = sol_thread_notice_signals;
   sol_thread_ops.to_thread_alive = sol_thread_alive;
+  sol_thread_ops.to_find_new_threads = sol_find_new_threads;
   sol_thread_ops.to_stop = sol_thread_stop;
   sol_thread_ops.to_stratum = process_stratum;
   sol_thread_ops.to_has_all_memory = 1;
index 8b330dee13154a73a886cbd16173a54bd27a4dab..2ee51b6a2b8160ab8a2d1ead1f3d3c5ba31be8ba 100644 (file)
@@ -529,7 +529,7 @@ openp (path, try_cwd_first, string, mode, prot, filename_opened)
   mode |= O_BINARY;
 #endif
 
-  if (try_cwd_first || SLASH_P (string[0]))
+  if (try_cwd_first || ROOTED_P (string))
     {
       int i;
       filename = string;
index f5b948ec4b88f1ab599f7689904f03fae29dbf5d..7a1abf84282c15c2983fdf917755aad8c2ce4cfe 100644 (file)
@@ -585,7 +585,7 @@ examine_prologue (start_pc, frameless_p, fi, saved_regs)
 }
 
 CORE_ADDR 
-skip_prologue (start_pc, frameless_p)
+sparc_skip_prologue (start_pc, frameless_p)
      CORE_ADDR start_pc;
      int frameless_p;
 {
index 5c4af5346fdb2843c317d8500d102103d2477fa8..15685398b593593e2abb01dd404c64697a1e2f41 100644 (file)
@@ -2089,7 +2089,7 @@ find_function_start_sal (sym, funfirstline)
        pc = overlay_unmapped_address (pc, section);
 
       pc += FUNCTION_START_OFFSET;
-      SKIP_PROLOGUE (pc);
+      pc = SKIP_PROLOGUE (pc);
 
       /* For overlays, map pc back into its mapped VMA range */
       pc = overlay_mapped_address (pc, section);
@@ -3144,7 +3144,7 @@ minimal_symbol_found: /* We also jump here from the case for variables
       if (funfirstline)
        {
          values.sals[0].pc += FUNCTION_START_OFFSET;
-         SKIP_PROLOGUE (values.sals[0].pc);
+         values.sals[0].pc = SKIP_PROLOGUE (values.sals[0].pc);
        }
       values.nelts = 1;
       return values;
@@ -4285,7 +4285,7 @@ in_prologue (pc, func_start)
    function's start address because PC may be pointing at an instruction that
    could be mistakenly considered part of the prologue.  */
 
-  SKIP_PROLOGUE (func_start);
+  func_start = SKIP_PROLOGUE (func_start);
 
   return pc < func_start;
 }
index ea8a752af6d59de5a9ea4b72e43c7ac5a9a20900..c57bc353a8b6b006227fd2544aec93c0c3f6aeab 100644 (file)
@@ -31,6 +31,37 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 static unsigned char *print_insn_arg ();
 
+/* Advance PC across any function entry prologue instructions
+   to reach some "real" code.  */
+
+CORE_ADDR
+tahoe_skip_prologue (pc)
+     CORE_ADDR pc;
+{
+  register int op = (unsigned char) read_memory_integer (pc, 1);
+  if (op == 0x11)
+    pc += 2;  /* skip brb */
+  if (op == 0x13)
+    pc += 3;  /* skip brw */
+  if (op == 0x2c
+      && ((unsigned char) read_memory_integer (pc+2, 1)) == 0x5e)
+    pc += 3;  /* skip subl2 */
+  if (op == 0xe9
+      && ((unsigned char) read_memory_integer (pc+1, 1)) == 0xae
+      && ((unsigned char) read_memory_integer(pc+3, 1)) == 0x5e)
+    pc += 4;  /* skip movab */
+  if (op == 0xe9
+      && ((unsigned char) read_memory_integer (pc+1, 1)) == 0xce
+      && ((unsigned char) read_memory_integer(pc+4, 1)) == 0x5e)
+    pc += 5;  /* skip movab */
+  if (op == 0xe9
+      && ((unsigned char) read_memory_integer (pc+1, 1)) == 0xee
+      && ((unsigned char) read_memory_integer(pc+6, 1)) == 0x5e)
+    pc += 7;  /* skip movab */
+  return pc;
+}
+
+
 /* Print the Tahoe instruction at address MEMADDR in debugged memory,
    on STREAM.  Returns length of the instruction, in bytes.  */
 
index bf9dc3b97f9a3d5c4e9d9d278077c947ca2dd000..d96514c4dbb9cea42a8fac75fe1da3dd0d8fbb4b 100644 (file)
@@ -516,6 +516,7 @@ update_current_target ()
       INHERIT (to_can_run, t);
       INHERIT (to_notice_signals, t);
       INHERIT (to_thread_alive, t);
+      INHERIT (to_find_new_threads, t);
       INHERIT (to_stop, t);
       INHERIT (to_query, t);
       INHERIT (to_enable_exception_callback, t);
index c8c9bb52b4fbd040e74d42d178d36ccd1d0d66d9..41006efe418290a69d0997c880746d9751476935 100644 (file)
@@ -356,6 +356,7 @@ struct target_ops
   int        (*to_can_run) PARAMS ((void));
   void       (*to_notice_signals) PARAMS ((int pid));
   int        (*to_thread_alive) PARAMS ((int pid));
+  void        (*to_find_new_threads) PARAMS ((void));
   void       (*to_stop) PARAMS ((void));
   int        (*to_query) PARAMS ((int/*char*/, char *, char *, int *));
   struct symtab_and_line * (*to_enable_exception_callback) PARAMS ((enum exception_event_kind, int));
@@ -887,6 +888,14 @@ print_section_info PARAMS ((struct target_ops *, bfd *));
 #define target_thread_alive(pid) \
        (*current_target.to_thread_alive) (pid)
 
+/* Query for new threads and add them to the thread list.  */
+
+#define target_find_new_threads() \
+     do { \
+       if (current_target.to_find_new_threads) \
+         (*current_target.to_find_new_threads) (); \
+     } while (0);
+
 /* Make target stop in a continuable fashion.  (For instance, under Unix, this
    should act like SIGSTOP).  This function is normally used by GUIs to
    implement a stop button.  */
index 331c2afe40f6c571cd54512684927c91f23980d2..4a5eec12f55c08212dc99dcc35acfff0a1b13854 100644 (file)
@@ -1,3 +1,17 @@
+1999-05-04  Elena Zannoni  <ezannoni@kwikemart.cygnus.com>
+
+       * gdb.base/call-ar-st.exp: Fix one regular expression in test
+       output.
+
+       * gdb.base/annota1.exp: New file. Annotation level 2 tests.
+       * gdb.base/annota2.exp: New file. More annotation tests.
+       * gdb.base/annota1.c: New file. Source file for annota1.exp.
+       * gdb.base/annota2.cc: New file. Source file for annota2.exp.
+
+1999-04-23  Angela Marie Thomas <angela@cygnus.com>
+
+       * config/cfdbug.exp: New file.
+
 1999-04-20  Jim Blandy  <jimb@zwingli.cygnus.com>
 
        * gdb.c++/demangle.exp (test_gnu_style_demangling): Add tests for
index d408cf1f7f5d5af0ba810637355724481af570ec..bc450fb9870be4a45f3da2390202afef2d1f8acb 100644 (file)
@@ -210,6 +210,7 @@ gdb_test continue "Continuing\\..*array_c.*array_f.*array_d.*HELLO WORLD.*main \
 
 
 #call sum_array_print(10, *list1, *list2, *list3, *list4)
+
 send_gdb "print sum_array_print(10, *list1, *list2, *list3, *list4)\n"
 gdb_expect {
     -re ".*Sum of 4 arrays, by element \\(add in seed as well\\):\[ \t\r\n\]+Seed: 10\[ \t\r\n\]+Element Index . Sum\[ \t\r\n\]+-------------------------\[ \t\r\n\]+.*\[ \t\]+0\[ \t\]+52\[ \t\r\n\]+1\[ \t\]+60\[ \t\r\n\]+2\[ \t\]+68\[ \t\r\n\]+3\[ \t\]+76\[ \t\r\n\]+4\[ \t\]+84\[ \t\r\n\]+5\[ \t\]+92\[ \t\r\n\]+6\[ \t\]+100\[ \t\r\n\]+7\[ \t\]+108\[ \t\r\n\]+8\[ \t\]+116\[ \t\r\n\]+9\[ \t\]+124\[ \t\r\n\]+.*$gdb_prompt $" {
@@ -219,28 +220,25 @@ gdb_expect {
     timeout           { fail "(timeout) print sum_array_print(10, *list1, *list2, *list3, *list4)" }
   }
 
-
-#step -over
-    send_gdb "next\n"
-    gdb_expect {
-        -re "BYE BYE FOR NOW\[ \t\r\n\]main.*+1035\[ \t\r\n\]+printf\\(.VERY GREEN GRASS.n.\\);\[ \t\r\n\]+.*$gdb_prompt $" { pass "next to 1035"}
-        -re ".*$gdb_prompt $" { fail "next to 1035" }
-        timeout { fail "next to 1035(timeout)" }
-    }
+#step over
+send_gdb "n\n"
+gdb_expect {
+    -re ".*BYE BYE FOR NOW.*1035.*printf\\(.VERY GREEN GRASS.n.\\);.*$gdb_prompt $" { pass "next to 1035"}
+    -re ".*$gdb_prompt $" { fail "next to 1035" }
+    timeout { fail "next to 1035(timeout)" }
+}
 
 #call print_array_rep(\*list1, \*list2, \*list3)
 
 send_gdb "print print_array_rep(\*list1, \*list2, \*list3)\n"
 gdb_expect {
-    -re ".*.*$gdb_prompt $" {
+    -re ".*$gdb_prompt $" {
         pass "print print_array_rep(*list1, *list2, *list3)"
       }
     -re ".*$gdb_prompt $" { fail "print print_array_rep(*list1, *list2, *list3)" }
     timeout           { fail "(timeout) print print_array_rep(*list1, *list2, *list3)" }
   }
 
-
-
 #go -until 1039
 gdb_test "tbreak 1039" \
     "Breakpoint..* file .*$srcfile, line 1039.*" \
index d11a2e92fada985f98de184083a6e1e8aa225ce2..9f68547636df45190ddd2231078e2e7d85432ddb 100644 (file)
@@ -80,7 +80,7 @@ void _initialize_thread PARAMS ((void));
 /* Prototypes for local functions. */
 
 #if !defined(FIND_NEW_THREADS)
-#define FIND_NEW_THREADS target_find_new_threads
+#define FIND_NEW_THREADS local_find_new_threads
 #endif  
                           
 static struct thread_info *thread_list = NULL;
@@ -104,10 +104,8 @@ static void prune_threads PARAMS ((void));
 
 static struct target_thread_vector *target_thread_functions;
 
-static int target_find_new_threads PARAMS ((void));
-
 static int
-target_find_new_threads ()
+local_find_new_threads ()
 {
   int retval = 0;
   if (target_thread_functions &&
@@ -454,9 +452,7 @@ info_threads_command (arg, from_tty)
   if (!target_has_stack) error ("No stack.");
 
   prune_threads ();
-#if defined(FIND_NEW_THREADS)
-  FIND_NEW_THREADS ();
-#endif
+  target_find_new_threads ();
   current_pid = inferior_pid;
   for (tp = thread_list; tp; tp = tp->next)
     {
index b378571ec566c6628efdb878466db8aeb7553bf5..7e0426035f181c8a7ba4b63ab3ff4a185f72c8c3 100644 (file)
@@ -29,6 +29,36 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 static unsigned char *print_insn_arg ();
 \f
+/* Advance PC across any function entry prologue instructions
+   to reach some "real" code.  */
+
+CORE_ADDR
+vax_skip_prologue (pc)
+     CORE_ADDR pc;
+{
+  register int op = (unsigned char) read_memory_integer (pc, 1);
+  if (op == 0x11)
+    pc += 2;  /* skip brb */
+  if (op == 0x31)
+    pc += 3;  /* skip brw */
+  if (op == 0xC2
+      && ((unsigned char) read_memory_integer (pc+2, 1)) == 0x5E)
+    pc += 3;  /* skip subl2 */
+  if (op == 0x9E
+      && ((unsigned char) read_memory_integer (pc+1, 1)) == 0xAE
+      && ((unsigned char) read_memory_integer(pc+3, 1)) == 0x5E)
+    pc += 4;  /* skip movab */
+  if (op == 0x9E
+      && ((unsigned char) read_memory_integer (pc+1, 1)) == 0xCE
+      && ((unsigned char) read_memory_integer(pc+4, 1)) == 0x5E)
+    pc += 5;  /* skip movab */
+  if (op == 0x9E
+      && ((unsigned char) read_memory_integer (pc+1, 1)) == 0xEE
+      && ((unsigned char) read_memory_integer(pc+6, 1)) == 0x5E)
+    pc += 7;  /* skip movab */
+  return pc;
+}
+
 /* Print the vax instruction at address MEMADDR in debugged memory,
    from disassembler info INFO.
    Returns length of the instruction, in bytes.  */
index ed3c6016c6dfcfe9b809d3b53312d2a21df9065a..65e10705e81a97c92b91f2b49f71effd4ba93935 100644 (file)
@@ -53,9 +53,6 @@ Wed Mar 31 18:55:41 1999  Doug Evans  <devans@canuck.cygnus.com>
 
 1999-02-09  Doug Evans  <devans@casey.cygnus.com>
 
-       * Make-common.in (CGEN_READ_SCM): Renamed from CGEN_MAIN_SCM.
-       (CGEN_DESC_SCM): New variable.
-       (cgen-desc): New rule.
        * cgen-cpu.h (CGEN_DISASSEMBLER): New type.
        (CGEN_CPU): Member opcode renamed to cpu_desc.
        New members get_idata,disassembler.
@@ -162,8 +159,6 @@ Wed Jan 27 17:19:09 1999  Doug Evans  <devans@canuck.cygnus.com>
 1999-01-05  Doug Evans  <devans@casey.cygnus.com>
 
        * Make-common.in (CGEN_INCLUDE_DEPS): Add cgen-defs.h, cgen-engine.h.
-       (CGEN_MAIN_SCM): Add rtx-funcs.scm.
-       (cgen-arch): Pass $(mach) to cgen.sh.
        * cgen-engine.h (SEM_BRANCH_FINI): New arg pcvar, all uses updated.
        (SEM_BRANCH_INIT_EXTRACT): New macro.
        (SEM_BRANCH_INIT): Add taken_p.
@@ -333,7 +328,6 @@ Mon Nov 23 13:28:38 1998  Andrew Cagney  <cagney@b1.cygnus.com>
 1998-11-18  Doug Evans  <devans@casey.cygnus.com>
 
        * Make-common.in (cgen-utils.o): Depend on cgen-engine.h.
-       (CGEN_ARCH_SCM): New variable.
        * cgen-engine.h (EXTRACT_[ML]SB0_{INT,UINT}): New macros.
        (EXTRACT_INT,EXTRACT_UINT): New macros.
        (SEM_SEM_ARG): New macro.
@@ -342,7 +336,7 @@ Mon Nov 23 13:28:38 1998  Andrew Cagney  <cagney@b1.cygnus.com>
        (sim_disassemble_insn): Update prototype.
        * cgen-trace.c (current_insn,insn_fields): New static locals.
        (trace_insn): Set them.
-       * cgen-utils.scm: #include cgen-engine.h.
+       * cgen-utils.c: #include cgen-engine.h.
        (sim_disassemble_insn): New arg insn_fields.
        Handle variable length insns.
        * genmloop.sh: Only emit pbb decls if -pbb.
@@ -538,15 +532,6 @@ Thu Jul  2 17:13:25 1998  Doug Evans  <devans@seba.cygnus.com>
 
 Wed Jul  1 16:44:12 1998  Doug Evans  <devans@seba.cygnus.com>
 
-       * Make-common.in (SCHEME,SCHEMEFLAGS): Delete.
-       (CGENDIR,CGEN): New variables.
-       (CGEN_VERBOSE): Renamed to CGENFLAGS.
-       (cgen-arch,cgen-cpu,cgen-decode): Update.
-       (CGEN_CPU_WRITE): New variable.
-       (CGEN_CPU_SEMSW): -W -> -X.
-       (CGEN_FLAGS_TO_PASS): Delete SCHEME.  Add CGEN,CGENFLAGS.
-       * cgen.sh: Delete args scheme,schemeflags.  New arg cgen.
-
        * cgen-sim.h (RECORD_IADDR): Delete.
        * cgen-types.h (HOSTINT,HOSTUINT,HOSTPTR): New types.
        * genmloop.sh (engine_resume_{full,fast}): Delete icount.
@@ -793,8 +778,6 @@ Wed May  6 16:04:18 1998  Doug Evans  <devans@seba.cygnus.com>
        (cgen_cpu_max_extra_bytes): Declare.
        * cgen-utils.c (cgen_cpu_max_extra_bytes): New function.
 
-       * cgen.sh: s/@arch@/${arch}/ for cpu files.
-
        * sim-cpu.h: New file.  sim_cpu_base moved here.
        Move sim_cpu_lookup decl here.
        * sim-base.h: #include "sim-cpu.h".
@@ -1551,14 +1534,12 @@ Tue Feb 17 16:27:46 1998  Andrew Cagney  <cagney@b1.cygnus.com>
        
 Tue Feb 17 17:27:30 1998  Doug Evans  <devans@seba.cygnus.com>
 
-       * Make-common.in (CGEN_MAIN_SCM): Update.
        * aclocal.m4 (USE_MAINTAINER_MODE): New variable.
 
        * cgen-sim.h (SEMANTIC_CACHE_FN): Delete.
        (SEMANTIC_FN): Rewrite declaration.
        (DECODE): Update type of semantic_fast member.
        ({EX,SEM}_FN_NAME): Have only one version.
-       * cgen.sh: Support building cpu.c.
        * sim-base.h (sim_state_base): Delete conditionals surrounding
        member scache_size.
 
@@ -1578,7 +1559,6 @@ Mon Feb  9 14:48:37 1998  Doug Evans  <devans@canuck.cygnus.com>
        * cgen-sim.h (DECODE): Always use switch for `read' for now.
        (PAREXEC): Renamed from PARALLEL_EXEC.  All uses updated.
        (SEMANTIC{,_CACHE}_FN): Fix return type.
-       * cgen.sh (decode): Add s/@arch@/$arch/.
        * genmloop.sh (@cpu@_engine_run): Delete `current_state'.
        (engine_resume): Likewise.  Make `engine' volatile.  Save copy
        of cpu pointer in volatile object.  Initialize read switch if
@@ -1648,10 +1628,6 @@ Fri Jan 30 09:36:33 1998  Andrew Cagney  <cagney@b1.cygnus.com>
        MAX_NR_PROCESSORS.
        (sim_engine_nr_cpus) sim-engine.c, sim-engine.h: New function
        
-Thu Jan 29 12:13:01 1998  Doug Evans  <devans@canuck.cygnus.com>
-
-       * cgen.sh: Portably read parms past $9.
-
 Fri Jan 23 14:20:54 1998  Doug Evans  <devans@seba.cygnus.com>
 
        * Make-common.in (stamp-tvals): New rule.
@@ -1672,7 +1648,6 @@ Mon Jan 19 12:45:45 1998  Doug Evans  <devans@seba.cygnus.com>
 
        * cgen-scache.h: Deleted.
        * Make-common.in (cgen-run.o,cgen-scache.o): Delete cgen-scache.h dep.
-       (CGEN_CPU_SCM): Add sim-model.scm.
        * cgen-scache.c: Only compile contents if WITH_SCACHE.
        (scache_init): Use runtime computed size of SCACHE.
        (scache_flush): Likewise.
index 63ff6621ec6b5918ac2c0d58825c109c36bc4a51..40ca5c7b47631ee687d4808d57300bd6f5631226 100644 (file)
@@ -64,4 +64,3 @@ $shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
 dir=libgloss/v850/sys target=v850
 $shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
        "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}"
-
index 8c1ca649d495877389999d0f586f60d3cec43511..795b25c3a4b70a24713e6e3a2e839f45aa6e704f 100644 (file)
@@ -1883,8 +1883,7 @@ build_insn_table (cd)
   cd->insn_table.num_init_entries = MAX_INSNS;
 }
 
-/* Subroutine of i960_cgen_cpu_open to rebuild the tables.
-   This is also called by cgen_set_cpu (via an entry in CD).  */
+/* Subroutine of i960_cgen_cpu_open to rebuild the tables.  */
 
 static void
 i960_cgen_rebuild_tables (cd)
index 51e976cf695f6f9cdebec135e2bd091b8443ebc8..1585c65568377fee0af3e0bab1ce111a4cb5b8aa 100644 (file)
@@ -1,3 +1,8 @@
+1999-04-29  Nick Clifton  <nickc@cygnus.com>
+
+       * interp.c (set_initial_gprs): Only display memory range if
+       verbose option has been set.
+
 1999-04-22  Nick Clifton  <nickc@cygnus.com>
 
        * interp.c: Add tracing and verbose options.
index e6d5c1a46263fd9784acb513ce6f47c280876cb5..a5d188b255b11ccf061076188d2065b5a8af1d37 100644 (file)
@@ -405,7 +405,7 @@ set_initial_gprs ()
   
   memsize = cpu.asregs.msize / (1024 * 1024);
 
-  if (issue_messages)
+  if (issue_messages > 1)
     fprintf (stderr, "Simulated memory of %d Mbytes (0x0 .. 0x%08x)\n",
             memsize, cpu.asregs.msize - 1);
 
@@ -2107,7 +2107,7 @@ sim_do_command (sd, cmd)
        }
       else if (strcmp (simargv[0], "verbose") == 0)
        {
-         issue_messages = 1;
+         issue_messages = 2;
        }
       else
        {