* breakpoint.h (struct breakpoint): Replace frame with frame_id.
(set_momentary_breaokpoint): Replace `struct frame_info' parameter
with `struct frame_id'.
(set_longjmp_resume_breakpoint): Ditto.
* infrun.c (handle_inferior_event): Update.
* breakpoint.c (watch_command_1, until_break_command): Update.
* infrun.c (handle_inferior_event, check_sigtramp2): Update.
(handle_inferior_event, step_over_function): Update.
* breakpoint.c (bpstat_stop_status, print_one_breakpoint): Update.
(set_raw_breakpoint, set_longjmp_resume_breakpoint): Update.
(set_momentary_breakpoint, deprecated_frame_in_dummy): Update.
* infcmd.c (finish_command, run_stack_dummy): Update.
+2002-12-11 Andrew Cagney <ac131313@redhat.com>
+
+ * breakpoint.h (struct breakpoint): Replace frame with frame_id.
+ (set_momentary_breaokpoint): Replace `struct frame_info' parameter
+ with `struct frame_id'.
+ (set_longjmp_resume_breakpoint): Ditto.
+ * infrun.c (handle_inferior_event): Update.
+ * breakpoint.c (watch_command_1, until_break_command): Update.
+ * infrun.c (handle_inferior_event, check_sigtramp2): Update.
+ (handle_inferior_event, step_over_function): Update.
+ * breakpoint.c (bpstat_stop_status, print_one_breakpoint): Update.
+ (set_raw_breakpoint, set_longjmp_resume_breakpoint): Update.
+ (set_momentary_breakpoint, deprecated_frame_in_dummy): Update.
+ * infcmd.c (finish_command, run_stack_dummy): Update.
+
2002-12-11 Kevin Buettner <kevinb@redhat.com>
* dwarf2read.c (dwarf2_const_ignored, dwarf2_volatile_ignored)
ALL_BREAKPOINTS (b)
{
if (b->type == bp_call_dummy
- && b->frame == get_frame_base (frame)
+ && frame_id_eq (b->frame_id, get_frame_id (frame))
/* We need to check the PC as well as the frame on the sparc,
for signals.exp in the testsuite. */
&& (get_frame_pc (frame)
real_breakpoint = 1;
}
- if (b->frame &&
- b->frame != get_frame_base (get_current_frame ()))
+ if (frame_id_p (b->frame_id)
+ && !frame_id_eq (b->frame_id, get_frame_id (get_current_frame ())))
bs->stop = 0;
else
{
ui_out_text (uiout, "\n");
- if (b->frame)
+ if (frame_id_p (b->frame_id))
{
annotate_field (6);
ui_out_text (uiout, "\tstop only in stack frame at ");
- ui_out_field_core_addr (uiout, "frame", b->frame);
+ /* FIXME: cagney/2002-12-01: Shouldn't be poeking around inside
+ the frame ID. */
+ ui_out_field_core_addr (uiout, "frame", b->frame_id.base);
ui_out_text (uiout, "\n");
}
b->silent = 0;
b->ignore_count = 0;
b->commands = NULL;
- b->frame = 0;
+ b->frame_id = null_frame_id;
b->dll_pathname = NULL;
b->triggered_dll_pathname = NULL;
b->forked_inferior_pid = 0;
that gets deleted automatically... */
void
-set_longjmp_resume_breakpoint (CORE_ADDR pc, struct frame_info *frame)
+set_longjmp_resume_breakpoint (CORE_ADDR pc, struct frame_id frame_id)
{
register struct breakpoint *b;
{
b->address = pc;
b->enable_state = bp_enabled;
- if (frame != NULL)
- b->frame = get_frame_base (frame);
- else
- b->frame = 0;
+ b->frame_id = frame_id;
check_duplicates (b);
return;
}
Restrict it to frame FRAME if FRAME is nonzero. */
struct breakpoint *
-set_momentary_breakpoint (struct symtab_and_line sal, struct frame_info *frame,
+set_momentary_breakpoint (struct symtab_and_line sal, struct frame_id frame_id,
enum bptype type)
{
register struct breakpoint *b;
b = set_raw_breakpoint (sal, type);
b->enable_state = bp_enabled;
b->disposition = disp_donttouch;
- b->frame = (frame ? get_frame_base (frame) : 0);
+ b->frame_id = frame_id;
/* If we're debugging a multi-threaded program, then we
want momentary breakpoints to be active in only a
scope_breakpoint->disposition = disp_del;
/* Only break in the proper frame (help with recursion). */
- scope_breakpoint->frame = get_frame_base (prev_frame);
+ scope_breakpoint->frame_id = get_frame_id (prev_frame);
/* Set the address at which we will stop. */
scope_breakpoint->address = get_frame_pc (prev_frame);
resolve_sal_pc (&sal);
- breakpoint = set_momentary_breakpoint (sal, deprecated_selected_frame, bp_until);
+ breakpoint =
+ set_momentary_breakpoint (sal,get_frame_id (deprecated_selected_frame),
+ bp_until);
if (!event_loop_p || !target_can_async_p ())
old_chain = make_cleanup_delete_breakpoint (breakpoint);
if (prev_frame)
{
- sal = find_pc_line (get_frame_pc (prev_frame), 0);
- sal.pc = get_frame_pc (prev_frame);
- breakpoint = set_momentary_breakpoint (sal, prev_frame, bp_until);
+ sal = find_pc_line (prev_frame->pc, 0);
+ sal.pc = prev_frame->pc;
+ breakpoint = set_momentary_breakpoint (sal, get_frame_id (prev_frame),
+ bp_until);
if (!event_loop_p || !target_can_async_p ())
make_cleanup_delete_breakpoint (breakpoint);
else
struct command_line *commands;
/* Stack depth (address of frame). If nonzero, break only if fp
equals this. */
- CORE_ADDR frame;
+ struct frame_id frame_id;
/* Conditional. Break only if this expression's value is nonzero. */
struct expression *cond;
/* Prototypes for breakpoint-related functions. */
-/* Forward declarations for prototypes */
-struct frame_info;
-
extern enum breakpoint_here breakpoint_here_p (CORE_ADDR);
extern int breakpoint_inserted_here_p (CORE_ADDR);
implements a functional superset of this function. The only reason
it hasn't been removed is because some architectures still don't
use the new framework. Once they have been fixed, this can go. */
+struct frame_info;
extern int deprecated_frame_in_dummy (struct frame_info *);
extern int breakpoint_thread_match (CORE_ADDR, ptid_t);
extern int ep_is_exception_catchpoint (struct breakpoint *);
extern struct breakpoint *set_momentary_breakpoint
- (struct symtab_and_line, struct frame_info *, enum bptype);
+ (struct symtab_and_line, struct frame_id, enum bptype);
extern void set_ignore_count (int, int, int);
extern void enable_overlay_breakpoints (void);
extern void disable_overlay_breakpoints (void);
-extern void set_longjmp_resume_breakpoint (CORE_ADDR, struct frame_info *);
+extern void set_longjmp_resume_breakpoint (CORE_ADDR, struct frame_id);
/* These functions respectively disable or reenable all currently
enabled watchpoints. When disabled, the watchpoints are marked
call_disabled. When reenabled, they are marked enabled.
addr is the address of the call dummy plus the CALL_DUMMY_START_OFFSET,
so we need to subtract the CALL_DUMMY_START_OFFSET. */
+ /* FIXME: cagney/2002-12-01: Rather than pass in curent frame,
+ why not just create, and then pass in a frame ID. This would
+ make it possible to eliminate set_current_frame(). */
bpt = set_momentary_breakpoint (sal,
- get_current_frame (),
+ get_frame_id (get_current_frame ()),
bp_call_dummy);
bpt->disposition = disp_del;
sal = find_pc_line (get_frame_pc (frame), 0);
sal.pc = get_frame_pc (frame);
- breakpoint = set_momentary_breakpoint (sal, frame, bp_finish);
+ breakpoint = set_momentary_breakpoint (sal, get_frame_id (frame), bp_finish);
if (!event_loop_p || !target_can_async_p ())
old_chain = make_cleanup_delete_breakpoint (breakpoint);
set_longjmp_resume_breakpoint (jmp_buf_pc, get_current_frame ());
else
#endif /* 0 */
- set_longjmp_resume_breakpoint (jmp_buf_pc, NULL);
+ set_longjmp_resume_breakpoint (jmp_buf_pc, null_frame_id);
ecs->handling_longjmp = 1; /* FIXME */
keep_going (ecs);
return;
check_for_old_step_resume_breakpoint ();
step_resume_breakpoint =
- set_momentary_breakpoint (sr_sal, NULL, bp_step_resume);
+ set_momentary_breakpoint (sr_sal, null_frame_id, bp_step_resume);
if (breakpoints_inserted)
insert_breakpoints ();
}
step_frame_id; I don't think anyone thought to try it. */
check_for_old_step_resume_breakpoint ();
step_resume_breakpoint =
- set_momentary_breakpoint (sr_sal, NULL, bp_step_resume);
+ set_momentary_breakpoint (sr_sal, null_frame_id, bp_step_resume);
if (breakpoints_inserted)
insert_breakpoints ();
}
xxx.section = find_pc_overlay (xxx.pc);
check_for_old_step_resume_breakpoint ();
step_resume_breakpoint =
- set_momentary_breakpoint (xxx, NULL, bp_step_resume);
+ set_momentary_breakpoint (xxx, null_frame_id, bp_step_resume);
insert_breakpoints ();
keep_going (ecs);
return;
is where the new fp value is established. */
check_for_old_step_resume_breakpoint ();
step_resume_breakpoint =
- set_momentary_breakpoint (sr_sal, NULL, bp_step_resume);
+ set_momentary_breakpoint (sr_sal, null_frame_id, bp_step_resume);
if (breakpoints_inserted)
insert_breakpoints ();
/* We perhaps could set the frame if we kept track of what the
frame corresponding to prev_pc was. But we don't, so don't. */
through_sigtramp_breakpoint =
- set_momentary_breakpoint (sr_sal, NULL, bp_through_sigtramp);
+ set_momentary_breakpoint (sr_sal, null_frame_id, bp_through_sigtramp);
if (breakpoints_inserted)
insert_breakpoints ();
established. */
check_for_old_step_resume_breakpoint ();
step_resume_breakpoint =
- set_momentary_breakpoint (sr_sal, NULL, bp_step_resume);
+ set_momentary_breakpoint (sr_sal, null_frame_id, bp_step_resume);
if (breakpoints_inserted)
insert_breakpoints ();
check_for_old_step_resume_breakpoint ();
step_resume_breakpoint =
- set_momentary_breakpoint (sr_sal, get_current_frame (), bp_step_resume);
+ set_momentary_breakpoint (sr_sal, get_frame_id (get_current_frame ()),
+ bp_step_resume);
if (frame_id_p (step_frame_id)
&& !IN_SOLIB_DYNSYM_RESOLVE_CODE (sr_sal.pc))
- /* FIXME: cagney/2002-12-01: Someone should modify the breakpoint
- code so that it uses a frame ID, instead of a frame address. */
- step_resume_breakpoint->frame = step_frame_id.base;
+ step_resume_breakpoint->frame_id = step_frame_id;
if (breakpoints_inserted)
insert_breakpoints ();