Improve load command's help text
[deliverable/binutils-gdb.git] / bfd / dwarf2.c
index b477d27cfd50f9597f49191ae4a9845df5d319f2..369958765ad4733c506bf65f1f2413d017003cb7 100644 (file)
@@ -2336,9 +2336,15 @@ lookup_address_in_function_table (struct comp_unit *unit,
   bfd_size_type low, high, mid, first;
   struct arange *arange;
 
+  if (number_of_functions == 0)
+    return FALSE;
+
   if (!build_lookup_funcinfo_table (unit))
     return FALSE;
 
+  if (unit->lookup_funcinfo_table[number_of_functions - 1].high_addr < addr)
+    return FALSE;
+  
   /* Find the first function in the lookup table which may contain the
      specified address.  */
   low = 0;
@@ -3915,7 +3921,11 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd,
   msec = find_debug_info (debug_bfd, debug_sections, NULL);
   if (msec == NULL && abfd == debug_bfd)
     {
-      char * debug_filename = bfd_follow_gnu_debuglink (abfd, DEBUGDIR);
+      char * debug_filename;
+
+      debug_filename = bfd_follow_build_id_debuglink (abfd, DEBUGDIR);
+      if (debug_filename == NULL)
+       debug_filename = bfd_follow_gnu_debuglink (abfd, DEBUGDIR);
 
       if (debug_filename == NULL)
        /* No dwarf2 info, and no gnu_debuglink to follow.
This page took 0.023796 seconds and 4 git commands to generate.