From: Luis Machado <lgustavo@codesourcery.com>
To: Antoine Tremblay <antoine.tremblay@ericsson.com>,
Yao Qi <qiyaoltc@gmail.com>, <gdb-patches@sourceware.org>
Subject: Re: [PATCH] [gdbserver] Disable conditional breakpoints on no-hardware-single-step targets
Date: Fri, 08 May 2015 12:18:00 -0000 [thread overview]
Message-ID: <554CA972.8050700@codesourcery.com> (raw)
In-Reply-To: <55426205.3070901@ericsson.com>
On 04/30/2015 02:10 PM, Antoine Tremblay wrote:
>
>
> On 04/30/2015 12:23 PM, Yao Qi wrote:
>> From: Yao Qi <yao.qi@linaro.org>
>> /* Define an ARM-mode breakpoint; we only set breakpoints in the C
>> library, which is most likely to be ARM. If the kernel supports
>> clone events, we will never insert a breakpoint, so even a Thumb
>> C library will work; so will mixing EABI/non-EABI gdbserver and
>> application. */
>> #ifndef __ARM_EABI__
>> (const unsigned char *) &arm_breakpoint,
>> #else
>> (const unsigned char *) &arm_eabi_breakpoint,
>> #endif
>>
>> note that the comments are no longer valid as C library can be compiled
>> in thumb mode.
>
> Could we update the comments at the same time ?...
>>
>> When GDBserver steps over a breakpoint in arm mode function, which
>> returns to thumb mode, GDBserver will insert arm mode breakpoint by
>> mistake and the program will crash. GDBserver alone is unable to
>> determine the arm/thumb mode given a PC address. See how GDB does
>> it in arm-tdep.c:arm_pc_is_thumb.
>>
>> After thinking about how to teach GDBserver inserting right breakpoint
>> (arm or thumb) for a while, I reconsider it from a different direction
>> that it may be unreasonable to run target-side conditional breakpoint for
>> targets without hardware single step. Pedro also pointed this out here
>> https://sourceware.org/ml/gdb-patches/2015-04/msg00337.html
>>
>
> I'm looking into teaching gdbserver about inserting the right
> breakpoint and possibly software single-step like this post :
> https://sourceware.org/ml/gdb/2012-10/msg00077.html wanted to do...
>
> It would also fix the problem where we would step-over other breakpoints...
>
> But it does seems very complex to say the least, I'm still early in my
> investigation but if you could share your thoughts on how you came to
> think of it as unreasonable to fix arm-mode and possibly the
> single-stepping it would be appreciated ?
I like the idea of having gdbserver learn how to properly
software-single-step, allowing us to share the knowledge GDB already has.
Disabling a feature, on the other hand, sound like a backward movement.
People with knowledge on each architecture can probably help fine tune
those to their needs.
next prev parent reply other threads:[~2015-05-08 12:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1430411029-12097-1-git-send-email-qiyaoltc@gmail.com>
[not found] ` <55426205.3070901@ericsson.com>
2015-05-01 14:18 ` Yao Qi
2015-05-08 12:18 ` Luis Machado [this message]
2015-05-08 13:14 ` Yao Qi
2015-05-06 15:43 ` Pedro Alves
2015-05-07 10:48 ` Yao Qi
2015-05-07 11:45 ` Antoine Tremblay
2015-05-08 11:50 ` Pedro Alves
2015-05-08 12:12 ` Antoine Tremblay
2015-05-08 12:29 ` Pedro Alves
2015-05-08 12:35 ` Antoine Tremblay
2015-05-08 11:02 ` Pedro Alves
2015-05-10 1:04 ` Maciej W. Rozycki
2015-05-11 11:31 ` Pedro Alves
2015-05-11 12:38 ` Maciej W. Rozycki
2015-05-11 14:08 ` Pedro Alves
2015-05-11 17:40 ` Maciej W. Rozycki
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=554CA972.8050700@codesourcery.com \
--to=lgustavo@codesourcery.com \
--cc=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