+Tue Aug 23 16:54:16 1994 Stu Grossman (grossman@cygnus.com)
+
+ * nlm/ppc.c (set_step_traps clear_step_traps): Cleanups.
+ * nlm/gdbserve.def: Autoload clib.
+
Tue Aug 23 12:05:19 1994 Jim Kingdon (kingdon@cygnus.com)
+ * breakpoint.c (condition_command): Call breakpoints_changed.
+
* gdbtypes.h: Declare f77_create_literal_string_type and
f77_create_literal_complex_type.
* valops.c (f77_value_literal_string, f77_value_substring,
};
static LONG saved_inst;
-static char *saved_inst_pc = 0;
+static LONG *saved_inst_pc = 0;
static LONG saved_target_inst;
-static char *saved_target_inst_pc = 0;
+static LONG *saved_target_inst_pc = 0;
void
set_step_traps (frame)
struct StackFrame *frame;
{
union inst inst;
- char *target;
+ LONG *target;
int opcode;
int ra, rb;
- char *pc = (char *)frame->ExceptionPC;
+ LONG *pc = (LONG *)frame->ExceptionPC;
- inst.l = *(LONG *)pc;
+ inst.l = *pc++;
opcode = inst.inst.variant.b.opcode;
+ target = pc;
+
switch (opcode)
{
case 18: /* Unconditional branch */
- target = (char *)(inst.inst.variant.b.li << 2);
- if (!inst.inst.variant.b.aa) /* Relative? */
- target += (long)pc;
+ if (inst.inst.variant.b.aa) /* Absolute? */
+ target = 0;
+ target += inst.inst.variant.b.li;
break;
case 16: /* Conditional branch */
- target = (char *)(inst.inst.variant.bc.bd << 2);
- if (!inst.inst.variant.bc.aa) /* Relative? */
- target += (long)pc;
+ if (!inst.inst.variant.bc.aa) /* Absolute? */
+ target = 0;
+ target += inst.inst.variant.bc.bd;
break;
case 19: /* Cond. branch via ctr or lr reg */
switch (inst.inst.variant.bclr.type)
{
case 528: /* ctr */
- target = (char *)frame->ExceptionState.u.SpecialRegistersEnumerated.CsavedCTR;
+ target = (LONG *)frame->ExceptionState.u.SpecialRegistersEnumerated.CsavedCTR;
break;
case 16: /* lr */
- target = (char *)frame->ExceptionState.u.SpecialRegistersEnumerated.CsavedLR;
+ target = (LONG *)frame->ExceptionState.u.SpecialRegistersEnumerated.CsavedLR;
break;
- default:
- target = pc;
}
break;
- default:
- target = pc;
}
- saved_inst = *(LONG *)pc;
+ saved_inst = *pc;
mem_write (pc, breakpoint_insn, BREAKPOINT_SIZE);
saved_inst_pc = pc;
if (target != pc)
{
- saved_target_inst = *(LONG *)target;
+ saved_target_inst = *target;
mem_write (target, breakpoint_insn, BREAKPOINT_SIZE);
saved_target_inst_pc = target;
}
struct StackFrame *frame;
{
int retcode;
- char *pc = (char *)frame->ExceptionPC;
+ LONG *pc = (LONG *)frame->ExceptionPC;
if (saved_inst_pc == pc || saved_target_inst_pc == pc)
retcode = 1;
*ptr = '\000';
}
+#if 0
/*
* strtol : convert a string to long.
*
*ptr = (char *) ((did_conversion) ? (char *)s : (char *)start);
return negate ? -total : total;
}
+#endif
void _exit (int foo) __attribute__ ((noreturn));