[Lldb-commits] [PATCH] D33035: Tool for using Intel(R) Processor Trace hardware feature

Abhishek via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 29 06:15:56 PDT 2017


abhishek.aggarwal added a comment.

Thanks for your review Pavel. My comments are inlined. Let me know your opinion :)



================
Comment at: tools/intel-features/intel-pt/Decoder.cpp:411
+        std::string image_path(image_complete_path, path_length);
+        try {
+          readExecuteSectionInfos.emplace_back(
----------------
labath wrote:
> We can't have exceptions in llvm code. You will have to achieve this differently. Your trick with manually adding -fexceptions will not work anyway if the rest of the code is compiled without exceptions. Although I'm not really sure why you need to protect this vector append in particular, as we don't do this for any other vector elsewhere.
I kept the exception handling around stl containers only to catch bad_alloc exception because if this exception occurs, I didn't want the code to just exit but provide user with whatever amount of instruction log is available in the vector. That much amount of instruction log might still be helpful to the user. What is your opinion on that?

Plus, If rest of the code is not being compiled with -fexceptions but just this file, will it not solve the purpose? Let me know what you think about it. I can make changes accordingly then.


https://reviews.llvm.org/D33035





More information about the lldb-commits mailing list