From 8f2cd9ad4ca4932b164ce755bff296545ed528bc Mon Sep 17 00:00:00 2001 From: jmcmullan Date: Sun, 10 Jul 2011 14:46:27 +0000 Subject: [PATCH] debug.library: Make debug.library pure Signed-off-by: Jason S. McMullan git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@39963 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- rom/debug/debug_init.c | 6 +++++- rom/debug/debug_intern.h | 4 +++- rom/debug/mmakefile.src | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/rom/debug/debug_init.c b/rom/debug/debug_init.c index 0ac3c91b5a..7a282e0d83 100644 --- a/rom/debug/debug_init.c +++ b/rom/debug/debug_init.c @@ -36,6 +36,10 @@ static int Debug_Init(struct DebugBase *DebugBase) if (!KernelBase) return FALSE; + UtilityBase = OpenLibrary("utility.library", 0); + if (!UtilityBase) + return FALSE; + NEWLIST(&DebugBase->db_Modules); InitSemaphore(&DebugBase->db_ModSem); @@ -50,7 +54,7 @@ static int Debug_Init(struct DebugBase *DebugBase) * and it can read debug information only from there */ if (HostIFace && HostIFace->ModListPtr) - *HostIFace->ModListPtr = &DebugBase->db_Modules; + *HostIFace->ModListPtr = &DebugBase->db_Modules; #endif D(bug("[Debug] Debug_Init() done\n")); diff --git a/rom/debug/debug_intern.h b/rom/debug/debug_intern.h index 9c1913e822..279926cecd 100644 --- a/rom/debug/debug_intern.h +++ b/rom/debug/debug_intern.h @@ -37,7 +37,9 @@ struct DebugBase struct ELF_ModuleInfo *db_KernelModules; struct SignalSemaphore db_ModSem; APTR db_KernelBase; + APTR db_UtilityBase; }; #define DBGBASE(x) ((struct DebugBase *)x) -#define KernelBase DBGBASE(DebugBase)->db_KernelBase +#define KernelBase DBGBASE(DebugBase)->db_KernelBase +#define UtilityBase DBGBASE(DebugBase)->db_UtilityBase diff --git a/rom/debug/mmakefile.src b/rom/debug/mmakefile.src index 7bb40779c7..abb91cfe14 100644 --- a/rom/debug/mmakefile.src +++ b/rom/debug/mmakefile.src @@ -5,12 +5,13 @@ FUNCS := registermodule unregistermodule decodelocation FILES := debug_init STATICFUNCS := kdofmt kgetchar kmaygetchar kputstr _kprintf kvprintf -USER_CFLAGS := -DHOST_OS_$(FAMILY) +USER_CFLAGS := -DHOST_OS_$(FAMILY) -D__UTILITY_NOLIBBASE__ #MM- core-linklibs : kernel-debug-linklib %build_module mmake=kernel-debug \ modname=debug modtype=library \ + uselibs="utility" \ files="$(FILES) $(FUNCS)" linklibfiles=$(STATICFUNCS) uselibs=rom %common -- 2.11.4.GIT