[Lldb-commits] [PATCH] D61776: [Target] Generalize some behavior in Thread

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri May 10 11:56:43 PDT 2019

xiaobai added a comment.

In D61776#1498225 <https://reviews.llvm.org/D61776#1498225>, @jingham wrote:

> If you really are going to support many languages you need to figure out how to tell folks what really happened with more specificity.

I agree.

> For instance, you can use C++ to throw anything, so you could throw an ObjC object from a C++ exception throw.  So you need to distinguish between the language of the exception thrown (which is captured by the ValueObject you return) and the language runtime throwing the language.  So we need a way to query that.  Also, there's no formula reason why you couldn't have two languages throwing an exception at the same time (for instance if a C++ exception is unwinding the stack and the destructor of some ObjC object that is getting destroyed throws an NSException, etc...  So there needs to be some way to handle that.
> This change isn't wrong but it gives a false impression of generality which makes it less well motivated.

Better support for exception handling is definitely something we should work towards. This patch doesn't actually change behavior, but I understand your concern that generalizing will make it look like things are better supported than they actually are. My motivation behind this change is removing language-specific knowledge from Thread, which is a goal that I think is worth pursuing. I could preserve/modify the comments that were there noting that only ObjC works right now.



More information about the lldb-commits mailing list