From: Antoine Tremblay <antoine.tremblay@ericsson.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [pushed] gdbserver: redo stepping over breakpoint that was on top of a permanent breakpoint
Date: Thu, 24 Sep 2015 16:43:00 -0000 [thread overview]
Message-ID: <5604281F.6010203@ericsson.com> (raw)
In-Reply-To: <86wpvg7y22.fsf@gmail.com>
On 09/24/2015 09:21 AM, Yao Qi wrote:
> Antoine Tremblay <antoine.tremblay@ericsson.com> writes:
>
>> Indeed I have a fix for this see :
>> https://sourceware.org/ml/gdb-patches/2015-09/msg00222.html
>>
>
> Ah, I did read your patch, but I forget it when I am fixing this problem.
>
Np, I think that patch is valid with the scenario you mention below,
however since it won't work properly as reinsert_addr doesn't work at
this stage I think it may be better to introduce it when I post the
single stepping support ?
> It can be triggered when GDBserver steps over its breakpoints, what I
> did is to pass 1 to thread_db_init, so that GDBserver will insert
> breakpoint on __nptl_create_event. Once a new thread is created, and
> hits this breakpoint, GDBserver will step over this breakpoint.
>
Haa I had missed that scenario!
>--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -3010,7 +3010,8 @@ linux_wait_1 (ptid_t ptid,
Advance the PC manually past the breakpoint, otherwise the
program would keep trapping the permanent breakpoint forever. */
if (!ptid_equal (step_over_bkpt, null_ptid)
- && event_child->stop_reason == TARGET_STOPPED_BY_SW_BREAKPOINT)
+ && event_child->stop_reason == TARGET_STOPPED_BY_SW_BREAKPOINT
+ && gdb_breakpoint_here (event_child->stop_pc))
{
int increment_pc = 0;
CORE_ADDR stop_pc = event_child->stop_pc;
This won't work as that single step breakpoint is not a gdb breakpoint
we need to check for a reinsert breakpoint like the patch I mentioned.
I tested the scenario with my patch and the issue is solved.
Note however I'm a bit concerted about the hack to remote_check_symbols.
I need to dig into it to understand that one should we expect it to
work without this hack ?
prev parent reply other threads:[~2015-09-24 16:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-23 20:27 Pedro Alves
2015-02-24 12:25 ` Yao Qi
2015-02-26 19:01 ` Pedro Alves
2015-09-24 10:43 ` Yao Qi
2015-09-24 11:39 ` Antoine Tremblay
2015-09-24 13:21 ` Yao Qi
2015-09-24 16:43 ` Antoine Tremblay [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5604281F.6010203@ericsson.com \
--to=antoine.tremblay@ericsson.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox