Index: kernel/generic/src/debug/symtab.c
===================================================================
--- kernel/generic/src/debug/symtab.c	(revision 16da5f8ea9ab37e2cfa254399004c4e82b09001c)
+++ kernel/generic/src/debug/symtab.c	(revision 7e15496b7745942ecb5c1956e833c827d6909d84)
@@ -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
 }
 
