This is the mail archive of the
mailing list for the GDB project.
Re: Add base linux native multi-process support.
- From: Tom Tromey <tromey at redhat dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 16 Apr 2009 13:13:22 -0600
- Subject: Re: Add base linux native multi-process support.
- References: <firstname.lastname@example.org>
- Reply-to: tromey at redhat dot com
Pedro> This patch adds base multi-process support to linux native GDB.
Pedro> I've left in a temporary global `linux_multi_process', and an
Pedro> undocumented command "set maint linux-multiprocess", for convenience
Pedro> when working on adding multi-exec support, and testing a multiprocess
Pedro> GDB. This has samed me quite some recompile time. Let me know if
Pedro> you think this is a bad idea.
I think this approach is fine.
Pedro> /* Call CALLBACK with its second argument set to DATA for every LWP in
Pedro> the list. If CALLBACK returns 1 for a particular LWP, return a
Pedro> pointer to the structure describing that LWP immediately.
Pedro> Otherwise return NULL. */
Pedro> struct lwp_info *
Pedro> -iterate_over_lwps (int (*callback) (struct lwp_info *, void *), void *data)
Pedro> +iterate_over_lwps (ptid_t filter,
Pedro> + int (*callback) (struct lwp_info *, void *),
Pedro> + void *data)
Please update the function's comment to explain the new parameter.
Pedro> Index: src/gdb/linux-thread-db.c
After reading Paul's patch and then yours, it occurs to me that the
thread database .so dlopen handle and various function pointers will
have to be per-inferior.