jasonmolenda wrote:

Ah, but I see my misunderstanding as I look at what debugserver returns.  It 
uses "no permissions" to indicate a memory range that is unmapped -- 

```
 <  23> send packet: $qMemoryRegionInfo:0#44
 <  27> read packet: $start:0;size:100000000;#00
 <  31> send packet: $qMemoryRegionInfo:100000000#c5
 <  67> read packet: 
$start:100000000;size:4000;permissions:rx;dirty-pages:100000000;#00
 <  31> send packet: $qMemoryRegionInfo:100004000#c9
 <  57> read packet: $start:100004000;size:4000;permissions:r;dirty-pages:;#00
 <  31> send packet: $qMemoryRegionInfo:100008000#cd
 <  32> read packet: $start:100008000;size:404000;#00
 <  31> send packet: $qMemoryRegionInfo:10040c000#fc
 < 198> read packet: 
$start:10040c000;size:40000;permissions:rw;dirty-pages:10040c000,100410000,100414000,100418000,10041c000,100420000,100424000,100428000,10042c000,100430000,100434000,100438000,10043c000,100440000;#00
```

0x100008000-0x000000010040c000 is a free address range in this example, and 
what this loop should choose if it had to find an unused memory range.  That 
conflicts with the behavior that this PR started with originally, where no 
permissions were returned for any memory regions --- which looks like the way 
debugserver reports a free memory region.

(The low 4 GB segment at the start of my output above is the PAGEZERO empty 
segment of virtual address space on 64-bit darwin processes)

https://github.com/llvm/llvm-project/pull/99045
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to