Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@act-europe.fr>
To: gdb-patches@sources.redhat.com
Subject: [RFA] Fix compilation failure in hpux-thread.c under HPUX 11.00
Date: Thu, 27 Sep 2001 06:53:00 -0000	[thread overview]
Message-ID: <20010927155347.F21075@act-europe.fr> (raw)

The GDB build on HPUX-11.00 failed in two places on hpux-thread.c. In
both cases, this is because we tried to assign a pid (a number) inside
a variable of type ptid_t (a struct). This pid needs to be converted
to a ptid_t first, using pid_to_ptid ().

The following patch fixes that, although I haven't had time to test it
at all. I just verified that it compiles. I'm sorry I can't go further
with this, but I'm really time-short at the moment (preparing a trip to
a customer's site next week). It seems obvious enough to be suggested as
is, but if somebody else could try it out for me, that would be
excellent.


2001-09-27  J. Brobecker <brobecker@gnat.com>

        * hpux-thread.c: fix two compilations errors caused by an attempt to
        assign a pid (a number) into a variable of type ptid_t (a struct).
        Convert the pids into ptid_t using pid_to_ptid () first.

<<
Index: hpux-thread.c
===================================================================
RCS file: /cvs/src/src/gdb/hpux-thread.c,v
retrieving revision 1.10
diff -c -3 -p -r1.10 hpux-thread.c
*** hpux-thread.c	2001/05/06 22:22:02	1.10
--- hpux-thread.c	2001/09/27 13:41:05
*************** hpux_thread_wait (ptid_t ptid, struct ta
*** 216,222 ****
  
    rtnval = child_ops.to_wait (ptid, ourstatus);
  
!   rtnval = find_active_thread ();
  
    do_cleanups (old_chain);
  
--- 216,222 ----
  
    rtnval = child_ops.to_wait (ptid, ourstatus);
  
!   rtnval = pid_to_ptid (find_active_thread ());
  
    do_cleanups (old_chain);
  
*************** hpux_thread_create_inferior (char *exec_
*** 445,451 ****
  
        push_target (&hpux_thread_ops);
  
!       inferior_ptid = find_active_thread ();
  
        add_thread (inferior_ptid);
      }
--- 445,451 ----
  
        push_target (&hpux_thread_ops);
  
!       inferior_ptid = pid_to_ptid (find_active_thread ());
  
        add_thread (inferior_ptid);
      }
>>

Thanks.
-- 
Joel


             reply	other threads:[~2001-09-27  6:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-27  6:53 Joel Brobecker [this message]
2001-09-27 10:05 ` Kevin Buettner
2001-09-28 14:31   ` Joel Brobecker
2001-10-01 11:40     ` Kevin Buettner
2001-10-01 12:12       ` Andrew Cagney
2001-10-08 13:50       ` Joel Brobecker

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=20010927155347.F21075@act-europe.fr \
    --to=brobecker@act-europe.fr \
    --cc=gdb-patches@sources.redhat.com \
    /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