This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA]: Modified Watchthreads Patch
- From: Daniel Jacobowitz <drow at false dot org>
- To: Jeff Johnston <jjohnstn at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Fri, 10 Dec 2004 14:10:15 -0500
- Subject: Re: [RFA]: Modified Watchthreads Patch
- References: <41B8E16D.6070505@redhat.com>
On Thu, Dec 09, 2004 at 06:36:13PM -0500, Jeff Johnston wrote:
> The following is a modified version of my thread watchpoint patch from
> October/November. It removes the code I had used to switch between lwp
> ptids and thread ptids now that Daniel's lwp patch is in place. It uses
> the former version of my observer that is linux-specific and is activated
> in attach_thread in linux-thread-db.c. Eli, I renamed the observer as
> asked to indicate this.
>
> I also addressed Ulrich's comments regarding simplifying the S390 code and
> using the s390_fix_watch_points call to actually put the watchpoints on the
> new thread.
>
> Ulrich/Daniel can you take a look to verify everything is in place.
> Daniel, I realize that this touches files that are currently in patch state
> for you. I have no problem waiting for your latest patch to apply and
> retrofitting my changes at check-in if necessary.
>
> As I mentioned before, more is required to get ia64 threaded watchpoints to
> work. For S390, this change allows it to set and recognize threaded
> watchpoints.
Two formatting comments: please replace "linux" in comments with
"GNU/Linux", and please check copyright years on the modified files.
On the technical side, two questions:
1) I can see that it will be a bit of work to rearrange i386-linux to
use this, but it should be doable. Do you know offhand of any
i386-specific problems other than inserting watchpoints for all
threads?
2) What should to_stopped_by_watchpoint do in the presence of multiple
threads? It looks like it relies on inferior_ptid being the thread
which stopped at a watchpoint; I'm worried that that may not be
consistently true in a heavily threaded application. Maybe it should
iterate over all threads.
The to_stopped_data_address has its own problems with threads; but the
case of handling hitting two watchpoints at once, I think, we can leave
for another day.
This is looking very good so far!
--
Daniel Jacobowitz