| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[lldb] refactor PlatformAndroid and make threadsafe (attempt 2) (#159676) Reattempt at https://github.com/llvm/llvm-project/pull/145382 (cc @labath). This time setenv() was replaced with set_env() (https://github.com/llvm/llvm-project/pull/145382#issuecomment-3187227704). --------- Co-authored-by: Chad Smith <cssmith@meta.com> | 11 个月前 | |
[lldb] refactor PlatformAndroid and make threadsafe (attempt 2) (#159676) Reattempt at https://github.com/llvm/llvm-project/pull/145382 (cc @labath). This time setenv() was replaced with set_env() (https://github.com/llvm/llvm-project/pull/145382#issuecomment-3187227704). --------- Co-authored-by: Chad Smith <cssmith@meta.com> | 11 个月前 | |
[lldb/cmake] Implicitly pass arguments to llvm_add_library (#142583) If we're not touching them, we don't need to do anything special to pass them along -- with one important caveat: due to how cmake arguments work, the implicitly passed arguments need to be specified before arguments that we handle. This isn't particularly nice, but the alternative is enumerating all arguments that can be used by llvm_add_library and the macros it calls (it also relies on implicit passing of some arguments to llvm_process_sources). | 1 年前 | |
[lldb][Android] Fix platform process list regression (#164333) ## Summary Fix FindProcesses to respect Android's hidepid=2 security model and enable name matching for Android apps. ## Problem 1. Called adb shell pidof or adb shell ps directly, bypassing Android's process visibility restrictions 2. Name matching failed for Android apps - searched for com.example.myapp but GDB Remote Protocol reports app_process64 Android apps fork from Zygote, so /proc/PID/exe points to app_process64 for all apps. The actual package name is only in /proc/PID/cmdline. The previous implementation applied name filters without supplementing with cmdline, so searches failed. ## Fix - Delegate to lldb-server via GDB Remote Protocol (respects hidepid=2) - Get all visible processes, supplement zygote/app_process entries with cmdline, then apply name matching - Only fetch cmdline for zygote apps (performance), parallelize with xargs -P 8 - Remove redundant code (GDB Remote Protocol already provides GID/arch) ## Test Results ### Before this fix: (lldb) platform process list error: no processes were found on the "remote-android" platform (lldb) platform process list -n com.example.hellojni 1 matching process was found on "remote-android" PID PARENT USER TRIPLE NAME ====== ====== ========== ============================== ============================ 5276 359 u0_a192 com.example.hellojni ^^^^^^^^ Missing triple! ### After this fix: (lldb) platform process list PID PARENT USER TRIPLE NAME ====== ====== ========== ============================== ============================ 1 0 root aarch64-unknown-linux-android init 2 0 root [kthreadd] 359 1 system aarch64-unknown-linux-android app_process64 5276 359 u0_a192 aarch64-unknown-linux-android com.example.hellojni 5357 5355 u0_a192 aarch64-unknown-linux-android sh 5377 5370 u0_a192 aarch64-unknown-linux-android lldb-server ^^^^^^^^ User-space processes now have triples! (lldb) platform process list -n com.example.hellojni 1 matching process was found on "remote-android" PID PARENT USER TRIPLE NAME ====== ====== ========== ============================== ============================ 5276 359 u0_a192 aarch64-unknown-linux-android com.example.hellojni (lldb) process attach -n com.example.hellojni Process 5276 stopped * thread #1, name = 'example.hellojni', stop reason = signal SIGSTOP ## Test Plan With an Android device/emulator connected: 1. Start lldb-server on device: bash adb push lldb-server /data/local/tmp/ adb shell chmod +x /data/local/tmp/lldb-server adb shell /data/local/tmp/lldb-server platform --listen 127.0.0.1:9500 --server 2. Connect from LLDB: (lldb) platform select remote-android (lldb) platform connect connect://127.0.0.1:9500 (lldb) platform process list 3. Verify: - platform process list returns all processes with triple information - platform process list -n com.example.app finds Android apps by package name - process attach -n com.example.app successfully attaches to Android apps ## Impact Restores platform process list on Android with architecture information and package name lookup. All name matching modes now work correctly. Fixes https://github.com/llvm/llvm-project/issues/164192 | 9 个月前 | |
[lldb][Android] Fix platform process list regression (#164333) ## Summary Fix FindProcesses to respect Android's hidepid=2 security model and enable name matching for Android apps. ## Problem 1. Called adb shell pidof or adb shell ps directly, bypassing Android's process visibility restrictions 2. Name matching failed for Android apps - searched for com.example.myapp but GDB Remote Protocol reports app_process64 Android apps fork from Zygote, so /proc/PID/exe points to app_process64 for all apps. The actual package name is only in /proc/PID/cmdline. The previous implementation applied name filters without supplementing with cmdline, so searches failed. ## Fix - Delegate to lldb-server via GDB Remote Protocol (respects hidepid=2) - Get all visible processes, supplement zygote/app_process entries with cmdline, then apply name matching - Only fetch cmdline for zygote apps (performance), parallelize with xargs -P 8 - Remove redundant code (GDB Remote Protocol already provides GID/arch) ## Test Results ### Before this fix: (lldb) platform process list error: no processes were found on the "remote-android" platform (lldb) platform process list -n com.example.hellojni 1 matching process was found on "remote-android" PID PARENT USER TRIPLE NAME ====== ====== ========== ============================== ============================ 5276 359 u0_a192 com.example.hellojni ^^^^^^^^ Missing triple! ### After this fix: (lldb) platform process list PID PARENT USER TRIPLE NAME ====== ====== ========== ============================== ============================ 1 0 root aarch64-unknown-linux-android init 2 0 root [kthreadd] 359 1 system aarch64-unknown-linux-android app_process64 5276 359 u0_a192 aarch64-unknown-linux-android com.example.hellojni 5357 5355 u0_a192 aarch64-unknown-linux-android sh 5377 5370 u0_a192 aarch64-unknown-linux-android lldb-server ^^^^^^^^ User-space processes now have triples! (lldb) platform process list -n com.example.hellojni 1 matching process was found on "remote-android" PID PARENT USER TRIPLE NAME ====== ====== ========== ============================== ============================ 5276 359 u0_a192 aarch64-unknown-linux-android com.example.hellojni (lldb) process attach -n com.example.hellojni Process 5276 stopped * thread #1, name = 'example.hellojni', stop reason = signal SIGSTOP ## Test Plan With an Android device/emulator connected: 1. Start lldb-server on device: bash adb push lldb-server /data/local/tmp/ adb shell chmod +x /data/local/tmp/lldb-server adb shell /data/local/tmp/lldb-server platform --listen 127.0.0.1:9500 --server 2. Connect from LLDB: (lldb) platform select remote-android (lldb) platform connect connect://127.0.0.1:9500 (lldb) platform process list 3. Verify: - platform process list returns all processes with triple information - platform process list -n com.example.app finds Android apps by package name - process attach -n com.example.app successfully attaches to Android apps ## Impact Restores platform process list on Android with architecture information and package name lookup. All name matching modes now work correctly. Fixes https://github.com/llvm/llvm-project/issues/164192 | 9 个月前 | |
[lldb][Android] Add platform.plugin.remote-android.package-name When LLDB fails to pull file from a package directory due to security constraint, user needs to set the package name to 'platform.plugin.remote-android.package-name' property to run shell commands as the package user. (e.g. to get file with 'cat' and 'dd'). https://cs.android.com/android/platform/superproject/+/master: system/core/run-as/run-as.cpp;l=39-61; drc=4a77a84a55522a3b122f9c63ef0d0b8a6a131627 Differential Revision: https://reviews.llvm.org/D152933 | 3 年前 | |
[lldb] refactor PlatformAndroid and make threadsafe (attempt 2) (#159676) Reattempt at https://github.com/llvm/llvm-project/pull/145382 (cc @labath). This time setenv() was replaced with set_env() (https://github.com/llvm/llvm-project/pull/145382#issuecomment-3187227704). --------- Co-authored-by: Chad Smith <cssmith@meta.com> | 11 个月前 | |
[lldb] Remove remaining uses of llvm::Optional (NFC) This patch removes the unused "using" declarations, updates comments, and removes #include "llvm/ADT/Optional.h". This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716 | 3 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 11 个月前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 3 年前 | ||
| 11 个月前 | ||
| 3 年前 |