Index: kernel/Makefile
===================================================================
--- kernel/Makefile	(revision b1c8dc0cbdabf4d3aeb9f7f176d5c048406067c5)
+++ kernel/Makefile	(revision e16e0d595cccccd7668bd8111478ac903c1b3be3)
@@ -160,4 +160,5 @@
 	generic/src/ddi/irq.c \
 	generic/src/ddi/device.c \
+	generic/src/debug/symtab.c \
 	generic/src/interrupt/interrupt.c \
 	generic/src/main/main.c \
@@ -226,12 +227,4 @@
 endif
 
-## Kernel symbol information
-#
-
-ifeq ($(CONFIG_SYMTAB),y)
-GENERIC_SOURCES += \
-	generic/src/debug/symtab.c
-endif
-
 ## Udebug interface sources
 #
Index: kernel/arch/amd64/src/debugger.c
===================================================================
--- kernel/arch/amd64/src/debugger.c	(revision b1c8dc0cbdabf4d3aeb9f7f176d5c048406067c5)
+++ kernel/arch/amd64/src/debugger.c	(revision e16e0d595cccccd7668bd8111478ac903c1b3be3)
@@ -44,8 +44,5 @@
 #include <func.h>
 #include <smp/ipi.h>
-
-#ifdef CONFIG_SYMTAB
 #include <symtab.h>
-#endif
 
 typedef struct  {
@@ -234,10 +231,6 @@
 	}
 
-#ifdef CONFIG_SYMTAB
-	printf("Reached breakpoint %d:%lx(%s)\n", slot, getip(istate),
-	    get_symtab_entry(getip(istate)));
-#else
-	printf("Reached breakpoint %d:%lx\n", slot, getip(istate));
-#endif
+	printf("Reached breakpoint %d:%lx (%s)\n", slot, getip(istate),
+	    symtab_fmt_name_lookup(getip(istate)));
 
 #ifdef CONFIG_KCONSOLE
