[Lldb-commits] [lldb] 8a6333e - [lldb/REPL] Fix unhandled switch case

Jim Ingham via lldb-commits lldb-commits at lists.llvm.org
Fri May 22 10:07:13 PDT 2020


Sorry I missed that.  That seems fine.  In the dedicated REPL, you’re probably dead at this point, but you can do “expr —repl --” in which case we’ll pick whatever thread on to run your expression, adding the results to the REPL context, so it could happen there and you might not be all the way toast.  So just returning an error is fine.

Jim

> On May 21, 2020, at 11:23 PM, Jonas Devlieghere <jonas at devlieghere.com> wrote:
> 
> Jim, does this look correct to you?
> 
> On Thu, May 21, 2020 at 11:22 PM Jonas Devlieghere via lldb-commits <lldb-commits at lists.llvm.org <mailto:lldb-commits at lists.llvm.org>> wrote:
> 
> Author: Jonas Devlieghere
> Date: 2020-05-21T23:22:17-07:00
> New Revision: 8a6333ef38088b65224bc021a14eeeef0a123a29
> 
> URL: https://github.com/llvm/llvm-project/commit/8a6333ef38088b65224bc021a14eeeef0a123a29 <https://github.com/llvm/llvm-project/commit/8a6333ef38088b65224bc021a14eeeef0a123a29>
> DIFF: https://github.com/llvm/llvm-project/commit/8a6333ef38088b65224bc021a14eeeef0a123a29.diff <https://github.com/llvm/llvm-project/commit/8a6333ef38088b65224bc021a14eeeef0a123a29.diff>
> 
> LOG: [lldb/REPL] Fix unhandled switch case
> 
> Fix warning: enumeration value 'eExpressionThreadVanished' not handled
> in switch [-Wswitch]
> 
> Added: 
> 
> 
> Modified: 
>     lldb/source/Expression/REPL.cpp
> 
> Removed: 
> 
> 
> 
> ################################################################################
> diff  --git a/lldb/source/Expression/REPL.cpp b/lldb/source/Expression/REPL.cpp
> index 6c9792c6e837..a55fe09bdeb6 100644
> --- a/lldb/source/Expression/REPL.cpp
> +++ b/lldb/source/Expression/REPL.cpp
> @@ -388,6 +388,11 @@ void REPL::IOHandlerInputComplete(IOHandler &io_handler, std::string &code) {
>              error_sp->Printf("error: stopped for debug -- %s\n",
>                               error.AsCString());
>              break;
> +          case lldb::eExpressionThreadVanished:
> +            // Shoulnd't happen???
> +            error_sp->Printf("error: expression thread vanished -- %s\n",
> +                             error.AsCString());
> +            break;
>            }
>          }
> 
> 
> 
> 
> _______________________________________________
> 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/20200522/c3011e2a/attachment-0001.html>


More information about the lldb-commits mailing list