[Lldb-commits] [PATCH] D152759: [lldb][Android] Support zip .so file
Kazuki Sakamoto via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 12 17:02:53 PDT 2023
splhack created this revision.
Herald added subscribers: danielkiss, krytarowski.
Herald added a project: All.
splhack added reviewers: clayborg, labath, lanza, srhines.
splhack published this revision for review.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
In Android API level 23 and above, dynamic loader is able to load .so file
directly from APK, which is zip file.
https://android.googlesource.com/platform/bionic/+/master/
android-changes-for-ndk-developers.md#
opening-shared-libraries-directly-from-an-apk
The .so file is page aligned and uncompressed, so
ObjectFileELF::GetModuleSpecifications works with .so file offset and size
directly from zip file without extracting it. (D152757 <https://reviews.llvm.org/D152757>)
GDBRemoteCommunicationServerCommon::GetModuleInfo returns a module spec to LLDB
with "zip_path!/so_path" file spec, which is passed through from Android
dynamic loader, and the .so file offset and size.
PlatformAndroid::DownloadModuleSlice uses 'shell dd' to download the .so file
slice from the zip file with the .so file offset and size.
Depends on D152494 <https://reviews.llvm.org/D152494> and D152712 <https://reviews.llvm.org/D152712> and D152757 <https://reviews.llvm.org/D152757>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D152759
Files:
lldb/include/lldb/Host/android/HostInfoAndroid.h
lldb/source/Host/CMakeLists.txt
lldb/source/Host/android/HostInfoAndroid.cpp
lldb/source/Host/android/ZipFile.cpp
lldb/source/Host/android/ZipFile.h
lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
lldb/unittests/Host/CMakeLists.txt
lldb/unittests/Host/android/CMakeLists.txt
lldb/unittests/Host/android/HostInfoAndroidTest.cpp
lldb/unittests/Host/android/Inputs/zip-test.zip
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152759.530715.patch
Type: text/x-patch
Size: 19654 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230613/5e3e873a/attachment-0001.bin>
More information about the lldb-commits
mailing list