This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA]: Watchpoints per thread patch
- From: "Eli Zaretskii" <eliz at gnu dot org>
- To: Jeff Johnston <jjohnstn at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 20 Oct 2004 06:59:57 +0200
- Subject: Re: [RFA]: Watchpoints per thread patch
- References: <4175A9C9.8040300@redhat.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Tue, 19 Oct 2004 19:56:57 -0400
> From: Jeff Johnston <jjohnstn@redhat.com>
>
> The following patch adds needed support for the ia64 and s390 platforms. For
> these platforms, watchpoints need to be inserted / removed on each thread so as
> to work across all threads.
The patch is fine with me, provided that you take care of the
following minor issues:
> +# Set various watchpoint flags based on host/cpu
> +
> +case "${host}" in
> +ia64-*-*)
> + gdb_host_watchpoints_per_thread=1
This is not very autoconfish, but I guess there's no better way to
test for this, is there?
> +int
> +thread_switch_and_call (int thread_num, int (*callback) (void *), void *args)
IMHO, the name of this function is misleading; a better name would
something like map_threads or apply_to_all_threads.
> +int
> +insert_watchpoints_for_new_thread (struct thread_info *ti)
This function is only neded if WATCHPOINTS_PER_THREAD is defined, so I
think the function's definition itself should be conditioned by
WATCHPOINTS_PER_THREAD.