reinit_frame_cache.
(flush_cached_frames): Rename to reinit_frame_cache and delete
old implementation.
* frame.h (flush_cached_frames): Delete prototype and update comment.
* bsd-kvm.c (bsd_kvm_open, bsd_kvm_proc_cmd, bsd_kvm_pcb_cmd): Call
reinit_frame_cache instead of flush_cached_frames. Do not call
select_frame after reinit_frame_cache.
* corelow.c (core_open): Likewise.
* gdbarch.sh (deprecated_current_gdbarch_select_hack): Likewise.
* infrun.c (prepare_to_proceed, context_switch)
(handle_inferior_event): Likewise.
* linux-fork.c (fork_load_infrun_state): Likewise.
* ocd.c (ocd_start_remote): Likewise.
* remote-e7000.c (e7000_start_remote): Likewise.
* remote-mips.c (device): Likewise.
* thread.c (switch_to_thread): Likewise.
* tracepoint.c (finish_tfind_command): Likewise.
* gdbarch.c: Regenerated.
+2007-02-28 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * frame.c (frame_pop, frame_observer_target_changed): Call
+ reinit_frame_cache.
+ (flush_cached_frames): Rename to reinit_frame_cache and delete
+ old implementation.
+ * frame.h (flush_cached_frames): Delete prototype and update comment.
+
+ * bsd-kvm.c (bsd_kvm_open, bsd_kvm_proc_cmd, bsd_kvm_pcb_cmd): Call
+ reinit_frame_cache instead of flush_cached_frames. Do not call
+ select_frame after reinit_frame_cache.
+ * corelow.c (core_open): Likewise.
+ * gdbarch.sh (deprecated_current_gdbarch_select_hack): Likewise.
+ * infrun.c (prepare_to_proceed, context_switch)
+ (handle_inferior_event): Likewise.
+ * linux-fork.c (fork_load_infrun_state): Likewise.
+ * ocd.c (ocd_start_remote): Likewise.
+ * remote-e7000.c (e7000_start_remote): Likewise.
+ * remote-mips.c (device): Likewise.
+ * thread.c (switch_to_thread): Likewise.
+ * tracepoint.c (finish_tfind_command): Likewise.
+ * gdbarch.c: Regenerated.
+
2007-02-28 Jerome Guitton <guitton@adacore.com>
Joel Brobecker <brobecker@adacore.com>
target_fetch_registers (-1);
- flush_cached_frames ();
- select_frame (get_current_frame ());
+ reinit_frame_cache ();
print_stack_frame (get_selected_frame (NULL), -1, 1);
}
target_fetch_registers (-1);
- flush_cached_frames ();
- select_frame (get_current_frame ());
+ reinit_frame_cache ();
print_stack_frame (get_selected_frame (NULL), -1, 1);
}
target_fetch_registers (-1);
- flush_cached_frames ();
- select_frame (get_current_frame ());
+ reinit_frame_cache ();
print_stack_frame (get_selected_frame (NULL), -1, 1);
}
target_fetch_registers (-1);
/* Now, set up the frame cache, and print the top of stack. */
- flush_cached_frames ();
- select_frame (get_current_frame ());
+ reinit_frame_cache ();
print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC);
}
else
/* We've made right mess of GDB's local state, just discard
everything. */
- flush_cached_frames ();
+ reinit_frame_cache ();
}
void
void
frame_observer_target_changed (struct target_ops *target)
{
- flush_cached_frames ();
+ reinit_frame_cache ();
}
/* Flush the entire frame cache. */
void
-flush_cached_frames (void)
+reinit_frame_cache (void)
{
/* Since we can't really be sure what the first object allocated was */
obstack_free (&frame_cache_obstack, 0);
select_frame (NULL);
annotate_frames_invalid ();
if (frame_debug)
- fprintf_unfiltered (gdb_stdlog, "{ flush_cached_frames () }\n");
-}
-
-/* Flush the frame cache, and start a new one if necessary. */
-
-void
-reinit_frame_cache (void)
-{
- flush_cached_frames ();
-
- /* FIXME: The inferior_ptid test is wrong if there is a corefile. */
- if (PIDGET (inferior_ptid) != 0)
- {
- select_frame (get_current_frame ());
- }
+ fprintf_unfiltered (gdb_stdlog, "{ reinit_frame_cache () }\n");
}
/* Find where a register is saved (in memory or another register).
/* Invalidates the frame cache (this function should have been called
invalidate_cached_frames).
- FIXME: cagney/2002-11-28: The only difference between
- flush_cached_frames() and reinit_frame_cache() is that the latter
- explicitly sets the selected frame back to the current frame -- there
- isn't any real difference (except that one delays the selection of
- a new frame). Code can instead simply rely on get_selected_frame()
- to reinit the selected frame as needed. As for invalidating the
- cache, there should be two methods: one that reverts the thread's
- selected frame back to current frame (for when the inferior
- resumes) and one that does not (for when the user modifies the
- target invalidating the frame cache). */
-extern void flush_cached_frames (void);
+ FIXME: cagney/2002-11-28: There should be two methods: one that
+ reverts the thread's selected frame back to current frame (for when
+ the inferior resumes) and one that does not (for when the user
+ modifies the target invalidating the frame cache). */
extern void reinit_frame_cache (void);
/* On demand, create the selected frame and then return it. If the
current_gdbarch_swap_out_hack ();
current_gdbarch_swap_in_hack (new_gdbarch);
architecture_changed_event ();
- flush_cached_frames ();
+ reinit_frame_cache ();
}
extern void _initialize_gdbarch (void);
current_gdbarch_swap_out_hack ();
current_gdbarch_swap_in_hack (new_gdbarch);
architecture_changed_event ();
- flush_cached_frames ();
+ reinit_frame_cache ();
}
extern void _initialize_gdbarch (void);
/* FIXME: This stuff came from switch_to_thread() in
thread.c (which should probably be a public function). */
- flush_cached_frames ();
+ reinit_frame_cache ();
registers_changed ();
stop_pc = wait_pc;
- select_frame (get_current_frame ());
}
/* We return 1 to indicate that there is a breakpoint here,
&ecs->current_line, &ecs->current_symtab);
}
inferior_ptid = ecs->ptid;
- flush_cached_frames ();
+ reinit_frame_cache ();
}
static void
}
ecs->infwait_state = infwait_normal_state;
- flush_cached_frames ();
+ reinit_frame_cache ();
/* If it's a new process, add it to the thread database */
if (!ptid_equal (ecs->ptid, inferior_ptid))
{
context_switch (ecs);
- flush_cached_frames ();
+ reinit_frame_cache ();
}
stop_pc = read_pc ();
if (!ptid_equal (ecs->ptid, inferior_ptid))
{
context_switch (ecs);
- flush_cached_frames ();
+ reinit_frame_cache ();
}
/* If no catchpoint triggered for this, then keep going. */
registers_changed ();
reinit_frame_cache ();
- /* We must select a new frame before making any inferior calls to
- avoid warnings. */
- select_frame (get_current_frame ());
-
stop_pc = read_pc ();
nullify_last_target_wait_ptid ();
doesn't happen here (in fact, it may not be possible to get the monitor to
send the appropriate packet). */
- flush_cached_frames ();
+ reinit_frame_cache ();
registers_changed ();
stop_pc = read_pc ();
print_stack_frame (get_selected_frame (NULL), 0, SRC_AND_LOC);
that the target is about to print out a status message of some sort. That
doesn't happen here. */
- flush_cached_frames ();
+ reinit_frame_cache ();
registers_changed ();
stop_pc = read_pc ();
print_stack_frame (get_selected_frame (NULL), 0, SRC_AND_LOC);
of some sort. That doesn't happen here (in fact, it may not be
possible to get the monitor to send the appropriate packet). */
- flush_cached_frames ();
+ reinit_frame_cache ();
registers_changed ();
stop_pc = read_pc ();
print_stack_frame (get_selected_frame (NULL), 0, SRC_AND_LOC);
return;
inferior_ptid = ptid;
- flush_cached_frames ();
+ reinit_frame_cache ();
registers_changed ();
stop_pc = read_pc ();
- select_frame (get_current_frame ());
}
static void
error (_("Bogus reply from target: %s"), reply);
}
- flush_cached_frames ();
+ reinit_frame_cache ();
registers_changed ();
- select_frame (get_current_frame ());
set_traceframe_num (target_frameno);
set_tracepoint_num (target_tracept);
if (target_frameno == -1)