This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: bsd-kvm target, always a thread
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: pedro at codesourcery dot com
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 9 Aug 2008 10:32:57 +0200 (CEST)
- Subject: Re: bsd-kvm target, always a thread
- References: <200808080420.05897.pedro@codesourcery.com>
> From: Pedro Alves <pedro@codesourcery.com>
> Date: Fri, 8 Aug 2008 04:20:04 +0100
>
> Hi,
>
> This patches makes the bsd-kvm target register a main thread.
>
> OK?
Hmm, it is unfortunate that a process ID of 0 is "verboten", since
that's what you are really looking at with "target kvm". And it
should be possible for me to actually make all the running processes
visible as kernel "threads".
I guess your diff is right, although I'd prefer a less arbitrary ptid
to be used. Would something like ptid_build(0, 1, 0) work?
> 2008-08-08 Pedro Alves <pedro@codesourcery.com>
>
> * bsd-kvm.c: Include "gdbthread.h".
> (bsd_kvm_ptid): New.
> (bsd_kvm_open): Add a main thread.
> (bsd_kvm_close): Delete it.
> (bsd_kvm_thread_alive): New.
> (bsd_kvm_pid_to_str): New.
> (bsd_kvm_add_target): Register bsd_kvm_thread_alive and
> bsd_kvm_pid_to_str.