[Lldb-commits] [lldb] [lldb] Fix breakpoint resolver serialization bug (PR #76766)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 2 17:06:01 PST 2024
clayborg wrote:
> > Can this be tested?
>
> I took a look at existing tests, but I'm not sure how to best test this. I think we would need to create a breakpoint in a module by address and make sure the resolver correctly serializes the name (in `statistics dump` or otherwise). Does that sound appropriate to you?
That can work. Another idea is to create a test that sets a breakpoint by function name where we will find one match. After setting this breakpoint, get the one and only SBBreakpointLocation from this breakpoint and get the SBAddress from the location. Then delete the breakpoint by function name and create one using the SBAddress using:
```
lldb::SBBreakpoint lldb::SBTarget::BreakpointCreateBySBAddress(SBAddress &address);
```
You can then serialize the breakpoints to a JSON file using:
```
(lldb) breakpoint write -f <path>
```
Then you can use the JSON to verify the bug is fixed?
https://github.com/llvm/llvm-project/pull/76766
More information about the lldb-commits
mailing list