[Lldb-commits] [PATCH] D71372: [lldb] Add additional validation on return address in 'thread step-out'

Mark Mossberg via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 12 11:40:18 PST 2019


mossberg added a comment.

> So just add a std::string to ThreadPlanStepOut, and cons up your error message there.  Then in ThreadPlanStepOut::ValidatePlan, instead of doing:
> 
>   if (m_return_bp_id == LLDB_INVALID_BREAK_ID) {
>     if (error)
>       error->PutCString("Could not create return address breakpoint.");
>     return false;
>   }
>    
> 
> Write the error string you made in the constructor.
> 
> It's a good idea to log it as well, since the logs don't get command output so having it there will make logs easier to read.

Ok, I see that `ThreadPlanCallFunction.cpp` seems to do this. I'll plan to model mine after it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71372/new/

https://reviews.llvm.org/D71372





More information about the lldb-commits mailing list