public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Arnez <arnez@linux.vnet.ibm.com>
To: gdb-patches@sourceware.org
Cc: Mark Kettenis <kettenis@gnu.org>
Subject: [PATCH 24/26] Drop target method 'fbsd_make_corefile_notes'
Date: Fri, 12 Sep 2014 18:31:00 -0000	[thread overview]
Message-ID: <1410536396-25524-25-git-send-email-arnez@linux.vnet.ibm.com> (raw)
In-Reply-To: <1410536396-25524-1-git-send-email-arnez@linux.vnet.ibm.com>

Now that all users of the target method 'fbsd_make_corefile_notes'
have been converted to the version in fbsd-tdep.c, the old method is
removed.

gdb/ChangeLog:

	* fbsd-nat.c (find_signalled_thread, find_stop_signal)
	(fbsd_collect_regset_section_cb, fbsd_make_corefile_notes):
	Remove.
	* fbsd-nat.h (fbsd_make_corefile_notes): Remove prototype.
---
 gdb/fbsd-nat.c | 76 ----------------------------------------------------------
 gdb/fbsd-nat.h |  6 -----
 2 files changed, 82 deletions(-)

diff --git a/gdb/fbsd-nat.c b/gdb/fbsd-nat.c
index e9db30e..3bccc77 100644
--- a/gdb/fbsd-nat.c
+++ b/gdb/fbsd-nat.c
@@ -137,79 +137,3 @@ fbsd_find_memory_regions (struct target_ops *self,
   do_cleanups (cleanup);
   return 0;
 }
-
-static int
-find_signalled_thread (struct thread_info *info, void *data)
-{
-  if (info->suspend.stop_signal != GDB_SIGNAL_0
-      && ptid_get_pid (info->ptid) == ptid_get_pid (inferior_ptid))
-    return 1;
-
-  return 0;
-}
-
-static enum gdb_signal
-find_stop_signal (void)
-{
-  struct thread_info *info =
-    iterate_over_threads (find_signalled_thread, NULL);
-
-  if (info)
-    return info->suspend.stop_signal;
-  else
-    return GDB_SIGNAL_0;
-}
-
-/* Create appropriate note sections for a corefile, returning them in
-   allocated memory.  */
-
-char *
-fbsd_make_corefile_notes (struct target_ops *self, bfd *obfd, int *note_size)
-{
-  const struct regcache *regcache = get_current_regcache ();
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  gregset_t gregs;
-  fpregset_t fpregs;
-  char *note_data = NULL;
-  Elf_Internal_Ehdr *i_ehdrp;
-  const struct regset *regset;
-  size_t size;
-
-  /* Put a "FreeBSD" label in the ELF header.  */
-  i_ehdrp = elf_elfheader (obfd);
-  i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
-
-  gdb_assert (gdbarch_regset_from_core_section_p (gdbarch));
-
-  size = sizeof gregs;
-  regset = gdbarch_regset_from_core_section (gdbarch, ".reg", size);
-  gdb_assert (regset && regset->collect_regset);
-  regset->collect_regset (regset, regcache, -1, &gregs, size);
-
-  note_data = elfcore_write_prstatus (obfd, note_data, note_size,
-				      ptid_get_pid (inferior_ptid),
-				      find_stop_signal (), &gregs);
-
-  size = sizeof fpregs;
-  regset = gdbarch_regset_from_core_section (gdbarch, ".reg2", size);
-  gdb_assert (regset && regset->collect_regset);
-  regset->collect_regset (regset, regcache, -1, &fpregs, size);
-
-  note_data = elfcore_write_prfpreg (obfd, note_data, note_size,
-				     &fpregs, sizeof (fpregs));
-
-  if (get_exec_file (0))
-    {
-      const char *fname = lbasename (get_exec_file (0));
-      char *psargs = xstrdup (fname);
-
-      if (get_inferior_args ())
-	psargs = reconcat (psargs, psargs, " ", get_inferior_args (),
-			   (char *) NULL);
-
-      note_data = elfcore_write_prpsinfo (obfd, note_data, note_size,
-					  fname, psargs);
-    }
-
-  return note_data;
-}
diff --git a/gdb/fbsd-nat.h b/gdb/fbsd-nat.h
index a3f51d6..531fe4f 100644
--- a/gdb/fbsd-nat.h
+++ b/gdb/fbsd-nat.h
@@ -32,10 +32,4 @@ extern char *fbsd_pid_to_exec_file (struct target_ops *self, int pid);
 extern int fbsd_find_memory_regions (struct target_ops *self,
 				     find_memory_region_ftype func, void *obfd);
 
