Assume that PT_LWPINFO is always defined on FreeBSD hosts.
authorJohn Baldwin <jhb@FreeBSD.org>
Wed, 16 Sep 2020 18:40:04 +0000 (11:40 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Wed, 16 Sep 2020 18:40:04 +0000 (11:40 -0700)
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
gdb/fbsd-nat.c
gdb/fbsd-nat.h

index 85c733e203fe968d77181a61236471616a98a4e1..8cfe3491595a5836b969aec837dca020175d1e68 100644 (file)
@@ -1,3 +1,8 @@
+2020-09-16  John Baldwin  <jhb@FreeBSD.org>
+
+       * fbsd-nat.c: Assume PT_LWPINFO is always defined.
+       * fbsd-nat.h: Likewise.
+
 2020-09-16  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>
 
        * breakpoint.c (commands_command_1): Make a copy of the 'arg'
index a355ebe438239e2e16a12949790b568e0ebafe28..fc7136a97c7de995be8332618d2ba4afcdea636d 100644 (file)
@@ -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
 }
index 1b1e043dae72abb80563098ab1695f5a59d1e5cd..ed3c1cdfc51db5bdb98afeb7992ddf47f67ff27e 100644 (file)
@@ -55,7 +55,6 @@ public:
                                        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;
 
@@ -99,7 +98,6 @@ public:
   int set_syscall_catchpoint (int, bool, int, gdb::array_view<const int>)
     override;
 #endif
-#endif /* PT_LWPINFO */
 
   bool supports_multi_process () override;
 };