When loading split debug files for PE/COFF executables (produced with
objcopy --only-keep-debug), the tables or directories in such files
may not exist. COFFObjectFile shall check the pointers to make sure they
are not out of bounds. One such check already exists for
initImportTablePtr. However, this check forces an error and prevents
the object file from being loaded, which means the file could not be
used as debug info in LLDB. To fix this, it is sufficient to just hide
the error and pretend the import table does not exist for the object
file.
In the same way, other functions which load the pointers for other
tables should also contain similar pointer checks, but none of these
functions actually have the check in place. This commit adds these
missing checks.
The // ! comments should be left out when upstreaming the patch.