[PATCH] D36347: New lldb python module for adding diagnostic breakpoints

Don Hinton via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 26 15:18:50 PDT 2017


On Thu, Oct 26, 2017 at 2:48 PM, Zachary Turner <zturner at google.com> wrote:

> Seems fine, it would be nice if the workflow could be improved a little
> bit so that all you have to do is say `clangdiag break
> —error=“-Wcovered-switch”` or something . I think that gives the most
> intuitive usage for people, even it’s a bit harder to implement.
>

The idea was to break on actual diagnostics emitted, but if you want to
break on diagnostic usage, i.e., when it was checked but not emitted, I
suppose that's possible as well.  diagtool doesn't produce a mapping for
this, but it could be added -- assuming tablegen produced enough info in
the .inc files to support it.  I added the feature I'm using here a few
months ago, which was an extension to what Alex added earlier.


>
> I also think user shouldn’t really have to concern themselves with
> diagtool, it should all just be magic. I get why it’s easier to do this
> way, but from the users perspective, having the commands map as closely as
> possible to the thing the person wants to do and hiding implementation
> details is a big win from a usability standpoint.
>

For the normal use case, i.e., clang/llvm developers that build both
together, it will just work by magic, i.e., you just run enable/disable.
The only problem is when you build out-of-tree.  If you can suggest a way
to find the correct location by examining the executable, I'd be happy to
add it.


>
> We can iterate on it later though
>

I'm happy to keep hacking on it -- got plenty of time on my hands right
now...  And I get to learn more about lldb...


> On Thu, Oct 26, 2017 at 2:38 PM Don Hinton via Phabricator <
> reviews at reviews.llvm.org> wrote:
>
>> hintonda updated this revision to Diff 120492.
>> hintonda added a comment.
>>
>> - Remove debugging print statement, and enhance help message.
>>
>>
>> https://reviews.llvm.org/D36347
>>
>> Files:
>>   utils/clangdiag.py
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171026/80393b6d/attachment.html>


More information about the cfe-commits mailing list