[Lldb-commits] [PATCH] D68048: [WIP][RFC] Improve fetching the process list on the android platform
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Sep 27 02:57:17 PDT 2019
labath added a comment.
I think that being able to debug an android device without needing to first copy&run an lldb-server there would be a great feature, and it's something I've wished for many times. Whether that also means ditching the lldb-server platform process is a more complicated question.
While some of the things that we use lldb-server platform for (copying files) can be easily done with adb, this is not generally true. I am afraid that if we try to do that, then we'll end up simply not being able to access some data, or needing to do complicated text scraping (which can be flaky). While it is not _that_ bad, this patch demonstrates both problems -- fetching the process architecture in this manner is pretty easy for lldb-server, but very hard over adb, and it also needs to account for differences in the "ps" output format on different devices.
Whether that means this approach should be scrapped? I don't know... If I were doing this, I'd probably try to keep it. But that's kind of not my business now...
What I do want to suggest is to think about a solid regression testing strategy early on. One of the ideas that come to mind is to create a mock adb server in python (similar to the mock gdb server in test/testcases/functionalities/gdb_client). This would allow you to simulate a variety of android devices and their responses to different commands (e.g. `ps`), and it would not require a real android device present at least for the most basic tests.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68048/new/
https://reviews.llvm.org/D68048
More information about the lldb-commits
mailing list