#ifndef SENTRY_PROCMAPS_MODULEFINDER_H_INCLUDED
#define SENTRY_PROCMAPS_MODULEFINDER_H_INCLUDED
#include "sentry_boot.h"
#include "sentry_slice.h"
#define SENTRY_MAX_MAPPINGS 5
typedef struct {
uint64_t start;
uint64_t end;
uint64_t offset;
char permissions[5];
uint64_t inode;
sentry_slice_t file;
} sentry_parsed_module_t;
typedef struct {
uint64_t offset; uint64_t size; uint64_t addr; } sentry_mapped_region_t;
typedef struct {
sentry_slice_t file;
sentry_mapped_region_t mappings[SENTRY_MAX_MAPPINGS];
uint64_t offset_in_inode;
uint64_t mappings_inode;
uint8_t num_mappings;
} sentry_module_t;
#if SENTRY_UNITTEST
bool sentry__procmaps_read_ids_from_elf(
sentry_value_t value, const sentry_module_t *module);
int sentry__procmaps_parse_module_line(
const char *line, sentry_parsed_module_t *module);
void *sentry__module_get_addr(
const sentry_module_t *module, uint64_t start_offset, uint64_t size);
#endif
#endif