CreateBreakpoint / FindLocationIDByAddress

Should the following work?

m_break_bp_sp = m_process->GetTarget().CreateBreakpoint(break_addr, true);
assert (m_break_bp_sp->FindLocationIDByAddress(break_addr) != LLDB_INVALID_BREAK_ID);

The problem I’m running into is that CreateBreakpoint() is resolving the address:

319+> m_section_load_list.ResolveLoadAddress(addr, so_addr);
320| if (!so_addr.IsValid())
321| {
322| // The address didn’t resolve, so just set this as an absolute address
323| so_addr.SetOffset (addr);
324| }

But FindLocationIDByAddress() isn’t, so the address comparisons are failing in the FindLocationIDByAddress() routine.

That should work. We changed the address compares used in the breakpoint location lists to use Address::ModulePointerAndOffsetLessThanFunctionObject, but that requires the input Addresses be resolved already. That's probably why it stopped working. It should be fine to just resolve the input address in FindLocationIDByAddress before looking it up.


BTW, it is probably best to do this in the BreakpointLocationList's FindByAddress...