+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
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
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.
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.
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:
to reach some "real" code. */
CORE_ADDR
-skip_prologue (pc)
+a29k_skip_prologue (pc)
CORE_ADDR pc;
{
return examine_prologue (pc, NULL, NULL, NULL);
-
-/* 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
*/
#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)
This allows a quicker answer. */
CORE_ADDR
-skip_prologue (pc, frameless_p)
+arc_skip_prologue (pc, frameless_p)
CORE_ADDR pc;
int frameless_p;
{
#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;
}
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);
/* config.in. Generated automatically from configure.in by autoheader. */
-/* Whether malloc must be declared even if <stdlib.h> is included. */
-#undef NEED_DECLARATION_MALLOC
-
-/* Whether realloc must be declared even if <stdlib.h> is included. */
-#undef NEED_DECLARATION_REALLOC
-
-/* Whether free must be declared even if <stdlib.h> is included. */
-#undef NEED_DECLARATION_FREE
-
-/* Whether strerror must be declared even if <string.h> is included. */
-#undef NEED_DECLARATION_STRERROR
-
/* Define if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
/* Define if strdup is not declared in system header files. */
#undef NEED_DECLARATION_STRDUP
+/* Define if strstr is not declared in system header files. */
+#undef NEED_DECLARATION_STRSTR
+
/* Define if <sys/procfs.h> has pstatus_t. */
#undef HAVE_PSTATUS_T
/* 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
/* 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.
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.
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
[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) */
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. */
/* 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. */
#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;
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); \
}
/* 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.
/* 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.
/* 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));
/* 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
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
/* 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"
/* 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"
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
/* 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
/* 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
(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
(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
/* 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
/* 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
/* 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. */
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.
/* 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 *));
/* 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.
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
/* 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
/* 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.
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
/* 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
/* 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));
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
# 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
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 3924 "configure"
+#line 3971 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
gdb_cv_hostos_is_solaris=yes ;;
esac
echo $ac_n "checking for directory proc entries""... $ac_c" 1>&6
-echo "configure: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 \
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
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
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
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
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>
; 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
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
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
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
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
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
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
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
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
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() {
; 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
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
gdb_cv_printf_has_long_long=no
else
cat > conftest.$ac_ext <<EOF
-#line 4354 "configure"
+#line 4401 "configure"
#include "confdefs.h"
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
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
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
gdb_cv_printf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 4434 "configure"
+#line 4481 "configure"
#include "confdefs.h"
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
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
gdb_cv_scanf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 4476 "configure"
+#line 4523 "configure"
#include "confdefs.h"
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
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*
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. */
; 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
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
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.
}
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
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
;;
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
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
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
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
# 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
# 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>
; 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
# 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__)
+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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
{ echo "configure: error: Could not find a term library" 1>&2; exit 1; }
fi
fi
+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
# 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*
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.
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() {
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
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
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
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) ;;
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
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
AC_MSG_ERROR(Could not find a term library, e.g. termcap or termlib!)
fi
fi
+fi
AC_SUBST(TERM_LIB)
#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;
+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.
(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)
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
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) */
/* 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.
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);
/* 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.
/* 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). */
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);
#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
#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)
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)
{
static void
go32_kill_inferior (void)
{
- go32_stop ();
unpush_target (&go32_ops);
}
if (prog_has_started)
{
+ go32_stop ();
go32_kill_inferior ();
}
clear_proceed_status ();
insert_breakpoints ();
proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_0, 0);
+ prog_has_started = 1;
}
static void
#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
return 0;
}
-static struct target_ops go32_ops;
-
static void
init_go32_ops (void)
{
stuff some day. */
CORE_ADDR
-skip_prologue (pc)
+hppa_skip_prologue (pc)
CORE_ADDR pc;
{
unsigned long inst;
/* 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
regaddr = register_addr (regno, offset);
errno = 0;
if (regno == PCOQ_HEAD_REGNUM || regno == PCOQ_TAIL_REGNUM)
- {
- scratch = *(int *) ®isters[REGISTER_BYTE (regno)] | 0x3;
- call_ptrace (PT_WUREGS, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
- scratch);
- if (errno != 0)
- {
+ {
+ scratch = *(int *) ®isters[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 *) ®isters[REGISTER_BYTE (regno) + i]);
+ *(int *) ®isters[REGISTER_BYTE (regno) + i]);
if (errno != 0)
{
/* Warning, not error, in case we are attached; sometimes the
{
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);
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
{
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;
}
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
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
/* 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;
}
/* 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");
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
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;
void
require_notification_of_events (pid)
- int pid;
+ int pid;
{
#if defined(PT_SET_EVENT_MASK)
int pt_status;
/* 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;
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)
void
require_notification_of_exec_events (pid)
- int pid;
+ int pid;
{
#if defined(PT_SET_EVENT_MASK)
int pt_status;
/* 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;
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)
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
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. */
(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)
#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)
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)
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)
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)
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)
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)
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)
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;
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)
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
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;
prologue. */
CORE_ADDR
-skip_prologue (ip)
+i960_skip_prologue (ip)
CORE_ADDR (ip);
{
struct frame_saved_regs saved_regs_dummy;
\f
/* Go to line or address in current procedure */
static void
-go_command(line_no, from_tty)
+go_command (line_no, from_tty)
char *line_no;
int from_tty;
{
if (line_no == (char *)NULL || !*line_no)
- printf_filtered(GO_USAGE);
+ printf_filtered (GO_USAGE);
else
{
- tbreak_command(line_no, from_tty);
- jump_command(line_no, from_tty);
+ tbreak_command (line_no, from_tty);
+ jump_command (line_no, from_tty);
}
}
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\
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 ()
{
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);
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 ();
/* 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,
target_resume (pid, 0, TARGET_SIGNAL_0);
else
target_resume (-1, 0, TARGET_SIGNAL_0);
- continue;
+ continue;
}
else
{
/* 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
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. */
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
#include "inferior.h"
\f
+/* The only reason this is here is the tm-altos.h reference below. It
+ was moved back here from tm-m68k.h. FIXME? */
+
+extern CORE_ADDR
+altos_skip_prologue (pc)
+ CORE_ADDR pc;
+{
+ register int op = read_memory_integer (pc, 2);
+ if (op == 0047126)
+ pc += 4; /* Skip link #word */
+ else if (op == 0044016)
+ pc += 6; /* Skip link #long */
+ /* Not sure why branches are here. */
+ /* From tm-isi.h, tm-altos.h */
+ else if (op == 0060000)
+ pc += 4; /* Skip bra #word */
+ else if (op == 00600377)
+ pc += 6; /* skip bra #long */
+ else if ((op & 0177400) == 0060000)
+ pc += 2; /* skip bra #char */
+ return pc;
+}
+
+/* The only reason this is here is the tm-isi.h reference below. It
+ was moved back here from tm-m68k.h. FIXME? */
+
+extern CORE_ADDR
+isi_skip_prologue (pc)
+ CORE_ADDR pc;
+{
+ register int op = read_memory_integer (pc, 2);
+ if (op == 0047126)
+ pc += 4; /* Skip link #word */
+ else if (op == 0044016)
+ pc += 6; /* Skip link #long */
+ /* Not sure why branches are here. */
+ /* From tm-isi.h, tm-altos.h */
+ else if (op == 0060000)
+ pc += 4; /* Skip bra #word */
+ else if (op == 00600377)
+ pc += 6; /* skip bra #long */
+ else if ((op & 0177400) == 0060000)
+ pc += 2; /* skip bra #char */
+ return pc;
+}
+
+
/* Push an empty stack frame, to record the current PC, etc. */
void
prologue. */
CORE_ADDR
-skip_prologue (ip)
+m88k_skip_prologue (ip)
CORE_ADDR (ip);
{
struct frame_saved_regs saved_regs_dummy;
{
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);
}
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);
LOCAL FUNCTION
- procfs_kill_inferior - kill any currently inferior
+ procfs_kill_inferior - kill any current inferior
SYNOPSIS
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
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;
&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);
}
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
#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;
}
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)
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;
mode |= O_BINARY;
#endif
- if (try_cwd_first || SLASH_P (string[0]))
+ if (try_cwd_first || ROOTED_P (string))
{
int i;
filename = string;
}
CORE_ADDR
-skip_prologue (start_pc, frameless_p)
+sparc_skip_prologue (start_pc, frameless_p)
CORE_ADDR start_pc;
int frameless_p;
{
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);
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;
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;
}
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. */
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);
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));
#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. */
+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
#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 $" {
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.*" \
/* 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;
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 &&
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)
{
static unsigned char *print_insn_arg ();
\f
+/* Advance PC across any function entry prologue instructions
+ to reach some "real" code. */
+
+CORE_ADDR
+vax_skip_prologue (pc)
+ CORE_ADDR pc;
+{
+ register int op = (unsigned char) read_memory_integer (pc, 1);
+ if (op == 0x11)
+ pc += 2; /* skip brb */
+ if (op == 0x31)
+ pc += 3; /* skip brw */
+ if (op == 0xC2
+ && ((unsigned char) read_memory_integer (pc+2, 1)) == 0x5E)
+ pc += 3; /* skip subl2 */
+ if (op == 0x9E
+ && ((unsigned char) read_memory_integer (pc+1, 1)) == 0xAE
+ && ((unsigned char) read_memory_integer(pc+3, 1)) == 0x5E)
+ pc += 4; /* skip movab */
+ if (op == 0x9E
+ && ((unsigned char) read_memory_integer (pc+1, 1)) == 0xCE
+ && ((unsigned char) read_memory_integer(pc+4, 1)) == 0x5E)
+ pc += 5; /* skip movab */
+ if (op == 0x9E
+ && ((unsigned char) read_memory_integer (pc+1, 1)) == 0xEE
+ && ((unsigned char) read_memory_integer(pc+6, 1)) == 0x5E)
+ pc += 7; /* skip movab */
+ return pc;
+}
+
/* Print the vax instruction at address MEMADDR in debugged memory,
from disassembler info INFO.
Returns length of the instruction, in bytes. */
1999-02-09 Doug Evans <devans@casey.cygnus.com>
- * Make-common.in (CGEN_READ_SCM): Renamed from CGEN_MAIN_SCM.
- (CGEN_DESC_SCM): New variable.
- (cgen-desc): New rule.
* cgen-cpu.h (CGEN_DISASSEMBLER): New type.
(CGEN_CPU): Member opcode renamed to cpu_desc.
New members get_idata,disassembler.
1999-01-05 Doug Evans <devans@casey.cygnus.com>
* Make-common.in (CGEN_INCLUDE_DEPS): Add cgen-defs.h, cgen-engine.h.
- (CGEN_MAIN_SCM): Add rtx-funcs.scm.
- (cgen-arch): Pass $(mach) to cgen.sh.
* cgen-engine.h (SEM_BRANCH_FINI): New arg pcvar, all uses updated.
(SEM_BRANCH_INIT_EXTRACT): New macro.
(SEM_BRANCH_INIT): Add taken_p.
1998-11-18 Doug Evans <devans@casey.cygnus.com>
* Make-common.in (cgen-utils.o): Depend on cgen-engine.h.
- (CGEN_ARCH_SCM): New variable.
* cgen-engine.h (EXTRACT_[ML]SB0_{INT,UINT}): New macros.
(EXTRACT_INT,EXTRACT_UINT): New macros.
(SEM_SEM_ARG): New macro.
(sim_disassemble_insn): Update prototype.
* cgen-trace.c (current_insn,insn_fields): New static locals.
(trace_insn): Set them.
- * cgen-utils.scm: #include cgen-engine.h.
+ * cgen-utils.c: #include cgen-engine.h.
(sim_disassemble_insn): New arg insn_fields.
Handle variable length insns.
* genmloop.sh: Only emit pbb decls if -pbb.
Wed Jul 1 16:44:12 1998 Doug Evans <devans@seba.cygnus.com>
- * Make-common.in (SCHEME,SCHEMEFLAGS): Delete.
- (CGENDIR,CGEN): New variables.
- (CGEN_VERBOSE): Renamed to CGENFLAGS.
- (cgen-arch,cgen-cpu,cgen-decode): Update.
- (CGEN_CPU_WRITE): New variable.
- (CGEN_CPU_SEMSW): -W -> -X.
- (CGEN_FLAGS_TO_PASS): Delete SCHEME. Add CGEN,CGENFLAGS.
- * cgen.sh: Delete args scheme,schemeflags. New arg cgen.
-
* cgen-sim.h (RECORD_IADDR): Delete.
* cgen-types.h (HOSTINT,HOSTUINT,HOSTPTR): New types.
* genmloop.sh (engine_resume_{full,fast}): Delete icount.
(cgen_cpu_max_extra_bytes): Declare.
* cgen-utils.c (cgen_cpu_max_extra_bytes): New function.
- * cgen.sh: s/@arch@/${arch}/ for cpu files.
-
* sim-cpu.h: New file. sim_cpu_base moved here.
Move sim_cpu_lookup decl here.
* sim-base.h: #include "sim-cpu.h".
Tue Feb 17 17:27:30 1998 Doug Evans <devans@seba.cygnus.com>
- * Make-common.in (CGEN_MAIN_SCM): Update.
* aclocal.m4 (USE_MAINTAINER_MODE): New variable.
* cgen-sim.h (SEMANTIC_CACHE_FN): Delete.
(SEMANTIC_FN): Rewrite declaration.
(DECODE): Update type of semantic_fast member.
({EX,SEM}_FN_NAME): Have only one version.
- * cgen.sh: Support building cpu.c.
* sim-base.h (sim_state_base): Delete conditionals surrounding
member scache_size.
* cgen-sim.h (DECODE): Always use switch for `read' for now.
(PAREXEC): Renamed from PARALLEL_EXEC. All uses updated.
(SEMANTIC{,_CACHE}_FN): Fix return type.
- * cgen.sh (decode): Add s/@arch@/$arch/.
* genmloop.sh (@cpu@_engine_run): Delete `current_state'.
(engine_resume): Likewise. Make `engine' volatile. Save copy
of cpu pointer in volatile object. Initialize read switch if
MAX_NR_PROCESSORS.
(sim_engine_nr_cpus) sim-engine.c, sim-engine.h: New function
-Thu Jan 29 12:13:01 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * cgen.sh: Portably read parms past $9.
-
Fri Jan 23 14:20:54 1998 Doug Evans <devans@seba.cygnus.com>
* Make-common.in (stamp-tvals): New rule.
* cgen-scache.h: Deleted.
* Make-common.in (cgen-run.o,cgen-scache.o): Delete cgen-scache.h dep.
- (CGEN_CPU_SCM): Add sim-model.scm.
* cgen-scache.c: Only compile contents if WITH_SCACHE.
(scache_init): Use runtime computed size of SCACHE.
(scache_flush): Likewise.
dir=libgloss/v850/sys target=v850
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
"syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}"
-
cd->insn_table.num_init_entries = MAX_INSNS;
}
-/* Subroutine of i960_cgen_cpu_open to rebuild the tables.
- This is also called by cgen_set_cpu (via an entry in CD). */
+/* Subroutine of i960_cgen_cpu_open to rebuild the tables. */
static void
i960_cgen_rebuild_tables (cd)
+1999-04-29 Nick Clifton <nickc@cygnus.com>
+
+ * interp.c (set_initial_gprs): Only display memory range if
+ verbose option has been set.
+
1999-04-22 Nick Clifton <nickc@cygnus.com>
* interp.c: Add tracing and verbose options.
memsize = cpu.asregs.msize / (1024 * 1024);
- if (issue_messages)
+ if (issue_messages > 1)
fprintf (stderr, "Simulated memory of %d Mbytes (0x0 .. 0x%08x)\n",
memsize, cpu.asregs.msize - 1);
}
else if (strcmp (simargv[0], "verbose") == 0)
{
- issue_messages = 1;
+ issue_messages = 2;
}
else
{