================
@@ -212,72 +216,132 @@ class DynamicLoader : public PluginInterface {
lldb::addr_t base_addr,
bool base_addr_is_offset);
- /// Find/load a binary into lldb given a UUID and the address where it is
- /// loaded in memory, or a slide to be applied to the file address.
- /// May force an expensive search on the computer to find the binary by
- /// UUID, should not be used for a large number of binaries - intended for
- /// an environment where there may be one, or a few, binaries resident in
- /// memory.
+ /// A binary to find and load into a Target, and the state that finding it
+ /// produces.
+ ///
+ /// Loading a binary is split into LocateBinaries and LoadBinaryInTarget so
+ /// that a caller with many binaries can search for all of them before adding
+ /// any of them to the Target.
+ struct BinarySpec {
+ /// Name of the binary, if available. If no matching binary can be found
on
+ /// the debug host, a module may be created out of live memory and given
+ /// this name. If empty, a name is constructed from the address the binary
+ /// is loaded at.
+ std::string name;
+
+ /// UUID of the binary to be loaded. May be empty, in which case, if a
load
+ /// address is supplied, the binary is read out of memory to get a UUID to
+ /// look for. There is a performance cost to doing this, it is not
+ /// preferable.
+ UUID uuid;
+
+ /// Address where the binary should be loaded, or read out of memory. Or a
+ /// slide value, to be applied to the file addresses of the binary.
+ lldb::addr_t value = LLDB_INVALID_ADDRESS;
+
+ /// A flag indicating that \a value is an address, or an offset to be
+ /// applied to the file addresses.
+ bool value_is_offset = false;
+
+ /// Allow the search to do a possibly expensive external search for the
+ /// ObjectFile and/or SymbolFile.
+ bool force_symbol_search = false;
+
+ /// Whether ModulesDidLoad should be called once the binary has been added
+ /// to the Target. A caller loading several binaries may prefer to batch
+ /// those up.
+ bool notify = false;
+
+ /// Whether the address of the binary should be set in the Target if it is
+ /// added. A caller that wants to set the section addresses individually
+ /// leaves this clear, and is then responsible for setting the load address
----------------
jasonmolenda wrote:
"leaves this false"
https://github.com/llvm/llvm-project/pull/214372
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits