diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-12-30 20:34:06 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-12-30 20:34:06 +0000 |
commit | 05052b638ca28ec04bc39a383869aeab442e59f1 (patch) | |
tree | cab43a567dc3be0a4117dafc184a8d2be289920a /gdb/breakpoint.c | |
parent | da6b2d99f7b95caf5f31a31e28a310e0b63b2ee5 (diff) | |
download | gdb-05052b638ca28ec04bc39a383869aeab442e59f1.zip gdb-05052b638ca28ec04bc39a383869aeab442e59f1.tar.gz gdb-05052b638ca28ec04bc39a383869aeab442e59f1.tar.bz2 |
* breakpoint.c (breakpoint_chain): Make static.
* breakpoint.c, breakpoint.h (frame_in_dummy): New function.
* stack.c (print_frame_info): Use it.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index e078064..c7d1831 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -154,7 +154,7 @@ static int executing_breakpoint_commands; /* Chain of all breakpoints defined. */ -struct breakpoint *breakpoint_chain; +static struct breakpoint *breakpoint_chain; /* Number of last breakpoint made. */ @@ -450,6 +450,7 @@ insert_breakpoints () 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"); @@ -460,6 +461,7 @@ insert_breakpoints () 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, @@ -554,6 +556,30 @@ breakpoint_here_p (pc) 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. */ @@ -2619,6 +2645,7 @@ delete_breakpoint (bpt) 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 */ } @@ -2640,10 +2667,14 @@ delete_breakpoint (bpt) 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; |