[Pdbg] [PATCH 03/19] libpdbg: Add an api to get current backend
Amitay Isaacs
amitay at ozlabs.org
Thu Feb 27 12:06:48 AEDT 2020
Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
libpdbg/dtb.c | 5 +++++
libpdbg/target.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c
index dc51334..f14388a 100644
--- a/libpdbg/dtb.c
+++ b/libpdbg/dtb.c
@@ -290,6 +290,11 @@ bool pdbg_set_backend(enum pdbg_backend backend, const char *backend_option)
return true;
}
+enum pdbg_backend pdbg_get_backend(void)
+{
+ return pdbg_backend;
+}
+
const char *pdbg_get_backend_option(void)
{
return pdbg_backend_option;
diff --git a/libpdbg/target.h b/libpdbg/target.h
index fffdc49..c638fb2 100644
--- a/libpdbg/target.h
+++ b/libpdbg/target.h
@@ -79,6 +79,7 @@ extern struct list_head empty_list;
extern struct list_head target_classes;
struct pdbg_dtb *pdbg_default_dtb(void *system_fdt);
+enum pdbg_backend pdbg_get_backend(void);
const char *pdbg_get_backend_option(void);
bool pdbg_fdt_is_writeable(void *fdt);
--
2.24.1
More information about the Pdbg
mailing list