-/* Create appropriate note sections for a corefile, returning them in
-   allocated memory.  */
-
-extern char *fbsd_make_corefile_notes (struct target_ops *self,
-				       bfd *obfd, int *note_size);
-
 #endif /* fbsd-nat.h */
-- 
1.8.4.2

  parent reply	other threads:[~2014-09-12 18:31 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-12 15:40 [PATCH 00/26] Regset rework Andreas Arnez
2014-09-12 15:40 ` [PATCH 23/26] XTENSA: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections' Andreas Arnez
2014-09-12 15:40 ` [PATCH 22/26] VAX: " Andreas Arnez
2014-09-12 15:40 ` [PATCH 14/26] MIPS: " Andreas Arnez
2014-09-12 15:40 ` [PATCH 05/26] ALPHA: " Andreas Arnez
2014-09-12 15:40 ` [PATCH 26/26] Drop 'regset_from_core_section' gdbarch method Andreas Arnez
2014-09-12 15:40 ` [PATCH 01/26] Replace 'core_regset_sections' by iterator method Andreas Arnez
2014-09-12 15:40 ` [PATCH 07/26] FRV: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections' Andreas Arnez
2014-09-12 15:40 ` [PATCH 13/26] M88K: " Andreas Arnez
2014-09-12 15:40 ` [PATCH 17/26] PPC: " Andreas Arnez
2014-09-12 15:40 ` [PATCH 11/26] M68K: " Andreas Arnez
2014-09-12 15:40 ` [PATCH 12/26] IA64: " Andreas Arnez
2014-09-12 15:40 ` [PATCH 21/26] TILEGX: " Andreas Arnez
2014-09-12 15:40 ` [PATCH 16/26] NIOS2: " Andreas Arnez
2014-09-12 15:40 ` [PATCH 04/26] AARCH64: " Andreas Arnez
2014-09-12 15:40 ` [PATCH 09/26] X86: " Andreas Arnez
2014-09-12 15:40 ` [PATCH 08/26] HPPA: " Andreas Arnez
2014-09-12 15:40 ` [PATCH 19/26] SH: " Andreas Arnez
2014-09-12 15:40 ` [PATCH 03/26] Add multi-arch capable 'fbsd_make_corefile_notes' variant Andreas Arnez
2014-09-12 15:40 ` [PATCH 06/26] ARM: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections' Andreas Arnez
2014-09-12 15:40 ` [PATCH 20/26] SPARC: " Andreas Arnez
2014-09-12 16:14 ` [PATCH 02/26] Add 'regset' parameter to 'iterate_over_regset_sections_cb' Andreas Arnez
2014-09-12 16:15 ` [PATCH 10/26] M32R: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections' Andreas Arnez
2014-09-12 16:17 ` [PATCH 15/26] MN10300: " Andreas Arnez
2014-09-12 16:18 ` [PATCH 18/26] SCORE: " Andreas Arnez
2014-09-12 16:18 ` [PATCH 25/26] Linux targets: drop fall back to target method for 'make_corefile_notes' Andreas Arnez
2014-09-12 16:18 ` [PATCH 24/26] Drop target method 'fbsd_make_corefile_notes' Andreas Arnez
2014-09-12 18:31 ` [PATCH 15/26] MN10300: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections' Andreas Arnez
2014-09-12 18:31 ` Andreas Arnez [this message]
2014-09-12 18:31 ` [PATCH 25/26] Linux targets: drop fall back to target method for 'make_corefile_notes' Andreas Arnez
2014-09-12 18:32 ` [PATCH 02/26] Add 'regset' parameter to 'iterate_over_regset_sections_cb' Andreas Arnez
2014-09-12 18:32 ` [PATCH 18/26] SCORE: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections' Andreas Arnez
2014-09-12 18:32 ` [PATCH 10/26] M32R: " Andreas Arnez
2014-09-22 17:15 ` [PATCH 00/26] Regset rework Ulrich Weigand
2014-09-26 16:20   ` Pedro Alves
2014-09-29 11:22     ` Ulrich Weigand
2014-09-30  7:59       ` Andreas Krebbel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1410536396-25524-25-git-send-email-arnez@linux.vnet.ibm.com \
    --to=arnez@linux.vnet.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kettenis@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).