ANDROID: android: Create debug_symbols driver
Introduce new API to expose symbols useful for debugging the GKI kernel. Symbols exported from this driver would be difficult to maintain via the traditional EXPORT_SYMBOL_GPL. Bug: 199236943 Change-Id: I1cadb409289ca9ce36b0084efc9ac46f6bec6741 Signed-off-by: Elliot Berman <eberman@codeaurora.org> Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org> Signed-off-by: Yogesh Lal <ylal@codeaurora.org>
This commit is contained in:
committed by
Yogesh Lal
parent
5acb9c2a7b
commit
b2df67a932
@@ -4785,6 +4785,22 @@ void print_modules(void)
|
||||
pr_cont("\n");
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ANDROID_DEBUG_SYMBOLS
|
||||
void android_debug_for_each_module(int (*fn)(const char *mod_name, void *mod_addr, void *data),
|
||||
void *data)
|
||||
{
|
||||
struct module *module;
|
||||
preempt_disable();
|
||||
list_for_each_entry_rcu(module, &modules, list) {
|
||||
if (fn(module->name, module->core_layout.base, data))
|
||||
goto out;
|
||||
}
|
||||
out:
|
||||
preempt_enable();
|
||||
}
|
||||
EXPORT_SYMBOL_NS_GPL(android_debug_for_each_module, MINIDUMP);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MODVERSIONS
|
||||
/*
|
||||
* Generate the signature for all relevant module structures here.
|
||||
|
||||
Reference in New Issue
Block a user