Fix OpenBSD build error.

Message ID 20200415192605.135839-1-cbiesinger@chromium.org
State New
Headers show
Series
  • Fix OpenBSD build error.
Related show

Commit Message

Simon Marchi via Gdb-patches April 15, 2020, 7:26 p.m.
From: Kamil Rytarowski <n54@gmx.com>


This was likely introduced by 5b6d1e4fa4fc6827c7b3f0e99ff120dfa14d65d2

gdb/ChangeLog:

2020-04-15  Kamil Rytarowski  <n54@gmx.com>

	* obsd-nat.c (obsd_nat_target::update_thread_list): Pass "this" to
	thread functions.
	(obsd_nat_target::wait): Likewise.

Change-Id: Ib8d11238c55e0ebdbcf127d1f28c9693c785527a
---
 gdb/obsd-nat.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

-- 
2.26.0.110.g2183baf09c-goog

Comments

Simon Marchi via Gdb-patches April 15, 2020, 7:57 p.m. | #1
On Wed, 15 Apr 2020 14:26:05 -0500
cbiesinger--- via Gdb-patches <gdb-patches@sourceware.org> wrote:

> From: Kamil Rytarowski <n54@gmx.com>

> 

> This was likely introduced by 5b6d1e4fa4fc6827c7b3f0e99ff120dfa14d65d2

> 

> gdb/ChangeLog:

> 

> 2020-04-15  Kamil Rytarowski  <n54@gmx.com>

> 

> 	* obsd-nat.c (obsd_nat_target::update_thread_list): Pass "this" to

> 	thread functions.

> 	(obsd_nat_target::wait): Likewise.


LGTM.

Kevin
Simon Marchi via Gdb-patches April 15, 2020, 8 p.m. | #2
On Wed, Apr 15, 2020 at 2:58 PM Kevin Buettner <kevinb@redhat.com> wrote:
>

> On Wed, 15 Apr 2020 14:26:05 -0500

> cbiesinger--- via Gdb-patches <gdb-patches@sourceware.org> wrote:

>

> > From: Kamil Rytarowski <n54@gmx.com>

> >

> > This was likely introduced by 5b6d1e4fa4fc6827c7b3f0e99ff120dfa14d65d2

> >

> > gdb/ChangeLog:

> >

> > 2020-04-15  Kamil Rytarowski  <n54@gmx.com>

> >

> >       * obsd-nat.c (obsd_nat_target::update_thread_list): Pass "this" to

> >       thread functions.

> >       (obsd_nat_target::wait): Likewise.

>

> LGTM.


Thanks, pushed.

Christian

Patch

diff --git a/gdb/obsd-nat.c b/gdb/obsd-nat.c
index faef8ff7d3..b1f3d0b1b4 100644
--- a/gdb/obsd-nat.c
+++ b/gdb/obsd-nat.c
@@ -59,12 +59,12 @@  obsd_nat_target::update_thread_list ()
     {
       ptid_t ptid = ptid_t (pid, pts.pts_tid, 0);
 
-      if (!in_thread_list (ptid))
+      if (!in_thread_list (this, ptid))
 	{
 	  if (inferior_ptid.lwp () == 0)
-	    thread_change_ptid (inferior_ptid, ptid);
+	    thread_change_ptid (this, inferior_ptid, ptid);
 	  else
-	    add_thread (ptid);
+	    add_thread (this, ptid);
 	}
 
       if (ptrace (PT_GET_THREAD_NEXT, pid, (caddr_t)&pts, sizeof pts) == -1)
@@ -147,12 +147,12 @@  obsd_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
 	}
 
       ptid = ptid_t (pid, pe.pe_tid, 0);
-      if (!in_thread_list (ptid))
+      if (!in_thread_list (this, ptid))
 	{
 	  if (inferior_ptid.lwp () == 0)
-	    thread_change_ptid (inferior_ptid, ptid);
+	    thread_change_ptid (this, inferior_ptid, ptid);
 	  else
-	    add_thread (ptid);
+	    add_thread (this, ptid);
 	}
     }