summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/source/MacOSX
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2018-09-06 00:55:27 +0000
committerJason Molenda <jmolenda@apple.com>2018-09-06 00:55:27 +0000
commitb0d33e9b3ceff6b80e7c3288a874540d952fa821 (patch)
tree7ee223f378c519874462834f41be7cddd5fac1a9 /lldb/tools/debugserver/source/MacOSX
parent26f23f8c25e92ea72ef4befa620a97b95ee708d0 (diff)
downloadbcm5719-llvm-b0d33e9b3ceff6b80e7c3288a874540d952fa821.tar.gz
bcm5719-llvm-b0d33e9b3ceff6b80e7c3288a874540d952fa821.zip
Re-instate a bit of code that was commented out in r188246 which
reads an ObjectFileMachO's string table in one chunk. Originally this was commented out because binaries in the system's shared cache all share a mega-string table and so reading the entire mega-strtab for each binary was a performance problem. In the reinstated code, I add a check that the binary we're reading from memory is not in the shared cache (there isn't a constant in <mach-o/loader.h> for this bit yet; we hardcode the value in one other place in ObjectFileMachO alread). For binaries that we're reading out of memory that are NOT in the shared cache, reading the string table in one chunk is a big performance improvement. Also have debugserver send up the flags value for binaries in its response to the jGetLoadedDynamicLibrariesInfos request. NFC. <rdar://problem/33604496> llvm-svn: 341511
Diffstat (limited to 'lldb/tools/debugserver/source/MacOSX')
-rw-r--r--lldb/tools/debugserver/source/MacOSX/MachProcess.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/tools/debugserver/source/MacOSX/MachProcess.mm b/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
index 4ddc5f8b10d..edbd012e6e2 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
+++ b/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
@@ -803,6 +803,8 @@ JSONGenerator::ObjectSP MachProcess::FormatDynamicLibrariesIntoJSON(
(uint32_t)image_infos[i].macho_info.mach_header.cpusubtype);
mach_header_dict_sp->AddIntegerItem(
"filetype", image_infos[i].macho_info.mach_header.filetype);
+ mach_header_dict_sp->AddIntegerItem ("flags",
+ image_infos[i].macho_info.mach_header.flags);
// DynamicLoaderMacOSX doesn't currently need these fields, so
// don't send them.
@@ -810,8 +812,6 @@ JSONGenerator::ObjectSP MachProcess::FormatDynamicLibrariesIntoJSON(
// image_infos[i].macho_info.mach_header.ncmds);
// mach_header_dict_sp->AddIntegerItem ("sizeofcmds",
// image_infos[i].macho_info.mach_header.sizeofcmds);
- // mach_header_dict_sp->AddIntegerItem ("flags",
- // image_infos[i].macho_info.mach_header.flags);
image_info_dict_sp->AddItem("mach_header", mach_header_dict_sp);
JSONGenerator::ArraySP segments_sp(new JSONGenerator::Array());
OpenPOWER on IntegriCloud