This feature is mostly there to aid debugging of Clang module issues, since the only useful actual the end-user can to is to recompile their program. Dsymutil prints a similar warning in this case.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM
lldb/source/Host/common/Host.cpp | ||
---|---|---|
297 | On macOS, SystemLog vsprintf's to stderr. So you probably don't want to put this out always. Maybe since you don't know where SystemLog is going to print things, it would be better to only output this if the log channel is set to verbose. That would still allow you to use it in tests, but wouldn't introduce any new output in the normal case? |
lldb/include/lldb/Symbol/SymbolFile.h | ||
---|---|---|
283–285 ↗ | (On Diff #229400) | Can we remove this and put a cast in SymbolFileDWARF::UpdateExternalModuleListIfNeeded instead? It looks like that function should check that it has really found a dwarf file (and not a pdb for instance) anyway... |
lldb/source/Host/common/Host.cpp | ||
301 | Are you sure it's legal to recycle the va_list this way? Should you maybe re-initialize it? | |
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | ||
1570 | DWARFDebugInfoEntry objects assume that they are living in one big vector and do pointer arithmetic on their this pointers. I don't think it's wise to copy them even if that happens to work in this case... | |
1579 | With this implementation, the function will return the dwo id of the first skeleton unit in the main module in the dwo scenario. I think this is very unexpected and not very useful. I think this should check that the file contains a just a single compile unit, at least. | |
1724–1725 | Maybe you could have GetDWOId return Optional<uint>. That way, the FIXME will be inside that function, and not in all of it's callers. |
lldb/include/lldb/Symbol/SymbolFile.h | ||
---|---|---|
283–285 ↗ | (On Diff #229400) |
We don't have a mechanism to dynamic-cast between SymbolFiles at the moment and I think it's difficult to add one, since it's a base class of an open-ended plugin hierarchy. We could require all plugins to register in a global enum if we don't care about extensibility. I also thought about each class identifying itself via a string that is its class name, but then we couldn't implement casting to a base-class easily. If you have any idea for how to do this elegantly I'm more than happy to implement it.
Technically, yes, but you'd need DWARF that encodes the path of a PDB to get into that situation, so I'm not super concerned about this. |
lldb/include/lldb/Symbol/SymbolFile.h | ||
---|---|---|
283–285 ↗ | (On Diff #229400) |
I know at least of two ways of doing that:
if (symfile->GetPluginName() == SymbolFileDWARF::GetPluginNameStatic()) static_cast<SymbolFileDWARF*>(symfile)->stuff() and probably doesn't require any extra coding (the presence of SymbolFileDWARFDebugMap makes things a bit complicated, but I don't think you need that here(?))
|
lldb/source/Host/common/Host.cpp | ||
---|---|---|
297 | Turns out LIBLLDB has no VERBOSE channel, and I can't add one because all 32 bits are already defined as channels. In the end this is probably not too bad — how many users are running with the host log enabled? What do you think about making it either/or? It goes to the syslog by default and to the host log if it is enabled? |
On macOS, SystemLog vsprintf's to stderr. So you probably don't want to put this out always. Maybe since you don't know where SystemLog is going to print things, it would be better to only output this if the log channel is set to verbose. That would still allow you to use it in tests, but wouldn't introduce any new output in the normal case?