aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1999-05-05 14:45:51 +0000
committerStan Shebs <shebs@codesourcery.com>1999-05-05 14:45:51 +0000
commitb83266a0e1813b7f4891d5d6b0ed6b7302a3fe98 (patch)
treec59a94fbe917e0839329b872139198c2a7a05ab1 /gdb
parente1346c8d0969dad58ddc13c9c741cb0f4e6345a5 (diff)
downloadgdb-b83266a0e1813b7f4891d5d6b0ed6b7302a3fe98.zip
gdb-b83266a0e1813b7f4891d5d6b0ed6b7302a3fe98.tar.gz
gdb-b83266a0e1813b7f4891d5d6b0ed6b7302a3fe98.tar.bz2
import gdb-19990504 snapshot
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog130
-rw-r--r--gdb/Makefile.in2
-rw-r--r--gdb/TODO20
-rw-r--r--gdb/a29k-tdep.c2
-rw-r--r--gdb/acconfig.h14
-rw-r--r--gdb/alpha-tdep.c5
-rw-r--r--gdb/arc-tdep.c2
-rw-r--r--gdb/blockframe.c4
-rw-r--r--gdb/coffread.c11
-rw-r--r--gdb/config.in15
-rw-r--r--gdb/config/a29k/tm-a29k.h5
-rw-r--r--gdb/config/alpha/tm-alpha.h2
-rw-r--r--gdb/config/arc/tm-arc.h8
-rw-r--r--gdb/config/arm/tm-arm.h2
-rw-r--r--gdb/config/convex/tm-convex.h22
-rw-r--r--gdb/config/d10v/tm-d10v.h3
-rw-r--r--gdb/config/d30v/tm-d30v.h5
-rw-r--r--gdb/config/fr30/tm-fr30.h4
-rw-r--r--gdb/config/h8300/tm-h8300.h2
-rw-r--r--gdb/config/h8500/tm-h8500.h2
-rw-r--r--gdb/config/i386/tm-i386.h2
-rw-r--r--gdb/config/i960/tm-i960.h4
-rw-r--r--gdb/config/m32r/tm-m32r.h2
-rw-r--r--gdb/config/m68k/tm-altos.h17
-rw-r--r--gdb/config/m68k/tm-isi.h17
-rw-r--r--gdb/config/m68k/tm-m68k.h4
-rw-r--r--gdb/config/m88k/tm-m88k.h5
-rw-r--r--gdb/config/mips/tm-mips.h2
-rw-r--r--gdb/config/mn10200/tm-mn10200.h2
-rw-r--r--gdb/config/mn10300/tm-mn10300.h2
-rw-r--r--gdb/config/ns32k/tm-merlin.h10
-rw-r--r--gdb/config/ns32k/tm-umax.h10
-rw-r--r--gdb/config/pa/tm-hppa.h4
-rw-r--r--gdb/config/pyr/tm-pyr.h2
-rw-r--r--gdb/config/rs6000/tm-rs6000.h7
-rw-r--r--gdb/config/sh/tm-sh.h5
-rw-r--r--gdb/config/sparc/tm-sparc.h8
-rw-r--r--gdb/config/tahoe/tm-tahoe.h22
-rw-r--r--gdb/config/tic80/tm-tic80.h2
-rw-r--r--gdb/config/v850/tm-v850.h2
-rw-r--r--gdb/config/vax/tm-vax.h22
-rw-r--r--gdb/config/z8k/tm-z8k.h2
-rwxr-xr-xgdb/configure243
-rw-r--r--gdb/configure.in5
-rw-r--r--gdb/convex-tdep.c39
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/gdbint.texinfo8
-rw-r--r--gdb/gdb_string.h10
-rw-r--r--gdb/gdbarch.c25
-rw-r--r--gdb/gdbarch.h4
-rw-r--r--gdb/gnu-nat.c4
-rw-r--r--gdb/go32-nat.c126
-rw-r--r--gdb/hppa-tdep.c2
-rw-r--r--gdb/hppah-nat.c345
-rw-r--r--gdb/hpux-thread.c2
-rw-r--r--gdb/i960-tdep.c2
-rw-r--r--gdb/infcmd.c16
-rw-r--r--gdb/infrun.c139
-rw-r--r--gdb/m68k-tdep.c47
-rw-r--r--gdb/m88k-tdep.c2
-rw-r--r--gdb/main.c5
-rw-r--r--gdb/ns32k-tdep.c40
-rw-r--r--gdb/procfs.c4
-rw-r--r--gdb/remote.c10
-rw-r--r--gdb/rs6000-tdep.c10
-rw-r--r--gdb/ser-go32.c7
-rw-r--r--gdb/sol-thread.c3
-rw-r--r--gdb/source.c2
-rw-r--r--gdb/sparc-tdep.c2
-rw-r--r--gdb/symtab.c6
-rw-r--r--gdb/tahoe-tdep.c31
-rw-r--r--gdb/target.c1
-rw-r--r--gdb/target.h9
-rw-r--r--gdb/testsuite/ChangeLog14
-rw-r--r--gdb/testsuite/gdb.base/call-ar-st.exp20
-rw-r--r--gdb/thread.c10
-rw-r--r--gdb/vax-tdep.c30
77 files changed, 1049 insertions, 592 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 500a28a..5aa6fbd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 7799e09..308bbb8 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -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
diff --git a/gdb/TODO b/gdb/TODO
index fcbcd16..463d1cc 100644
--- 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:
diff --git a/gdb/a29k-tdep.c b/gdb/a29k-tdep.c
index 114922c..2aab6a4 100644
--- a/gdb/a29k-tdep.c
+++ b/gdb/a29k-tdep.c
@@ -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);
diff --git a/gdb/acconfig.h b/gdb/acconfig.h
index 8128e4e..bf52c4f 100644
--- a/gdb/acconfig.h
+++ b/gdb/acconfig.h
@@ -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
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 35430a4..9b4716a 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -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)
diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c
index c5dd847..16e259b 100644
--- a/gdb/arc-tdep.c
+++ b/gdb/arc-tdep.c
@@ -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;
{
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index c3b377e..71d19e3 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -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;
}
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 9c8f475..56c1438 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -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);
diff --git a/gdb/config.in b/gdb/config.in
index 4d206a4..6bef6b40 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -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. */
@@ -321,6 +309,9 @@
/* 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
diff --git a/gdb/config/a29k/tm-a29k.h b/gdb/config/a29k/tm-a29k.h
index 0936e83..cef9345 100644
--- a/gdb/config/a29k/tm-a29k.h
+++ b/gdb/config/a29k/tm-a29k.h
@@ -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
diff --git a/gdb/config/alpha/tm-alpha.h b/gdb/config/alpha/tm-alpha.h
index c079809..51c8dce 100644
--- a/gdb/config/alpha/tm-alpha.h
+++ b/gdb/config/alpha/tm-alpha.h
@@ -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.
diff --git a/gdb/config/arc/tm-arc.h b/gdb/config/arc/tm-arc.h
index e964bef..e170d2d 100644
--- a/gdb/config/arc/tm-arc.h
+++ b/gdb/config/arc/tm-arc.h
@@ -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.
diff --git a/gdb/config/arm/tm-arm.h b/gdb/config/arm/tm-arm.h
index 26bdf37..54e0954 100644
--- a/gdb/config/arm/tm-arm.h
+++ b/gdb/config/arm/tm-arm.h
@@ -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
diff --git a/gdb/config/convex/tm-convex.h b/gdb/config/convex/tm-convex.h
index 5eb9f6e..6558859 100644
--- a/gdb/config/convex/tm-convex.h
+++ b/gdb/config/convex/tm-convex.h
@@ -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) */
diff --git a/gdb/config/d10v/tm-d10v.h b/gdb/config/d10v/tm-d10v.h
index edfa62f..d0c1a50 100644
--- a/gdb/config/d10v/tm-d10v.h
+++ b/gdb/config/d10v/tm-d10v.h
@@ -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. */
diff --git a/gdb/config/d30v/tm-d30v.h b/gdb/config/d30v/tm-d30v.h
index 7a69ca3..1ce9ccc 100644
--- a/gdb/config/d30v/tm-d30v.h
+++ b/gdb/config/d30v/tm-d30v.h
@@ -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. */
diff --git a/gdb/config/fr30/tm-fr30.h b/gdb/config/fr30/tm-fr30.h
index 5478b93..d03f845 100644
--- a/gdb/config/fr30/tm-fr30.h
+++ b/gdb/config/fr30/tm-fr30.h
@@ -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); \
}
diff --git a/gdb/config/h8300/tm-h8300.h b/gdb/config/h8300/tm-h8300.h
index 929d6ff..f8f1f64 100644
--- a/gdb/config/h8300/tm-h8300.h
+++ b/gdb/config/h8300/tm-h8300.h
@@ -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.
diff --git a/gdb/config/h8500/tm-h8500.h b/gdb/config/h8500/tm-h8500.h
index 8f7d966..2dded7c 100644
--- a/gdb/config/h8500/tm-h8500.h
+++ b/gdb/config/h8500/tm-h8500.h
@@ -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.
diff --git a/gdb/config/i386/tm-i386.h b/gdb/config/i386/tm-i386.h
index aeff2e1..06d9f85 100644
--- a/gdb/config/i386/tm-i386.h
+++ b/gdb/config/i386/tm-i386.h
@@ -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));
diff --git a/gdb/config/i960/tm-i960.h b/gdb/config/i960/tm-i960.h
index a6d93b0..dcd24e5 100644
--- a/gdb/config/i960/tm-i960.h
+++ b/gdb/config/i960/tm-i960.h
@@ -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
diff --git a/gdb/config/m32r/tm-m32r.h b/gdb/config/m32r/tm-m32r.h
index e03558a..3a6f231 100644
--- a/gdb/config/m32r/tm-m32r.h
+++ b/gdb/config/m32r/tm-m32r.h
@@ -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
diff --git a/gdb/config/m68k/tm-altos.h b/gdb/config/m68k/tm-altos.h
index 2d77fea..23c5653 100644
--- a/gdb/config/m68k/tm-altos.h
+++ b/gdb/config/m68k/tm-altos.h
@@ -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"
diff --git a/gdb/config/m68k/tm-isi.h b/gdb/config/m68k/tm-isi.h
index f994524..ae8ccbf 100644
--- a/gdb/config/m68k/tm-isi.h
+++ b/gdb/config/m68k/tm-isi.h
@@ -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"
diff --git a/gdb/config/m68k/tm-m68k.h b/gdb/config/m68k/tm-m68k.h
index 098500c..9cbb41f 100644
--- a/gdb/config/m68k/tm-m68k.h
+++ b/gdb/config/m68k/tm-m68k.h
@@ -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
diff --git a/gdb/config/m88k/tm-m88k.h b/gdb/config/m88k/tm-m88k.h
index 390cdef..be9ffba 100644
--- a/gdb/config/m88k/tm-m88k.h
+++ b/gdb/config/m88k/tm-m88k.h
@@ -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
diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h
index 6a7091a..601d875 100644
--- a/gdb/config/mips/tm-mips.h
+++ b/gdb/config/mips/tm-mips.h
@@ -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
diff --git a/gdb/config/mn10200/tm-mn10200.h b/gdb/config/mn10200/tm-mn10200.h
index e15cdae..99b8f61 100644
--- a/gdb/config/mn10200/tm-mn10200.h
+++ b/gdb/config/mn10200/tm-mn10200.h
@@ -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
diff --git a/gdb/config/mn10300/tm-mn10300.h b/gdb/config/mn10300/tm-mn10300.h
index f073642..42b7341 100644
--- a/gdb/config/mn10300/tm-mn10300.h
+++ b/gdb/config/mn10300/tm-mn10300.h
@@ -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
diff --git a/gdb/config/ns32k/tm-merlin.h b/gdb/config/ns32k/tm-merlin.h
index f90c5e7..d586430 100644
--- a/gdb/config/ns32k/tm-merlin.h
+++ b/gdb/config/ns32k/tm-merlin.h
@@ -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
diff --git a/gdb/config/ns32k/tm-umax.h b/gdb/config/ns32k/tm-umax.h
index 1fdfb2f..925a3e9 100644
--- a/gdb/config/ns32k/tm-umax.h
+++ b/gdb/config/ns32k/tm-umax.h
@@ -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
diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h
index e5b5acd9..2fcae42 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -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. */
diff --git a/gdb/config/pyr/tm-pyr.h b/gdb/config/pyr/tm-pyr.h
index b97ebe7..fbfe87c 100644
--- a/gdb/config/pyr/tm-pyr.h
+++ b/gdb/config/pyr/tm-pyr.h
@@ -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.
diff --git a/gdb/config/rs6000/tm-rs6000.h b/gdb/config/rs6000/tm-rs6000.h
index 52beec1..159ebc6 100644
--- a/gdb/config/rs6000/tm-rs6000.h
+++ b/gdb/config/rs6000/tm-rs6000.h
@@ -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 *));
diff --git a/gdb/config/sh/tm-sh.h b/gdb/config/sh/tm-sh.h
index 291677b..2d5f8bd 100644
--- a/gdb/config/sh/tm-sh.h
+++ b/gdb/config/sh/tm-sh.h
@@ -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.
diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h
index 6d56508..b2bc3c0 100644
--- a/gdb/config/sparc/tm-sparc.h
+++ b/gdb/config/sparc/tm-sparc.h
@@ -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
diff --git a/gdb/config/tahoe/tm-tahoe.h b/gdb/config/tahoe/tm-tahoe.h
index a9df374..8c8321f 100644
--- a/gdb/config/tahoe/tm-tahoe.h
+++ b/gdb/config/tahoe/tm-tahoe.h
@@ -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
diff --git a/gdb/config/tic80/tm-tic80.h b/gdb/config/tic80/tm-tic80.h
index e17ca95..8b33381 100644
--- a/gdb/config/tic80/tm-tic80.h
+++ b/gdb/config/tic80/tm-tic80.h
@@ -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.
diff --git a/gdb/config/v850/tm-v850.h b/gdb/config/v850/tm-v850.h
index 287ff86..5a11451 100644
--- a/gdb/config/v850/tm-v850.h
+++ b/gdb/config/v850/tm-v850.h
@@ -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
diff --git a/gdb/config/vax/tm-vax.h b/gdb/config/vax/tm-vax.h
index ad10fb7..62729b3 100644
--- a/gdb/config/vax/tm-vax.h
+++ b/gdb/config/vax/tm-vax.h
@@ -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
diff --git a/gdb/config/z8k/tm-z8k.h b/gdb/config/z8k/tm-z8k.h
index babde90..1a34b0f 100644
--- a/gdb/config/z8k/tm-z8k.h
+++ b/gdb/config/z8k/tm-z8k.h
@@ -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));
diff --git a/gdb/configure b/gdb/configure
index 8d39270..a3ad095 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -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) ;;
diff --git a/gdb/configure.in b/gdb/configure.in
index 363438a..216f6d6 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -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)
diff --git a/gdb/convex-tdep.c b/gdb/convex-tdep.c
index 8eeb2b3..fd490b1 100644
--- a/gdb/convex-tdep.c
+++ b/gdb/convex-tdep.c
@@ -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;
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 19f11db..ab547e8 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -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.
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index 3ebeae5..6dffb98 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -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)
diff --git a/gdb/gdb_string.h b/gdb/gdb_string.h
index 944eec1..d578c8d 100644
--- a/gdb/gdb_string.h
+++ b/gdb/gdb_string.h
@@ -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) */
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index b9ee310..87d1906 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -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);
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index beb206b..f2380db 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -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). */
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 795f8a8..85dc669 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -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);
diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c
index 782d240..2572a11 100644
--- a/gdb/go32-nat.c
+++ b/gdb/go32-nat.c
@@ -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)
{
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 69188c7..ce5f1f8 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -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;
diff --git a/gdb/hppah-nat.c b/gdb/hppah-nat.c
index dbf41c4..d1e632c 100644
--- a/gdb/hppah-nat.c
+++ b/gdb/hppah-nat.c
@@ -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
diff --git a/gdb/hpux-thread.c b/gdb/hpux-thread.c
index 36421f3..64b932e 100644
--- a/gdb/hpux-thread.c
+++ b/gdb/hpux-thread.c
@@ -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;
diff --git a/gdb/i960-tdep.c b/gdb/i960-tdep.c
index bb2087a..4e16de1 100644
--- a/gdb/i960-tdep.c
+++ b/gdb/i960-tdep.c
@@ -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;
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index b6df2e9..16ec0b7 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -503,16 +503,16 @@ jump_command (arg, from_tty)
/* 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\
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 12f1cd3..d1a2d9b 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -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
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index c751604..56e5552 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -26,6 +26,53 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "inferior.h"
+/* 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
diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c
index f82cb76..2ac4335 100644
--- a/gdb/m88k-tdep.c
+++ b/gdb/m88k-tdep.c
@@ -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;
diff --git a/gdb/main.c b/gdb/main.c
index 1fef7bc..809ef86 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -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);
}
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index 3edb7f5..775e8af 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -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);
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 6822f42..8a68a89 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -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
diff --git a/gdb/remote.c b/gdb/remote.c
index 9f84f5d..6ec108c 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -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);
}
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index b45f62ee..a0e7444 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -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
diff --git a/gdb/ser-go32.c b/gdb/ser-go32.c
index f776161..1768488 100644
--- a/gdb/ser-go32.c
+++ b/gdb/ser-go32.c
@@ -126,9 +126,10 @@
#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;
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index e76f831..afc8d0c 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -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;
diff --git a/gdb/source.c b/gdb/source.c
index 8b330de..2ee51b6 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -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;
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index f5b948e..7a1abf8 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -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;
{
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 5c4af53..1568539 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -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;
}
diff --git a/gdb/tahoe-tdep.c b/gdb/tahoe-tdep.c
index ea8a752..c57bc35 100644
--- a/gdb/tahoe-tdep.c
+++ b/gdb/tahoe-tdep.c
@@ -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. */
diff --git a/gdb/target.c b/gdb/target.c
index bf9dc3b..d96514c 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -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);
diff --git a/gdb/target.h b/gdb/target.h
index c8c9bb5..41006ef 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -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. */
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 331c2af..4a5eec1 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -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
diff --git a/gdb/testsuite/gdb.base/call-ar-st.exp b/gdb/testsuite/gdb.base/call-ar-st.exp
index d408cf1..bc450fb 100644
--- a/gdb/testsuite/gdb.base/call-ar-st.exp
+++ b/gdb/testsuite/gdb.base/call-ar-st.exp
@@ -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.*" \
diff --git a/gdb/thread.c b/gdb/thread.c
index d11a2e9..9f68547 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -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)
{
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index b378571..7e04260 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -29,6 +29,36 @@ 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
+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. */