public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: John Baldwin <jhb@FreeBSD.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 1/5] Assume that PT_LWPINFO is always defined on FreeBSD hosts.
Date: Mon, 20 Jul 2020 10:31:32 -0700	[thread overview]
Message-ID: <20200720173136.10514-2-jhb@FreeBSD.org> (raw)
In-Reply-To: <20200720173136.10514-1-jhb@FreeBSD.org>

FreeBSD kernels have included support for this since 5.0 release.
The most recent release without support is 4.11 which was released
in January of 2005.

gdb/ChangeLog:

	* fbsd-nat.c: Assume PT_LWPINFO is always defined.
	* fbsd-nat.h: Likewise.
---
 gdb/ChangeLog  | 5 +++++
 gdb/fbsd-nat.c | 4 ----
 gdb/fbsd-nat.h | 2 --
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fad4608002..687d9aede5 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2020-07-20  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd-nat.c: Assume PT_LWPINFO is always defined.
+	* fbsd-nat.h: Likewise.
+
 2020-07-20  John Baldwin  <jhb@FreeBSD.org>
 
 	* fbsd-tdep.c (fbsd_skip_solib_resolver): New function.
diff --git a/gdb/fbsd-nat.c b/gdb/fbsd-nat.c
index a355ebe438..fc7136a97c 100644
--- a/gdb/fbsd-nat.c
+++ b/gdb/fbsd-nat.c
@@ -831,7 +831,6 @@ fbsd_nat_target::xfer_partial (enum target_object object,
     }
 }
 
-#ifdef PT_LWPINFO
 static bool debug_fbsd_lwp;
 static bool debug_fbsd_nat;
 
@@ -1667,7 +1666,6 @@ fbsd_nat_target::set_syscall_catchpoint (int pid, bool needed,
   return 0;
 }
 #endif
-#endif
 
 bool
 fbsd_nat_target::supports_multi_process ()
@@ -1679,7 +1677,6 @@ void _initialize_fbsd_nat ();
 void
 _initialize_fbsd_nat ()
 {
-#ifdef PT_LWPINFO
   add_setshow_boolean_cmd ("fbsd-lwp", class_maintenance,
 			   &debug_fbsd_lwp, _("\
 Set debugging of FreeBSD lwp module."), _("\
@@ -1696,5 +1693,4 @@ Enables printf debugging output."),
 			   NULL,
 			   &show_fbsd_nat_debug,
 			   &setdebuglist, &showdebuglist);
-#endif
 }
diff --git a/gdb/fbsd-nat.h b/gdb/fbsd-nat.h
index b5a62b9212..b49bf8cbaf 100644
--- a/gdb/fbsd-nat.h
+++ b/gdb/fbsd-nat.h
@@ -49,7 +49,6 @@ class fbsd_nat_target : public inf_ptrace_target
 					ULONGEST offset, ULONGEST len,
 					ULONGEST *xfered_len) override;
 
-#ifdef PT_LWPINFO
   bool thread_alive (ptid_t ptid) override;
   std::string pid_to_str (ptid_t) override;
 
@@ -93,7 +92,6 @@ class fbsd_nat_target : public inf_ptrace_target
   int set_syscall_catchpoint (int, bool, int, gdb::array_view<const int>)
     override;
 #endif
-#endif /* PT_LWPINFO */
 
   bool supports_multi_process () override;
 };
-- 
2.25.1


  reply	other threads:[~2020-07-20 17:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20 17:31 [PATCH 0/5] Remove support for old " John Baldwin
2020-07-20 17:31 ` John Baldwin [this message]
2020-07-20 17:31 ` [PATCH 2/5] Assume KERN_PROC_PATHNAME is present on " John Baldwin
2020-07-21  2:16   ` Simon Marchi
2020-07-22 16:44     ` John Baldwin
2020-07-20 17:31 ` [PATCH 3/5] Assume FreeBSD hosts include support for fetching signal information John Baldwin
2020-07-20 17:31 ` [PATCH 4/5] Require kinfo_get_file and kinfo_get_vmmap for FreeBSD hosts John Baldwin
2020-07-20 17:31 ` [PATCH 5/5] Assume FreeBSD kernels always report exec events John Baldwin
2020-08-03 16:19 ` [PATCH 0/5] Remove support for old FreeBSD hosts John Baldwin
2020-09-10 12:24   ` Simon Marchi
2020-09-10 19:56     ` John Baldwin
2020-09-09 21:19 ` John Baldwin

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=20200720173136.10514-2-jhb@FreeBSD.org \
    --to=jhb@freebsd.org \
    --cc=gdb-patches@sourceware.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).