This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3 2/5] Support breakpoint kinds for software breakpoints in GDBServer.
- From: Pedro Alves <palves at redhat dot com>
- To: Antoine Tremblay <antoine dot tremblay at ericsson dot com>, gdb-patches at sourceware dot org
- Date: Wed, 21 Oct 2015 14:04:10 +0100
- Subject: Re: [PATCH v3 2/5] Support breakpoint kinds for software breakpoints in GDBServer.
- Authentication-results: sourceware.org; auth=none
- References: <1445359685-2589-1-git-send-email-antoine dot tremblay at ericsson dot com> <1445359685-2589-3-git-send-email-antoine dot tremblay at ericsson dot com> <5627749B dot 1080805 at redhat dot com> <56277F2C dot 9040404 at ericsson dot com>
On 10/21/2015 01:03 PM, Antoine Tremblay wrote:
>
>
>> This comment should be expanded. Something like:
>>
>> /* The software breakpoint's kind. This is target specific.
>> Most architectures only use one specific instruction for software
>> breakpoints, while others may use more than one. E.g., on ARM, we
>> need to set different breakpoint instructions on Thumb, Thumb-2,
>> and ARM code. */
>> int kind;
>>
>
> I will remove the "software" specification since hardware breakpoints
> have kinds too encoded in this struct see for example :
> arm_linux_hw_point_initialize.
>
> Like so :
>
> /* The breakpoint's kind. This is target specific. Most
> architectures only use one specific instruction for breakpoints, while
> others may use more than one. E.g., on ARM, we need to set different
> breakpoint instructions on Thumb, Thumb-2, and ARM code. */
>
Ah. Hmm, but if we only remove the "software" word and continue only talking
about "instructions", then I think it ends up the same. How about extending
it like this:
/* The breakpoint's kind. This is target specific. Most
architectures only use one specific instruction for breakpoints, while
others may use more than one. E.g., on ARM, we need to use different
breakpoint instructions on Thumb, Thumb-2, and ARM code. Likewise for
hardware breakpoints -- some architectures (including ARM) need to
setup debug registers differently depending on mode. */
Thanks,
Pedro Alves