/* Chain of all breakpoints defined. */
-struct breakpoint *breakpoint_chain;
+static struct breakpoint *breakpoint_chain;
/* Number of last breakpoint made. */
b->enable = disabled;
if (!disabled_breaks)
{
+ target_terminal_ours_for_output ();
fprintf_unfiltered (gdb_stderr,
"Cannot insert breakpoint %d:\n", b->number);
printf_filtered ("Disabling shared library breakpoints:\n");
else
#endif
{
+ target_terminal_ours_for_output ();
fprintf_unfiltered (gdb_stderr, "Cannot insert breakpoint %d:\n", b->number);
#ifdef ONE_PROCESS_WRITETEXT
fprintf_unfiltered (gdb_stderr,
return 0;
}
+/* Return nonzero if FRAME is a dummy frame. We can't use PC_IN_CALL_DUMMY
+ because figuring out the saved SP would take too much time, at least using
+ get_saved_register on the 68k. This means that for this function to
+ work right a port must use the bp_call_dummy breakpoint. */
+
+int
+frame_in_dummy (frame)
+ FRAME frame;
+{
+ struct breakpoint *b;
+
+ ALL_BREAKPOINTS (b)
+ {
+ /* We could also check whether fi->pc is within the call dummy, but
+ that should not be necessary if we check the frame (note the
+ call dummy is sizeof (dummy) / sizeof (LONGEST) * REGISTER_SIZE
+ bytes not just sizeof (dummy) bytes). */
+ if (b->type == bp_call_dummy
+ && b->frame == frame->frame)
+ return 1;
+ }
+ return 0;
+}
+
/* breakpoint_match_thread (PC, PID) returns true if the breakpoint at PC
is valid for process/thread PID. */
val = target_insert_breakpoint (b->address, b->shadow_contents);
if (val != 0)
{
+ target_terminal_ours_for_output ();
fprintf_unfiltered (gdb_stderr, "Cannot insert breakpoint %d:\n", b->number);
memory_error (val, b->address); /* which bombs us out */
}
free (bpt->source_file);
if (xgdb_verbose && bpt->type == bp_breakpoint)
- printf_unfiltered ("breakpoint #%d deleted\n", bpt->number);
+ {
+ target_terminal_ours_for_output ();
+ printf_unfiltered ("breakpoint #%d deleted\n", bpt->number);
+ }
/* Be sure no bpstat's are pointing at it after it's been freed. */
- /* FIXME, how can we find all bpstat's? We just check stop_bpstat for now. */
+ /* FIXME, how can we find all bpstat's?
+ We just check stop_bpstat for now. */
for (bs = stop_bpstat; bs; bs = bs->next)
if (bs->breakpoint_at == bpt)
bs->breakpoint_at = NULL;
char buf[MAX_REGISTER_RAW_SIZE];
CORE_ADDR sp;
+#if 0
+ /* On the 68k, this spends too much time in m68k_find_saved_regs. */
+
/* Get the value of SP_REGNUM relative to the frame. */
get_saved_register (buf, (int *)NULL, (CORE_ADDR *)NULL,
FRAME_INFO_ID (fi), SP_REGNUM, (enum lval_type *)NULL);
will succeed even though there is no call dummy. Probably best is
to check for a bp_call_dummy breakpoint. */
if (PC_IN_CALL_DUMMY (fi->pc, sp, fi->frame))
+#else
+ if (frame_in_dummy (fi))
+#endif
{
/* Do this regardless of SOURCE because we don't have any source
to list for this frame. */
if (fi->pc != sal.pc || !sal.symtab)
printf_filtered ("%s in ", local_hex_string((unsigned long) fi->pc));
fprintf_symbol_filtered (gdb_stdout, funname ? funname : "??", funlang,
- DMGL_NO_OPTS);
+ DMGL_ANSI);
wrap_here (" ");
fputs_filtered (" (", gdb_stdout);
if (args)