Reland "[lldb] Add --all option to "memory region""
This reverts commit 3e928c4b. This fixes an issue seen on Windows where we did not properly get the section names of regions if they overlapped. Windows has regions like: [0x00007fff928db000-0x00007fff949a0000) --- [0x00007fff949a0000-0x00007fff949a1000) r-- PECOFF header [0x00007fff949a0000-0x00007fff94a3d000) r-x .hexpthk [0x00007fff949a0000-0x00007fff94a85000) r-- .rdata [0x00007fff949a0000-0x00007fff94a88000) rw- .data [0x00007fff949a0000-0x00007fff94a94000) r-- .pdata [0x00007fff94a94000-0x00007fff95250000) --- I assumed that you could just resolve the address and get the section name using the start of the region but here you'd always get "PECOFF header" because they all have the same start point. The usual command repeating loop used the end address of the previous region when requesting the next, or getting the section name. So I've matched this in the --all scenario. In the example above, somehow asking for the region at 0x00007fff949a1000 would get you a region that starts at 0x00007fff949a0000 but has a different end point. Using the load address you get (what I assume is) the correct section name.
parent
dd644ddf
Please register or sign in to comment