Fix two bugs with stack corefiles patch, restrict test built debugserver

These two tests, TestSkinnyCorefile.py and TestStackCorefile.py,
require a new debugserver on darwin systems to run correctly; for now,
skip them if the system debugserver is in use.  There's no easy way to
test if the debugserver being used supports either of these memory
region info features. For end users, the fallback will be a full
corefile and that's not the worst thing, but for the tests it is a
problem.
This commit is contained in:
Jason Molenda
2021-08-11 17:17:39 -07:00
parent 73056f239e
commit 2b30fc2ff3
4 changed files with 7 additions and 5 deletions

View File

@@ -6616,6 +6616,7 @@ bool ObjectFileMachO::SaveCore(const lldb::ProcessSP &process_sp,
std::vector<page_object> combined_page_objects;
page_object last_obj;
last_obj.addr = LLDB_INVALID_ADDRESS;
last_obj.size = 0;
for (page_object obj : pages_to_copy) {
if (last_obj.addr == LLDB_INVALID_ADDRESS) {
last_obj = obj;
@@ -6629,12 +6630,10 @@ bool ObjectFileMachO::SaveCore(const lldb::ProcessSP &process_sp,
combined_page_objects.push_back(last_obj);
last_obj = obj;
}
// If we only ended up with one contiguous memory segment
if (combined_page_objects.size() == 0 &&
last_obj.addr != LLDB_INVALID_ADDRESS) {
// Add the last entry we were looking to combine
// on to the array.
if (last_obj.addr != LLDB_INVALID_ADDRESS && last_obj.size != 0)
combined_page_objects.push_back(last_obj);
}
for (page_object obj : combined_page_objects) {
uint32_t cmd_type = LC_SEGMENT_64;