Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: gdb-buildbot@sergiodj.net, gdb-patches@sourceware.org,
	Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Subject: Re: Breakage on builder Solaris11-amd64-m64, revision 080363310650c93ad8e93018bcb6760ba5d32d1c
Date: Fri, 23 Nov 2018 13:34:00 -0000	[thread overview]
Message-ID: <96729b3f-3568-1d41-4bb8-fbe4d037da93@redhat.com> (raw)
In-Reply-To: <E1gPsAZ-0004sf-6z@kwanyin.sergiodj.net>

On 11/22/2018 04:49 PM, gdb-buildbot@sergiodj.net wrote:
> Undefined			first referenced
>  symbol  			    in file
> is_exited(ptid_t)                   procfs.o
> ld: fatal: symbol referencing errors
> collect2: error: ld returned 1 exit status
> gmake[2]: *** [Makefile:1912: gdb] Error 1
> gmake[2]: Leaving directory '/opt/gdb-buildbot/home/solaris11-amd64/solaris11-amd64-m64/build/gdb'
> gmake[1]: *** [Makefile:8792: all-gdb] Error 2
> gmake[1]: Leaving directory '/opt/gdb-buildbot/home/solaris11-amd64/solaris11-amd64-m64/build'
> gmake: *** [Makefile:849: all] Error 2
> ============================

Whoops, sorry about that.  I assume this works, but I haven't tried it.

From a48ec78677f732cc78eeefecc149742eb4ca0624 Mon Sep 17 00:00:00 2001
From: Pedro Alves <palves@redhat.com>
Date: Fri, 23 Nov 2018 13:13:35 +0000
Subject: [PATCH] Fix Solaris build

The recent commit 080363310650 ("Per-inferior thread list, thread
ranges/iterators, down with ALL_THREADS, etc.") removed the
definitions of is_running/is_stopped/is_exited but missed updating a
couple uses of is_exited in Solaris-specific code.

gdb/ChangeLog:
2018-11-23  Pedro Alves  <palves@redhat.com>

	* procfs.c (procfs_notice_thread): Replace uses of
	in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
	* sol-thread.c (sol_thread_target::wait)
	(sol_update_thread_list_callback): Likewise.
---
 gdb/procfs.c     |  3 ++-
 gdb/sol-thread.c | 14 ++++++++------
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/gdb/procfs.c b/gdb/procfs.c
index 0d8f9df966..f82fc83987 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -3133,7 +3133,8 @@ procfs_notice_thread (procinfo *pi, procinfo *thread, void *ptr)
 {
   ptid_t gdb_threadid = ptid_t (pi->pid, thread->tid, 0);
 
-  if (!in_thread_list (gdb_threadid) || is_exited (gdb_threadid))
+  thread_info *thr = find_thread_ptid (gdb_threadid);
+  if (thr == NULL || thr->state == THREAD_EXITED)
     add_thread (gdb_threadid);
 
   return 0;
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index 682302a40b..0a57c4d1a6 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -462,9 +462,11 @@ sol_thread_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
       /* See if we have a new thread.  */
       if (rtnval.tid_p ()
 	  && rtnval != save_ptid
-	  && (!in_thread_list (rtnval)
-	      || is_exited (rtnval)))
-	add_thread (rtnval);
+	{
+	  thread_info *thr = find_thread_ptid (rtnval);
+	  if (thr == NULL || thr->state == THREAD_EXITED)
+	    add_thread (rtnval);
+	}
     }
 
   /* During process initialization, we may get here without the thread
@@ -1035,14 +1037,14 @@ sol_update_thread_list_callback (const td_thrhandle_t *th, void *ignored)
 {
   td_err_e retval;
   td_thrinfo_t ti;
-  ptid_t ptid;
 
   retval = p_td_thr_get_info (th, &ti);
   if (retval != TD_OK)
     return -1;
 
-  ptid = ptid_t (inferior_ptid.pid (), 0, ti.ti_tid);
-  if (!in_thread_list (ptid) || is_exited (ptid))
+  ptid_t ptid = ptid_t (inferior_ptid.pid (), 0, ti.ti_tid);
+  thread_info *thr = find_thread_ptid (ptid);
+  if (thr == NULL || thr->state == THREAD_EXITED)
     add_thread (ptid);
 
   return 0;
-- 
2.14.4


  reply	other threads:[~2018-11-23 13:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-22 16:39 Oh dear. I regret to inform you that commit 080363310650c93ad8e93018bcb6760ba5d32d1c might be unfortunate gdb-buildbot
2018-11-22 16:39 ` Breakage on builder Solaris11-sparcv9-m64, revision 080363310650c93ad8e93018bcb6760ba5d32d1c gdb-buildbot
2018-11-22 16:49 ` Breakage on builder Solaris11-amd64-m64, " gdb-buildbot
2018-11-23 13:34   ` Pedro Alves [this message]
2018-11-23 14:06     ` Sergio Durigan Junior
2018-11-23 14:12       ` Sergio Durigan Junior
2018-11-23 14:16         ` Rainer Orth
2018-11-23 16:39           ` Pedro Alves
2018-11-25 14:55             ` Rainer Orth
2018-11-26 13:26               ` Pedro Alves

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=96729b3f-3568-1d41-4bb8-fbe4d037da93@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-buildbot@sergiodj.net \
    --cc=gdb-patches@sourceware.org \
    --cc=ro@CeBiTec.Uni-Bielefeld.DE \
    /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