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

Don Hinton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 25 14:29:09 PDT 2017


hintonda added a comment.

Thanks for the quick feedback.  I'll make all you suggested changes, but need to think a little more about `diagtool`.



================
Comment at: utils/clangdiag.py:75-78
+    diagtool = os.path.join(exe.GetDirectory(), 'diagtool')
+    if not os.path.exists(diagtool):
+        print('diagtool not found along side %s' % exe)
+        return
----------------
clayborg wrote:
> Allow "diagtool" to be set from an option maybe? This would require the options to be passed into this function as an argument. If it doesn't get set, then modify the options to contain this default value? Then this error message can just complain about the actual path:
> 
> ```
> print('diagtool "%s" doesn't exist' % diagtool)
> ```
The problem is that `diagtool` contains a map of DiagID -> DiagEnums, and must be in sync.   I wasn't sure how else to enforce the version you were using was built at the same time as the code you're trying to debug.

I can add the option, but then you might get bogus output.


https://reviews.llvm.org/D36347





More information about the lldb-commits mailing list