pc = entry_point_address ();
sal = find_pc_line (pc, 0);
}
- else if (deprecated_selected_frame
- && (get_frame_pc (deprecated_selected_frame) != read_pc ()))
- {
- /* Note - this next line is not correct on all architectures.
- For a graphical debugger we really want to highlight the
- assembly line that called the next function on the stack.
- Many architectures have the next instruction saved as the
- pc on the stack, so what happens is the next instruction
- is highlighted. FIXME */
- pc = get_frame_pc (deprecated_selected_frame);
- find_frame_sal (deprecated_selected_frame, &sal);
- }
else
- {
- pc = read_pc ();
- sal = find_pc_line (pc, 0);
- }
+ {
+ struct frame_info *frame;
+
+ frame = get_selected_frame (NULL);
+
+ if (get_frame_pc (frame) != read_pc ())
+ {
+ /* Note - this next line is not correct on all architectures.
+ For a graphical debugger we really want to highlight the
+ assembly line that called the next function on the stack.
+ Many architectures have the next instruction saved as the
+ pc on the stack, so what happens is the next instruction
+ is highlighted. FIXME */
+ pc = get_frame_pc (frame);
+ find_frame_sal (frame, &sal);
+ }
+ else
+ {
+ pc = read_pc ();
+ sal = find_pc_line (pc, 0);
+ }
+ }
}
else if (objc == 2)
{
}
Tcl_SetListObj (result_ptr->obj_ptr, 0, NULL);
- if (deprecated_selected_frame == NULL)
+ if (!target_has_registers)
return TCL_OK;
start = string_to_core_addr (Tcl_GetStringFromObj (objv[1], NULL));
end = string_to_core_addr (Tcl_GetStringFromObj (objv[2], NULL));
- block = get_frame_block (deprecated_selected_frame, 0);
+ block = get_frame_block (get_selected_frame (NULL), 0);
while (block != 0)
{
Tcl_SetListObj (result_ptr->obj_ptr, 0, NULL);
- if (deprecated_selected_frame != NULL)
+ if (target_has_registers)
{
- block = get_frame_block (deprecated_selected_frame, 0);
- pc = get_frame_pc (deprecated_selected_frame);
+ struct frame_info *frame = get_selected_frame (NULL);
+
+ block = get_frame_block (frame, 0);
+ pc = get_frame_pc (frame);
while (block != 0)
{
junk = 0;
else
{
/* Specified currently selected frame */
- if (deprecated_selected_frame == NULL)
+ if (!target_has_registers)
return TCL_OK;
- block = get_frame_block (deprecated_selected_frame, 0);
+ block = get_frame_block (get_selected_frame (NULL), 0);
}
while (block != 0)
char *start = NULL;
char *end = NULL;
- if (deprecated_selected_frame == NULL)
+ if (!target_has_registers)
{
xasprintf (&start, "%s", "");
xasprintf (&end, "%s", "");
else
{
struct block *block;
- block = get_frame_block (deprecated_selected_frame, 0);
+ block = get_frame_block (get_selected_frame (NULL), 0);
xasprintf (&start, "0x%s", paddr_nz (BLOCK_START (block)));
xasprintf (&end, "0x%s", paddr_nz (BLOCK_END (block)));
}
{
char *frame;
- if (deprecated_selected_frame == NULL)
+ if (!target_has_registers)
xasprintf (&frame, "%s","");
else
/* FIXME: cagney/2002-11-19: This should be using get_frame_id()
to identify the frame and *NOT* get_frame_base(). */
xasprintf (&frame, "0x%s",
- paddr_nz (get_frame_base (deprecated_selected_frame)));
+ paddr_nz (get_frame_base (get_selected_frame (NULL))));
Tcl_SetStringObj (result_ptr->obj_ptr, frame, -1);