From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31354 invoked by alias); 8 Feb 2007 21:47:21 -0000 Received: (qmail 31345 invoked by uid 22791); 8 Feb 2007 21:47:21 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO brahms.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 08 Feb 2007 21:47:16 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.0/8.14.0) with ESMTP id l18LlCxD024368; Thu, 8 Feb 2007 22:47:12 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.0/8.14.0/Submit) id l18Ll7NU005756; Thu, 8 Feb 2007 22:47:07 +0100 (CET) Date: Thu, 08 Feb 2007 21:47:00 -0000 Message-Id: <200702082147.l18Ll7NU005756@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: fnf@specifix.com CC: gdb-patches@sources.redhat.com, fnf@specifix.com In-reply-to: <200702061718.47875.fnf@specifix.com> (message from Fred Fish on Tue, 6 Feb 2007 17:18:47 -0700) Subject: Re: [RFC] Patch to add kernel threads support for FreeBSD 6.1 References: <200702061718.47875.fnf@specifix.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-02/txt/msg00106.txt.bz2 > From: Fred Fish > Date: Tue, 6 Feb 2007 17:18:47 -0700 > > This patch adds support for kernel threads on FreeBSD 6.1. There are > obviously some rough edges still, and I'd appreciate feedback from > people with FreeBSD experience and also experience with thread support > in gdb. This looks quite reasonable. A couple of remarks: Can you avoid introducing supply_xxregset()/fill_xxregset() and use register sets instead? Is the child_suppress_run hack really necessary? I thought the right stratum was automatically chosen. > +#define GET_PID(ptid) ptid_get_pid (ptid) > +#define GET_LWP(ptid) ptid_get_lwp (ptid) > +#define GET_THREAD(ptid) ptid_get_tid (ptid) > + > +#define IS_LWP(ptid) (GET_LWP (ptid) != 0) > +#define IS_THREAD(ptid) (GET_THREAD (ptid) != 0) > + > +#define BUILD_LWP(lwp, pid) ptid_build (pid, lwp, 0) > +#define BUILD_THREAD(tid, pid) ptid_build (pid, 0, tid) These days these macros are really pointless and I think they should die (here and elsewhere in the code). Mark