Index: kernel/generic/src/console/cmd.c
===================================================================
--- kernel/generic/src/console/cmd.c	(revision e2b762ec7955698a156a39c44cbaacd7211758b2)
+++ kernel/generic/src/console/cmd.c	(revision f3f700969f3b6eb1e83490a13926412f32c7bf6c)
@@ -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 e2b762ec7955698a156a39c44cbaacd7211758b2)
+++ kernel/generic/src/console/kconsole.c	(revision f3f700969f3b6eb1e83490a13926412f32c7bf6c)
@@ -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 e2b762ec7955698a156a39c44cbaacd7211758b2)
+++ kernel/generic/src/debug/symtab.c	(revision f3f700969f3b6eb1e83490a13926412f32c7bf6c)
@@ -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 e2b762ec7955698a156a39c44cbaacd7211758b2)
+++ kernel/generic/src/interrupt/interrupt.c	(revision f3f700969f3b6eb1e83490a13926412f32c7bf6c)
@@ -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 e2b762ec7955698a156a39c44cbaacd7211758b2)
+++ kernel/generic/src/synch/spinlock.c	(revision f3f700969f3b6eb1e83490a13926412f32c7bf6c)
@@ -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;
