[lldb] Consider binary as module of last resort
authorWill Hawkins <whh8b@obs.cr>
Fri, 20 May 2022 20:50:42 +0000 (13:50 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Fri, 20 May 2022 21:01:05 +0000 (14:01 -0700)
commita3c3482ceb529206b0ae4e7782e5496da5e0879d
treea88abb67293fdc26096c5af7cd3edcaa13e99b2c
parentbd62b70b515bcbded99ea2debe1d1f54acbb38cd
[lldb] Consider binary as module of last resort

When setting an address breakpoint using a non-section address in lldb
before having ever run the program, the binary itself is not considered
a module. As a result, the breakpoint is unresolved (and never gets
resolved subsequently).

This patch changes that behavior: as a last resort, the binary is
considered as a module when resolving a non-section address breakpoint.

Differential revision: https://reviews.llvm.org/D124731
lldb/source/Breakpoint/BreakpointResolverAddress.cpp
lldb/source/Commands/Options.td
lldb/test/API/commands/breakpoint/set/address-nomodule/Makefile [new file with mode: 0644]
lldb/test/API/commands/breakpoint/set/address-nomodule/TestBreakpointAddressNoModule.py [new file with mode: 0644]
lldb/test/API/commands/breakpoint/set/address-nomodule/inferior.c [new file with mode: 0644]