Re: [RFA]: Watchpoints per thread patch

Ulrich Weigand
2004-11-05T11:49:23Z

Jeff Johnston wrote:

> (s390_remove_one_watchpoint): New function.
> (s390_remove_watchpoint_callback): Ditto.
> (s390_remove_watchpoint): Change to iterate through lwps and
> remove the specified watchpoint for each thread.
> (s390_insert_one_watchpoint): New function.
> (s390_insert_watchpoint_callback): Ditto.
> (s390_insert_watchpoint): Change to iterate through lwps and
> insert the specified watchpoint on each thread.

Note that s390_insert/remove_watchpoint simply manipulate a global
data structure holding current watch points; only the routine
s390_fix_watch_points actually changes per-thread kernel state.

So it would appear simpler to only call s390_fix_watch_points
in a per-thread loop, and leave the higher-level functions alone.
(When a new thread attaches, you only need to run s390_fix_watch_points
on the new thread as well.)

Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

--
Dr. Ulrich Weigand
Linux for S/390 Design & Development
IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
Phone: +49-7031/16-3727 --- Email: Ulrich.Weigand@de.ibm.com