Fix an error in parse_scrolling_args
[deliverable/binutils-gdb.git] / gdb / corelow.c
index a0fab140a149ca5748f2ac410f76accc558c5ee2..c0e5ad12eab012a306bd8ed0406bd64ca44f1bf5 100644 (file)
@@ -42,7 +42,7 @@
 #include "objfiles.h"
 #include "gdb_bfd.h"
 #include "completer.h"
-#include "common/filestuff.h"
+#include "gdbsupport/filestuff.h"
 
 #ifndef O_LARGEFILE
 #define O_LARGEFILE 0
@@ -285,7 +285,7 @@ add_to_thread_list (bfd *abfd, asection *asect, void *reg_sect_arg)
   int core_tid;
   int pid, lwpid;
   asection *reg_sect = (asection *) reg_sect_arg;
-  int fake_pid_p = 0;
+  bool fake_pid_p = false;
   struct inferior *inf;
 
   if (!startswith (bfd_section_name (abfd, asect), ".reg/"))
@@ -296,7 +296,7 @@ add_to_thread_list (bfd *abfd, asection *asect, void *reg_sect_arg)
   pid = bfd_core_file_pid (core_bfd);
   if (pid == 0)
     {
-      fake_pid_p = 1;
+      fake_pid_p = true;
       pid = CORELOW_PID;
     }
 
@@ -466,7 +466,7 @@ core_target_open (const char *arg, int from_tty)
       target_update_thread_list ();
     }
 
-  catch (const gdb_exception_RETURN_MASK_ERROR &except)
+  catch (const gdb_exception_error &except)
     {
       exception_print (gdb_stderr, except);
     }
@@ -520,7 +520,7 @@ core_target_open (const char *arg, int from_tty)
        {
          thread_command (NULL, from_tty);
        }
-      catch (const gdb_exception_RETURN_MASK_ERROR &except)
+      catch (const gdb_exception_error &except)
        {
          exception_print (gdb_stderr, except);
        }
@@ -535,6 +535,8 @@ core_target::detach (inferior *inf, int from_tty)
      'this'.  */
   unpush_target (this);
 
+  /* Clear the register cache and the frame cache.  */
+  registers_changed ();
   reinit_frame_cache ();
   maybe_say_no_core_file_now (from_tty);
 }
This page took 0.027116 seconds and 4 git commands to generate.