コード例 #1
0
static void
core_close (void)
{
  if (core_bfd)
    {
      int pid = ptid_get_pid (inferior_ptid);
      inferior_ptid = null_ptid;    /* Avoid confusion from thread
				       stuff.  */
      if (pid != 0)
	exit_inferior_silent (pid);

      /* Clear out solib state while the bfd is still open.  See
         comments in clear_solib in solib.c.  */
      clear_solib ();

      if (core_data)
	{
	  xfree (core_data->sections);
	  xfree (core_data);
	  core_data = NULL;
	}

      gdb_bfd_unref (core_bfd);
      core_bfd = NULL;
    }
  core_vec = NULL;
  core_gdbarch = NULL;
}
コード例 #2
0
static void
core_close (int quitting)
{
  char *name;

  if (core_bfd)
    {
      int pid = ptid_get_pid (inferior_ptid);
      inferior_ptid = null_ptid;	/* Avoid confusion from thread stuff */
      exit_inferior_silent (pid);

      /* Clear out solib state while the bfd is still open. See
         comments in clear_solib in solib.c. */
      clear_solib ();

      xfree (core_data->sections);
      xfree (core_data);
      core_data = NULL;
      core_has_fake_pid = 0;

      name = bfd_get_filename (core_bfd);
      gdb_bfd_close_or_warn (core_bfd);
      xfree (name);
      core_bfd = NULL;
    }
  core_vec = NULL;
  core_gdbarch = NULL;
}
コード例 #3
0
ファイル: ctf.c プロジェクト: phausler/binutils
static void
ctf_close (struct target_ops *self)
{
  int pid;

  ctf_destroy ();
  xfree (trace_dirname);
  trace_dirname = NULL;

  pid = ptid_get_pid (inferior_ptid);
  inferior_ptid = null_ptid;	/* Avoid confusion from thread stuff.  */
  exit_inferior_silent (pid);

  trace_reset_local_state ();
}
コード例 #4
0
ファイル: corelow.c プロジェクト: T-J-Teru/binutils-gdb
void
core_target::close ()
{
  if (core_bfd)
    {
      inferior_ptid = null_ptid;    /* Avoid confusion from thread
				       stuff.  */
      exit_inferior_silent (current_inferior ());

      /* Clear out solib state while the bfd is still open.  See
         comments in clear_solib in solib.c.  */
      clear_solib ();

      current_program_space->cbfd.reset (nullptr);
    }

  /* Core targets are heap-allocated (see core_target_open), so here
     we delete ourselves.  */
  delete this;
}