This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] Fix compilation failure in hpux-thread.c under HPUX 11.00
- To: gdb-patches at sources dot redhat dot com
- Subject: [RFA] Fix compilation failure in hpux-thread.c under HPUX 11.00
- From: Joel Brobecker <brobecker at act-europe dot fr>
- Date: Thu, 27 Sep 2001 15:53:47 +0200
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