clayborg wrote: > One way you might gate this more safely is to disallow (or only allow with a > --force option) the replacement of any Module whose ObjectFile has any > capabilities. That way the default case would only replace the case where the > original Module really couldn't have handed out anything. > > You still need to figure out what happens in the case where two Targets hold > onto the original module. OTOH, it would be weird if `target modules replace` > replaced all the modules in all extant Targets. OTOH, I doubt we're well > setup to handle the case where a Target gets a different Module from the > shared Module cache for the same UUID depending on when it asks.
We could limit this to only work if the `ObjectFile` is a `ObjectFilePlaceholder` instance? `ObjectFilePlaceholder` only create a single section, no symbols, variables, function or anything else. Would that be acceptable? https://github.com/llvm/llvm-project/pull/214576 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
