]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/exec.c
PR gdb/20609 - attach of JIT-debug-enabled inf 7.11.1 regression
[thirdparty/binutils-gdb.git] / gdb / exec.c
index 74359711736eedcf07030c2218cff85f41961980..d858e996a8de69038b4f39b2572d1753ab0df551 100644 (file)
@@ -158,7 +158,7 @@ exception_print_same (struct gdb_exception e1, struct gdb_exception e2)
 /* See gdbcore.h.  */
 
 void
-exec_file_locate_attach (int pid, int from_tty)
+exec_file_locate_attach (int pid, int defer_bp_reset, int from_tty)
 {
   char *exec_file, *full_exec_path = NULL;
   struct cleanup *old_chain;
@@ -233,6 +233,8 @@ exec_file_locate_attach (int pid, int from_tty)
 
   TRY
     {
+      if (defer_bp_reset)
+       current_inferior ()->symfile_flags |= SYMFILE_DEFER_BP_RESET;
       symbol_file_add_main (full_exec_path, from_tty);
     }
   CATCH (err, RETURN_MASK_ERROR)
@@ -241,6 +243,7 @@ exec_file_locate_attach (int pid, int from_tty)
        warning ("%s", err.message);
     }
   END_CATCH
+  current_inferior ()->symfile_flags &= ~SYMFILE_DEFER_BP_RESET;
 
   do_cleanups (old_chain);
 }