* linux-low.c (get_stop_pc): Print pc if debug_threads.
(check_removed_breakpoint, linux_wait_for_lwp): Ditto. (linux_resume_one_lwp): Ditto.
This commit is contained in:
parent
ea26755da7
commit
47c0c97542
|
@ -1,3 +1,9 @@
|
||||||
|
2009-05-24 Doug Evans <dje@google.com>
|
||||||
|
|
||||||
|
* linux-low.c (get_stop_pc): Print pc if debug_threads.
|
||||||
|
(check_removed_breakpoint, linux_wait_for_lwp): Ditto.
|
||||||
|
(linux_resume_one_lwp): Ditto.
|
||||||
|
|
||||||
2009-05-23 Doug Evans <dje@google.com>
|
2009-05-23 Doug Evans <dje@google.com>
|
||||||
|
|
||||||
* linux-low.c (linux_resume_one_lwp): Change type of first arg
|
* linux-low.c (linux_resume_one_lwp): Change type of first arg
|
||||||
|
|
|
@ -354,10 +354,13 @@ get_stop_pc (void)
|
||||||
{
|
{
|
||||||
CORE_ADDR stop_pc = (*the_low_target.get_pc) ();
|
CORE_ADDR stop_pc = (*the_low_target.get_pc) ();
|
||||||
|
|
||||||
if (get_thread_lwp (current_inferior)->stepping)
|
if (! get_thread_lwp (current_inferior)->stepping)
|
||||||
return stop_pc;
|
stop_pc -= the_low_target.decr_pc_after_break;
|
||||||
else
|
|
||||||
return stop_pc - the_low_target.decr_pc_after_break;
|
if (debug_threads)
|
||||||
|
fprintf (stderr, "stop pc is 0x%lx\n", (long) stop_pc);
|
||||||
|
|
||||||
|
return stop_pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
|
@ -814,7 +817,11 @@ check_removed_breakpoint (struct lwp_info *event_child)
|
||||||
decrement. We go immediately from this function to resuming,
|
decrement. We go immediately from this function to resuming,
|
||||||
and can not safely call get_stop_pc () again. */
|
and can not safely call get_stop_pc () again. */
|
||||||
if (the_low_target.set_pc != NULL)
|
if (the_low_target.set_pc != NULL)
|
||||||
(*the_low_target.set_pc) (stop_pc);
|
{
|
||||||
|
if (debug_threads)
|
||||||
|
fprintf (stderr, "Set pc to 0x%lx\n", (long) stop_pc);
|
||||||
|
(*the_low_target.set_pc) (stop_pc);
|
||||||
|
}
|
||||||
|
|
||||||
/* We consumed the pending SIGTRAP. */
|
/* We consumed the pending SIGTRAP. */
|
||||||
event_child->pending_is_breakpoint = 0;
|
event_child->pending_is_breakpoint = 0;
|
||||||
|
@ -942,14 +949,16 @@ retry:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug_threads
|
if (debug_threads
|
||||||
&& WIFSTOPPED (*wstatp))
|
&& WIFSTOPPED (*wstatp)
|
||||||
|
&& the_low_target.get_pc != NULL)
|
||||||
{
|
{
|
||||||
struct thread_info *saved_inferior = current_inferior;
|
struct thread_info *saved_inferior = current_inferior;
|
||||||
|
CORE_ADDR pc;
|
||||||
|
|
||||||
current_inferior = (struct thread_info *)
|
current_inferior = (struct thread_info *)
|
||||||
find_inferior_id (&all_threads, child->head.id);
|
find_inferior_id (&all_threads, child->head.id);
|
||||||
/* For testing only; i386_stop_pc prints out a diagnostic. */
|
pc = (*the_low_target.get_pc) ();
|
||||||
if (the_low_target.get_pc != NULL)
|
fprintf (stderr, "linux_wait_for_lwp: pc is 0x%lx\n", (long) pc);
|
||||||
get_stop_pc ();
|
|
||||||
current_inferior = saved_inferior;
|
current_inferior = saved_inferior;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1706,8 +1715,8 @@ linux_resume_one_lwp (struct lwp_info *lwp,
|
||||||
|
|
||||||
if (debug_threads && the_low_target.get_pc != NULL)
|
if (debug_threads && the_low_target.get_pc != NULL)
|
||||||
{
|
{
|
||||||
fprintf (stderr, " ");
|
CORE_ADDR pc = (*the_low_target.get_pc) ();
|
||||||
(*the_low_target.get_pc) ();
|
fprintf (stderr, " resuming from pc 0x%lx\n", (long) pc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we have pending signals, consume one unless we are trying to reinsert
|
/* If we have pending signals, consume one unless we are trying to reinsert
|
||||||
|
|
Loading…
Reference in New Issue