This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3 2/5] Support breakpoint kinds for software breakpoints in GDBServer.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]