Fix script name in usage and generated year range.
[binutils-gdb.git] / gdb / jit.c
index 4fe2acc2f944043ee9b5d34206bf971d36839717..024c66e7add34c5b2183871e88a95db9da9169d1 100644 (file)
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -893,19 +893,30 @@ jit_breakpoint_re_set_internal (struct gdbarch *gdbarch, program_space *pspace)
 {
   for (objfile *the_objfile : pspace->objfiles ())
     {
+      if (the_objfile->skip_jit_symbol_lookup)
+       continue;
+
       /* Lookup the registration symbol.  If it is missing, then we
         assume we are not attached to a JIT.  */
       bound_minimal_symbol reg_symbol
        = lookup_minimal_symbol (jit_break_name, nullptr, the_objfile);
       if (reg_symbol.minsym == NULL
          || BMSYMBOL_VALUE_ADDRESS (reg_symbol) == 0)
-       continue;
+       {
+         /* No need to repeat the lookup the next time.  */
+         the_objfile->skip_jit_symbol_lookup = true;
+         continue;
+       }
 
       bound_minimal_symbol desc_symbol
        = lookup_minimal_symbol (jit_descriptor_name, NULL, the_objfile);
       if (desc_symbol.minsym == NULL
          || BMSYMBOL_VALUE_ADDRESS (desc_symbol) == 0)
-       continue;
+       {
+         /* No need to repeat the lookup the next time.  */
+         the_objfile->skip_jit_symbol_lookup = true;
+         continue;
+       }
 
       jiter_objfile_data *objf_data
        = get_jiter_objfile_data (reg_symbol.objfile);