[Lldb-commits] [PATCH] D96548: [lldb] [Process/FreeBSDRemote] Introduce aarch64 hw break/watchpoint support

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 19 01:13:24 PST 2021


mgorny added a comment.

In D96548#2573954 <https://reviews.llvm.org/D96548#2573954>, @omjavaid wrote:

> In D96548#2573245 <https://reviews.llvm.org/D96548#2573245>, @mgorny wrote:
>
>> In D96548#2572770 <https://reviews.llvm.org/D96548#2572770>, @omjavaid wrote:
>>
>>> I am wondering Whats the need for version checks? you are excluding hardware breakpoint mangement code from the build but then that lldb-server executable may well run on FreeBSD version which actually supports HW breakpoints. Isnt there a dynamic way of checking support for hardware break/watch points. May be query hardware debug registers and if it fails just disable hardware breakpoints for that thread.
>>
>> The code relies on `struct` members that are only present with this version. I'd like to avoid copying implementation details like that into the code.
>
> Only concern here is that someone might be cross-compiling lldb-server on an older system but eventually using it on a target which supports HW break/watchpoints. What chances do you think we have for such a scenario? if this is rare then this should be ok.

I don't think it's very likely. @emaste, any opinion on this?

>>> Moreover, can we shrink class name NativeRegisterContextBreakWatchpoint_arm64 to may be NativeDebugRegisterContext_arm64.
>>
>> I generally leave naming decisions to @labath ;-).
>
> Lets see what @labath has to say... IMO Debug Register is a general term used in other architecture specs for referring to hardware debug capabilities like breakpoints watchpoints etc.

I agree. For consistency with the x86 class, maybe `NativeRegisterContextDBReg_arm64`? I wonder if we should rename the x86 class too.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96548/new/

https://reviews.llvm.org/D96548



More information about the lldb-commits mailing list