* symtab.c (lookup_symtab_1): Use lbasename (NAME) instead of
[deliverable/binutils-gdb.git] / gdb / symtab.c
index 8207eef5c2a2076769b31269b28a9318477d9e96..108ace764d61ac350ef87890f803759226df5aed 100644 (file)
@@ -154,7 +154,7 @@ got_symtab:
 
   /* Now, search for a matching tail (only if name doesn't have any dirs) */
 
-  if (basename (name) == name)
+  if (lbasename (name) == name)
     ALL_SYMTABS (objfile, s)
     {
       if (FILENAME_CMP (basename (s->filename), name) == 0)
@@ -244,7 +244,7 @@ lookup_partial_symtab (char *name)
 
   /* Now, search for a matching tail (only if name doesn't have any dirs) */
 
-  if (basename (name) == name)
+  if (lbasename (name) == name)
     ALL_PSYMTABS (objfile, pst)
     {
       if (FILENAME_CMP (basename (pst->filename), name) == 0)
@@ -2644,9 +2644,17 @@ print_symbol_info (namespace_enum kind, struct symtab *s, struct symbol *sym,
 static void
 print_msymbol_info (struct minimal_symbol *msymbol)
 {
-  printf_filtered ("   %08lx  %s\n",
-                  (unsigned long) SYMBOL_VALUE_ADDRESS (msymbol),
-                  SYMBOL_SOURCE_NAME (msymbol));
+  char *tmp;
+
+  if (TARGET_ADDR_BIT <= 32)
+    tmp = longest_local_hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol)
+                                          & (CORE_ADDR) 0xffffffff,
+                                          "08l");
+  else
+    tmp = longest_local_hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol),
+                                          "016l");
+  printf_filtered ("%s  %s\n",
+                  tmp, SYMBOL_SOURCE_NAME (msymbol));
 }
 
 /* This is the guts of the commands "info functions", "info types", and
This page took 0.024559 seconds and 4 git commands to generate.