+Tue Aug 11 02:49:39 1992 John Gilmore (gnu at cygnus.com)
+
+ * am29k-tdep.c: Lint from DECstation compiler.
+ * mem-break.c: Restore test of BREAKPOINT size that Fred removed.
+ As the man page says, "Sometimes you just can't get lint to shut
+ up". That doesn't mean you should blow away the code it won't
+ shut up about.
+ * mips-xdep.c: Revise stubbing-out of code until Rich cleans
+ it up over the next few weeks. Make mips x 29k build.
+ * tm-29k.h (CALL_DUMMY): Make it work on cross-endian hosts.
+ (FIX_CALL_DUMMY): Comment in the patching of the breakpoint,
+ but leave it as a comment because the breakpoint instruction
+ is not easily accessible at this moment (it's static, and if
+ we define one here, it goes into every file compiled).
+
Mon Aug 10 22:27:19 1992 Fred Fish (fnf@cygnus.com)
* Makefile.in (VERSION): Bump to 4.6.3.
#include "inferior.h"
#include "gdbcore.h"
-/* For now we stub this out; sgi format is super-hairy (and completely
- different in the new release) */
+/* For now we stub this out; sgi core format is super-hairy (and completely
+ different in the new release).
+ For most mips systems, this function is defined in coredep.c. */
-#if defined(sgi) || !defined(GDB_TARGET_IS_MIPS)
+#if defined(sgi)
void
fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
char *core_reg_sect;
{
return;
}
+#endif
+
+/* Access to the inferior is only good for native systems, not cross.
+ I am not sure why this is stubbed out on SGI... --gnu@cygnus.com */
+
+#if defined(sgi) || !defined(GDB_TARGET_IS_MIPS)
/* ARGSUSED */
void
}
#endif /* sgi */
-
-#if 0
-void
-fetch_core_registers ()
-{
- register int regno;
- int val;
-
- for (regno = 1; regno < NUM_REGS; regno++) {
- char buf[MAX_REGISTER_RAW_SIZE];
-
- val = bfd_seek (core_bfd, register_addr (regno, 0));
- if (val < 0 || (val = bfd_read (core_bfd, buf, sizeof buf)) < 0) {
- char buffer[50];
- strcpy (buffer, "Reading register ");
- strcat (buffer, reg_names[regno]);
-
- perror_with_name (buffer);
- }
- supply_register (regno, buf);
- }
-}
-#endif /* 0 */
mtsrim cr, 15
loadm 0, 0, lr2, msp ; load first 16 words of arguments into registers
add msp, msp, 16 * 4 ; point to the remaining arguments
- CONST_INSN:
- const lr0,inf
- consth lr0,inf
+ CONST_INSN:
+ const lr0,inf ; (replaced by half of target addr)
+ consth lr0,inf ; (replaced by other half of target addr)
calli lr0, lr0
aseq 0x40,gr1,gr1 ; nop
- asneq 0x50,gr1,gr1 ; breakpoint
+ BREAKPT_INSN:
+ asneq 0x50,gr1,gr1 ; breakpoint (replaced by local breakpoint insn)
*/
-/* Position of the "const" instruction within CALL_DUMMY in bytes. */
-#define CONST_INSN (3 * 4)
#if TARGET_BYTE_ORDER == HOST_BYTE_ORDER
-#define CALL_DUMMY {0x0400870f,\
- 0x36008200|(MSP_HW_REGNUM), \
- 0x15000040|(MSP_HW_REGNUM<<8)|(MSP_HW_REGNUM<<16), \
- 0x03ff80ff, 0x02ff80ff, 0xc8008080, 0x70400101, 0x72500101}
-#else /* Byte order differs. */
- you lose
-#endif /* Byte order differs. */
+#define BS(const) const
+#else
+#define BS(const) (((const) & 0xff) << 24) | \
+ (((const) & 0xff00) << 8) | \
+ (((const) & 0xff0000) >> 8) | \
+ (((const) & 0xff000000) >> 24)
+#endif
+
+/* Position of the "const" and blkt instructions within CALL_DUMMY in bytes. */
+#define CONST_INSN (3 * 4)
+#define BREAKPT_INSN (7 * 4)
+#define CALL_DUMMY { \
+ BS(0x0400870f),\
+ BS(0x36008200|(MSP_HW_REGNUM)), \
+ BS(0x15000040|(MSP_HW_REGNUM<<8)|(MSP_HW_REGNUM<<16)), \
+ BS(0x03ff80ff), \
+ BS(0x02ff80ff), \
+ BS(0xc8008080), \
+ BS(0x70400101), \
+ BS(0x72500101)}
#define CALL_DUMMY_LENGTH (8 * 4)
#define CALL_DUMMY_START_OFFSET 0 /* Start execution at beginning of dummy */
into a call sequence of the above form stored at DUMMYNAME. */
/* Currently this stuffs in the address of the function that we are calling.
- If different 29k systems use different breakpoint instructions, it
- could also stuff BREAKPOINT in the right place (to avoid having to
+ Since different 29k systems use different breakpoint instructions, it
+ also stuffs BREAKPOINT in the right place (to avoid having to
duplicate CALL_DUMMY in each tm-*.h file). */
#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
{\
- STUFF_I16((char *)dummyname + CONST_INSN, fun);\
- STUFF_I16((char *)dummyname + CONST_INSN + 4, fun >> 16);\
+ STUFF_I16((char *)dummyname + CONST_INSN, fun); \
+ STUFF_I16((char *)dummyname + CONST_INSN + 4, fun >> 16); \
+ /* FIXME memcpy ((char *)(dummyname) + BREAKPT_INSN, break_insn, 4); */ \
}
/* 29k architecture has separate data & instruction memories -- wired to