-
Notifications
You must be signed in to change notification settings - Fork 227
bypass -data-read-memory-bytes when using lldb #1527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Thanks for working on fixing this! Do you know if lldb-mi's implementation of |
|
It seems like the It is basically just calculating the address and then using it to fetch the memory. So for this call, but if I use the same startAddress in I do wonder if there are differences in the addresses when it comes to disassembly vs addresses that are used for reading the memory? |
|
Follow-up: I don't see how we could make the As an alternative on this I do wonder if we should limit this fi to core dumps + lldb only. |
|
What that code is attempting to do is implement disassembly through all addresses. This is a bit tricky because we don't know what range of addresses are actually valid. So, for example, the UI could be currently be starting with the 3rd instruction of a method, and the user pages up so we now have a request to disassembly through the first two valid addresses, but also a bunch of stuff that might be non-instructions and might not even be valid memory. FindValidMemoryRange is attempting to deal with that by telling us the range of memory around There are three possible ways we could probably deal with this:
|
04635cb to
dc0d62f
Compare
|
So I've spent a lot of time trying to investigate what the ramifications are if we bypass the So far I have not seen any issues by just using the To make sure that this isn't breaking anything I had this fix locally for few days and it seems like things are working as intended. How are you feeling about this? Having the code bail out in case of CoreDump + LLDB?
|
On LLDB backed debugging, the disassembly view does not work at all. It just shows

??on all instructions.Turns out the call
-data-read-memory-bytesdoes not work with lldb, and it returns error, namelyLLDB unable to read entire memory block of n bytes at address 0x0....This PR adds a check to see if lldb is the debugger used, and if lldb is being used then do not call the
_process.FindValidMemoryRangefunction. Instead use the parameters sent in to the function and calculate the start and end addresses.This is how the assembly window looks like with this patch:
