[Lldb-commits] [lldb] [lldb-dap] Use protocol types for exceptioninfo (PR #165858)
Ebuka Ezike via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 3 07:01:58 PST 2025
da-viper wrote:
> Please explain what you did differently, if anything than last time.
this time it was written to a stream instead of creating a char buffer.
> I can reproduce it at some point, but not until Wednesday
I suspect this is happening during the conversion to `JSON`
Please, could you please try changing `ProtocolRequests.cpp::toJSON( const ExceptionInfoResponseBody &ERB)` line 639 from
` result.insert({"description", ERB.description.c_str()});` to
` result.insert({"description", ERB.description});` and rerun the test.
and try getting the output of the following.
reproducer
```cpp
#include <stdexcept>
int main(int argc, char const *argv[]) {
throw std::invalid_argument("throwing exception for testing");
return 0;
}
```
```sh
(lldb) file main
(lldb) run
(lldb) script
>>> stream = lldb.SBStream()
>>> lldb.thread.GetStopDescription(stream)
>>> stream.GetData()
```
Thanks
https://github.com/llvm/llvm-project/pull/165858
More information about the lldb-commits
mailing list