@@ -364,9 +357,6 @@
 	for (i = 0; i < BKPOINTS_MAX; i++)
 		if (breakpoints[i].address) {
-#ifdef CONFIG_SYMTAB
-			symbol = get_symtab_entry(breakpoints[i].address);
-#else
-			symbol = "n/a";
-#endif
+			symbol = symtab_fmt_name_lookup(
+			    breakpoints[i].address);
 
 #ifdef __32_BITS__
Index: kernel/arch/amd64/src/interrupt.c
===================================================================
--- kernel/arch/amd64/src/interrupt.c	(revision b1c8dc0cbdabf4d3aeb9f7f176d5c048406067c5)
+++ kernel/arch/amd64/src/interrupt.c	(revision e16e0d595cccccd7668bd8111478ac903c1b3be3)
@@ -52,8 +52,5 @@
 #include <interrupt.h>
 #include <ddi/irq.h>
-
-#ifdef CONFIG_SYMTAB
 #include <symtab.h>
-#endif
 
 /*
@@ -68,12 +65,6 @@
 {
 	char *symbol;
-/*	uint64_t *x = &istate->stack[0]; */
-
-#ifdef CONFIG_SYMTAB
-	if (!(symbol = get_symtab_entry(istate->rip)))
-		symbol = "";
-#else
-	symbol = "";
-#endif
+
+	symbol = symtab_fmt_name_lookup((istate->rip);
 
 	printf("-----EXCEPTION(%d) OCCURED----- ( %s )\n", n, __func__);
Index: kernel/arch/ia32/src/interrupt.c
===================================================================
--- kernel/arch/ia32/src/interrupt.c	(revision b1c8dc0cbdabf4d3aeb9f7f176d5c048406067c5)
+++ kernel/arch/ia32/src/interrupt.c	(revision e16e0d595cccccd7668bd8111478ac903c1b3be3)
@@ -52,8 +52,5 @@
 #include <interrupt.h>
 #include <ddi/irq.h>
-
-#ifdef CONFIG_SYMTAB
 #include <symtab.h>
-#endif
 
 /*
@@ -69,11 +66,5 @@
 	char *symbol;
 
-#ifdef CONFIG_SYMTAB
-	symbol = get_symtab_entry(istate->eip);
-	if (!symbol)
-		symbol = "";
-#else
-	symbol = "";
-#endif
+	symbol = symtab_fmt_name_lookup(istate->eip);
 
 	if (CPU)
Index: kernel/arch/ia64/src/interrupt.c
===================================================================
--- kernel/arch/ia64/src/interrupt.c	(revision b1c8dc0cbdabf4d3aeb9f7f176d5c048406067c5)
+++ kernel/arch/ia64/src/interrupt.c	(revision e16e0d595cccccd7668bd8111478ac903c1b3be3)
@@ -54,8 +54,5 @@
 #include <synch/spinlock.h>
 #include <mm/tlb.h>
-
-#ifdef CONFIG_SYMTAB
 #include <symtab.h>
-#endif
 
 #define VECTORS_64_BUNDLE	20
@@ -141,11 +138,7 @@
 	char *ifa, *iipa, *iip;
 
-#ifdef CONFIG_SYMTAB
-	ifa = get_symtab_entry(istate->cr_ifa);
-	iipa = get_symtab_entry(istate->cr_iipa);
-	iip = get_symtab_entry(istate->cr_iip);
-#else
-	ifa = iipa = iip = "n/a";
-#endif
+	ifa = symtab_fmt_name_lookup(istate->cr_ifa);
+	iipa = symtab_fmt_name_lookup(istate->cr_iipa);
+	iip = symtab_fmt_name_lookup(istate->cr_iip);
 
 	putchar('\n');
Index: kernel/arch/mips32/src/debugger.c
===================================================================
--- kernel/arch/mips32/src/debugger.c	(revision b1c8dc0cbdabf4d3aeb9f7f176d5c048406067c5)
+++ kernel/arch/mips32/src/debugger.c	(revision e16e0d595cccccd7668bd8111478ac903c1b3be3)
@@ -43,8 +43,5 @@
 #include <arch/cp0.h>
 #include <func.h>
-
-#ifdef CONFIG_SYMTAB
 #include <symtab.h>
-#endif
 
 bpinfo_t breakpoints[BKPOINTS_MAX];
@@ -263,10 +260,7 @@
 	for (i = 0; i < BKPOINTS_MAX; i++)
 		if (breakpoints[i].address) {
-#ifdef CONFIG_SYMTAB
-			symbol = get_symtab_entry(breakpoints[i].address);
-#else
-			symbol = "n/a";
-#endif
-			
+			symbol = symtab_fmt_name_lookup(
+			    breakpoints[i].address);
+
 			printf("%-2u %-5d %#10zx %-6s %-7s %-8s %s\n", i,
 			    breakpoints[i].counter, breakpoints[i].address,
@@ -357,10 +351,6 @@
 		
 		if (!(cur->flags & BKPOINT_FUNCCALL)) {
-#ifdef CONFIG_SYMTAB
 			printf("***Breakpoint %d: %p in %s.\n", i, fireaddr,
-			    get_symtab_entry(istate->epc));
-#else
-			printf("***Breakpoint %d: %p.\n", i, fireaddr);
-#endif
+			    symtab_fmt_name_lookup(istate->epc));
 		}
 
@@ -376,10 +366,7 @@
 		cur->flags |= BKPOINT_INPROG;
 	} else {
-#ifdef CONFIG_SYMTAB
-		printf("***Breakpoint %p in %s.\n", fireaddr,
-		       get_symtab_entry(fireaddr));
-#else
-		printf("***Breakpoint %p.\n", fireaddr);	
-#endif
+		printf("***Breakpoint %d: %p in %s.\n", i, fireaddr,
+		    symtab_fmt_name_lookup(fireaddr));
+
 		/* Move on to next instruction */
 		istate->epc += 4;
Index: kernel/arch/mips32/src/exception.c
===================================================================
--- kernel/arch/mips32/src/exception.c	(revision b1c8dc0cbdabf4d3aeb9f7f176d5c048406067c5)
+++ kernel/arch/mips32/src/exception.c	(revision e16e0d595cccccd7668bd8111478ac903c1b3be3)
@@ -47,8 +47,5 @@
 #include <ddi/irq.h>
 #include <arch/debugger.h>
-
-#ifdef CONFIG_SYMTAB
 #include <symtab.h>
-#endif
 
 static char * exctable[] = {
@@ -77,17 +74,11 @@
 static void print_regdump(istate_t *istate)
 {
-	char *pcsymbol = "";
-	char *rasymbol = "";
+	char *pcsymbol, *rasymbol;
 
-#ifdef CONFIG_SYMTAB
-	char *s = get_symtab_entry(istate->epc);
-	if (s)
-		pcsymbol = s;
-	s = get_symtab_entry(istate->ra);
-	if (s)
-		rasymbol = s;
-#endif
-	
-	printf("PC: %#x(%s) RA: %#x(%s), SP(%p)\n", istate->epc, pcsymbol, istate->ra, rasymbol, istate->sp);
+	pcsymbol = symtab_fmt_name_lookup(istate->epc);
+	rasymbol = symtab_fmt_name_lookup(istate->ra);
+
+	printf("PC: %#x(%s) RA: %#x(%s), SP(%p)\n", istate->epc, pcsymbol,
+	    istate->ra, rasymbol, istate->sp);
 }
 
Index: kernel/arch/mips32/src/mm/tlb.c
===================================================================
--- kernel/arch/mips32/src/mm/tlb.c	(revision b1c8dc0cbdabf4d3aeb9f7f176d5c048406067c5)
+++ kernel/arch/mips32/src/mm/tlb.c	(revision e16e0d595cccccd7668bd8111478ac903c1b3be3)
@@ -46,8 +46,5 @@
 #include <align.h>
 #include <interrupt.h>
-
-#ifdef CONFIG_SYMTAB
 #include <symtab.h>
-#endif
 
 static void tlb_refill_fail(istate_t *);
@@ -324,19 +321,12 @@
 void tlb_refill_fail(istate_t *istate)
 {
-	char *symbol = "";
-	char *sym2 = "";
-
-#ifdef CONFIG_SYMTAB
-	char *s = get_symtab_entry(istate->epc);
-	if (s)
-		symbol = s;
-	s = get_symtab_entry(istate->ra);
-	if (s)
-		sym2 = s;
-#endif
-
+	char *symbol, *sym2;
+
+	symbol = symtab_fmt_name_lookup(istate->epc);
+	sym2 = symtab_fmt_name_lookup(istate->ra);
+	
 	fault_if_from_uspace(istate, "TLB Refill Exception on %p.",
 	    cp0_badvaddr_read());
-	panic("%x: TLB Refill Exception at %x(%s<-%s).", cp0_badvaddr_read(),
+	panic("%x: TLB Refill Exception at %x (%s<-%s).", cp0_badvaddr_read(),
 	    istate->epc, symbol, sym2);
 }
@@ -345,15 +335,11 @@
 void tlb_invalid_fail(istate_t *istate)
 {
-	char *symbol = "";
-
-#ifdef CONFIG_SYMTAB
-	char *s = get_symtab_entry(istate->epc);
-	if (s)
-		symbol = s;
-#endif
+	char *symbol;
+
+	symbol = symtab_fmt_name_lookup(istate->epc);
 
 	fault_if_from_uspace(istate, "TLB Invalid Exception on %p.",
 	    cp0_badvaddr_read());
-	panic("%x: TLB Invalid Exception at %x(%s).", cp0_badvaddr_read(),
+	panic("%x: TLB Invalid Exception at %x (%s).", cp0_badvaddr_read(),
 	    istate->epc, symbol);
 }
@@ -361,15 +347,11 @@
 void tlb_modified_fail(istate_t *istate)
 {
-	char *symbol = "";
-
-#ifdef CONFIG_SYMTAB
-	char *s = get_symtab_entry(istate->epc);
-	if (s)
-		symbol = s;
-#endif
+	char *symbol;
+
+	symbol = symtab_fmt_name_lookup(istate->epc);
 
 	fault_if_from_uspace(istate, "TLB Modified Exception on %p.",
 	    cp0_badvaddr_read());
-	panic("%x: TLB Modified Exception at %x(%s).", cp0_badvaddr_read(),
+	panic("%x: TLB Modified Exception at %x (%s).", cp0_badvaddr_read(),
 	    istate->epc, symbol);
 }
Index: kernel/arch/ppc32/src/mm/tlb.c
===================================================================
--- kernel/arch/ppc32/src/mm/tlb.c	(revision b1c8dc0cbdabf4d3aeb9f7f176d5c048406067c5)
+++ kernel/arch/ppc32/src/mm/tlb.c	(revision e16e0d595cccccd7668bd8111478ac903c1b3be3)
@@ -41,8 +41,5 @@
 #include <print.h>
 #include <macros.h>
-
-#ifdef CONFIG_SYMTAB
 #include <symtab.h>
-#endif
 
 static unsigned int seed = 10;
@@ -121,15 +118,9 @@
 static void pht_refill_fail(uintptr_t badvaddr, istate_t *istate)
 {
-	char *symbol = "";
-	char *sym2 = "";
-
-#ifdef CONFIG_SYMTAB
-	char *str = get_symtab_entry(istate->pc);
-	if (str)
-		symbol = str;
-	str = get_symtab_entry(istate->lr);
-	if (str)
-		sym2 = str;
-#endif
+	char *symbol;
+	char *sym2;
+
+	symbol = symtab_fmt_name_lookup(istate->pc);
+	sym2 = symtab_fmt_name_lookup(istate->lr);
 
 	fault_if_from_uspace(istate,
Index: kernel/arch/sparc64/src/trap/exception.c
===================================================================
--- kernel/arch/sparc64/src/trap/exception.c	(revision b1c8dc0cbdabf4d3aeb9f7f176d5c048406067c5)
+++ kernel/arch/sparc64/src/trap/exception.c	(revision e16e0d595cccccd7668bd8111478ac903c1b3be3)
@@ -42,8 +42,5 @@
 #include <debug.h>
 #include <print.h>
-
-#ifdef CONFIG_SYMTAB
 #include <symtab.h>
-#endif
 
 void dump_istate(istate_t *istate)
@@ -51,10 +48,7 @@
 	char *tpcs, *tnpcs;
 
-#ifdef CONFIG_SYMTAB
-	tpcs = get_symtab_entry(istate->tpc);
-	tnpcs = get_symtab_entry(istate->tnpc);
-#else
-	tpcs = tnpcs = "n/a";
-#endif
+	tpcs = symtab_fmt_name_lookup(istate->tpc);
+	tnpcs = symtab_fmt_name_lookup(istate->tnpc);
+
 	printf("TSTATE=%#" PRIx64 "\n", istate->tstate);
 	printf("TPC=%#" PRIx64 " (%s)\n", istate->tpc, tpcs);
Index: kernel/generic/include/symtab.h
===================================================================
--- kernel/generic/include/symtab.h	(revision b1c8dc0cbdabf4d3aeb9f7f176d5c048406067c5)
+++ kernel/generic/include/symtab.h	(revision e16e0d595cccccd7668bd8111478ac903c1b3be3)
@@ -45,8 +45,11 @@
 };
 
-extern char * get_symtab_entry(unative_t addr);
-extern uintptr_t get_symbol_addr(const char *name);
+extern int symtab_name_lookup(unative_t addr, char **name);
+extern char *symtab_fmt_name_lookup(unative_t addr);
+extern int symtab_addr_lookup(const char *name, uintptr_t *addr);
 extern void symtab_print_search(const char *name);
 extern int symtab_compl(char *name);
+
+#ifdef CONFIG_SYMTAB
 
 /* Symtable linked together by build process */
@@ -55,4 +58,6 @@
 #endif
 
+#endif
+
 /** @}
  */
Index: kernel/generic/src/console/cmd.c
===================================================================
--- kernel/generic/src/console/cmd.c	(revision b1c8dc0cbdabf4d3aeb9f7f176d5c048406067c5)
+++ kernel/generic/src/console/cmd.c	(revision e16e0d595cccccd7668bd8111478ac903c1b3be3)
@@ -65,8 +65,6 @@
 #include <ipc/ipc.h>
 #include <ipc/irq.h>
-
-#ifdef CONFIG_SYMTAB
 #include <symtab.h>
-#endif
+#include <errno.h>
 
 #ifdef CONFIG_TEST
@@ -171,5 +169,4 @@
 };
 
-#ifdef CONFIG_SYMTAB
 /* Data and methods for 'symaddr' command. */
 static int cmd_symaddr(cmd_arg_t *argv);
@@ -187,5 +184,4 @@
 	.argv = &symaddr_argv
 };
-#endif
 
 static char set_buf[MAX_CMDLINE+1];
@@ -464,7 +460,5 @@
 	&set4_info,
 	&slabs_info,
-#ifdef CONFIG_SYMTAB
 	&symaddr_info,
-#endif
 	&sched_info,
 	&threads_info,
@@ -613,6 +607,4 @@
 }
 
-#ifdef CONFIG_SYMTAB
-
 /** Search symbol table */
 int cmd_symaddr(cmd_arg_t *argv)
@@ -623,26 +615,29 @@
 }
 
-#endif
-
 /** Call function with zero parameters */
 int cmd_call0(cmd_arg_t *argv)
 {
-#ifdef CONFIG_SYMTAB
 	uintptr_t symaddr;
+	char *symbol;
 	unative_t (*fnc)(void);
 	fncptr_t fptr;
-
-	symaddr = get_symbol_addr((char *) argv->buffer);
-	if (!symaddr)
-		printf("Symbol %s not found.\n", argv->buffer);
-	else if (symaddr == (uintptr_t) -1) {
-		symtab_print_search((char *) argv->buffer);
+	int rc;
+
+	symbol = (char *) argv->buffer;
+	rc = symtab_addr_lookup(symbol, &symaddr);
+
+	if (rc == ENOENT)
+		printf("Symbol %s not found.\n", symbol);
+	else if (rc == EOVERFLOW) {
+		symtab_print_search(symbol);
 		printf("Duplicate symbol, be more specific.\n");
+	} else if (rc == EOK) {
+		fnc = (unative_t (*)(void)) arch_construct_function(&fptr,
+		    (void *) symaddr, (void *) cmd_call0);
+		printf("Calling %s() (%p)\n", symbol, symaddr);
+		printf("Result: %#" PRIxn "\n", fnc());
 	} else {
-		fnc = (unative_t (*)(void)) arch_construct_function(&fptr, (void *) symaddr, (void *) cmd_call0);
-		printf("Calling %s() (%p)\n", argv->buffer, symaddr);
-		printf("Result: %#" PRIxn "\n", fnc());
-	}
-#endif
+		printf("No symbol information available.\n");
+	}
 	return 1;
 }
@@ -680,5 +675,4 @@
 int cmd_call1(cmd_arg_t *argv)
 {
-#ifdef CONFIG_SYMTAB
 	uintptr_t symaddr;
 	char *symbol;
@@ -686,19 +680,22 @@
 	unative_t arg1 = argv[1].intval;
 	fncptr_t fptr;
-	
-	symaddr = get_symbol_addr((char *) argv->buffer);
-
-	if (!symaddr)
-		printf("Symbol %s not found.\n", argv->buffer);
-	else if (symaddr == (uintptr_t) -1) {
-		symtab_print_search((char *) argv->buffer);
+	int rc;
+
+	symbol = (char *) argv->buffer;
+	rc = symtab_addr_lookup(symbol, &symaddr);
+
+	if (rc == ENOENT) {
+		printf("Symbol %s not found.\n", symbol);
+	} else if (rc == EOVERFLOW) {
+		symtab_print_search(symbol);
 		printf("Duplicate symbol, be more specific.\n");
-	} else {
-		symbol = get_symtab_entry(symaddr);
+	} else if (rc == EOK) {
 		fnc = (unative_t (*)(unative_t, ...)) arch_construct_function(&fptr, (void *) symaddr, (void *) cmd_call1);
 		printf("Calling f(%#" PRIxn "): %p: %s\n", arg1, symaddr, symbol);
 		printf("Result: %#" PRIxn "\n", fnc(arg1));
-	}
-#endif
+	} else {
+		printf("No symbol information available.\n");
+	}
+
 	return 1;
 }
@@ -707,5 +704,4 @@
 int cmd_call2(cmd_arg_t *argv)
 {
-#ifdef CONFIG_SYMTAB
 	uintptr_t symaddr;
 	char *symbol;
@@ -714,19 +710,22 @@
 	unative_t arg2 = argv[2].intval;
 	fncptr_t fptr;
-	
-	symaddr = get_symbol_addr((char *) argv->buffer);
-	if (!symaddr)
-		printf("Symbol %s not found.\n", argv->buffer);
-	else if (symaddr == (uintptr_t) -1) {
-		symtab_print_search((char *) argv->buffer);
+	int rc;
+
+	symbol = (char *) argv->buffer;
+	rc = symtab_addr_lookup(symbol, &symaddr);
+
+	if (rc == ENOENT) {
+		printf("Symbol %s not found.\n", symbol);
+	} else if (rc == EOVERFLOW) {
+		symtab_print_search(symbol);
 		printf("Duplicate symbol, be more specific.\n");
-	} else {
-		symbol = get_symtab_entry(symaddr);
+	} else if (rc == EOK) {
 		fnc = (unative_t (*)(unative_t, unative_t, ...)) arch_construct_function(&fptr, (void *) symaddr, (void *) cmd_call2);
 		printf("Calling f(%#" PRIxn ", %#" PRIxn "): %p: %s\n", 
 		       arg1, arg2, symaddr, symbol);
 		printf("Result: %#" PRIxn "\n", fnc(arg1, arg2));
-	}	
-#endif
+	} else {
+		printf("No symbol information available.\n");
+	}
 	return 1;
 }
@@ -735,5 +734,4 @@
 int cmd_call3(cmd_arg_t *argv)
 {
-#ifdef CONFIG_SYMTAB
 	uintptr_t symaddr;
 	char *symbol;
@@ -743,19 +741,22 @@
 	unative_t arg3 = argv[3].intval;
 	fncptr_t fptr;
-	
-	symaddr = get_symbol_addr((char *) argv->buffer);
-	if (!symaddr)
-		printf("Symbol %s not found.\n", argv->buffer);
-	else if (symaddr == (uintptr_t) -1) {
-		symtab_print_search((char *) argv->buffer);
+	int rc;
+	
+	symbol = (char *) argv->buffer;
+	rc = symtab_addr_lookup(symbol, &symaddr);
+
+	if (rc == ENOENT) {
+		printf("Symbol %s not found.\n", symbol);
+	} else if (rc == EOVERFLOW) {
+		symtab_print_search(symbol);
 		printf("Duplicate symbol, be more specific.\n");
-	} else {
-		symbol = get_symtab_entry(symaddr);
+	} else if (rc == EOK) {
 		fnc = (unative_t (*)(unative_t, unative_t, unative_t, ...)) arch_construct_function(&fptr, (void *) symaddr, (void *) cmd_call3);
 		printf("Calling f(%#" PRIxn ",%#" PRIxn ", %#" PRIxn "): %p: %s\n", 
 		       arg1, arg2, arg3, symaddr, symbol);
 		printf("Result: %#" PRIxn "\n", fnc(arg1, arg2, arg3));
-	}
-#endif
+	} else {
+		printf("No symbol information available.\n");
+	}
 	return 1;
 }
@@ -807,39 +808,32 @@
 int cmd_set4(cmd_arg_t *argv)
 {
-	uint32_t *addr;
+	uintptr_t addr;
 	uint32_t arg1 = argv[1].intval;
 	bool pointer = false;
+	int rc;
 
 	if (((char *)argv->buffer)[0] == '*') {
-#ifdef CONFIG_SYMTAB
-		addr = (uint32_t *) get_symbol_addr((char *) argv->buffer + 1);
-#else
-		addr = 0;
-#endif
+		rc = symtab_addr_lookup((char *) argv->buffer + 1, &addr);
 		pointer = true;
 	} else if (((char *) argv->buffer)[0] >= '0' && 
 		   ((char *)argv->buffer)[0] <= '9') {
-		addr = (uint32_t *)atoi((char *)argv->buffer);
+		rc = EOK;
+		addr = atoi((char *)argv->buffer);
 	} else {
-#ifdef CONFIG_SYMTAB
-		addr = (uint32_t *)get_symbol_addr((char *) argv->buffer);
-#else
-		addr = 0;
-#endif
-	}
-
-	if (!addr)
+		rc = symtab_addr_lookup((char *) argv->buffer, &addr);
+	}
+
+	if (rc == ENOENT)
 		printf("Symbol %s not found.\n", argv->buffer);
-	else if (addr == (uint32_t *) -1) {
-#ifdef CONFIG_SYMTAB
+	else if (rc == EOVERFLOW) {
 		symtab_print_search((char *) argv->buffer);
-#endif
 		printf("Duplicate symbol, be more specific.\n");
+	} else if (rc == EOK) {
+		if (pointer)
+			addr = *(uintptr_t *) addr;
+		printf("Writing %#" PRIx64 " -> %p\n", arg1, addr);
+		*(uint32_t *) addr = arg1;
 	} else {
-		if (pointer)
-			addr = (uint32_t *)(*(unative_t *)addr);
-		printf("Writing %#" PRIx64 " -> %p\n", arg1, addr);
-		*addr = arg1;
-		
+		printf("No symbol information available.\n");
 	}
 	
Index: kernel/generic/src/console/kconsole.c
===================================================================
--- kernel/generic/src/console/kconsole.c	(revision b1c8dc0cbdabf4d3aeb9f7f176d5c048406067c5)
+++ kernel/generic/src/console/kconsole.c	(revision e16e0d595cccccd7668bd8111478ac903c1b3be3)
@@ -54,8 +54,6 @@
 #include <sysinfo/sysinfo.h>
 #include <ddi/device.h>
-
-#ifdef CONFIG_SYMTAB
 #include <symtab.h>
-#endif
+#include <errno.h>
 
 /** Simple kernel console.
@@ -350,9 +348,5 @@
 				found = cmdtab_compl(tmp);
 			} else { /* Symtab completion */
-#ifdef CONFIG_SYMTAB
 				found = symtab_compl(tmp);
-#else
-				found = 0;
-#endif
 			}
 
@@ -525,8 +519,7 @@
 	bool isaddr = false;
 	bool isptr = false;
-
-#ifdef CONFIG_SYMTAB
+	int rc;
+
 	static char symname[MAX_SYMBOL_NAME];
-#endif
 	
 	/* If we get a name, try to find it in symbol table */
@@ -541,19 +534,19 @@
 	}
 	if (text[0] < '0' || text[0] > '9') {
-#ifdef CONFIG_SYMTAB
 		strncpy(symname, text, min(len + 1, MAX_SYMBOL_NAME));
-		symaddr = get_symbol_addr(symname);
-		if (!symaddr) {
+		rc = symtab_addr_lookup(symname, &symaddr);
+		switch (rc) {
+		case ENOENT:
 			printf("Symbol %s not found.\n", symname);
 			return -1;
-		}
-		if (symaddr == (uintptr_t) -1) {
+		case EOVERFLOW:
 			printf("Duplicate symbol %s.\n", symname);
 			symtab_print_search(symname);
 			return -1;
-		}
-#else
-		symaddr = 0;
-#endif
+		default:
+			printf("No symbol information available.\n");
+			return -1;
+		}
+
 		if (isaddr)
 			*result = (unative_t)symaddr;
Index: kernel/generic/src/debug/symtab.c
===================================================================
--- kernel/generic/src/debug/symtab.c	(revision b1c8dc0cbdabf4d3aeb9f7f176d5c048406067c5)
+++ kernel/generic/src/debug/symtab.c	(revision e16e0d595cccccd7668bd8111478ac903c1b3be3)
@@ -42,16 +42,17 @@
 #include <arch/types.h>
 #include <typedefs.h>
-
-/** Return entry that seems most likely to correspond to argument.
- *
- * Return entry that seems most likely to correspond
- * to address passed in the argument.
- *
- * @param addr Address.
- *
- * @return Pointer to respective symbol string on success, NULL otherwise.
- */
-char * get_symtab_entry(unative_t addr)
-{
+#include <errno.h>
+
+/** Get name of symbol that seems most likely to correspond to address.
+ *
+ * @param addr	Address.
+ * @param name	Place to store pointer to the symbol name.
+ *
+ * @return	Zero on success or negative error code, ENOENT if not found,
+ *		ENOTSUP if symbol table not available.
+ */
+int symtab_name_lookup(unative_t addr, char **name)
+{
+#ifdef CONFIG_SYMTAB
 	count_t i;
 
@@ -60,8 +61,41 @@
 			break;
 	}
-	if (addr >= uint64_t_le2host(symbol_table[i - 1].address_le))
-		return symbol_table[i - 1].symbol_name;
-	return NULL;
-}
+	if (addr >= uint64_t_le2host(symbol_table[i - 1].address_le)) {
+		*name = symbol_table[i - 1].symbol_name;
+		return EOK;
+	}
+
+	*name = NULL;
+	return ENOENT;
+#else
+	*name = NULL;
+	return ENOTSUP;
+#endif
+}
+
+/** Lookup symbol by address and format for display.
+ *
+ * Returns name of closest corresponding symbol, "Not found" if none exists
+ * or "N/A" if no symbol information is available.
+ *
+ * @param addr	Address.
+ * @param name	Place to store pointer to the symbol name.
+ *
+ * @return	Pointer to a human-readable string.
+ */
+char *symtab_fmt_name_lookup(unative_t addr)
+{
+	int rc;
+	char *name;
+
+	rc = symtab_name_lookup(addr, &name);
+	switch (rc) {
+	case EOK: return name;
+	case ENOENT: return "Not found";
+	default: return "N/A";
+	}
+}
+
+#ifdef CONFIG_SYMTAB
 
 /** Find symbols that match the parameter forward and print them.
@@ -103,15 +137,20 @@
 }
 
+#endif
+
 /** Return address that corresponds to the entry
  *
  * Search symbol table, and if there is one match, return it
  *
- * @param name Name of the symbol
- * @return 0 - Not found, -1 - Duplicate symbol, other - address of symbol
- */
-uintptr_t get_symbol_addr(const char *name)
-{
+ * @param name	Name of the symbol
+ * @param addr	Place to store symbol address
+ *
+ * @return 	Zero on success, ENOENT - not found, EOVERFLOW - duplicate
+ *		symbol, ENOTSUP - no symbol information available.
+ */
+int symtab_addr_lookup(const char *name, uintptr_t *addr)
+{
+#ifdef CONFIG_SYMTAB
 	count_t found = 0;
-	uintptr_t addr = NULL;
 	char *hint;
 	int i;
@@ -120,5 +159,5 @@
 	while ((hint = symtab_search_one(name, &i))) {
 		if (!strlen(hint)) {
-			addr =  uint64_t_le2host(symbol_table[i].address_le);
+			*addr =  uint64_t_le2host(symbol_table[i].address_le);
 			found++;
 		}
@@ -126,6 +165,11 @@
 	}
 	if (found > 1)
-		return ((uintptr_t) -1);
-	return addr;
+		return EOVERFLOW;
+	if (found < 1)
+		return ENOENT;
+	return EOK;
+#else
+	return ENOTSUP;
+#endif
 }
 
@@ -133,4 +177,5 @@
 void symtab_print_search(const char *name)
 {
+#ifdef CONFIG_SYMTAB
 	int i;
 	uintptr_t addr;
@@ -145,4 +190,7 @@
 		i++;
 	}
+#else
+	printf("No symbol information available.\n");
+#endif
 }
 
@@ -154,4 +202,5 @@
 int symtab_compl(char *input)
 {
+#ifdef CONFIG_SYMTAB
 	char output[MAX_SYMBOL_NAME + 1];
 	int startpos = 0;
@@ -197,5 +246,7 @@
 	strncpy(input, output, MAX_SYMBOL_NAME);
 	return found;
-	
+#else
+	return 0;
+#endif
 }
 
Index: kernel/generic/src/interrupt/interrupt.c
===================================================================
--- kernel/generic/src/interrupt/interrupt.c	(revision b1c8dc0cbdabf4d3aeb9f7f176d5c048406067c5)
+++ kernel/generic/src/interrupt/interrupt.c	(revision e16e0d595cccccd7668bd8111478ac903c1b3be3)
@@ -46,8 +46,5 @@
 #include <panic.h>
 #include <print.h>
-
-#ifdef CONFIG_SYMTAB
 #include <symtab.h>
-#endif
 
 static struct {
@@ -134,11 +131,5 @@
 	
 	for (i = 0; i < IVT_ITEMS; i++) {
-#ifdef CONFIG_SYMTAB
-		symbol = get_symtab_entry((unative_t) exc_table[i].f);
-		if (!symbol)
-			symbol = "not found";
-#else
-		symbol = "n/a";
-#endif
+		symbol = symtab_fmt_name_lookup((unative_t) exc_table[i].f);
 
 #ifdef __32_BITS__
Index: kernel/generic/src/synch/spinlock.c
===================================================================
--- kernel/generic/src/synch/spinlock.c	(revision b1c8dc0cbdabf4d3aeb9f7f176d5c048406067c5)
+++ kernel/generic/src/synch/spinlock.c	(revision e16e0d595cccccd7668bd8111478ac903c1b3be3)
@@ -43,8 +43,5 @@
 #include <print.h>
 #include <debug.h>
-
-#ifdef CONFIG_SYMTAB
 #include <symtab.h>
-#endif
 
 #ifdef CONFIG_FB
@@ -81,7 +78,4 @@
 	count_t i = 0;
 	bool deadlock_reported = false;
-#ifdef CONFIG_SYMTAB
-	char *symbol;
-#endif
 
 	preemption_disable();
@@ -112,12 +106,8 @@
 #endif
 		if (i++ > DEADLOCK_THRESHOLD) {
-			printf("cpu%u: looping on spinlock %" PRIp ":%s, caller=%" PRIp,
-				CPU->id, sl, sl->name, CALLER);
-#ifdef CONFIG_SYMTAB
-			symbol = get_symtab_entry(CALLER);
-			if (symbol)
-				printf("(%s)", symbol);
-#endif
-			printf("\n");
+			printf("cpu%u: looping on spinlock %" PRIp ":%s, "
+			    "caller=%" PRIp "(%s)", CPU->id, sl, sl->name,
+			    CALLER, symtab_fmt_name_lookup(CALLER));
+
 			i = 0;
 			deadlock_reported = true;
