Loader: Automatically unload NRRs on service close.

This commit is contained in:
Michael Scire 2018-04-26 20:50:27 -06:00
parent e7aa5c246b
commit 2e7b6de195
3 changed files with 38 additions and 14 deletions

View file

@ -46,11 +46,13 @@ class Registration {
static Registration::Process *GetFreeProcess();
static Registration::Process *GetProcess(u64 index);
static Registration::Process *GetProcessByProcessId(u64 pid);
static Registration::Process *GetProcessByRoService(void *service);
static Result GetRegisteredTidSid(u64 index, Registration::TidSid *out);
static bool RegisterTidSid(const TidSid *tid_sid, u64 *out_index);
static bool UnregisterIndex(u64 index);
static void SetProcessIdTidMinAndIs64BitAddressSpace(u64 index, u64 process_id, u64 tid_min, bool is_64_bit_addspace);
static void AddNsoInfo(u64 index, u64 base_address, u64 size, const unsigned char *build_id);
static void CloseRoService(void *service, Handle process_h);
static Result AddNrrInfo(u64 index, MappedCodeMemory *nrr_info);
static Result RemoveNrrInfo(u64 index, u64 base_address);
static Result GetNsoInfosForProcessId(NsoInfo *out, u32 max_out, u64 process_id, u32 *num_written);