You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve ProcessElfCore::GetLoadedModuleList() dealing with duplicate NT_FILE ranges
Summary:
Currently ProcessElfCore::GetLoadedModuleList() assumes NT_FILE entries are mostly continuous, and if there are discontinuous ranges, it uses lower start address range base address and brutally merge all ranges. However, during real world testing, I discovered MySQL team's coredump has discontinuous ranges for many modules and some module's later ranges are the correct one.
We have two options here:
1. Keep all duplicate ranges and create duplicate modules
2. Rate the ranges and select a best one.
Since lldb does not support duplicate modules I chose option #2 above:
* Merge continuous entries into one range.
* Rate among duplicate ranges and select a "better" one.
* "Better" range is defined to have more NT_FILE entry count; and have larger size if entry count equals.
MySQL's coredump has zero mismatch modules after this change.
Test Plan: Tested with MySQL's coredump.
Reviewers: wanyi, hyubo, #lldb_team
Reviewed By: wanyi
Subscribers: generatedunixname89002005328444, #lldb_team
Differential Revision: https://phabricator.intern.facebook.com/D45869549
[Easy] handling corner cases of NT_FILE in ProcessElfCore::GetLoadedModuleList
Summary:
This diff handles the corner cases of the algorithm added in D45869549:
1. When m_nt_file_entries is empty, we should simply return without adding any range
2. The first entry should simply record
Test Plan: Found a coredumper triggering the corner cases and can be debugged fine.
Reviewers: wanyi, hyubo, #lldb_team
Reviewed By: wanyi
Subscribers: #lldb_team
Differential Revision: https://phabricator.intern.facebook.com/D46076584
0 commit comments