LLDB
mainline
llvm-project
lldb
include
lldb
Host
common
ZipFileResolver.h
Go to the documentation of this file.
1
//===-- ZipFileResolver.h ---------------------------------------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#ifndef LLDB_HOST_ZIPFILERESOLVER_H
10
#define LLDB_HOST_ZIPFILERESOLVER_H
11
12
#include "
lldb/lldb-private.h
"
13
14
namespace
lldb_private
{
15
16
/// In Android API level 23 and above, bionic dynamic linker is able to load
17
/// .so file directly from APK or .zip file. This is a utility class to resolve
18
/// the file spec in order to get the zip path and the .so file offset and size
19
/// if the file spec contains "zip_path!/so_path".
20
/// https://android.googlesource.com/platform/bionic/+/master/
21
/// android-changes-for-ndk-developers.md#
22
/// opening-shared-libraries-directly-from-an-apk
23
class
ZipFileResolver
{
24
public
:
25
enum
FileKind
{
26
eFileKindInvalid
= 0,
27
eFileKindNormal
,
28
eFileKindZip
,
29
};
30
31
static
bool
ResolveSharedLibraryPath
(
const
FileSpec
&file_spec,
32
FileKind
&file_kind,
33
std::string &file_path,
34
lldb::offset_t
&so_file_offset,
35
lldb::offset_t
&so_file_size);
36
};
37
38
}
// end of namespace lldb_private
39
40
#endif
// LLDB_HOST_ZIPFILERESOLVER_H
FileKind
FileKind
Definition:
FormatEntity.cpp:86
lldb_private::FileSpec
A file utility class.
Definition:
FileSpec.h:56
lldb_private::ZipFileResolver
In Android API level 23 and above, bionic dynamic linker is able to load .so file directly from APK o...
Definition:
ZipFileResolver.h:23
lldb_private::ZipFileResolver::ResolveSharedLibraryPath
static bool ResolveSharedLibraryPath(const FileSpec &file_spec, FileKind &file_kind, std::string &file_path, lldb::offset_t &so_file_offset, lldb::offset_t &so_file_size)
Definition:
ZipFileResolver.cpp:18
lldb_private::ZipFileResolver::FileKind
FileKind
Definition:
ZipFileResolver.h:25
lldb_private::ZipFileResolver::eFileKindNormal
@ eFileKindNormal
Definition:
ZipFileResolver.h:27
lldb_private::ZipFileResolver::eFileKindZip
@ eFileKindZip
Definition:
ZipFileResolver.h:28
lldb_private::ZipFileResolver::eFileKindInvalid
@ eFileKindInvalid
Definition:
ZipFileResolver.h:26
lldb-private.h
lldb_private
A class that represents a running process on the host machine.
Definition:
SBAddressRange.h:14
lldb::offset_t
uint64_t offset_t
Definition:
lldb-types.h:85
Generated on Sun Feb 2 2025 16:12:21 for LLDB by
1.9.6