summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2019-12-18 16:11:06 -0800
committerJason Molenda <jmolenda@apple.com>2019-12-18 16:13:17 -0800
commit7026b34702f3f71ff157876831f29c76b3cb8bb1 (patch)
tree03de7b9e81fccbae5298c66aeaebbe25a0ed06b2 /lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
parent7e8541f3df064e133c9f99e889682833b17d5f8e (diff)
downloadbcm5719-llvm-7026b34702f3f71ff157876831f29c76b3cb8bb1.tar.gz
bcm5719-llvm-7026b34702f3f71ff157876831f29c76b3cb8bb1.zip
make err msg in MachSymtabSectionInfo::GetSection clear about the file
This error message didn't specify which file was malformed, so there's some hunting-around required if it comes up. We have the filename; include it in the error message.
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp')
-rw-r--r--lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index ef6ad1696c4..e730aafbd3e 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -1865,9 +1865,15 @@ public:
m_section_infos[n_sect].vm_range.SetByteSize(
section_sp->GetByteSize());
} else {
+ const char *filename = "<unknown>";
+ SectionSP first_section_sp(m_section_list->GetSectionAtIndex(0));
+ if (first_section_sp)
+ filename = first_section_sp->GetObjectFile()->GetFileSpec().GetPath().c_str();
+
Host::SystemLog(Host::eSystemLogError,
- "error: unable to find section for section %u\n",
- n_sect);
+ "error: unable to find section %d for a symbol in %s, corrupt file?\n",
+ n_sect,
+ filename);
}
}
if (m_section_infos[n_sect].vm_range.Contains(file_addr)) {
OpenPOWER on IntegriCloud