[Lldb-commits] LLDB Intel hardware breakpoints patch

Jim Ingham via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 17 11:27:54 PST 2020


Somebody will have to champion this patch for it to get into lldb.  It has no test case, so it’s not acceptable as is.  It should also be cleaned up so that it shares more code with the watchpoint implementation in the same file (for instance duplicating all the comments and logic to set a hardware breakpoint vrs. a hardware watchpoint when they only differ by the size & read/write bits seems unfortunate.)

I don’t think the shared resource issue is actually a problem.  Both the watchpoint support and your additions call IsWatchpointVacant to find an available slot before using it so they won’t overwrite an already in use watchpoint.  That is certainly one of the things that should be included in a test case however.

I’m presuming you don’t intend to champion this patch yourself? 

Jim


> On Jan 17, 2020, at 8:20 AM, Reverser via lldb-commits <lldb-commits at lists.llvm.org> wrote:
> 
> Hi,
>  
> Jonas Devlieghere asked me to send my patch to this mailing list because of potential licensing issues.
>  
> It adds hardware breakpoints support for i386 and x86_64 architectures, something that has been missing for a long time. I have written a blogpost about it at https://reverse.put.as/2019/11/19/how-to-make-lldb-a-real-debugger/ <https://reverse.put.as/2019/11/19/how-to-make-lldb-a-real-debugger/>.
>  
> Patch available in attachment and also here https://github.com/gdbinit/llvmpatches <https://github.com/gdbinit/llvmpatches>.
>  
> You most probably want to tweak it out and adapt to your project style. If I'm not mistaken there is no count between hardware breakpoints and watchpoints since they share the same resources. I didn't bother taking care of that but it's something that should exist in production ready code.
>  
> I declared the patch code as public domain. If it makes your life easier I can change it to whatever license you need, just tell me.
>  
> Best,
> Pedro
>  
> <hwbreakpoints.patch>_______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org <mailto:lldb-commits at lists.llvm.org>
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits <https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200117/fe54d464/attachment-0001.html>


More information about the lldb-commits mailing list