mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-19 22:03:57 +08:00
Invalidate target cache before starting to handle event.
gdb: 2013-12-10 Yao Qi <yao@codesourcery.com> * infrun.c: Include "target-dcache.h". (prepare_for_detach): Call target_dcache_invalidate. (wait_for_inferior): Likewise. (fetch_inferior_event): Likewise. (infrun_thread_stop_requested_callback): Likewise. Set overlay_cache_invalid to 1.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
2013-12-10 Yao Qi <yao@codesourcery.com>
|
||||||
|
|
||||||
|
* infrun.c: Include "target-dcache.h".
|
||||||
|
(prepare_for_detach): Call target_dcache_invalidate.
|
||||||
|
(wait_for_inferior): Likewise.
|
||||||
|
(fetch_inferior_event): Likewise.
|
||||||
|
(infrun_thread_stop_requested_callback): Likewise. Set
|
||||||
|
overlay_cache_invalid to 1.
|
||||||
|
|
||||||
2013-12-10 Joel Brobecker <brobecker@adacore.com>
|
2013-12-10 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
* symtab.c (symbol_find_demangled_name): Add handling of
|
* symtab.c (symbol_find_demangled_name): Add handling of
|
||||||
|
24
gdb/infrun.c
24
gdb/infrun.c
@ -60,6 +60,7 @@
|
|||||||
#include "objfiles.h"
|
#include "objfiles.h"
|
||||||
#include "completer.h"
|
#include "completer.h"
|
||||||
#include "target-descriptions.h"
|
#include "target-descriptions.h"
|
||||||
|
#include "target-dcache.h"
|
||||||
|
|
||||||
/* Prototypes for local functions */
|
/* Prototypes for local functions */
|
||||||
|
|
||||||
@ -2475,6 +2476,13 @@ infrun_thread_stop_requested_callback (struct thread_info *info, void *arg)
|
|||||||
|
|
||||||
old_chain = make_cleanup_restore_current_thread ();
|
old_chain = make_cleanup_restore_current_thread ();
|
||||||
|
|
||||||
|
overlay_cache_invalid = 1;
|
||||||
|
/* Flush target cache before starting to handle each event.
|
||||||
|
Target was running and cache could be stale. This is just a
|
||||||
|
heuristic. Running threads may modify target memory, but we
|
||||||
|
don't get any event. */
|
||||||
|
target_dcache_invalidate ();
|
||||||
|
|
||||||
/* Go through handle_inferior_event/normal_stop, so we always
|
/* Go through handle_inferior_event/normal_stop, so we always
|
||||||
have consistent output as if the stop event had been
|
have consistent output as if the stop event had been
|
||||||
reported. */
|
reported. */
|
||||||
@ -2677,6 +2685,11 @@ prepare_for_detach (void)
|
|||||||
memset (ecs, 0, sizeof (*ecs));
|
memset (ecs, 0, sizeof (*ecs));
|
||||||
|
|
||||||
overlay_cache_invalid = 1;
|
overlay_cache_invalid = 1;
|
||||||
|
/* Flush target cache before starting to handle each event.
|
||||||
|
Target was running and cache could be stale. This is just a
|
||||||
|
heuristic. Running threads may modify target memory, but we
|
||||||
|
don't get any event. */
|
||||||
|
target_dcache_invalidate ();
|
||||||
|
|
||||||
if (deprecated_target_wait_hook)
|
if (deprecated_target_wait_hook)
|
||||||
ecs->ptid = deprecated_target_wait_hook (pid_ptid, &ecs->ws, 0);
|
ecs->ptid = deprecated_target_wait_hook (pid_ptid, &ecs->ws, 0);
|
||||||
@ -2740,6 +2753,12 @@ wait_for_inferior (void)
|
|||||||
|
|
||||||
overlay_cache_invalid = 1;
|
overlay_cache_invalid = 1;
|
||||||
|
|
||||||
|
/* Flush target cache before starting to handle each event.
|
||||||
|
Target was running and cache could be stale. This is just a
|
||||||
|
heuristic. Running threads may modify target memory, but we
|
||||||
|
don't get any event. */
|
||||||
|
target_dcache_invalidate ();
|
||||||
|
|
||||||
if (deprecated_target_wait_hook)
|
if (deprecated_target_wait_hook)
|
||||||
ecs->ptid = deprecated_target_wait_hook (waiton_ptid, &ecs->ws, 0);
|
ecs->ptid = deprecated_target_wait_hook (waiton_ptid, &ecs->ws, 0);
|
||||||
else
|
else
|
||||||
@ -2805,6 +2824,11 @@ fetch_inferior_event (void *client_data)
|
|||||||
make_cleanup_restore_current_thread ();
|
make_cleanup_restore_current_thread ();
|
||||||
|
|
||||||
overlay_cache_invalid = 1;
|
overlay_cache_invalid = 1;
|
||||||
|
/* Flush target cache before starting to handle each event. Target
|
||||||
|
was running and cache could be stale. This is just a heuristic.
|
||||||
|
Running threads may modify target memory, but we don't get any
|
||||||
|
event. */
|
||||||
|
target_dcache_invalidate ();
|
||||||
|
|
||||||
make_cleanup_restore_integer (&execution_direction);
|
make_cleanup_restore_integer (&execution_direction);
|
||||||
execution_direction = target_execution_direction ();
|
execution_direction = target_execution_direction ();
|
||||||
|
Reference in New Issue
Block a user