This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Patch to add kernel threads support for FreeBSD 6.1
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: fnf at specifix dot com
- Cc: gdb-patches at sources dot redhat dot com, fnf at specifix dot com
- Date: Thu, 8 Feb 2007 22:47:07 +0100 (CET)
- Subject: Re: [RFC] Patch to add kernel threads support for FreeBSD 6.1
- References: <200702061718.47875.fnf@specifix.com>
> From: Fred Fish <fnf@specifix.com>
> 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