Fix obvious gotcha in string comparison
[deliverable/binutils-gdb.git] / gdb / exec.c
index 74359711736eedcf07030c2218cff85f41961980..67ecc6363072cdd7b8b00aaa36085b7c2ccf032f 100644 (file)
@@ -152,13 +152,13 @@ exception_print_same (struct gdb_exception e1, struct gdb_exception e2)
 
   return (e1.reason == e2.reason
          && e1.error == e2.error
-         && strcmp (e1.message, e2.message) == 0);
+         && strcmp (msg1, msg2) == 0);
 }
 
 /* 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);
 }
This page took 0.024785 seconds and 4 git commands to generate.