Remove need_step_over from struct lwp_info
Hi, I happen to see that field need_step_over in struct lwp_info is only used to print a debug info. need_step_over is set in linux_wait_1 when breakpoint_here is true, however, we check breakpoint_here too in need_step_over_p and do the step over. I think we don't need field need_step_over, and check breakpoint_here directly in need_step_over_p. This field was added in this patch https://sourceware.org/ml/gdb-patches/2010-03/msg00605.html and the code wasn't changed much since then. This patch is to remove it. gdb/gdbserver: 2016-04-28 Yao Qi <yao.qi@linaro.org> * linux-low.h (struct lwp_info) <need_step_over>: Remove. * linux-low.c (linux_wait_1): Update. (need_step_over_p): Likewise.
This commit is contained in:
parent
4bd13cde17
commit
f166f943f3
|
@ -3267,14 +3267,8 @@ linux_wait_1 (ptid_t ptid,
|
||||||
|
|
||||||
if (bp_explains_trap)
|
if (bp_explains_trap)
|
||||||
{
|
{
|
||||||
/* If we stepped or ran into an internal breakpoint, we've
|
|
||||||
already handled it. So next time we resume (from this
|
|
||||||
PC), we should step over it. */
|
|
||||||
if (debug_threads)
|
if (debug_threads)
|
||||||
debug_printf ("Hit a gdbserver breakpoint.\n");
|
debug_printf ("Hit a gdbserver breakpoint.\n");
|
||||||
|
|
||||||
if (breakpoint_here (event_child->stop_pc))
|
|
||||||
event_child->need_step_over = 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -4540,12 +4534,6 @@ need_step_over_p (struct inferior_list_entry *entry, void *dummy)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!lwp->need_step_over)
|
|
||||||
{
|
|
||||||
if (debug_threads)
|
|
||||||
debug_printf ("Need step over [LWP %ld]? No\n", lwpid_of (thread));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (lwp->status_pending_p)
|
if (lwp->status_pending_p)
|
||||||
{
|
{
|
||||||
if (debug_threads)
|
if (debug_threads)
|
||||||
|
@ -4571,8 +4559,6 @@ need_step_over_p (struct inferior_list_entry *entry, void *dummy)
|
||||||
"Old stop_pc was 0x%s, PC is now 0x%s\n",
|
"Old stop_pc was 0x%s, PC is now 0x%s\n",
|
||||||
lwpid_of (thread),
|
lwpid_of (thread),
|
||||||
paddress (lwp->stop_pc), paddress (pc));
|
paddress (lwp->stop_pc), paddress (pc));
|
||||||
|
|
||||||
lwp->need_step_over = 0;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4622,8 +4608,6 @@ need_step_over_p (struct inferior_list_entry *entry, void *dummy)
|
||||||
that find_inferior stops looking. */
|
that find_inferior stops looking. */
|
||||||
current_thread = saved_thread;
|
current_thread = saved_thread;
|
||||||
|
|
||||||
/* If the step over is cancelled, this is set again. */
|
|
||||||
lwp->need_step_over = 0;
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -365,10 +365,6 @@ struct lwp_info
|
||||||
a exit-jump-pad-quickly breakpoint. This is it. */
|
a exit-jump-pad-quickly breakpoint. This is it. */
|
||||||
struct breakpoint *exit_jump_pad_bkpt;
|
struct breakpoint *exit_jump_pad_bkpt;
|
||||||
|
|
||||||
/* True if the LWP was seen stop at an internal breakpoint and needs
|
|
||||||
stepping over later when it is resumed. */
|
|
||||||
int need_step_over;
|
|
||||||
|
|
||||||
#ifdef USE_THREAD_DB
|
#ifdef USE_THREAD_DB
|
||||||
int thread_known;
|
int thread_known;
|
||||||
/* The thread handle, used for e.g. TLS access. Only valid if
|
/* The thread handle, used for e.g. TLS access. Only valid if
|
||||||
|
|
Loading…
Reference in New Issue