hawkinsw added inline comments.
================ Comment at: lldb/test/API/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py:43 + if region.GetRegionEnd() > illegal_address: + illegal_address = region.GetRegionEnd() ---------------- hawkinsw wrote: > DavidSpickett wrote: > > DavidSpickett wrote: > > > I'm confused as to what the logic is here now. > > > > > > You: > > > * read from address 0x0 to fill in error > > > * walk the memory regions until the highest one, making the end of that > > > the illegal address > > > * assume that the error value from reading 0x0 is the same as you'd get > > > from this new illegal address > > > ... > > > > > > Or am I missing something and the ptr was just left in accidentally. > > > > > > (I would suggest you could jump to the last region in the list straight > > > away but I don't think we actually require them to be sorted, plus > > > sometimes you get multiple regions with the same base) > > > > > (same base but different end addresses I mean) > Hello! Thank you for the review! > > I was initializing `illegal_address` to 0 as a way to, well, initialize the > value. I suppose that I could have initialized it to `None` and then used > that a special value in the loop. In fact, now that I think about it, that's > the tact that I will take in a second version of this patch. > > But, yes, you basically have the rest correct: I walk through all the memory > regions and find the highest address. Then, when I have that address (which I > know is not in a valid memory region), I will use that as the address to set > for the illegal breakpoint. > > Does that make sense? And, woah, I now realize what you meant! So sorry! Yes, `ptr` was leftover. I am so sorry! Standby for the next version of this patch! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126109/new/ https://reviews.llvm.org/D126109 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits