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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to